Changeset 85 for trunk/dll/update.c


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

Add some intermin large drive error avoidance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/update.c

    r51 r85  
    1010
    1111  Revisions     12 Feb 03 SHL - Standardize EA math
     12                10 Jan 04 SHL - Add some intermin large drive error avoidance
    1213
    1314***********************************************************************/
     
    214215                        MPFROMP(pci),
    215216                        MPFROMP(&ri)) &&
    216              totalbytes != (ULONG)-1L &&
    217              totalbytes) {
     217             totalbytes != -1 &&
     218             totalbytes)
     219          {
    218220            dcd->totalbytes += totalbytes;
     221            if (dcd->totalbytes == -1)
     222              dcd->totalbytes--;
    219223            PostMsg(hwndCnr,
    220224                    UM_RESCAN,
     
    253257
    254258                RECORDINSERT ri;
    255                 ULONG        totalbytes;
    256259
    257260                *ffb.achName = 0;
    258                 totalbytes = FillInRecordFromFFB(hwndCnr,
    259                                                  pci,
    260                                                  filename,
    261                                                  &ffb,
    262                                                  partial,
    263                                                  dcd);
     261                FillInRecordFromFFB(hwndCnr,
     262                                    pci,
     263                                    filename,
     264                                    &ffb,
     265                                    partial,
     266                                    dcd);
    264267                if(strlen(pci->szFileName) < 4) {
    265268                  *pci->szFileName = toupper(*pci->szFileName);
     
    365368                        MPFROMP(pci),
    366369                        MPFROMP(&ri)) &&
    367              totalbytes != (ULONG)-1L &&
    368              totalbytes) {
    369             if(dcd->type == DIR_FRAME)
     370             totalbytes != -1 &&
     371             totalbytes)
     372          {
     373            if (dcd->type == DIR_FRAME) {
    370374              dcd->totalbytes += totalbytes;
     375              if (dcd->totalbytes == -1)
     376                dcd->totalbytes--;      // fixme for real someday
     377            }
    371378            Stubby(hwndCnr,pci);
    372379          }
     
    396403                              CRA_SELECTED));
    397404    if(dcd->type == DIR_FRAME)
    398       dcd->totalbytes -= (pci->cbFile + pci->easize);
     405      dcd->totalbytes -= pci->cbFile + pci->easize;
    399406    WinSendMsg(hwndCnr,
    400407               CM_REMOVERECORD,
     
    598605                          MPFROMP(pci),
    599606                          MPFROMP(&ri))) {
    600               if(totalbytes != (ULONG)-1L &&
    601                  totalbytes) {
     607              if (totalbytes != -1 &&
     608                  totalbytes)
     609            {
    602610                dcd->totalbytes += totalbytes;
     611                if (dcd->totalbytes == -1)
     612                  dcd->totalbytes--;    // fixme for real someday
    603613                numremain++;
    604614              }
     
    678688                                MPFROMP(pci),
    679689                                MPFROMP(&ri))) {
    680                     if(totalbytes != (ULONG)-1L && totalbytes) {
     690                    if (totalbytes != -1 &&
     691                        totalbytes)
     692                    {
    681693                      numremain++;
    682                       if(dcd->type == DIR_FRAME)
     694                      if(dcd->type == DIR_FRAME) {
    683695                        dcd->totalbytes += totalbytes;
     696                        if (dcd->totalbytes == -1)
     697                          dcd->totalbytes--;    // fixme for real someday
     698                      }
    684699                    }
    685700                    repos = TRUE;
     
    744759                            MPFROMP(pci),
    745760                            MPFROMP(&ri))) {
    746                 if(totalbytes != (ULONG)-1L && totalbytes) {
     761                if (totalbytes != -1 &&
     762                    totalbytes)
     763                {
    747764                  numremain++;
    748                   if(dcd->type == DIR_FRAME)
     765                  if (dcd->type == DIR_FRAME) {
    749766                    dcd->totalbytes += totalbytes;
     767                    if (dcd->totalbytes == -1)
     768                      dcd->totalbytes--;        // fixme for real someday
     769                  }
    750770                }
    751771                repos = TRUE;
Note: See TracChangeset for help on using the changeset viewer.