Changeset 1394 for trunk/dll/init.c


Ignore:
Timestamp:
Feb 5, 2009, 5:17:25 AM (17 years ago)
Author:
Steven Levine
Message:

Ticket 340: Convert GetPString to use STRINGTABLE.

Drop fm3dll.str and mkstr.exe from makefiles and wpi builders

Convert many functions to expect PCSZ arguments.
Correct walk, compare and dirsizes dialog setups to ignore saved dialog size
Drop copyright.c logic from makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1393 r1394  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2008 Steven H. Levine
     9  Copyright (c) 2001, 2009 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Add CheckVersion
     
    6464  28 Dec 08 GKY Check for LVM.EXE and remove Refresh removable media menu item as appropriate
    6565  28 Dec 08 GKY Rework partition submenu to gray out unavailable items (check for existence of files)
    66                 and have no default choice.
     66                and have no default choice.
    6767  01 Jan 09 GKY Add option to rescan tree container on eject of removable media
    6868  03 Jan 09 GKY Avoid dbl scan of drive on startup by checking for first rescan drive.
    6969  03 Jan 09 GKY Check for system that is protectonly to gray out Dos/Win command lines and prevent
    70                 Dos/Win programs from being inserted into the execute dialog with message why.
     70                Dos/Win programs from being inserted into the execute dialog with message why.
    7171  11 Jan 09 GKY Move strings that shouldn't be translated (font names etc) compile time variables
     72  03 Feb 09 SHL Switch to STRINGTABLE
    7273
    7374***********************************************************************/
     
    387388                          unsigned ulFlag)
    388389{
    389   CHAR *env;
    390   CHAR stringfile[CCHMAXPATH];
    391   FILESTATUS3 fsa;
    392   APIRET rc;
    393 
    394390  switch (ulFlag) {
    395391  case 0:
    396392    FM3DllHandle = hModule;
    397     strcpy(stringfile, "FM3RES.STR");
    398     env = getenv("FM3INI");
    399     if (env) {
    400       DosError(FERR_DISABLEHARDERR);
    401       rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, sizeof(fsa));
    402       if (!rc) {
    403         if (fsa.attrFile & FILE_DIRECTORY) {
    404           BldFullPathName(stringfile, env, "FM3RES.STR");
    405           DosError(FERR_DISABLEHARDERR);
    406           if (DosQueryPathInfo(stringfile, FIL_STANDARD, &fsa, sizeof(fsa)))
    407             strcpy(stringfile, "FM3RES.STR");
    408         }
    409       }
    410     }
    411     LoadStrings(stringfile);
    412393
    413394    DosError(FERR_DISABLEHARDERR);
     
    506487                                    unsigned long ulFlag)
    507488{
    508   CHAR *env;
    509   CHAR stringfile[CCHMAXPATH];
    510   FILESTATUS3 fsa;
    511   APIRET rc;
    512 
    513489  switch (ulFlag) {
    514490  case 0:
     
    516492      return 0UL;
    517493    FM3DllHandle = hModule;
    518     strcpy(stringfile, "FM3RES.STR");
    519     env = getenv("FM3INI");
    520     if (env) {
    521       DosError(FERR_DISABLEHARDERR);
    522       rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, sizeof(fsa));
    523       if (!rc) {
    524         if (fsa.attrFile & FILE_DIRECTORY) {
    525           BldFullPathName(stringfile, env, "FM3RES.STR");
    526           DosError(FERR_DISABLEHARDERR);
    527           if (DosQueryPathInfo(stringfile, FIL_STANDARD, &fsa, sizeof(fsa)))
    528             strcpy(stringfile, "FM3RES.STR");
    529         }
    530       }
    531     }
    532     LoadStrings(stringfile);
    533494
    534495    DosError(FERR_DISABLEHARDERR);
     
    747708  ULONG size;
    748709
    749   if (!StringsLoaded()) {
    750     saymsg(MB_ENTER,
    751            HWND_DESKTOP,
    752            "Error",
    753            "FM3RES.STR isn't in right format, at least "
    754            "for this version of FM/2.");
    755     return FALSE;
    756   }
    757 
    758710  strcpy(dllfile, "FM3RES");
    759711  env = getenv("FM3INI");
     
    10511003  hini.idAccelTable = 0;
    10521004  hini.idActionBar = 0;
    1053   hini.pszHelpWindowTitle = GetPString(IDS_FM2HELPTITLETEXT);
     1005  hini.pszHelpWindowTitle = (PSZ)GetPString(IDS_FM2HELPTITLETEXT);
    10541006  hini.fShowPanelId = CMIC_HIDE_PANEL_ID;
    10551007  hini.pszHelpLibraryName = "FM3.HLP";
     
    12981250    if (!DosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) {
    12991251      ret = runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED,
    1300                     (HWND) 0, pszSrcFile, __LINE__, NULL, NULL,
    1301                     "%s /C exit", GetCmdSpec(TRUE));
     1252                    (HWND) 0, pszSrcFile, __LINE__, NULL, NULL,
     1253                    "%s /C exit", GetCmdSpec(TRUE));
    13021254      if (ret == ERROR_SMG_INVALID_PROGRAM_TYPE)
    1303         fProtectOnly = TRUE;
     1255        fProtectOnly = TRUE;
    13041256    }
    13051257    else
Note: See TracChangeset for help on using the changeset viewer.