- Timestamp:
- Oct 3, 2005 2:46:21 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r317 r325 1 1 /* $Id$ */ 2 3 2005-10-03: bird 4 - src/kDepPre/kDepPre.c, kBuild/bin/x86.win32/kDepPre.exe: 5 o Fixed stupid stupid bug in the win32 case correcting code. 6 Rebuilt the win32 binary. 2 7 3 8 2005-08-11: bird -
trunk/src/kDepPre/kDepPre.c
r304 r325 32 32 #ifdef __WIN32__ 33 33 #include <windows.h> 34 #endif 35 36 #ifdef HAVE_FGETC_UNLOCKED 34 #endif 35 36 #ifdef HAVE_FGETC_UNLOCKED 37 37 # define FGETC(s) getc_unlocked(s) 38 38 #else 39 39 # define FGETC(s) fgetc(s) 40 #endif 40 #endif 41 41 42 42 #ifdef NEED_ISBLANK 43 43 # define isblank(ch) ( (unsigned char)(ch) == ' ' || (unsigned char)(ch) == '\t' ) 44 #endif 44 #endif 45 45 46 46 … … 56 56 struct DEP *pNext; 57 57 /** The filename hash. */ 58 unsigned uHash; 58 unsigned uHash; 59 59 /** The length of the filename. */ 60 size_t cchFilename; 60 size_t cchFilename; 61 61 /** The filename. */ 62 62 char szFilename[4]; … … 75 75 * Corrects the case of a path. 76 76 * Expects a fullpath! 77 * 77 * 78 78 * @param pszPath Pointer to the path, both input and output. 79 79 * The buffer must be able to hold one more byte than the string length. … … 90 90 } \ 91 91 } while (0) 92 92 93 93 char *psz = pszPath; 94 94 if (*psz == '/' || *psz == '\\') … … 189 189 } 190 190 191 #endif 191 #endif 192 192 193 193 194 194 /** 195 195 * Prints the dependency chain. 196 * 196 * 197 197 * @returns Pointer to the allocated dependency. 198 198 * @param pOutput Output stream. … … 203 203 for (pDep = g_pDeps; pDep; pDep = pDep->pNext) 204 204 { 205 /* 205 /* 206 206 * Skip some fictive names like <built-in> and <command line>. 207 207 */ … … 214 214 if (_fullpath(szFilename, pDep->szFilename, sizeof(szFilename))) 215 215 w32_fixcase(szFilename); 216 fprintf(pOutput, " \\\n\t%s", szFilename); 217 } 218 #else 216 219 fprintf(pOutput, " \\\n\t%s", pDep->szFilename); 217 } 218 #else 219 fprintf(pOutput, " \\\n\t%s", pDep->szFilename); 220 #endif 220 #endif 221 221 } 222 222 fprintf(pOutput, "\n\n"); … … 249 249 /** 250 250 * Adds a dependency. 251 * 251 * 252 252 * @returns Pointer to the allocated dependency. 253 253 * @param pszFilename The filename. … … 265 265 pDepPrev = NULL; 266 266 for (pDep = g_pDeps; pDep; pDepPrev = pDep, pDep = pDep->pNext) 267 if ( pDep->uHash == uHash 267 if ( pDep->uHash == uHash 268 268 && pDep->cchFilename == cchFilename 269 269 && !memcmp(pDep->szFilename, pszFilename, cchFilename)) … … 300 300 /** 301 301 * Parses the output from a preprocessor of a C-style language. 302 * 302 * 303 303 * @returns 0 on success. 304 304 * @returns 1 or other approriate exit code on failure. … … 307 307 static int ParseCPrecompiler(FILE *pInput) 308 308 { 309 enum 309 enum 310 310 { 311 311 C_DISCOVER = 0, … … 416 416 /* retreive and unescape the filename. */ 417 417 char *psz = &szBuf[0]; 418 while ( (ch = FGETC(pInput)) != EOF 418 while ( (ch = FGETC(pInput)) != EOF 419 419 && psz < &szBuf[sizeof(szBuf) - 1]) 420 420 { … … 432 432 fprintf(stderr, "warning: unknown escape char '%c'\n", ch); 433 433 continue; 434 434 435 435 } 436 436 *psz++ = ch == '\\' ? '/' : ch; … … 443 443 *psz = '\0'; 444 444 /* compare with current dep, add & switch on mismatch. */ 445 if ( !pDep 445 if ( !pDep 446 446 || pDep->cchFilename != cchFilename 447 447 || memcmp(pDep->szFilename, szBuf, cchFilename)) … … 479 479 { 480 480 int i; 481 481 482 482 /* Arguments. */ 483 483 int iExec = 0;
Note:
See TracChangeset
for help on using the changeset viewer.