Changeset 907 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Jan 6, 2008, 8:26:17 AM (18 years ago)
Author:
Steven Levine
Message:

Avoid out of memory traps in Compare Directories
Rework Compare Directories progress display for 2 second update rate
Start refactoring to reduce dependence on fm3dll.h
Add timer services (IsITimerExpired etc.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r850 r907  
    3434***********************************************************************/
    3535
    36 #define INCL_DOS
    37 #define INCL_WIN
    38 #define INCL_GPI
    39 #define INCL_LONGLONG
    40 #define INCL_DOSERRORS
    41 #include <os2.h>
    42 
    43 #include <stdio.h>
    4436#include <stdlib.h>
    4537#include <string.h>
     
    4739#include <process.h>                    // _beginthread
    4840
    49 #include "fm3dll.h"
     41#define INCL_DOS
     42#define INCL_DOSERRORS
     43#define INCL_WIN
     44#define INCL_GPI
     45#define INCL_LONGLONG
     46
    5047#include "fm3dlg.h"
    5148#include "fm3str.h"
     49#include "dircnrs.h"
     50#include "errutil.h"                    // Dos_Error...
     51#include "strutil.h"                    // GetPString
     52#include "fm3dll.h"
    5253
    5354typedef struct
     
    223224    while (!rc) {
    224225
    225 #if 0 // 13 Aug 07 SHL fixme to be gone
    226       {
    227         static ULONG ulMaxCnt = 1;
    228         if (ulFindCnt > ulMaxCnt) {
    229           ulMaxCnt = ulFindCnt;
    230           DbgMsg(pszSrcFile, __LINE__, "ulMaxCnt %u/%u", ulMaxCnt, FilesToGet);
    231         }
    232       }
    233 #endif
    234 
    235226      priority_normal();
    236227      pffbFile = pffbArray;
     
    258249          break;
    259250        pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + pffbFile->oNextEntryOffset);
    260 
    261 #if 0 // 13 Aug 07 SHL fixme to be gone
    262         {
    263           static ULONG ulMaxBytes = 65535;
    264           ULONG ul = (PBYTE)pffbFile - (PBYTE)pffbArray;
    265           if (ul > ulMaxBytes) {
    266             ulMaxBytes = ul;
    267             DbgMsg(pszSrcFile, __LINE__, "ulFindCnt %u/%u ulMaxBytes %u/%u",
    268                    ulFindCnt, FilesToGet, ulMaxBytes, ulBufBytes);
    269           }
    270         }
    271 #endif
    272251
    273252      } // for matches
Note: See TracChangeset for help on using the changeset viewer.