Changeset 1398 for trunk/dll/valid.c


Ignore:
Timestamp:
Feb 21, 2009, 6:43:00 PM (16 years ago)
Author:
Gregg Young
Message:

Move embeded strings to PCSZ variables or string table; Eliminate Error2 functions Runtime_Error with NULL format string returns "No data" error. Change declares from PSZ to PCSZ in functions where the variable isn't changed. Added btm as an executable file type in several additional places. Use fProtectOnly to prevent attempt to execute Dos and Win programs on "Protect only" installs in several additional places.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/valid.c

    r1394 r1398  
    613613      return FALSE;
    614614    if (apptype == 0x000b && (!p ||
    615         (stricmp(p, ".EXE") &&
    616          stricmp(p, ".COM") &&
    617          stricmp(p, ".CMD") &&
    618          stricmp(p, ".BAT") &&
    619          stricmp(p, ".BTM"))))
     615        (stricmp(p, PCSZ_DOTEXE) &&
     616         stricmp(p, PCSZ_DOTCOM) &&
     617         stricmp(p, PCSZ_DOTCMD) &&
     618         stricmp(p, PCSZ_DOTBAT) &&
     619         stricmp(p, PCSZ_DOTBTM))))
    620620      return FALSE;
    621621    if (!fProtectOnly) {
     
    631631                      FAPPTYP_32BIT |
    632632                      FAPPTYP_WINDOWSPROT31)))) ||
    633           (p && (!stricmp(p, ".CMD") || !stricmp(p, ".BAT") || !stricmp(p, ".BTM"))))
     633          (p && (!stricmp(p, PCSZ_DOTCMD) || !stricmp(p, PCSZ_DOTBAT) || !stricmp(p, PCSZ_DOTBTM))))
    634634        return TRUE;
    635635    }
     
    641641                         FAPPTYP_BOUND |
    642642                         FAPPTYP_32BIT)))) ||
    643              (p && (!stricmp(p, ".CMD") || !stricmp(p, ".BTM"))))
     643             (p && (!stricmp(p, PCSZ_DOTCMD) || !stricmp(p, PCSZ_DOTBTM))))
    644644      return TRUE;
    645645    if (fProtectOnly && (apptype &
     
    648648                          FAPPTYP_WINDOWSPROT |
    649649                          FAPPTYP_WINDOWSPROT31)) &&
    650         (p && (!stricmp(p, ".EXE") || !stricmp(p, ".COM"))))
     650        (p && (!stricmp(p, PCSZ_DOTEXE) || !stricmp(p, PCSZ_DOTCOM) ||
     651               !stricmp(p, PCSZ_DOTBAT))))
    651652      saymsg(MB_OK,
    652653             HWND_DESKTOP,
     
    10661067                               (PVOID) objectpath, sizeof(objectpath))) {
    10671068      Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__,
    1068                 "PrfQueryProfileString");
     1069                PCSZ_PRFQUERYPROFILESTRING);
    10691070      *objectpath = 0;
    10701071    }
Note: See TracChangeset for help on using the changeset viewer.