Changeset 96 for trunk/dll


Ignore:
Timestamp:
May 21, 2004, 5:21:19 PM (21 years ago)
Author:
root
Message:

Avoid -1L byte counts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/collect.c

    r2 r96  
     1
     2/***********************************************************************
     3
     4  $Id$
     5
     6  Collector
     7
     8  Copyright (c) 1993-98 M. Kimes
     9  Copyright (c) 2003 Steven H.Levine
     10
     11  Revisions     15 Oct 02 MK - Baseline
     12                10 Jan 04 SHL - Avoid -1L byte counts
     13
     14***********************************************************************/
     15
    116#define INCL_DOS
    217#define INCL_WIN
     
    3348
    3449
    35 MRESULT EXPENTRY CollectorTextProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    36 
     50MRESULT EXPENTRY CollectorTextProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
     51{
    3752  static BOOL   emphasized      = FALSE;
    3853  static HWND   hwndButtonPopup = (HWND)0;
     
    560575      DosError(FERR_DISABLEHARDERR);
    561576      dcd = WinQueryWindowPtr(hwnd,0);
    562       if(dcd) {
    563 
     577      if (dcd)
     578      {
    564579        LISTINFO    *li = (LISTINFO *)mp1;
    565580        INT          x;
     
    570585        RECORDINSERT ri;
    571586        ULONG        ulMaxFiles;
     587        ULONG        totalbytes;
    572588        CHAR         fullname[CCHMAXPATH];
    573589
     
    610626                priority_normal();
    611627                *fb4.achName = 0;
    612                 dcd->totalbytes += FillInRecordFromFFB(dcd->hwndCnr,pci,
    613                                                        fullname,
    614                                                        &fb4,FALSE,
    615                                                        dcd);
     628                totalbytes = FillInRecordFromFFB(dcd->hwndCnr,pci,
     629                                                 fullname,
     630                                                 &fb4,FALSE,
     631                                                 dcd);
     632                if (totalbytes != -1) {
     633                  dcd->totalbytes += totalbytes;
     634                  if (dcd->totalbytes == -1)
     635                    dcd->totalbytes--;          // fixme for real someday
     636                }
    616637                pciP = pci;
    617638                pci = (PCNRITEM)pci->rc.preccNextRecord;
Note: See TracChangeset for help on using the changeset viewer.