Changeset 1398 for trunk/dll/worker.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/worker.c

    r1395 r1398  
    11271127          case IDM_MCIPLAY:
    11281128            {
    1129               register INT x;
    1130               register ULONG total;
     1129              INT x, MaxFM2playStrLen = 24;
     1130              ULONG total;
    11311131              CHAR fbuf[CCHMAXPATH];
    11321132
    11331133              if (DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT |
    11341134                                SEARCH_CUR_DIRECTORY,
    1135                                 "PATH", "FM2PLAY.EXE", (PBYTE)fbuf, CCHMAXPATH - 1))
    1136                 total += strlen("..\\FM2UTILS\\FM2PLAY.EXE ");
     1135                                PCSZ_PATH, PCSZ_FM2PLAYEXE, (PBYTE)fbuf, CCHMAXPATH - 1))
     1136                total += MaxFM2playStrLen;
    11371137              else
    11381138                total = strlen(fbuf);
     
    11451145                CHAR szTempFile[CCHMAXPATH];
    11461146
    1147                 BldFullPathName(szTempFile, pTmpDir, "$FM2PLAY.$$$");
     1147                BldFullPathName(szTempFile, pTmpDir, PCSZ_FM2PLAYTEMP);
    11481148                fp = xfopen(szTempFile, "w", pszSrcFile, __LINE__);
    11491149                if (fp) {
     
    11561156                  strcat(szTempFile, "@/");
    11571157                  strrev(szTempFile);
    1158                   RunFM2Util("FM2PLAY.EXE", szTempFile);
     1158                  RunFM2Util(PCSZ_FM2PLAYEXE, szTempFile);
    11591159                }
    11601160              }
     
    11821182                if (DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT |
    11831183                                  SEARCH_CUR_DIRECTORY,
    1184                                   "PATH", "FM2PLAY.EXE", (PBYTE)fbuf, CCHMAXPATH - 1))
     1184                                  PCSZ_PATH, PCSZ_FM2PLAYEXE, (PBYTE)fbuf, CCHMAXPATH - 1))
    11851185                  strcpy(szBuffer, "UTILS\\FM2PLAY.EXE");
    11861186                else
    1187                   strcpy(szBuffer, "FM2PLAY.EXE");
     1187                  strcpy(szBuffer, PCSZ_FM2PLAYEXE);
    11881188              }
    11891189              p = &szBuffer[strlen(szBuffer)];
Note: See TracChangeset for help on using the changeset viewer.