Changeset 171 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
May 28, 2005, 7:31:05 PM (20 years ago)
Author:
root
Message:

More large file formatting updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r150 r171  
    1414  24 May 05 SHL Rework Win_Error usage
    1515  25 May 05 SHL Use ULONGLONG and CommaFmtULL
     16  26 May 05 SHL More large file formatting updates
    1617
    1718***********************************************************************/
     
    701702
    702703        FSALLOCATE fsa;
    703         CHAR       s[CCHMAXPATH * 2],tf[81],tb[81],szBuf[81];
     704        CHAR s[CCHMAXPATH * 2];
     705        CHAR tf[64];
     706        CHAR tb[64];
     707        CHAR szFree[64];
    704708
    705709        DosError(FERR_DISABLEHARDERR);
    706710        if(!DosQueryFSInfo(toupper(*dcd->directory) - '@',
    707            FSIL_ALLOC,&fsa,sizeof(FSALLOCATE))) {
    708           strcpy(szBuf,"  {");
    709           CommaFmtULL(szBuf + 3,sizeof(szBuf) - 5,
     711           FSIL_ALLOC,&fsa,sizeof(FSALLOCATE)))
     712        {
     713          CommaFmtULL(tb,sizeof(tb),
    710714                      (ULONGLONG)fsa.cUnitAvail * (fsa.cSectorUnit * fsa.cbSector),
    711715                      'K');
    712           strcat(szBuf,GetPString(IDS_KFREETEXT));
    713           strcat(szBuf,"}");
     716          sprintf(szFree,"  {%s %s}",
     717                  tb,GetPString(IDS_FREETEXT));
    714718        }
    715719        else
    716           *szBuf = 0;
     720          *szFree = 0;
    717721        commafmt(tf,sizeof(tf),dcd->totalfiles);
    718722        CommaFmtULL(tb,sizeof(tb),dcd->ullTotalBytes,' ');
    719         if(!fMoreButtons)
    720           sprintf(s," [%s / %sb]%s%s%s%s %s",tf,tb,
    721                   szBuf,
     723        if (!fMoreButtons)
     724        {
     725          sprintf(s," [%s / %s]%s%s%s%s %s",
     726                  tf,tb,szFree,
    722727                  (*dcd->mask.szMask || dcd->mask.antiattr ||
    723728                   dcd->mask.attrFile != ALLATTRS) ? "  (" : NullStr,
     
    729734                   dcd->mask.attrFile != ALLATTRS) ? ")" : NullStr,
    730735                  dcd->directory);
     736        }
    731737        else
    732           sprintf(s," [%s / %sb]%s %s",tf,tb,szBuf,
    733                   dcd->directory);
    734         if(dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent))
     738        {
     739          sprintf(s," [%s / %s]%s %s",
     740                  tf,tb,szFree,dcd->directory);
     741        }
     742        if (dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent))
    735743          WinSetWindowText(hwndStatus,s);
    736744      }
     
    15361544                if(!fMoreButtons)
    15371545                  sprintf(s,
    1538                           " %sb  %04u/%02u/%02u %02u:%02u:%02u  [%s]  %s",
     1546                          " %s  %04u/%02u/%02u %02u:%02u:%02u  [%s]  %s",
    15391547                          tb,
    15401548                          pci->date.year,
     
    34993507                      if(!fMoreButtons)
    35003508                      {
    3501                         sprintf(s," %sb  %04u/%02u/%02u %02u:%02u:%02u  [%s]  %s",
     3509                        sprintf(s," %s  %04u/%02u/%02u %02u:%02u:%02u  [%s]  %s",
    35023510                                tb,pci->date.year,
    35033511                                pci->date.month,pci->date.day,pci->time.hours,
Note: See TracChangeset for help on using the changeset viewer.