Changeset 730 for trunk/dll/update.c


Ignore:
Timestamp:
Jul 22, 2007, 7:57:09 PM (18 years ago)
Author:
Gregg Young
Message:

Preliminary work on variable sized container buffers. Removes szFileName etc. Builds fine but traps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/update.c

    r557 r730  
    4040HPOINTER SelectDriveIcon(PCNRITEM pci)
    4141{
    42     UINT driveflag = driveflags[toupper(*pci->szFileName) - 'A'];
    43     *pci->szFileName = toupper(*pci->szFileName);
    44               if (isalpha(*pci->szFileName) &&
    45                   toupper(*pci->szFileName) > 'B') {
     42    UINT driveflag = driveflags[toupper(*pci->pszFileName) - 'A'];
     43    *pci->pszFileName = toupper(*pci->pszFileName);
     44              if (isalpha(*pci->pszFileName) &&
     45                  toupper(*pci->pszFileName) > 'B') {
    4646                if (driveflag & DRIVE_CDROM)
    4747                  pci->rc.hptrIcon = hptrCDROM;
     
    127127      found = TRUE;
    128128#endif
    129       if ((!fForceUpper && !fForceLower && strcmp(pci->szFileName, filename)) ||
     129      if ((!fForceUpper && !fForceLower && strcmp(pci->pszFileName, filename)) ||
    130130          pci->cbFile != ffb.cbFile || pci->attrFile != ffb.attrFile ||
    131131          pci->easize != CBLIST_TO_EASIZE(ffb.cbList) || pci->date.day !=
     
    144144        ffb.cchName = 0;
    145145        FillInRecordFromFFB(hwndCnr, pci, filename, &ffb, partial, dcd);
    146         if (strlen(pci->szFileName) < 4)
     146        if (strlen(pci->pszFileName) < 4)
    147147        SelectDriveIcon(pci);
    148148        oldemphasis = pci->rc.flRecordAttr & (CRA_SELECTED | CRA_CURSORED);
     
    180180                                              pci,
    181181                                              filename, &ffb, partial, dcd);
    182           if (strlen(pci->szFileName) < 4)
     182          if (strlen(pci->pszFileName) < 4)
    183183          SelectDriveIcon(pci);
    184184          memset(&ri, 0, sizeof(RECORDINSERT));
     
    226226                FillInRecordFromFFB(hwndCnr,
    227227                                    pci, filename, &ffb, partial, dcd);
    228                 if (strlen(pci->szFileName) < 4)
     228                if (strlen(pci->pszFileName) < 4)
    229229                SelectDriveIcon(pci);
    230230                memset(&ri, 0, sizeof(RECORDINSERT));
     
    273273                                              pci,
    274274                                              filename, &ffb, partial, dcd);
    275           if (strlen(pci->szFileName) < 4)
     275          if (strlen(pci->pszFileName) < 4)
    276276          SelectDriveIcon(pci);
    277277          memset(&ri, 0, sizeof(RECORDINSERT));
     
    300300                                FALSE,
    301301                                TRUE)) !=
    302            NULL && (INT) pci != -1 && strlen(pci->szFileName) > 3) {
     302           NULL && (INT) pci != -1 && strlen(pci->pszFileName) > 3) {
    303303    /* file doesn't exist; delete record */
    304304#ifdef DEBUG
     
    410410          /* update record? */
    411411          if ((!fForceUpper && !fForceLower &&
    412                strcmp(pci->szFileName, filename[x])) ||
     412               strcmp(pci->pszFileName, filename[x])) ||
    413413              pci->cbFile != ffb.cbFile || pci->attrFile != ffb.attrFile ||
    414414              pci->easize != CBLIST_TO_EASIZE(ffb.cbList) ||
     
    431431            FillInRecordFromFFB(hwndCnr,
    432432                                pci, filename[x], &ffb, partial, dcd);
    433             if (IsRoot(pci->szFileName))
     433            if (IsRoot(pci->pszFileName))
    434434            SelectDriveIcon(pci);
    435435            WinSendMsg(hwndCnr,
     
    455455                                                  filename[x],
    456456                                                  &ffb, partial, dcd);
    457               if (strlen(pci->szFileName) < 4)
     457              if (strlen(pci->pszFileName) < 4)
    458458              SelectDriveIcon(pci);
    459459              memset(&ri, 0, sizeof(RECORDINSERT));
     
    509509                                                        filename[x],
    510510                                                        &ffb, partial, dcd);
    511                     if (strlen(pci->szFileName) < 4)
     511                    if (strlen(pci->pszFileName) < 4)
    512512                    SelectDriveIcon(pci);
    513513                    memset(&ri, 0, sizeof(RECORDINSERT));
     
    556556                                                    filename[x],
    557557                                                    &ffb, partial, dcd);
    558                 if (strlen(pci->szFileName) < 4)
     558                if (strlen(pci->pszFileName) < 4)
    559559                SelectDriveIcon(pci);
    560560                memset(&ri, 0, sizeof(RECORDINSERT));
     
    589589                                    FALSE,
    590590                                    TRUE)) != NULL &&
    591                (INT) pci != -1 && !IsRoot(pci->szFileName)) {
     591               (INT) pci != -1 && !IsRoot(pci->pszFileName)) {
    592592        /* file doesn't exist; delete record */
    593593        if (pci->rc.flRecordAttr & CRA_SELECTED)
Note: See TracChangeset for help on using the changeset viewer.