Changeset 846


Ignore:
Timestamp:
Sep 27, 2007, 11:16:00 PM (18 years ago)
Author:
Steven Levine
Message:

Correct ULONGLONG size formatting to avoid traps

Location:
trunk/dll
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/autoview.c

    r844 r846  
    2020  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    2121  01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry
     22  27 Sep 07 SHL Correct ULONGLONG size formatting
    2223
    2324***********************************************************************/
     
    464465                          (pffbFile->achName[1] == '.' &&
    465466                           !pffbFile->achName[2]))))) {
     467                    // 27 Sep 07 SHL fixme to use CommaFmtULL
    466468                    sprintf(p,
    467                             "%s%-*.*s  %-8lu  [%s%s%s%s]  %04lu/%02lu/%02lu "
    468                             "%02lu:%02lu:%02lu\r",
    469                             ((pffbFile->attrFile & FILE_DIRECTORY) != 0) ?
    470                             "\\" : " ",
     469                            "%s%-*.*s  %-8llu  [%s%s%s%s]  %04lu/%02lu/%02lu "
     470                              "%02lu:%02lu:%02lu\r",
     471                            pffbFile->attrFile & FILE_DIRECTORY ? "\\" : " ",
    471472                            ml,
    472473                            ml,
    473474                            pffbFile->achName,
    474475                            pffbFile->cbFile +
    475                             CBLIST_TO_EASIZE(pffbFile->cbList),
    476                             ((pffbFile->attrFile & FILE_READONLY) != 0) ?
    477                             "R" : "-",
    478                             ((pffbFile->attrFile & FILE_ARCHIVED) != 0) ?
    479                             "A" : "-",
    480                             ((pffbFile->attrFile & FILE_HIDDEN) != 0) ?
    481                             "H" : "-",
    482                             ((pffbFile->attrFile & FILE_SYSTEM) != 0) ?
    483                             "S" : "-",
     476                              CBLIST_TO_EASIZE(pffbFile->cbList),
     477                            pffbFile->attrFile & FILE_READONLY ? "R" : "-",
     478                            pffbFile->attrFile & FILE_ARCHIVED ? "A" : "-",
     479                            pffbFile->attrFile & FILE_HIDDEN ? "H" : "-",
     480                            pffbFile->attrFile & FILE_SYSTEM ? "S" : "-",
    484481                            pffbFile->fdateLastWrite.year + 1980,
    485482                            pffbFile->fdateLastWrite.month,
  • trunk/dll/comp.c

    r841 r846  
    3636  20 Aug 07 SHL Revert to DosSleep(0)
    3737  20 Aug 07 SHL Use GetMSecTimer for timing
     38  20 Aug 07 SHL A few more speed up tweaks.  Some experimental timing code
    3839  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
     40  27 Sep 07 SHL Correct ULONGLONG size formatting
    3941
    4042***********************************************************************/
     
    121123          strcpy(enddir, pffb->achName);
    122124          if (!(pffb->attrFile & FILE_DIRECTORY))
     125            // 27 Sep 07 SHL fixme to use CommaFmtULL
    123126            fprintf(fp,
    124                     "\"%s\",%u,%lu,%04u/%02u/%02u,%02u:%02u:%02u,%lu,%lu,N\n",
     127                    "\"%s\",%u,%llu,%04u/%02u/%02u,%02u:%02u:%02u,%lu,%lu,N\n",
    125128                    mask,
    126129                    enddir - mask,
     
    132135                    pffb->ftimeLastWrite.minutes,
    133136                    pffb->ftimeLastWrite.twosecs,
    134                     pffb->attrFile, (pffb->cbList > 4) ? (pffb->cbList / 2) : 0);
     137                    pffb->attrFile,
     138                    pffb->cbList > 4 ? pffb->cbList / 2 : 0);
    135139          // Skip . and ..
    136140          else if (recurse &&
     
    372376
    373377  case WM_DESTROY:
    374     DosSleep(50);//05 Aug 07 GKY 100
     378    DosSleep(50);                       // 05 Aug 07 GKY 100
    375379    break;
    376380  }
     
    482486              else
    483487                cmp->cmp->totalright--;
    484               DosSleep(0); //8-26-07 GKY 1
     488              DosSleep(0);              // 8-26-07 GKY 1
    485489            }
    486490            break;
     
    750754    return;
    751755  }
     756
     757  // DbgMsg(pszSrcFile, __LINE__, "FillDirList start %s", str);
    752758
    753759  maskstr = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);
     
    816822
    817823    DosFindClose(hDir);
    818     DosSleep(1);
     824    DosSleep(0);
    819825  }
    820826
     
    826832  free(maskstr);
    827833  free(pffbArray);
     834
     835  // DbgMsg(pszSrcFile, __LINE__, "FillDirList finish %s", str);
    828836}
    829837
     
    836844
    837845  return stricmp(fl1->fname, fl2->fname);
     846}
     847
     848// 20 Aug 07 SHL experimental fixme
     849
     850typedef struct {
     851  // Caller must init
     852  UINT sleepTime;               // How long to sleep
     853  UINT interval;                // How often to sleep
     854  // Owned by SleepIfNeeded
     855  UINT modulo;                  // How often to call GetMSecTimer
     856  UINT cntr;                    // Call counter
     857  ULONG lastMSec;               // Last time DosSleep invoked
     858} SLEEP_DESC;
     859
     860VOID SleepIfNeeded(BOOL id, UINT interval, UINT sleepTime)
     861{
     862  static ULONG lastMSec[10];
     863  static UINT cntr;
     864  static UINT modulo = 32;
     865  BOOL yes = ++cntr >= modulo;
     866
     867  if (yes) {
     868    ULONG newMSec = GetMSecTimer();
     869    // 1st time will have large difference, but don't care
     870    ULONG diff = newMSec - lastMSec[id];
     871    cntr = 0;
     872    yes = diff >= interval;
     873    // Try to tune modulo counter to approx 12% error
     874    if (yes) {
     875      lastMSec[id] = newMSec;
     876      if (diff >= interval + (interval / 8) && modulo > 0)
     877        modulo--;
     878    }
     879    else {
     880      if (diff < interval - (interval / 8))
     881        modulo++;
     882    }
     883    DosSleep(sleepTime);
     884  }
    838885}
    839886
     
    847894  BOOL notified = FALSE;
    848895
     896#if 0
    849897  ULONG lastMSec = GetMSecTimer();
    850898  ULONG ul;
     899#endif
    851900
    852901  HWND hwndLeft, hwndRight;
     
    858907    _endthread();
    859908  }
     909
     910  // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread enter");
    860911
    861912  DosError(FERR_DISABLEHARDERR);
     
    873924      INT l;
    874925      INT r;
    875       ULONG cntr;
     926      UINT cntr;
    876927      FILELIST **filesl = NULL;
    877928      FILELIST **filesr = NULL;
     
    916967      if (filesl)
    917968        qsort(filesl, numfilesl, sizeof(CHAR *), CompNames);
     969
     970      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesl");
    918971
    919972      // Build list of all files in right directory
     
    9971050                      if (p) {
    9981051                        p++;
     1052                        // 27 Sep 07 SHL fixme to do ULONGLONG conversion
    9991053                        fb4.cbFile = atol(p);
    10001054                        p = strchr(p, ',');
     
    10621116        qsort(filesr, numfilesr, sizeof(CHAR *), CompNames);
    10631117
     1118      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesr");
     1119
    10641120      // We now have two lists of files, both sorted.
    10651121      // Count total number of container entries required on each side
     
    11151171
    11161172      if (recsNeeded) {
     1173
     1174        // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread filling");
    11171175
    11181176        pcil = pcilFirst;
     
    13241382            DosSleep(0);
    13251383          cntr++;
    1326 #else
    1327           if ((cntr++ % 500) == 0) {
     1384#endif
     1385#if 0                                   // 20 Aug 07 SHL
     1386          if (cntr++ % 256 == 0) {
    13281387            ul = GetMSecTimer();
    1329             if (ul - lastMSec >= 1000) {
     1388            if (ul - lastMSec >= 200) {
    13301389              lastMSec = ul;
    13311390              DosSleep(1);
    13321391            }
    13331392          }
     1393#endif
     1394#if 1                                   // 20 Aug 07 SHL
     1395          SleepIfNeeded(0, 500, 1);
    13341396#endif
    13351397
     
    13811443        cmp->cmp->totalright = numfilesr;
    13821444
     1445        // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread filled");
     1446
    13831447      } // if recsNeeded
    13841448
    13851449      Deselect(hwndLeft);
    13861450      Deselect(hwndRight);
     1451
     1452      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread deselected");
    13871453
    13881454      if (!PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID))
    13891455        WinSendMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID);
    13901456      notified = TRUE;
     1457
     1458      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread FILLED posted");
    13911459
    13921460      if (filesl)
     
    14041472  free(cmp);
    14051473  DosPostEventSem(CompactSem);
     1474
     1475  // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread exit");
    14061476}
    14071477
     
    14091479#define hwndLeft        (WinWindowFromID(hwnd,COMP_LEFTDIR))
    14101480#define hwndRight       (WinWindowFromID(hwnd,COMP_RIGHTDIR))
     1481
     1482// 20 Aug 07 SHL fixme experimental
     1483
     1484BOOL NeedGUIUpdate(BOOL id)
     1485{
     1486  static ULONG lastMSec[10];
     1487  static UINT cntr;
     1488  static UINT modulo = 32;
     1489  BOOL yes = ++cntr >= modulo;
     1490
     1491  if (yes) {
     1492    ULONG newMSec = GetMSecTimer();
     1493    // 1st time will have large difference, but don't care
     1494    ULONG diff = newMSec - lastMSec[id];
     1495    cntr = 0;
     1496    yes = diff >= 500;
     1497    // Try to tune modulo counter to 10% error
     1498    if (yes) {
     1499      lastMSec[id] = newMSec;
     1500      if (diff >= 550 && modulo > 0)
     1501        modulo--;
     1502    }
     1503    else {
     1504      if (diff < 450)
     1505        modulo++;
     1506    }
     1507  }
     1508  return yes;
     1509}
    14111510
    14121511//=== CompareDlgProc() Compare directories dialog procedure ===
     
    16211720      CHAR s[81];
    16221721
     1722      // DbgMsg(pszSrcFile, __LINE__, "CompareDlgProc UM_CONTAINER_FILLED enter");
     1723
    16231724      cmp->filling = FALSE;
    16241725      WinEnableWindow(hwndLeft, TRUE);
     
    16701771      else
    16711772        WinSetDlgItemText(hwnd, COMP_NOTE, GetPString(IDS_COMPREADYTEXT));
     1773
     1774      // DbgMsg(pszSrcFile, __LINE__, "CompareDlgProc UM_CONTAINER_FILLED exit");
     1775
    16721776    }
    16731777    break;
     
    18481952                }
    18491953                if (SHORT1FROMMP(mp1) == COMP_LEFTDIR) {
    1850                   if (WinIsWindowEnabled(hwndLeft) || !(cmp->selleft % 50)) {
     1954                  // if (WinIsWindowEnabled(hwndLeft) || !(cmp->selleft % 50)) {
     1955                  if (WinIsWindowEnabled(hwndLeft) || NeedGUIUpdate(0)) {
    18511956                    sprintf(s, " %d", cmp->selleft);
    18521957                    WinSetDlgItemText(hwnd, COMP_SELLEFT, s);
     
    18541959                }
    18551960                else {
    1856                   if (WinIsWindowEnabled(hwndRight) || !(cmp->selright % 50)) {
     1961                  // if (WinIsWindowEnabled(hwndRight) || !(cmp->selright % 50)) {
     1962                  if (WinIsWindowEnabled(hwndRight) || NeedGUIUpdate(1)) {
    18571963                    sprintf(s, " %d", cmp->selright);
    18581964                    WinSetDlgItemText(hwnd, COMP_SELRIGHT, s);
  • trunk/dll/fm3dll.str

    r824 r846  
    843843Dropping here can change the icon of the object.
    844844FM/2: Drive flags (drive %c:)
    845 %lub + %lub EAs = %lub (%luk) total
     845%llub + %lub EAs = %llub (%luk) total
    846846PATH DPATH LIBPATH HELP BOOKSHELF LIB INCLUDE LOCPATH SMINCLUDE LPATH CODELPATH
    847847%%Environment%%
  • trunk/dll/info.c

    r841 r846  
    2222  25 Aug 07 SHL Drop list from FILESTUF - data not static
    2323  25 Aug 07 SHL IconProc: do not use freed memory - random bad things happen
     24  27 Sep 07 SHL Correct ULONGLONG size formatting
    2425
    2526***********************************************************************/
     
    692693          WinSetDlgItemText(hwnd, FLE_LASTACCESS, s);
    693694        }
     695        // 27 Sep 07 SHL fixme to use CommaFmtULL
     696        // 27 Sep 07 SHL fixme to not format numbers in IDS_SIZEINCLEASTEXT
    694697        sprintf(s,
    695698                GetPString(IDS_SIZEINCLEASTEXT),
     
    697700                CBLIST_TO_EASIZE(fs.cbList),
    698701                fs.cbFile + CBLIST_TO_EASIZE(fs.cbList),
    699                 (fs.cbFile + CBLIST_TO_EASIZE(fs.cbList)) / 1024);
     702                (ULONG)((fs.cbFile + CBLIST_TO_EASIZE(fs.cbList)) / 1024));
    700703        WinSetDlgItemText(hwnd, FLE_SIZES, s);
    701         sprintf(s, "%lub", fs.cbFileAlloc - fs.cbFile);
     704        // 27 Sep 07 SHL fixme to use CommaFmtULL
     705        sprintf(s, "%llub", fs.cbFileAlloc - fs.cbFile);
    702706        WinSetDlgItemText(hwnd, FLE_SLACK, s);
    703707        WinCheckButton(hwnd,
  • trunk/dll/rename.c

    r841 r846  
    1111  22 Mar 07 GKY Use QWL_USER
    1212  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     13  27 Sep 07 SHL Correct ULONGLONG size formatting
    1314
    1415***********************************************************************/
     
    3031MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    3132{
    32 
    3333  MOVEIT *mv;
    3434
     
    5252    if (mv->rename || !stricmp(mv->target, mv->source)) {
    5353
    54       CHAR *p;
    55 
    56       p = strrchr(mv->target, '\\');
     54      CHAR *p = strrchr(mv->target, '\\');
    5755      if (p) {
    5856
    5957        USHORT sello, selhi;
    6058
    61         sello = (p - mv->target) + 1;
     59        sello = p - mv->target + 1;
    6260        selhi = strlen(mv->target);
    6361
     
    6664                          EM_SETSEL, MPFROM2SHORT(sello, selhi), MPVOID);
    6765      }
    68 //        WinShowWindow(WinWindowFromID(hwnd,REN_DONTASK),FALSE);
    6966      WinShowWindow(WinWindowFromID(hwnd, REN_OVEROLD), FALSE);
    7067      WinShowWindow(WinWindowFromID(hwnd, REN_OVERNEW), FALSE);
     
    8077        CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH];
    8178        INT sourceexists = 0, targetexists = 0,
    82           sourcenewer = 0, sourcesmaller = 0;
     79            sourcenewer = 0, sourcesmaller = 0;
    8380
    8481        p = mv->target;
     
    9390          WinSetDlgItemText(hwnd, REN_SOURCE, mv->source);
    9491        if (!DosQueryPathInfo(mv->source, FIL_STANDARDL, &fs1, sizeof(fs1))) {
     92          // 27 Sep 07 SHL fixme to use CommaFmtULL
    9593          sprintf(s,
    96                   " %s%lu %ss %04u/%02u/%02u %02u:%02u:%02u",
    97                   (fs1.attrFile & FILE_DIRECTORY) ?
    98                   GetPString(IDS_DIRBRKTTEXT) :
    99                   NullStr,
     94                  " %s%llu %ss %04u/%02u/%02u %02u:%02u:%02u",
     95                  fs1.attrFile & FILE_DIRECTORY ?
     96                    GetPString(IDS_DIRBRKTTEXT) : NullStr,
    10097                  fs1.cbFile,
    10198                  GetPString(IDS_BYTETEXT),
     
    107104          WinSetDlgItemText(hwnd, REN_SOURCEINFO, s);
    108105          sourceexists = 1;
    109           if (fs1.attrFile & (FILE_DIRECTORY))
     106          if (fs1.attrFile & FILE_DIRECTORY)
    110107            sourceexists = 3;
    111108        }
     
    120117        }
    121118        if (!DosQueryPathInfo(chkname, FIL_STANDARDL, &fs2, sizeof(fs2))) {
     119          // 27 Sep 07 SHL fixme to use CommaFmtULL
    122120          sprintf(s,
    123                   " %s%lu %ss %04u/%02u/%02u %02u:%02u:%02u",
    124                   (fs2.attrFile & FILE_DIRECTORY) ?
    125                   GetPString(IDS_DIRBRKTTEXT) :
    126                   NullStr,
     121                  " %s%llu %ss %04u/%02u/%02u %02u:%02u:%02u",
     122                  fs2.attrFile & FILE_DIRECTORY ?
     123                    GetPString(IDS_DIRBRKTTEXT) : NullStr,
    127124                  fs2.cbFile,
    128125                  GetPString(IDS_BYTETEXT),
     
    147144          sprintf(s,
    148145                  GetPString(IDS_SOURCEISATEXT),
    149                   (sourceexists & 2) ?
    150                   GetPString(IDS_DIRECTORYTEXT) : GetPString(IDS_FILETEXT));
     146                  sourceexists & 2 ? GetPString(IDS_DIRECTORYTEXT) :
     147                                    GetPString(IDS_FILETEXT));
    151148        {
    152149          FILE *fp = NULL;
    153 
    154           if (!(sourceexists & 2))
     150          if (~sourceexists & 2)
    155151            fp = fopen(mv->source, "ab");
    156           if ((!fp && !(sourceexists & 2)) || !sourceexists)
     152          if ((!fp && ~sourceexists & 2) || !sourceexists)
    157153            strcpy(s, GetPString(IDS_CANTACCESSSOURCETEXT));
    158154          if (fp)
     
    162158          sprintf(&s[strlen(s)],
    163159                  GetPString(IDS_TARGETEXISTSISATEXT),
    164                   (targetexists & 2) ?
    165                   GetPString(IDS_DIRECTORYTEXT) : GetPString(IDS_FILETEXT));
     160                  targetexists & 2 ? GetPString(IDS_DIRECTORYTEXT) :
     161                                    GetPString(IDS_FILETEXT));
    166162        if (targetexists && stricmp(mv->source, mv->target))
    167163          strcpy(&s[strlen(s)], GetPString(IDS_CLICKOVERWRITETEXT));
     
    169165          strcpy(&s[strlen(s)], GetPString(IDS_ENTERNEWTARGETTEXT));
    170166        WinEnableWindow(WinWindowFromID(hwnd, REN_OVERWRITE),
    171                         (stricmp(mv->target, mv->source) &&
    172                          (!mv->rename || strcmp(mv->target, mv->source))));
     167                        stricmp(mv->target, mv->source) &&
     168                          (!mv->rename || strcmp(mv->target, mv->source)));
    173169
    174170        if (targetexists == 1 && sourceexists == 1) {
    175171          sourcenewer =
    176             (fs1.fdateLastWrite.year <
    177              fs2.fdateLastWrite.year) ? 1 : (fs1.fdateLastWrite.year >
    178                                              fs2.fdateLastWrite.
    179                                              year) ? -1 : (fs1.fdateLastWrite.
    180                                                            month <
    181                                                            fs2.fdateLastWrite.
    182                                                            month) ? 1 : (fs1.
    183                                                                          fdateLastWrite.
    184                                                                          month
    185                                                                          >
    186                                                                          fs2.
    187                                                                          fdateLastWrite.
    188                                                                          month)
    189             ? -1 : (fs1.fdateLastWrite.day <
    190                     fs2.fdateLastWrite.day) ? 1 : (fs1.fdateLastWrite.day >
    191                                                    fs2.fdateLastWrite.
    192                                                    day) ? -1 : (fs1.
    193                                                                 ftimeLastWrite.
    194                                                                 hours <
    195                                                                 fs2.
    196                                                                 ftimeLastWrite.
    197                                                                 hours) ? 1
    198             : (fs1.ftimeLastWrite.hours >
    199                fs2.ftimeLastWrite.hours) ? -1 : (fs1.ftimeLastWrite.minutes <
    200                                                  fs2.ftimeLastWrite.
    201                                                  minutes) ? 1 : (fs1.
    202                                                                  ftimeLastWrite.
    203                                                                  minutes >
    204                                                                  fs2.
    205                                                                  ftimeLastWrite.
    206                                                                  minutes) ? -1
    207             : (fs1.ftimeLastWrite.twosecs <
    208                fs2.ftimeLastWrite.twosecs) ? 1 : (fs1.ftimeLastWrite.twosecs >
    209                                                   fs2.ftimeLastWrite.
    210                                                   twosecs) ? -1 : 0;
    211           sourcesmaller =
    212             (fs1.cbFile < fs2.cbFile) ? -1 : (fs1.cbFile >
    213                                               fs2.cbFile) ? 1 : 0;
     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;
     184          sourcesmaller = (fs1.cbFile < fs2.cbFile) ? -1 :
     185                          (fs1.cbFile > fs2.cbFile) ? 1 :
     186                          0;
    214187          sprintf(&s[strlen(s)], GetPString(IDS_SOURCEISTEXT),
    215                   (sourcenewer ==
    216                    -1) ? GetPString(IDS_NEWERTEXT) : (sourcenewer ==
    217                                                       1) ?
    218                   GetPString(IDS_OLDERTEXT) : GetPString(IDS_SAMEDATETEXT),
    219                   (sourcesmaller ==
    220                    -1) ? GetPString(IDS_SMALLERTEXT) : (sourcesmaller ==
    221                                                         1) ?
    222                   GetPString(IDS_LARGERTEXT) : GetPString(IDS_SAMESIZETEXT));
     188                  (sourcenewer == -1) ? GetPString(IDS_NEWERTEXT) :
     189                    (sourcenewer == 1) ? GetPString(IDS_OLDERTEXT) :
     190                      GetPString(IDS_SAMEDATETEXT),
     191                  (sourcesmaller == -1) ? GetPString(IDS_SMALLERTEXT) :
     192                    (sourcesmaller == 1) ? GetPString(IDS_LARGERTEXT) :
     193                      GetPString(IDS_SAMESIZETEXT));
    223194        }
    224195        WinSetDlgItemText(hwnd, REN_INFORMATION, s);
  • trunk/dll/saveclip.c

    r841 r846  
    1818  06 Aug 07 GKY Increase Subject EA to 1024
    1919  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     20  27 Sep 07 SHL Correct ULONGLONG size formatting
    2021
    2122***********************************************************************/
     
    450451                      break;
    451452                    case 'Z':
    452                       fprintf(fp, "%-13lu", pci->cbFile);
     453                      // 27 Sep 07 SHL fixme to use CommaFmtULL?
     454                      fprintf(fp, "%-13llu", pci->cbFile);
    453455                      break;
    454456                    case 'z':
    455                       fprintf(fp, "%lu", pci->cbFile);
     457                      // 27 Sep 07 SHL fixme to use CommaFmtULL?
     458                      fprintf(fp, "%llu", pci->cbFile);
    456459                      break;
    457460                    case 'E':
     
    890893                      break;
    891894                    case 'Z':
    892                       fprintf(fp, "%-13lu", ffb4.cbFile);
     895                      // 27 Sep 07 SHL fixme to use CommaFmtULL?
     896                      fprintf(fp, "%-13llu", ffb4.cbFile);
    893897                      break;
    894898                    case 'z':
    895                       fprintf(fp, "%lu", ffb4.cbFile);
     899                      // 27 Sep 07 SHL fixme to use CommaFmtULL?
     900                      fprintf(fp, "%llu", ffb4.cbFile);
    896901                      break;
    897902                    case 'E':
  • trunk/dll/seeall.c

    r841 r846  
    3030  14 Aug 07 SHL Drop afFilesToGet
    3131  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
     32  27 Sep 07 SHL Correct ULONGLONG size formatting
    3233
    3334***********************************************************************/
     
    22692270                    standardcolors[Colors[COLORS_NORMALBACK]]);
    22702271  }
     2272  // 27 Sep 07 SHL fixme to use CommaFmtULL
    22712273  len = sprintf(szBuff,
    2272                 "%c%-*.*s  %-12lu  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
    2273                 (whichfile == ad->cursored - 1) ? '>' : ' ',
    2274                 (ad->fullnames) ? ad->longestw : ad->longest,
    2275                 (ad->fullnames) ? ad->longestw : ad->longest,
    2276                 (ad->fullnames) ? ad->afindex[y]->fullname :
     2274                "%c%-*.*s  %-12llu  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
     2275                whichfile == ad->cursored - 1 ? '>' : ' ',
     2276                ad->fullnames ? ad->longestw : ad->longest,
     2277                ad->fullnames ? ad->longestw : ad->longest,
     2278                ad->fullnames ? ad->afindex[y]->fullname :
    22772279                ad->afindex[y]->filename,
    22782280                ad->afindex[y]->cbFile,
     
    34383440                              standardcolors[Colors
    34393441                                             [COLORS_CURSOREDNORMALBACK]]);
     3442            // 27 Sep 07 SHL fixme to use CommaFmtULL
    34403443            len =
    34413444              sprintf(szBuff,
    3442                       "%c%-*.*s  %-12lu  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
    3443                       (wascursored) ? '>' : ' ',
    3444                       (pAD->fullnames) ? pAD->longestw : pAD->longest,
    3445                       (pAD->fullnames) ? pAD->longestw : pAD->longest,
     3445                      "%c%-*.*s  %-12llu  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
     3446                      wascursored ? '>' : ' ',
     3447                      pAD->fullnames ? pAD->longestw : pAD->longest,
     3448                      pAD->fullnames ? pAD->longestw : pAD->longest,
    34463449                      (pAD->fullnames) ? pAD->afindex[y]->fullname : pAD->
    34473450                      afindex[y]->filename, pAD->afindex[y]->cbFile,
Note: See TracChangeset for help on using the changeset viewer.