Fossil SCM

Modify makeheaders so that it ignores the ":" character if it is the second character in a command-line argument, thus allowing drive-specifiers on windows filenames. This is related to, but is not a fix for ticket [fa403b6a123659d885e3].

drh 2010-12-23 15:04 trunk
Commit bb7a5a1c4e7eb4d143791fdc5c0a1febd46246d0
1 file changed +8 -2
--- src/makeheaders.c
+++ src/makeheaders.c
@@ -3010,14 +3010,20 @@
30103010
char *zSrc;
30113011
InFile *pFile;
30123012
int i;
30133013
30143014
/*
3015
- ** Get the name of the input file to be scanned
3015
+ ** Get the name of the input file to be scanned. The input file is
3016
+ ** everything before the first ':' or the whole file if no ':' is seen.
3017
+ **
3018
+ ** Except, on windows, ignore any ':' that occurs as the second character
3019
+ ** since it might be part of the drive specifier. So really, the ":' has
3020
+ ** to be the 3rd or later character in the name. This precludes 1-character
3021
+ ** file names, which really should not be a problem.
30163022
*/
30173023
zSrc = zArg;
3018
- for(nSrc=0; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){}
3024
+ for(nSrc=2; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){}
30193025
pFile = SafeMalloc( sizeof(InFile) );
30203026
memset(pFile,0,sizeof(InFile));
30213027
pFile->zSrc = StrDup(zSrc,nSrc);
30223028
30233029
/* Figure out if we are dealing with C or C++ code. Assume any
30243030
--- src/makeheaders.c
+++ src/makeheaders.c
@@ -3010,14 +3010,20 @@
3010 char *zSrc;
3011 InFile *pFile;
3012 int i;
3013
3014 /*
3015 ** Get the name of the input file to be scanned
 
 
 
 
 
 
3016 */
3017 zSrc = zArg;
3018 for(nSrc=0; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){}
3019 pFile = SafeMalloc( sizeof(InFile) );
3020 memset(pFile,0,sizeof(InFile));
3021 pFile->zSrc = StrDup(zSrc,nSrc);
3022
3023 /* Figure out if we are dealing with C or C++ code. Assume any
3024
--- src/makeheaders.c
+++ src/makeheaders.c
@@ -3010,14 +3010,20 @@
3010 char *zSrc;
3011 InFile *pFile;
3012 int i;
3013
3014 /*
3015 ** Get the name of the input file to be scanned. The input file is
3016 ** everything before the first ':' or the whole file if no ':' is seen.
3017 **
3018 ** Except, on windows, ignore any ':' that occurs as the second character
3019 ** since it might be part of the drive specifier. So really, the ":' has
3020 ** to be the 3rd or later character in the name. This precludes 1-character
3021 ** file names, which really should not be a problem.
3022 */
3023 zSrc = zArg;
3024 for(nSrc=2; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){}
3025 pFile = SafeMalloc( sizeof(InFile) );
3026 memset(pFile,0,sizeof(InFile));
3027 pFile->zSrc = StrDup(zSrc,nSrc);
3028
3029 /* Figure out if we are dealing with C or C++ code. Assume any
3030

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button