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].
Commit
bb7a5a1c4e7eb4d143791fdc5c0a1febd46246d0
Parent
b43740b1f11a4a5…
1 file changed
+8
-2
+8
-2
| --- src/makeheaders.c | ||
| +++ src/makeheaders.c | ||
| @@ -3010,14 +3010,20 @@ | ||
| 3010 | 3010 | char *zSrc; |
| 3011 | 3011 | InFile *pFile; |
| 3012 | 3012 | int i; |
| 3013 | 3013 | |
| 3014 | 3014 | /* |
| 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. | |
| 3016 | 3022 | */ |
| 3017 | 3023 | zSrc = zArg; |
| 3018 | - for(nSrc=0; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){} | |
| 3024 | + for(nSrc=2; zSrc[nSrc] && zArg[nSrc]!=':'; nSrc++){} | |
| 3019 | 3025 | pFile = SafeMalloc( sizeof(InFile) ); |
| 3020 | 3026 | memset(pFile,0,sizeof(InFile)); |
| 3021 | 3027 | pFile->zSrc = StrDup(zSrc,nSrc); |
| 3022 | 3028 | |
| 3023 | 3029 | /* Figure out if we are dealing with C or C++ code. Assume any |
| 3024 | 3030 |
| --- 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 |