Changeset 897 for trunk/dll/comp.c


Ignore:
Timestamp:
Dec 31, 2007, 12:34:00 AM (18 years ago)
Author:
Gregg Young
Message:

Use CommaFmtULL for additional file, EA etc sizes display; Modify/Create TestFDates & TestCDates for comparing/sorting files or CNRITEMS by date/time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r888 r897  
    3939  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
    4040  27 Sep 07 SHL Correct ULONGLONG size formatting
     41  30 Dec 07 GKY Use TestCDates for compare by file date/time
    4142
    4243***********************************************************************/
     
    931932      INT numallocl = 0;
    932933      INT numallocr = 0;
     934      INT ret = 0;
    933935      UINT lenl;                        // Directory prefix length
    934936      UINT lenr;
     
    12891291              strcpy(pch, GetPString(IDS_SMALLERTEXT));
    12901292              pch += 7;
    1291             }
    1292             if ((pcil->date.year > pcir->date.year) ? TRUE :
     1293            }
     1294            ret = TestCDates(&pcir->date, &pcir->time,
     1295                             &pcil->date, &pcil->time);
     1296            if (ret == 1)
     1297              /*((pcil->date.year > pcir->date.year) ? TRUE :
    12931298                (pcil->date.year < pcir->date.year) ? FALSE :
    12941299                (pcil->date.month > pcir->date.month) ? TRUE :
     
    13011306                (pcil->time.minutes < pcir->time.minutes) ? FALSE :
    13021307                (pcil->time.seconds > pcir->time.seconds) ? TRUE :
    1303                 (pcil->time.seconds < pcir->time.seconds) ? FALSE : FALSE) {
     1308                (pcil->time.seconds < pcir->time.seconds) ? FALSE : FALSE)*/ {
    13041309              pcil->flags |= CNRITEM_NEWER;
    13051310              pcir->flags |= CNRITEM_OLDER;
     
    13111316              pch += 5;
    13121317            }
    1313             else if ((pcil->date.year < pcir->date.year) ? TRUE :
     1318            else if (ret == -1)
     1319              /*((pcil->date.year < pcir->date.year) ? TRUE :
    13141320                     (pcil->date.year > pcir->date.year) ? FALSE :
    13151321                     (pcil->date.month < pcir->date.month) ? TRUE :
     
    13231329                     (pcil->time.seconds < pcir->time.seconds) ? TRUE :
    13241330                     (pcil->time.seconds > pcir->time.seconds) ? FALSE :
    1325                      FALSE) {
     1331                     FALSE)*/ {
    13261332              pcil->flags |= CNRITEM_OLDER;
    13271333              pcir->flags |= CNRITEM_NEWER;
Note: See TracChangeset for help on using the changeset viewer.