Changeset 6158 for trunk/tools
- Timestamp:
- Jul 3, 2001, 11:59:56 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/fastdep/fastdep.c
r6141 r6158 1 /* $Id: fastdep.c,v 1.2 8 2001-07-02 18:21:02bird Exp $1 /* $Id: fastdep.c,v 1.29 2001-07-03 21:59:56 bird Exp $ 2 2 * 3 3 * Fast dependents. (Fast = Quick and Dirty!) … … 16 16 #define INCL_DOSERRORS 17 17 #define INCL_FILEMGR 18 #define INCL_DOSMISC 19 18 20 19 21 /* … … 23 25 */ 24 26 #if defined(UNICODE) && !defined(__WIN32OS2__) 25 #define CBNEWLINE (2)27 #define CBNEWLINE (2) 26 28 #else 27 #define CBNEWLINE (1)29 #define CBNEWLINE (1) 28 30 #endif 29 31 32 33 /* 34 * Time stamp size. 35 */ 36 #define TS_SIZE (48) 30 37 31 38 … … 122 129 const char * pszSuperDependency; /* Name for super dependency rule. */ 123 130 BOOL fForceScan; /* Force scan of all files. */ 124 FDATE fDepDate; /* The date which files are to be search from. */125 131 } OPTIONS, *POPTIONS; 126 132 … … 130 136 */ 131 137 typedef int ( _FNLANG) (const char *pszFilename, const char *pszNormFilename, 132 FDATE FileDate, BOOL fHeader);138 const char *pszTS, BOOL fHeader); 133 139 typedef _FNLANG *PFNLANG; 134 140 … … 158 164 char ** papszDep; /* Pointer to an array of pointers to dependants. */ 159 165 BOOL fUpdated; /* If we have updated this entry during current run. */ 166 char szTS[TS_SIZE]; /* Time stamp. */ 160 167 } DEPRULE, *PDEPRULE; 161 168 … … 172 179 *******************************************************************************/ 173 180 static void syntax(void); 174 static int makeDependent(const char *pszFilename, FDATE FileDate);175 176 static int langC_CPP(const char *pszFilename, const char *pszNormFilename, FDATE FileDate, BOOL fHeader);177 static int langAsm( const char *pszFilename, const char *pszNormFilename, FDATE FileDate, BOOL fHeader);178 static int langRC( const char *pszFilename, const char *pszNormFilename, FDATE FileDate, BOOL fHeader);179 static int langCOBOL(const char *pszFilename, const char *pszNormFilename, FDATE FileDate, BOOL fHeader);181 static int makeDependent(const char *pszFilename, const char *pszTS); 182 183 static int langC_CPP(const char *pszFilename, const char *pszNormFilename, const char *pszTS, BOOL fHeader); 184 static int langAsm( const char *pszFilename, const char *pszNormFilename, const char *pszTS, BOOL fHeader); 185 static int langRC( const char *pszFilename, const char *pszNormFilename, const char *pszTS, BOOL fHeader); 186 static int langCOBOL(const char *pszFilename, const char *pszNormFilename, const char *pszTS, BOOL fHeader); 180 187 181 188 … … 230 237 static BOOL depWriteFile(const char *pszFilename); 231 238 static void depRemoveAll(void); 232 static void *depAddRule(const char *pszRulePath, const char *pszName, const char *pszExt, FDATE FileDate);239 static void *depAddRule(const char *pszRulePath, const char *pszName, const char *pszExt, const char *pszTS); 233 240 static BOOL depAddDepend(void *pvRule, const char *pszDep, BOOL fCheckCyclic); 241 static void depMarkNotFound(void *pvRule); 234 242 static BOOL depCheckCyclic(PDEPRULE pdepRule, const char *pszDep); 243 static BOOL depValidate(PDEPRULE pdepRule); 244 INLINE char *depMakeTS(char *pszTS, PFILEFINDBUF3 pfindbuf3); 235 245 236 246 … … 334 344 szExcludeFiles, /* pszExcludeFiles */ 335 345 NULL, /* pszSuperDependency */ 336 FALSE, /* fForceScan */ 337 {1,1,1} /* fDepDate */ 346 FALSE /* fForceScan */ 338 347 }; 339 348 … … 409 418 else 410 419 pszIncludeEnv = ""; 420 421 422 /* 423 * Disable hard errors. 424 */ 425 DosError(FERR_DISABLEHARDERR | FERR_ENABLEEXCEPTION); 411 426 412 427 … … 784 799 char szSource[CCHMAXPATH]; 785 800 BOOL fExcluded; 801 char szTS[TS_SIZE]; 786 802 787 803 /* … … 817 833 * Analyse the file. 818 834 */ 819 rc -= makeDependent(&szSource[0], pfindbuf3->fdateLastWrite); 835 depMakeTS(szTS, pfindbuf3); 836 rc -= makeDependent(&szSource[0], szTS); 820 837 } 821 838 … … 903 920 * @returns 904 921 * @param pszFilename Pointer to source filename. Correct case is assumed! 905 * @param FileDate File date.922 * @param pszTS File time stamp. 906 923 * @status completely implemented. 907 924 * @author knut st. osmundsen 908 925 */ 909 int makeDependent(const char *pszFilename, FDATE FileDate)926 int makeDependent(const char *pszFilename, const char *pszTS) 910 927 { 911 928 int rc = -1; … … 937 954 char szNormFile[CCHMAXPATH]; 938 955 fileNormalize2(pszFilename, szNormFile); 939 rc = (*pCfg->pfn)(pszFilename, &szNormFile[0], FileDate, fHeader);956 rc = (*pCfg->pfn)(pszFilename, &szNormFile[0], pszTS, fHeader); 940 957 } 941 958 else … … 958 975 * @param pszFilename Pointer to source filename. Correct case is assumed! 959 976 * @param pszNormFilename Pointer to normalized source filename. 960 * @par ma FileDate Date of the source file.977 * @param pszTS File time stamp. 961 978 * @parma fHeader True if header file is being scanned. 962 979 * @status completely implemented. … … 964 981 */ 965 982 int langC_CPP(const char *pszFilename, const char *pszNormFilename, 966 FDATE FileDate, BOOL fHeader)983 const char *pszTS, BOOL fHeader) 967 984 { 968 985 void * pvFile; /* Text buffer pointer. */ … … 993 1010 { 994 1011 if (options.fNoObjectPath) 995 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, FileDate);1012 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, pszTS); 996 1013 else 997 1014 pvRule = depAddRule(options.fObjectDir ? … … 1000 1017 fileNameNoExt(pszFilename, szBuffer + CCHMAXPATH), 1001 1018 options.pszObjectExt, 1002 FileDate);1019 pszTS); 1003 1020 1004 1021 if (options.fSrcWhenObj && pvRule) … … 1010 1027 else 1011 1028 pvRule = depAddRule(options.fExcludeAll || pathlistFindFile2(options.pszExclude, pszNormFilename) ? 1012 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, FileDate);1029 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, pszTS); 1013 1030 1014 1031 /* duplicate rule? */ … … 1129 1146 } 1130 1147 else 1148 { 1131 1149 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 1132 1150 pszFilename, iLine, szFullname); 1151 depMarkNotFound(pvRule); 1152 } 1133 1153 } 1134 1154 } … … 1254 1274 * @param pszFilename Pointer to source filename. Correct case is assumed! 1255 1275 * @param pszNormFilename Pointer to normalized source filename. 1256 * @par ma FileDate Date of the source file.1276 * @param pszTS File time stamp. 1257 1277 * @parma fHeader True if header file is being scanned. 1258 1278 * @status completely implemented. … … 1260 1280 */ 1261 1281 int langAsm(const char *pszFilename, const char *pszNormFilename, 1262 FDATE FileDate, BOOL fHeader)1282 const char *pszTS, BOOL fHeader) 1263 1283 { 1264 1284 void * pvFile; /* Text buffer pointer. */ … … 1275 1295 { 1276 1296 if (options.fNoObjectPath) 1277 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, FileDate);1297 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, pszTS); 1278 1298 else 1279 1299 pvRule = depAddRule(options.fObjectDir ? … … 1282 1302 fileNameNoExt(pszFilename, szBuffer + CCHMAXPATH), 1283 1303 options.pszObjectExt, 1284 FileDate);1304 pszTS); 1285 1305 1286 1306 if (options.fSrcWhenObj && pvRule) … … 1292 1312 else 1293 1313 pvRule = depAddRule(options.fExcludeAll || pathlistFindFile2(options.pszExclude, pszNormFilename) ? 1294 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, FileDate);1314 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, pszTS); 1295 1315 1296 1316 /* duplicate rule? */ … … 1371 1391 } 1372 1392 else 1393 { 1373 1394 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 1374 1395 pszFilename, iLine, szFullname); 1396 depMarkNotFound(pvRule); 1397 } 1375 1398 } 1376 1399 } /*while*/ … … 1385 1408 * Generates depend info on this Resource file, these are stored internally 1386 1409 * and written to file later. 1387 * @returns 1388 * 1389 * @param pszFilenamePointer to source filename. Correct case is assumed!1390 * @param pszNormFilenamePointer to normalized source filename.1391 * @par ma FileDate Date of the source file.1410 * @returns 0 on success. 1411 * !0 on error. 1412 * @param pszFilename Pointer to source filename. Correct case is assumed! 1413 * @param pszNormFilename Pointer to normalized source filename. 1414 * @param pszTS File time stamp. 1392 1415 * @parma fHeader True if header file is being scanned. 1393 * @status 1394 * @author 1416 * @status completely implemented. 1417 * @author knut st. osmundsen 1395 1418 */ 1396 1419 #if 0 … … 1410 1433 { 1411 1434 if (options.fNoObjectPath) 1412 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszRsrcExt, FileDate);1435 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszRsrcExt, pszTS); 1413 1436 else 1414 1437 pvRule = depAddRule(options.fObjectDir ? … … 1417 1440 fileNameNoExt(pszFilename, szBuffer + CCHMAXPATH), 1418 1441 options.pszRsrcExt, 1419 FileDate);1442 pszTS); 1420 1443 1421 1444 if (options.fSrcWhenObj && pvRule) … … 1428 1451 pvRule = depAddRule(options.fExcludeAll || pathlistFindFile2(options.pszExclude, pszNormFilename) ? 1429 1452 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, 1430 FileDate);1453 pszTS); 1431 1454 1432 1455 /* duplicate rule? */ … … 1536 1559 } 1537 1560 else 1561 { 1538 1562 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 1539 1563 pszFilename, iLine, szFullname); 1540 } } /*while*/ 1564 depMarkNotFound(pvRule); 1565 } 1566 } 1567 } /*while*/ 1541 1568 1542 1569 textbufferDestroy(pvFile); … … 1545 1572 #else 1546 1573 int langRC(const char *pszFilename, const char *pszNormFilename, 1547 FDATE FileDate, BOOL fHeader)1574 const char *pszTS, BOOL fHeader) 1548 1575 { 1549 1576 void * pvFile; /* Text buffer pointer. */ … … 1574 1601 { 1575 1602 if (options.fNoObjectPath) 1576 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszRsrcExt, FileDate);1603 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszRsrcExt, pszTS); 1577 1604 else 1578 1605 pvRule = depAddRule(options.fObjectDir ? … … 1581 1608 fileNameNoExt(pszFilename, szBuffer + CCHMAXPATH), 1582 1609 options.pszRsrcExt, 1583 FileDate);1610 pszTS); 1584 1611 1585 1612 if (options.fSrcWhenObj && pvRule) … … 1591 1618 else 1592 1619 pvRule = depAddRule(options.fExcludeAll || pathlistFindFile2(options.pszExclude, pszNormFilename) ? 1593 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, FileDate);1620 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, pszTS); 1594 1621 1595 1622 /* duplicate rule? */ … … 1710 1737 } 1711 1738 else 1739 { 1712 1740 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 1713 1741 pszFilename, iLine, szFullname); 1742 depMarkNotFound(pvRule); 1743 } 1714 1744 } 1715 1745 } … … 1840 1870 } 1841 1871 else 1872 { 1842 1873 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 1843 1874 pszFilename, iLine, pszFilename); 1875 depMarkNotFound(pvRule); 1876 } 1844 1877 } 1845 1878 } … … 1897 1930 * @param pszFilename Pointer to source filename. Correct case is assumed! 1898 1931 * @param pszNormFilename Pointer to normalized source filename. 1899 * @par ma FileDate Date of the source file.1932 * @param pszTS File time stamp. 1900 1933 * @parma fHeader True if header file is being scanned. 1901 1934 * @status completely implemented. … … 1903 1936 */ 1904 1937 int langCOBOL(const char *pszFilename, const char *pszNormFilename, 1905 FDATE FileDate, BOOL fHeader)1938 const char *pszTS, BOOL fHeader) 1906 1939 { 1907 1940 void * pvFile; /* Text buffer pointer. */ … … 1918 1951 { 1919 1952 if (options.fNoObjectPath) 1920 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, FileDate);1953 pvRule = depAddRule(fileNameNoExt(pszFilename, szBuffer), NULL, options.pszObjectExt, pszTS); 1921 1954 else 1922 1955 pvRule = depAddRule(options.fObjectDir ? … … 1925 1958 fileNameNoExt(pszFilename, szBuffer + CCHMAXPATH), 1926 1959 options.pszObjectExt, 1927 FileDate);1960 pszTS); 1928 1961 1929 1962 if (options.fSrcWhenObj && pvRule) … … 1935 1968 else 1936 1969 pvRule = depAddRule(options.fExcludeAll || pathlistFindFile2(options.pszExclude, pszNormFilename) ? 1937 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, FileDate);1970 fileName(pszFilename, szBuffer) : pszNormFilename, NULL, NULL, pszTS); 1938 1971 1939 1972 /* duplicate rule? */ … … 2046 2079 } 2047 2080 else 2081 { 2048 2082 fprintf(stderr, "%s(%d): warning include file '%s' not found!\n", 2049 2083 pszFilename, iLine, szFullname); 2084 depMarkNotFound(pvRule); 2085 } 2050 2086 } 2051 2087 } /*while*/ … … 2992 3028 BOOL depReadFile(const char *pszFilename) 2993 3029 { 2994 FILESTATUS3 fst3;2995 3030 void * pvFile; 2996 3031 char * pszNext; 3032 char * pszPrev; /* Previous line, only valid when finding new rule. */ 2997 3033 BOOL fMoreDeps = FALSE; 2998 3034 void * pvRule = NULL; … … 3004 3040 return FALSE; 3005 3041 3006 /* get the filedate and subtract one month from it. */3007 if (!DosQueryPathInfo((PSZ)pszFilename, FIL_STANDARD, &fst3, sizeof(fst3)))3008 {3009 if (fst3.fdateLastWrite.month <= 1)3010 {3011 if (fst3.fdateLastWrite.year != 0)3012 {3013 fst3.fdateLastWrite.month = 12;3014 fst3.fdateLastWrite.year--;3015 }3016 }3017 else3018 fst3.fdateLastWrite.month--;3019 options.fDepDate = fst3.fdateLastWrite;3020 }3021 3022 3042 /* parse the original depend file */ 3043 pszPrev = NULL; 3023 3044 pszNext = pvFile; 3024 3045 while (*pszNext != '\0') … … 3057 3078 3058 3079 if (*psz == '#') 3080 { 3081 pszPrev = psz; 3059 3082 continue; 3083 } 3060 3084 3061 3085 /* new rule? */ 3062 if (!fMoreDeps && *psz != ' ' && *psz != '\t' && *psz != '\0')3086 if (!fMoreDeps) 3063 3087 { 3064 i = 0; 3065 while (psz[i] != '\0') 3066 { 3067 if (psz[i] == ':' 3068 && (psz[i+1] == ' ' 3069 || psz[i+1] == '\t' 3070 || psz[i+1] == '\0' 3071 || (psz[i+1] == '\\' && psz[i+2] == '\0') 3088 if (*psz != ' ' && *psz != '\t' && *psz != '\0') 3089 { 3090 i = 0; 3091 while (psz[i] != '\0') 3092 { 3093 if (psz[i] == ':' 3094 && (psz[i+1] == ' ' 3095 || psz[i+1] == '\t' 3096 || psz[i+1] == '\0' 3097 || (psz[i+1] == '\\' && psz[i+2] == '\0') 3098 ) 3072 3099 ) 3073 ) 3074 { 3075 static FDATE FileDate = {0,0,0}; 3076 char *pszCont = strchr(&psz[i], '\\'); 3077 fMoreDeps = pszCont != NULL && pszCont[1] == '\0'; 3078 3079 psz[i] = '\0'; 3080 pvRule = depAddRule(trimQuotes(trimR(psz)), NULL, NULL, FileDate); 3081 ((PDEPRULE)pvRule)->fUpdated = FALSE; 3082 psz += i + 1; 3083 cch -= i + 1; 3084 break; 3100 { 3101 char szTS[TS_SIZE]; 3102 char * pszCont = strchr(&psz[i], '\\'); 3103 fMoreDeps = pszCont != NULL && pszCont[1] == '\0'; 3104 3105 /* read evt. timestamp. */ 3106 szTS[0] = '\0'; 3107 if (pszPrev && strlen(pszPrev) > 25 && *pszPrev == '#') 3108 strcpy(szTS, pszPrev + 2); 3109 3110 psz[i] = '\0'; 3111 pvRule = depAddRule(trimQuotes(trimR(psz)), NULL, NULL, szTS); 3112 ((PDEPRULE)pvRule)->fUpdated = FALSE; 3113 psz += i + 1; 3114 cch -= i + 1; 3115 break; 3116 } 3117 i++; 3085 3118 } 3086 i++;3087 }3119 } 3120 pszPrev = NULL; 3088 3121 } 3122 3089 3123 3090 3124 /* more dependants */ … … 3195 3229 while (pdep != NULL) 3196 3230 { 3231 int cchTS = strlen(pdep->szTS); 3197 3232 int fQuoted = strpbrk(pdep->pszRule, " \t") != NULL; /* TODO/BUGBUG/FIXME: are there more special chars to look out for?? */ 3198 3233 3199 3234 /* Write rule. Flush the buffer first if necessary. */ 3200 3235 cch = strlen(pdep->pszRule); 3201 if (iBuffer + cch + fQuoted * 2 + 2>= sizeof(szBuffer))3236 if (iBuffer + cch + fQuoted * 2 + cchTS + 9 >= sizeof(szBuffer)) 3202 3237 { 3203 3238 fwrite(szBuffer, iBuffer, 1, phFile); 3204 3239 iBuffer = 0; 3205 3240 } 3241 3242 memcpy(szBuffer + iBuffer, "# ", 2); 3243 memcpy(szBuffer + iBuffer + 2, pdep->szTS, cchTS); 3244 iBuffer += cchTS + 2; 3245 szBuffer[iBuffer++] = '\n'; 3246 3206 3247 if (fQuoted) szBuffer[iBuffer++] = '"'; 3207 3248 strcpy(szBuffer + iBuffer, pdep->pszRule); … … 3301 3342 * NULL if pszRulePath or pszRulePath and pszName contains the entire rule. 3302 3343 */ 3303 void *depAddRule(const char *pszRulePath, const char *pszName, const char *pszExt, FDATE FileDate)3344 void *depAddRule(const char *pszRulePath, const char *pszName, const char *pszExt, const char *pszTS) 3304 3345 { 3305 3346 char szRule[CCHMAXPATH*2]; … … 3337 3378 pNew->cDeps = 0; 3338 3379 pNew->papszDep = NULL; 3380 pNew->fUpdated = TRUE; 3339 3381 pNew->avlCore.Key = pNew->pszRule; 3340 pNew->fUpdated = TRUE;3382 strcpy(pNew->szTS, pszTS); 3341 3383 3342 3384 /* Insert the rule */ … … 3350 3392 * Reuse the node in the tree. 3351 3393 */ 3352 PDEPRULE pOld = (PDEPRULE) AVLGet((PPAVLNODECORE)(void*)&pdepTree, pNew->avlCore.Key);3394 PDEPRULE pOld = (PDEPRULE)(void*)AVLGet((PPAVLNODECORE)(void*)&pdepTree, pNew->avlCore.Key); 3353 3395 assert(pOld); 3354 3396 free(pNew); … … 3357 3399 3358 3400 pOld->fUpdated = TRUE; 3359 if (!options.fForceScan && *(PUSHORT)&FileDate < *(PUSHORT)&options.fDepDate)3401 if (!options.fForceScan && !strcmp(pOld->szTS, pszTS) && depValidate(pOld)) 3360 3402 return NULL; 3403 strcpy(pOld->szTS, pszTS); 3361 3404 3362 3405 if (pOld->papszDep) … … 3427 3470 /* successful! */ 3428 3471 return TRUE; 3472 } 3473 3474 3475 /** 3476 * Marks the file as one which is to be rescanned next time 3477 * since not all dependencies was found... 3478 * @param pvRule Rule handle... 3479 */ 3480 void depMarkNotFound(void *pvRule) 3481 { 3482 ((PDEPRULE)pvRule)->szTS[0] = '\0'; 3429 3483 } 3430 3484 … … 3489 3543 3490 3544 3545 /** 3546 * Validates that the dependencies for the file exists 3547 * in the given locations. Dependants without path is ignored. 3548 * @returns TRUE if all ok. 3549 * FALSE if one (or possibly more) dependants are non-existing. 3550 * @param pdepRule Pointer to rule we're to validate. 3551 */ 3552 BOOL depValidate(PDEPRULE pdepRule) 3553 { 3554 int i; 3555 3556 for (i = 0; i < pdepRule->cDeps; i++) 3557 { 3558 char *psz = pdepRule->papszDep[i]; 3559 if ( psz[1] == ':' 3560 || strchr(psz, '\\') 3561 || strchr(psz, '/') 3562 ) 3563 { 3564 /* 3565 * Check existance of the file. 3566 * Search cache first 3567 */ 3568 if (!filecacheFind(psz)) 3569 { 3570 char szDir[CCHMAXPATH]; 3571 3572 filePathSlash(psz, szDir); 3573 if (!filecacheIsDirCached(szDir)) 3574 { 3575 /* 3576 * If caching of entire dirs are enabled, we'll 3577 * add the directory to the cache and search it. 3578 */ 3579 if (options.fCacheSearchDirs && filecacheAddDir(szDir)) 3580 { 3581 if (!filecacheFind(psz)) 3582 return FALSE; 3583 } 3584 else 3585 { 3586 FILESTATUS3 fsts3; 3587 3588 /* ask the OS */ 3589 if (DosQueryPathInfo(psz, FIL_STANDARD, &fsts3, sizeof(fsts3))) 3590 return FALSE; 3591 /* add file to cache. */ 3592 filecacheAddFile(psz); 3593 } 3594 } 3595 } 3596 } 3597 } 3598 3599 return TRUE; 3600 } 3601 3602 3603 /** 3604 * Make a timestamp from the file data provided thru the 3605 * search API. 3606 * @returns Pointer to pszTS 3607 * @param pszTS Pointer to timestamp (output). 3608 * @param pfindbuf3 Pointer to search result. 3609 */ 3610 INLINE char *depMakeTS(char *pszTS, PFILEFINDBUF3 pfindbuf3) 3611 { 3612 sprintf(pszTS, "%04d-%02d-%02d-%02d.%02d.%02d 0x%04x%04x %d", 3613 pfindbuf3->fdateLastWrite.year + 1980, 3614 pfindbuf3->fdateLastWrite.month, 3615 pfindbuf3->fdateLastWrite.day, 3616 pfindbuf3->ftimeLastWrite.hours, 3617 pfindbuf3->ftimeLastWrite.minutes, 3618 pfindbuf3->ftimeLastWrite.twosecs * 2, 3619 (ULONG)*(PUSHORT)(void*)&pfindbuf3->fdateCreation, 3620 (ULONG)*(PUSHORT)(void*)&pfindbuf3->ftimeCreation, 3621 pfindbuf3->cbFile); 3622 return pszTS; 3623 } 3624 3625 3626 3491 3627 3492 3628
Note:
See TracChangeset
for help on using the changeset viewer.