Changeset 897 for trunk/dll/rename.c
- Timestamp:
- Dec 31, 2007, 12:34:00 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/rename.c
r846 r897 12 12 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 13 13 27 Sep 07 SHL Correct ULONGLONG size formatting 14 30 Dec 07 GKY Use TestFDates for comparing dates 14 15 15 16 ***********************************************************************/ … … 75 76 76 77 FILESTATUS3L fs1, fs2; 77 CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH] ;78 CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH], szCmmaFmtFileSize[81]; 78 79 INT sourceexists = 0, targetexists = 0, 79 80 sourcenewer = 0, sourcesmaller = 0; … … 90 91 WinSetDlgItemText(hwnd, REN_SOURCE, mv->source); 91 92 if (!DosQueryPathInfo(mv->source, FIL_STANDARDL, &fs1, sizeof(fs1))) { 92 // 27 Sep 07 SHL fixme to use CommaFmtULL 93 CommaFmtULL(szCmmaFmtFileSize, 94 sizeof(szCmmaFmtFileSize), fs1.cbFile, ' '); 93 95 sprintf(s, 94 " %s% llu%ss %04u/%02u/%02u %02u:%02u:%02u",96 " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u", 95 97 fs1.attrFile & FILE_DIRECTORY ? 96 98 GetPString(IDS_DIRBRKTTEXT) : NullStr, 97 fs1.cbFile,99 szCmmaFmtFileSize, 98 100 GetPString(IDS_BYTETEXT), 99 101 fs1.fdateLastWrite.year + 1980, … … 117 119 } 118 120 if (!DosQueryPathInfo(chkname, FIL_STANDARDL, &fs2, sizeof(fs2))) { 119 // 27 Sep 07 SHL fixme to use CommaFmtULL 121 CommaFmtULL(szCmmaFmtFileSize, 122 sizeof(szCmmaFmtFileSize), fs2.cbFile, ' '); 120 123 sprintf(s, 121 " %s% llu%ss %04u/%02u/%02u %02u:%02u:%02u",124 " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u", 122 125 fs2.attrFile & FILE_DIRECTORY ? 123 126 GetPString(IDS_DIRBRKTTEXT) : NullStr, 124 fs2.cbFile,127 szCmmaFmtFileSize, 125 128 GetPString(IDS_BYTETEXT), 126 129 fs2.fdateLastWrite.year + 1980, … … 169 172 170 173 if (targetexists == 1 && sourceexists == 1) { 171 sourcenewer = 172 (fs1.fdateLastWrite.year < fs2.fdateLastWrite.year) ? 1 : 173 (fs1.fdateLastWrite.year > fs2.fdateLastWrite.year) ? -1 : 174 (fs1.fdateLastWrite.month < fs2.fdateLastWrite.month) ? 1 : 175 (fs1.fdateLastWrite.month > fs2.fdateLastWrite.month) ? -1 : 176 (fs1.fdateLastWrite.day < fs2.fdateLastWrite.day) ? 1 : 177 (fs1.fdateLastWrite.day > fs2.fdateLastWrite.day) ? -1 : 178 (fs1.ftimeLastWrite.hours < fs2. ftimeLastWrite. hours) ? 1 : 179 (fs1.ftimeLastWrite.hours > fs2.ftimeLastWrite.hours) ? -1 : 180 (fs1.ftimeLastWrite.minutes < fs2.ftimeLastWrite.minutes) ? 1 : 181 (fs1.ftimeLastWrite.minutes > fs2.ftimeLastWrite.minutes) ? -1 : 182 (fs1.ftimeLastWrite.twosecs < fs2.ftimeLastWrite.twosecs) ? 1 : 183 (fs1.ftimeLastWrite.twosecs > fs2.ftimeLastWrite.twosecs) ? -1 : 0; 174 sourcenewer = TestFDates(NULL, NULL, 175 &fs1.fdateLastWrite, &fs1.ftimeLastWrite, 176 &fs2.fdateLastWrite, &fs2.ftimeLastWrite); 184 177 sourcesmaller = (fs1.cbFile < fs2.cbFile) ? -1 : 185 (fs1.cbFile > fs2.cbFile) ? 1 : 186 0; 178 (fs1.cbFile > fs2.cbFile) ? 1 : 0; 187 179 sprintf(&s[strlen(s)], GetPString(IDS_SOURCEISTEXT), 188 180 (sourcenewer == -1) ? GetPString(IDS_NEWERTEXT) :
Note:
See TracChangeset
for help on using the changeset viewer.