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

    r1387 r1398  
    141141             /* printf("%s %d %s\n",
    142142              __FILE__, __LINE__, p); fflush(stdout);*/
    143           if (!stricmp(p, ".OGG") || !stricmp(p, ".MP3") || !stricmp(p, ".FLAC") ||
    144                !stricmp(p, ".JPG") || !stricmp(p, ".JPEG")){
     143          if (!stricmp(p, PCSZ_DOTOGG) || !stricmp(p, PCSZ_DOTMP3) || !stricmp(p, PCSZ_DOTFLAC) ||
     144               !stricmp(p, PCSZ_DOTJPG) || !stricmp(p, PCSZ_DOTJPEG)){
    145145             hmmio = pMMIOOpen(filename,
    146146                    &mmioinfo,
     
    193193             /* printf("%s %d %s\n",
    194194              __FILE__, __LINE__, p); fflush(stdout);*/
    195           if (!stricmp(p, ".JPG") || !stricmp(p, ".JPEG"))
     195          if (!stricmp(p, PCSZ_DOTJPG) || !stricmp(p, PCSZ_DOTJPEG))
    196196            OpenObject(filename, Default, hwnd);  //Image fails to display these
    197197          else       // is an image that can be translated
     
    206206             /* printf("%s %d %s\n",
    207207              __FILE__, __LINE__, p); fflush(stdout);*/
    208           if (!stricmp(p, ".OGG") || !stricmp(p, ".MP3") || !stricmp(p, ".FLAC"))
     208          if (!stricmp(p, PCSZ_DOTOGG) || !stricmp(p, PCSZ_DOTMP3) || !stricmp(p, PCSZ_DOTFLAC))
    209209              OpenObject(filename, Default, hwnd);  //FM2Play fails to play these
    210210          else
    211             RunFM2Util("FM2PLAY.EXE", filename);
     211            RunFM2Util(PCSZ_FM2PLAYEXE, filename);
    212212          played = TRUE;
    213213    }
     
    340340            p = ".";
    341341          if (stricmp(p, ".INI") || !StartIniEditor(hwndParent, filename, 4)) {
    342             if (stricmp(p, ".HLP") || !ViewHelp(filename)) {
     342            if (stricmp(p, PCSZ_DOTHLP) || !ViewHelp(filename)) {
    343343            ViewIt:
    344344              if (TestBinary(filename)) {
Note: See TracChangeset for help on using the changeset viewer.