Changeset 859


Ignore:
Timestamp:
Nov 5, 2007, 11:32:39 PM (18 years ago)
Author:
Gregg Young
Message:

Changed display logic so CommaFmtULL is used both with and without large file support for file size display. GiB notation can actually be selected in the source (in addition to being used automatically on very large drives).

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/commafmt.c

    r857 r859  
    9898    ullNumber = (ullNumber + 1023) >> 10;
    9999    chSuffix = 'K';
    100     if (ullNumber >= 1ULL << 31 || (chPreferred == 'M' && ullNumber >= 1024)) {
     100    if (ullNumber >= 1ULL << 31 || (chPreferred == 'M' && ullNumber >= 1024) ||
     101        (chPreferred == 'G' && ullNumber >= 1024)) {
    101102      ullNumber = (ullNumber + 1023) >> 10;
    102103      chSuffix = 'M';
  • trunk/dll/filldir.c

    r857 r859  
    426426
    427427  //comma format the file size for large file support
    428   if(!fNoLargeFileSupport){
     428  {
    429429  CHAR szBuf[30];
    430430    CommaFmtULL(szBuf, sizeof(szBuf), pffb->cbFile, ' ');
     
    646646
    647647  //comma format the file size for large file support
    648 
    649   if(!fNoLargeFileSupport){
    650     CHAR szBuf[30];
     648  {
     649  CHAR szBuf[30];
    651650    CommaFmtULL(szBuf, sizeof(szBuf), pfsa4->cbFile, ' ');
    652651    pci->pszFmtFileSize = xstrdup(szBuf, pszSrcFile, __LINE__);
  • trunk/dll/misc.c

    r856 r859  
    553553    // Fill in column information for the file size
    554554
    555     if(fNoLargeFileSupport) {
    556       pfi = pfi->pNextFieldInfo;
    557       pfi->flData = CFA_ULONG | CFA_RIGHT | CFA_SEPARATOR | CFA_FIREADONLY;
    558       pfi->flTitle = CFA_CENTER;
    559       pfi->pTitleData = GetPString(IDS_SIZE);
    560       pfi->offStruct = FIELDOFFSET(CNRITEM, cbFile);
    561     }
    562     else {
    563       pfi = pfi->pNextFieldInfo;
    564       pfi->flData = CFA_STRING | CFA_RIGHT | CFA_SEPARATOR | CFA_FIREADONLY;
    565       pfi->flTitle = CFA_CENTER;
    566       pfi->pTitleData = GetPString(IDS_SIZE);
    567       pfi->offStruct = FIELDOFFSET(CNRITEM, pszFmtFileSize);
    568     }
     555
     556    pfi = pfi->pNextFieldInfo;
     557    pfi->flData = CFA_STRING | CFA_RIGHT | CFA_SEPARATOR | CFA_FIREADONLY;
     558    pfi->flTitle = CFA_CENTER;
     559    pfi->pTitleData = GetPString(IDS_SIZE);
     560    pfi->offStruct = FIELDOFFSET(CNRITEM, pszFmtFileSize);
     561
    569562
    570563    // Fill in the column information for the file's ea size
Note: See TracChangeset for help on using the changeset viewer.