Changeset 773 for trunk/dll/seeall.c


Ignore:
Timestamp:
Aug 7, 2007, 11:23:27 PM (18 years ago)
Author:
Steven Levine
Message:

Correct some compare directories collector nits
Use BldQuoted... functions
Move BldQuoted... functions near primary callers
Add RUNTYPE_MASK
Use Runtime_Error2 more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/seeall.c

    r771 r773  
    2323  30 Mar 07 GKY Remove GetPString for window class names
    2424  03 Aug 07 GKY Enlarged and made setable everywhere Findbuf (speed file loading)
     25  07 Aug 07 SHL Use BldQuotedFullPathName and BldQuotedFileName
    2526
    2627***********************************************************************/
     
    465466          x = 0;
    466467          while (list[x]) {
    467 
    468468            FILESTATUS3 fsa;
    469             BOOL spaces;
    470 
    471             if (needs_quoting(list[x])) {
    472               spaces = TRUE;
    473               strcat(szBuffer, "\"");
    474             }
    475             else
    476               spaces = FALSE;
    477             strcat(szBuffer, list[x]);
     469            // BOOL spaces;
     470            // if (needs_quoting(list[x])) {
     471            //   spaces = TRUE;
     472            //   strcat(szBuffer, "\"");
     473            // }
     474            // else
     475            //   spaces = FALSE;
     476            // strcat(szBuffer, list[x]);
    478477            memset(&fsa, 0, sizeof(fsa));
    479478            DosError(FERR_DISABLEHARDERR);
    480             DosQueryPathInfo(list[x], FIL_STANDARD,
    481                              &fsa, (ULONG) sizeof(fsa));
     479            DosQueryPathInfo(list[x], FIL_STANDARD, &fsa, sizeof(fsa));
    482480            if (fsa.attrFile & FILE_DIRECTORY) {
    483               if (szBuffer[strlen(szBuffer) - 1] != '\\')
    484                 strcat(szBuffer, "\\");
    485               strcat(szBuffer, "*");
    486             }
    487             if (spaces)
    488               strcat(szBuffer, "\"");
     481              BldQuotedFullPathName(szBuffer + strlen(szBuffer),
     482                                    list[x], "*");
     483              // if (szBuffer[strlen(szBuffer) - 1] != '\\')
     484              //        strcat(szBuffer, "\\");
     485              // strcat(szBuffer, "*");
     486            }
     487            else
     488              BldQuotedFileName(szBuffer + strlen(szBuffer), list[x]);
     489            // if (spaces)
     490            //   strcat(szBuffer, "\"");
    489491            x++;
    490492            if (!list[x] || strlen(szBuffer) + strlen(list[x]) + 5 > 1024) {
    491               runemf2(SEPARATE | WINDOWED |
    492                       ((fArcStuffVisible) ? 0 :
    493                        (BACKGROUND | MINIMIZED)) |
    494                       WAIT, HWND_DESKTOP, NULL, NULL, "%s", szBuffer);
     493              runemf2(SEPARATE | WINDOWED | WAIT |
     494                      (fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED)),
     495                      HWND_DESKTOP, NULL, NULL,
     496                      "%s", szBuffer);
    495497              DosSleep(1);
    496498              *p = 0;
     
    829831              maskspaces = TRUE;
    830832            runemf2(SEPARATE | WINDOWED |
    831                     ((fArcStuffVisible) ? 0 :
    832                      (BACKGROUND | MINIMIZED)),
    833                     HWND_DESKTOP,
    834                     ex.extractdir,
    835                     NULL,
     833                    (fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED)),
     834                    HWND_DESKTOP, ex.extractdir, NULL,
    836835                    "%s %s %s%s%s",
    837836                    ex.command,
    838837                    ex.arcname,
    839                     (maskspaces) ? "\"" : NullStr,
    840                     (*ex.masks) ? ex.masks : "*",
    841                     (maskspaces) ? "\"" : NullStr);
     838                    maskspaces ? "\"" : NullStr,
     839                    *ex.masks ? ex.masks : "*",
     840                    maskspaces ? "\"" : NullStr);
    842841          }
    843842        }
     
    30123011      list = BuildAList(hwnd);
    30133012      if (!list)
    3014         Runtime_Error(pszSrcFile, __LINE__, "no data");
     3013        Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT);
    30153014      else {
    30163015        WinSetWindowText(pAD->hwndStatus, GetPString(IDS_DRAGGINGFILESTEXT));
     
    41054104
    41064105            if (!list)
    4107               Runtime_Error(pszSrcFile, __LINE__, "no data");
     4106              Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT);
    41084107            else {
    41094108              switch (SHORT1FROMMP(mp1)) {
Note: See TracChangeset for help on using the changeset viewer.