mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-15 02:01:07 +00:00
Major code cleanup.
- Make all internal functions "static". - Make sure each module's header and implementation file match. - Remove all library-like functionality from main.c, so only the actual frontend remains in main.c. - Add C++ brackets to all header files. That effectively leaves the various module C files as something like an "avrdude library", with main.c being the currently only frontend program for that library. In theory, it should be possible to write different frontends using the same library backend functions though. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@722 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
28
avrdude.h
28
avrdude.h
@@ -30,4 +30,32 @@ extern int ovsigck; /* override signature check (-F) */
|
||||
extern int verbose; /* verbosity level (-v, -vv, ...) */
|
||||
extern int quell_progress; /* quiteness level (-q, -qq) */
|
||||
|
||||
#if defined(WIN32NATIVE)
|
||||
|
||||
#include "ac_cfg.h"
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* usleep replacements */
|
||||
/* sleep Windows in ms, Unix usleep in us
|
||||
#define usleep(us) Sleep((us)<20000?20:us/1000)
|
||||
#define usleep(us) Sleep(us/1000)
|
||||
#define ANTIWARP 3
|
||||
#define usleep(us) Sleep(us/1000*ANTIWARP)
|
||||
*/
|
||||
void usleep(unsigned long us);
|
||||
|
||||
#if !defined(HAVE_GETTIMEOFDAY)
|
||||
struct timezone;
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_GETTIMEOFDAY */
|
||||
|
||||
#endif /* defined(WIN32NATIVE) */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user