Integrate Windows search of config files.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@231 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Eric Weddington 2003-02-24 23:13:55 +00:00
parent c21adeb8f1
commit 0f40a804f2
2 changed files with 13 additions and 0 deletions

View File

@ -37,6 +37,8 @@ avrdude_SOURCES = \
avrpart.h \ avrpart.h \
config.c \ config.c \
config.h \ config.h \
confwin.c \
confwin.h \
fileio.c \ fileio.c \
fileio.h \ fileio.h \
linux_ppdev.h \ linux_ppdev.h \

View File

@ -44,6 +44,7 @@
#include "avr.h" #include "avr.h"
#include "config.h" #include "config.h"
#include "confwin.h"
#include "fileio.h" #include "fileio.h"
#include "par.h" #include "par.h"
#include "pindefs.h" #include "pindefs.h"
@ -330,6 +331,14 @@ int main(int argc, char * argv [])
do_cycles = 0; do_cycles = 0;
set_cycles = -1; set_cycles = -1;
#if defined(__CYGWIN__)
win_sys_config_set(sys_config);
win_usr_config_set(usr_config);
#else
strcpy(sys_config, CONFIG_DIR); strcpy(sys_config, CONFIG_DIR);
i = strlen(sys_config); i = strlen(sys_config);
if (i && (sys_config[i-1] != '/')) if (i && (sys_config[i-1] != '/'))
@ -346,6 +355,8 @@ int main(int argc, char * argv [])
strcat(usr_config, ".avrduderc"); strcat(usr_config, ".avrduderc");
} }
#endif
len = strlen(progname) + 2; len = strlen(progname) + 2;
for (i=0; i<len; i++) for (i=0; i<len; i++)
progbuf[i] = ' '; progbuf[i] = ' ';