Changeset 1400 for trunk/dll


Ignore:
Timestamp:
Mar 8, 2009, 6:50:25 PM (17 years ago)
Author:
Gregg Young
Message:

Remainder of changes to rename commafmt.h/c (Ticket 28, 82); Additional strings moved to PCSZs in init.c (Ticket 6); Added WriteDetailsSwitches used it and LoadDetailsSwitches to consolidate inline code (Ticket 343, 344)

Location:
trunk/dll
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1398 r1400  
    7272  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    7373  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     74  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     75  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    7476
    7577***********************************************************************/
     
    8183#include <share.h>                      // SH_DENYWR
    8284#include <limits.h>                     // ULONG_MAX
    83 // #include <process.h>                 // _beginthread // 10 Dec 08 SHL
    8485
    8586#if 0
     
    140141#include "viewer.h"                     // StartMLEEditor
    141142#include "newview.h"                    // StartViewer
    142 #include "commafmt.h"                   // commafmt
     143#include "i18nutil.h"                   // commafmt
    143144#include "copyf.h"                      // unlinkf
    144145#include "literal.h"                    // wildcard
     
    232233  Fortify_LeaveScope();
    233234#  endif
    234   // _endthread();                      // 10 Dec 08 SHL
    235235}
    236236
     
    23572357
    23582358  case WM_PRESPARAMCHANGED:
    2359     PresParamChanged(hwnd, "ArcCnr", mp1, mp2);
     2359    PresParamChanged(hwnd, PCSZ_ARCCNR, mp1, mp2);
    23602360    break;
    23612361
     
    25132513          }
    25142514        }
    2515         RestorePresParams(hwnd, "ArcCnr");
     2515        RestorePresParams(hwnd, PCSZ_ARCCNR);
    25162516        dcd->mask.fNoAttribs = TRUE;
    25172517        dcd->mask.fNoDirs = TRUE;
  • trunk/dll/autoview.c

    r1398 r1400  
    2828  07 Feb 09 GKY Add *DateFormat functions to format dates bassed on locale
    2929  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     30  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    3031
    3132***********************************************************************/
     
    6465#include "chklist.h"                    // PopupMenu
    6566#include "wrappers.h"                   // xDosSetPathInfo
    66 #include "commafmt.h"                   // CommaFmtULL
     67#include "i18nutil.h"                   // CommaFmtULL
    6768#include "fortify.h"
    6869#include "excputil.h"                   // 06 May 08 SHL added
  • trunk/dll/collect.c

    r1398 r1400  
    6363  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    6464  07 Feb 09 GKY Move repeated strings to PCSZs.
     65  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     66  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    6567
    6668***********************************************************************/
     
    130132#include "newview.h"                    // StartViewer
    131133#include "undel.h"                      // UndeleteDlgProc
    132 #include "commafmt.h"                   // commafmt
     134#include "i18nutil.h"                   // commafmt
    133135#include "getnames.h"                   // insert_filename
    134136#include "select.h"                     // InvertAll
     
    12041206
    12051207  case WM_PRESPARAMCHANGED:
    1206     PresParamChanged(hwnd, "Collector", mp1, mp2);
     1208    PresParamChanged(hwnd, PCSZ_COLLECTOR, mp1, mp2);
    12071209    break;
    12081210
     
    14151417        CNRINFO cnri;
    14161418
    1417         RestorePresParams(hwnd, "Collector");
    1418         LoadDetailsSwitches("Collector", &dcd->ds);
     1419        RestorePresParams(hwnd, PCSZ_COLLECTOR);
     1420        LoadDetailsSwitches(PCSZ_COLLECTOR, &dcd->ds);
    14191421
    14201422        dcd->amextracted = FALSE;       // Say not busy
     
    15801582      else {
    15811583        if (!PostMsg(dcd->hwndObject, UM_COLLECTFROMFILE, mp1, mp2)) {
    1582           Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     1584          Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    15831585        }
    15841586      }
     
    15951597      if (dcd) {
    15961598        if (!PostMsg(dcd->hwndObject, UM_COMMAND, mp1, mp2)) {
    1597           Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     1599          Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    15981600          FreeListInfo((LISTINFO *) mp1);
    15991601        }
     
    20822084        AdjustDetailsSwitches(hwnd, dcd->hwndLastMenu,
    20832085                              SHORT1FROMMP(mp1), NULL,
    2084                               "Collector", &dcd->ds, FALSE);
     2086                              PCSZ_COLLECTOR, &dcd->ds, FALSE);
    20852087        break;
    20862088
     
    22622264                *li->targetpath = 0;
    22632265              if (!PostMsg(dcd->hwndObject, action, MPFROMP(li), MPVOID)) {
    2264                 Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     2266                Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    22652267                FreeListInfo(li);
    22662268              }
  • trunk/dll/common.c

    r1398 r1400  
    2525  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
    2626  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     27  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    2728
    2829***********************************************************************/
     
    199200}
    200201
    201 void CommonCreateTextChildren(HWND hwnd, char *class, USHORT * ids)
     202void CommonCreateTextChildren(HWND hwnd, PCSZ class, USHORT * ids)
    202203{
    203204  int x;
     
    373374      DosError(FERR_DISABLEHARDERR);
    374375      rc = DosDevIOCtl(-1L, 8L, 0x40L, &parm, sizeof(parm), &plen, NULL, 0L, &dlen);
    375       DbgMsg(pszSrcFile, __LINE__, "Eject parm %i %i rc %i", parm[0], parm[1], rc);
    376376      if (cmd == IDM_EJECT &&
    377377          (fEjectFlpyScan ? TRUE : parm[1] > 1) &&
  • trunk/dll/common.h

    r1205 r1400  
    1010
    1111  Change log
     12  08 Mar 09 GKY Additional strings move to PCSZs in init.c (Declare changes)
    1213
    1314***********************************************************************/
     
    1819MRESULT EXPENTRY CommonCnrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
    1920void CommonCreateMainChildren(HWND hwnd, SWP * swp);
    20 void CommonCreateTextChildren(HWND hwnd, char *class, USHORT * ids);
     21void CommonCreateTextChildren(HWND hwnd, PCSZ class, USHORT * ids);
    2122void CommonDriveCmd(HWND hwnd, char *drive, USHORT cmd);
    2223MRESULT EXPENTRY CommonFrameWndProc(USHORT id,
  • trunk/dll/comp.c

    r1398 r1400  
    6262  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
    6363  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     64  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    6465
    6566***********************************************************************/
     
    116117#include "wrappers.h"                   // xDosFindNext
    117118#include "notebook.h"                   // External compare/dircompare
    118 #include "commafmt.h"                   // CommaFmtULL
     119#include "i18nutil.h"                   // CommaFmtULL
    119120#include "fortify.h"                    // 06 May 08 SHL added
    120121#include "excputil.h"                   // xbeginthread
  • trunk/dll/datamin.c

    r1397 r1400  
    2727  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    2828  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     29  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    2930
    3031***********************************************************************/
     
    5455#include "errutil.h"                    // Dos_Error...
    5556#include "strutil.h"                    // GetPString
    56 #include "commafmt.h"                   // CommaFmtUL
     57#include "i18nutil.h"                   // CommaFmtUL
    5758#include "killproc.h"                   // KillDlgProc
    5859#include "sysinfo.h"                    // SysInfoDlgProc
    5960#include "mainwnd.h"                    // TopWindowName
    60 #include "commafmt.h"                   // CommaFmtUL
    6161#include "common.h"                     // OpenDirCnr
    6262#include "shadow.h"                     // OpenObject
  • trunk/dll/dircnrs.c

    r1398 r1400  
    5858  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    5959  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     60  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     61  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    6062
    6163***********************************************************************/
     
    130132#include "newview.h"                    // StartViewer
    131133#include "undel.h"                      // UndeleteDlgProc
    132 #include "commafmt.h"                   // commafmt
     134#include "i18nutil.h"                   // commafmt
    133135#include "getnames.h"                   // insert_filename
    134136#include "wrappers.h"                   // xfree
     
    13781380
    13791381   case WM_PRESPARAMCHANGED:
    1380      PresParamChanged(hwnd, "DirCnr", mp1, mp2);
     1382     PresParamChanged(hwnd, PCSZ_DIRCNR, mp1, mp2);
    13811383     break;
    13821384
     
    18231825      if (dcd) {
    18241826        if (!PostMsg(dcd->hwndObject, UM_COMMAND, mp1, mp2)) {
    1825           Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     1827          Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    18261828          FreeListInfo((LISTINFO *) mp1);
    18271829        }
     
    27412743                *li->targetpath = 0;
    27422744              if (!PostMsg(dcd->hwndObject, action, MPFROMP(li), MPVOID)) {
    2743                 Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     2745                Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    27442746                FreeListInfo(li);
    27452747              }
     
    36973699          Fortify_ChangeScope(dcd, -1);
    36983700#         endif
    3699           RestorePresParams(dcd->hwndCnr, "DirCnr");
     3701          RestorePresParams(dcd->hwndCnr, PCSZ_DIRCNR);
    37003702          WinSetWindowPtr(dcd->hwndCnr, QWL_USER, (PVOID) dcd);
    37013703          dcd->oldproc = WinSubclassWindow(dcd->hwndCnr,
  • trunk/dll/dirsize.c

    r1398 r1400  
    4343  10 Dec 08 SHL Integrate exception handler support
    4444  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     45  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     46  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    4547
    4648***********************************************************************/
     
    7678#include "shadow.h"                     // OpenObject
    7779#include "presparm.h"                   // PresParamChanged
    78 #include "commafmt.h"                   // commafmt
     80#include "i18nutil.h"                   // commafmt
    7981#include "getnames.h"                   // export_filename
    8082#include "wrappers.h"                   // xDosFindNext
     
    510512    {
    511513      CHAR s[CCHMAXPATH + 81];
    512       RestorePresParams(hwnd, "DirSizes");
     514      RestorePresParams(hwnd, PCSZ_DIRSIZES);
    513515      sprintf(s, GetPString(IDS_DIRSIZETITLETEXT), pState->szDirName);
    514516      WinSetWindowText(hwnd, s);
     
    659661
    660662  case WM_PRESPARAMCHANGED:
    661     PresParamChanged(hwnd, "DirSizes", mp1, mp2);
     663    PresParamChanged(hwnd, PCSZ_DIRSIZES, mp1, mp2);
    662664    break;
    663665
  • trunk/dll/filldir.c

    r1398 r1400  
    6565  25 Dec 08 GKY Add ProcessDirectoryThread to allow optional recursive drive scan at startup.
    6666  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     67  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     68  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    6769
    6870***********************************************************************/
     
    99101#include "copyf.h"                      // unlinkf
    100102#include "literal.h"                    // wildcard
    101 #include "commafmt.h"                   // CommaFmtULL
     103#include "i18nutil.h"                   // CommaFmtULL
    102104#include "wrappers.h"                   // xDosFindNext
    103105#include "init.h"                       // GetTidForWindow
     
    16101612            p++;
    16111613          if (*szFSType &&
    1612               (!stricmp(szFSType, "LIBPATH") || getenv(szFSType))) {
     1614              (!stricmp(szFSType, PCSZ_LIBPATH) || getenv(szFSType))) {
    16131615            pci = WinSendMsg(hwndCnr,
    16141616                             CM_ALLOCRECORD,
  • trunk/dll/flesh.c

    r1358 r1400  
    2424  25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session
    2525                to prevent duplicate directory names in tree following a copy before initial scan.
     26  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    2627
    2728***********************************************************************/
     
    8182  if (*path) {
    8283    path[strlen(path) - 1] = 0;
    83     if (!stricmp(path, "LIBPATH")) {
     84    if (!stricmp(path, PCSZ_LIBPATH)) {
    8485      var = xmalloc(65536, pszSrcFile, __LINE__);
    8586      if (var)
  • trunk/dll/grep2.c

    r1398 r1400  
    2525  01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root
    2626  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     27  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    2728
    2829  fixme for more excess locals to be gone
     
    540541        if (!*path)
    541542          break;
    542         if (!stricmp(path, "LIBPATH"))
     543        if (!stricmp(path, PCSZ_LIBPATH))
    543544          LoadLibPath(env, 8192);
    544545        else {
  • trunk/dll/i18nutil.c

    r1399 r1400  
    1616  10 Nov 07 GKY Get thousands separator from country info for file sizes.
    1717  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     18  08 Mar 09 GKY Renamed commafmt.h/c i18nutil.h/c
    1819
    1920***********************************************************************/
  • trunk/dll/info.c

    r1398 r1400  
    3131  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    3232  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     33  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    3334
    3435***********************************************************************/
     
    6970#include "presparm.h"                   // SetPresParams
    7071#include "strips.h"                     // bstrip
    71 #include "commafmt.h"                   // CommaFmtULL
     72#include "i18nutil.h"                   // CommaFmtULL
    7273#include "wrappers.h"                   // xDosFindFirst
    7374#include "fortify.h"
  • trunk/dll/inis.c

    r1398 r1400  
    3232  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    3333  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     34  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    3435
    3536***********************************************************************/
     
    19751976                         PP_FONTNAMESIZE,
    19761977                         strlen(FNT_10SYSTEMMONOTEXT) + 1,
    1977                          FNT_10SYSTEMMONOTEXT))
     1978                         (PVOID) FNT_10SYSTEMMONOTEXT))
    19781979      WinSetPresParam(WinWindowFromID(hwnd, INI_DATALIST),
    19791980                      PP_FONTNAMESIZE,
    19801981                      strlen(FNT_10SYSTEMMONOTEXT) + 1,
    1981                       FNT_10SYSTEMMONOTEXT);
     1982                      (PVOID) FNT_10SYSTEMMONOTEXT);
    19821983    RestorePresParams(hwnd, "IniUtil");
    19831984    return 0;
  • trunk/dll/init.c

    r1398 r1400  
    7474  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    7575  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     76  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    7677
    7778***********************************************************************/
     
    228229PCSZ PCSZ_FM2PLAYEXE;
    229230PCSZ PCSZ_FM2PLAYTEMP;
     231PCSZ PCSZ_LVMGUICMD;
     232PCSZ PCSZ_DFSOS2EXE;
     233PCSZ PCSZ_MINILVMEXE;
     234PCSZ PCSZ_FDISKPMEXE;
     235PCSZ PCSZ_LVMEXE;
     236PCSZ PCSZ_ARCCNR;
     237PCSZ PCSZ_COLLECTOR;
     238PCSZ PCSZ_DIRCNR;
     239PCSZ PCSZ_DIRSIZES;
     240PCSZ PCSZ_TOOLBAR;
     241PCSZ PCSZ_TREECNR;
    230242CHAR *CBSIFS;
    231243CHAR *DRF_FM2ARCHIVE;
     
    237249HMODULE FM3DllHandle;
    238250CHAR *FM3Folder;
    239 CHAR *FNT_6HELVETICA;
    240 CHAR *FNT_8HELVETICA;
    241 CHAR *FNT_8HELVETICABOLD;
    242 CHAR *FNT_10SYSTEMMONOTEXT;
    243 CHAR *FNT_10SYSTEMPROPORT;
    244 CHAR *FNT_2SYSTEMVIO;
    245 CHAR *FNT_4SYSTEMVIO;
    246 CHAR *FNT_10SYSTEMVIO;
    247 CHAR *FNT_8TIMESNEWROMAN;
     251PCSZ FNT_6HELVETICA;
     252PCSZ FNT_8HELVETICA;
     253PCSZ FNT_8HELVETICABOLD;
     254PCSZ FNT_10SYSTEMMONOTEXT;
     255PCSZ FNT_10SYSTEMPROPORT;
     256PCSZ FNT_2SYSTEMVIO;
     257PCSZ FNT_4SYSTEMVIO;
     258PCSZ FNT_10SYSTEMVIO;
     259PCSZ FNT_8TIMESNEWROMAN;
    248260CHAR HomePath[CCHMAXPATH];
    249261CHAR *LONGNAME;
     
    254266PCSZ PCSZ_DOSQUERYPATHINFO;
    255267PCSZ PCSZ_DOSSEARCHPATH;
     268PCSZ PCSZ_POSTMSG;
    256269PCSZ PCSZ_WINCREATEWINDOW;
    257270PCSZ PCSZ_WINLOADACCELTABLE;
     
    288301PCSZ PCSZ_DOTCOMMENTS;
    289302PCSZ PCSZ_PATH;
     303PCSZ PCSZ_LIBPATH;
     304CHAR *pLibPathStrict;
     305PCSZ PCSZ_WPURLDEFAULTSETTINGS;
    290306CHAR *Settings;
    291307CHAR SwapperDat[CCHMAXPATH];
    292 CHAR *WC_ARCCONTAINER;
    293 CHAR *WC_ARCSTATUS;
    294 CHAR *WC_AUTOVIEW;
    295 CHAR *WC_BUBBLE;
    296 CHAR *WC_COLLECTOR;
    297 CHAR *WC_COLSTATUS;
    298 CHAR *WC_DATABAR;
    299 CHAR *WC_DIRCONTAINER;
    300 CHAR *WC_DIRSTATUS;
    301 CHAR *WC_DRIVEBACK;
    302 CHAR *WC_DRIVEBUTTONS;
    303 CHAR *WC_ERRORWND;
    304 CHAR *WC_INIEDITOR;
    305 CHAR *WC_LED;
    306 CHAR *WC_MAINWND2;
    307 CHAR *WC_MINITIME;
    308 CHAR *WC_MLEEDITOR;
    309 CHAR *WC_NEWVIEW;
    310 CHAR *WC_OBJECTWINDOW;
    311 CHAR *WC_SEEALL;
    312 CHAR *WC_SEESTATUS;
    313 CHAR *WC_STATUS;
    314 CHAR *WC_TOOLBACK;
    315 CHAR *WC_TOOLBUTTONS;
    316 CHAR *WC_TREECONTAINER;
    317 CHAR *WC_TREEOPENBUTTON;
    318 CHAR *WC_TREESTATUS;
    319 CHAR *WC_VIEWSTATUS;
     308PCSZ WC_ARCCONTAINER;
     309PCSZ WC_ARCSTATUS;
     310PCSZ WC_AUTOVIEW;
     311PCSZ WC_BUBBLE;
     312PCSZ WC_COLLECTOR;
     313PCSZ WC_COLSTATUS;
     314PCSZ WC_DATABAR;
     315PCSZ WC_DIRCONTAINER;
     316PCSZ WC_DIRSTATUS;
     317PCSZ WC_DRIVEBACK;
     318PCSZ WC_DRIVEBUTTONS;
     319PCSZ WC_ERRORWND;
     320PCSZ WC_INIEDITOR;
     321PCSZ WC_LED;
     322PCSZ WC_MAINWND2;
     323PCSZ WC_MINITIME;
     324PCSZ WC_MLEEDITOR;
     325PCSZ WC_NEWVIEW;
     326PCSZ WC_OBJECTWINDOW;
     327PCSZ WC_SEEALL;
     328PCSZ WC_SEESTATUS;
     329PCSZ WC_STATUS;
     330PCSZ WC_TOOLBACK;
     331PCSZ WC_TOOLBUTTONS;
     332PCSZ WC_TREECONTAINER;
     333PCSZ WC_TREEOPENBUTTON;
     334PCSZ WC_TREESTATUS;
     335PCSZ WC_VIEWSTATUS;
    320336CHAR profile[CCHMAXPATH];
    321337ULONGLONG ullTmpSpaceNeeded;
     
    496512    PCSZ_FM2PLAYEXE  = "FM2PLAY.EXE";
    497513    PCSZ_FM2PLAYTEMP = "$FM2PLAY.$$$";
     514    PCSZ_LVMGUICMD   = "LVMGUI.CMD";
     515    PCSZ_DFSOS2EXE   = "DFSOS2.EXE";
     516    PCSZ_MINILVMEXE  = "MINILVM.EXE";
     517    PCSZ_FDISKPMEXE  = "FDISKPM.EXE";
     518    PCSZ_LVMEXE      = "LVM.EXE";
     519    PCSZ_ARCCNR      = "ArcCnr";
     520    PCSZ_COLLECTOR   = "Collector";
     521    PCSZ_DIRCNR      = "DirCnr";
     522    PCSZ_DIRSIZES    = "DirSizes";
     523    PCSZ_TOOLBAR     = "ToolBar";
     524    PCSZ_TREECNR     = "TreeCnr";
    498525    FNT_6HELVETICA       =  "6.Helvetica";
    499526    FNT_8HELVETICA       =  "8.Helvetica";
     
    510537    PCSZ_DOSQUERYPATHINFO = "DosQueryPathInfo";
    511538    PCSZ_DOSSEARCHPATH    = "DosSearchPath";
     539    PCSZ_POSTMSG          = "PostMsg";
    512540    PCSZ_WINCREATEWINDOW  = "WinCreateWindow";
    513541    PCSZ_WINLOADACCELTABLE  = "WinLoadAccelTable";
     
    544572    PCSZ_DOTCOMMENTS   =  ".COMMENTS";
    545573    PCSZ_PATH     =  "PATH";
     574    PCSZ_LIBPATH       =  "LIBPATH";
     575    pLibPathStrict = "SET LIBPATHSTRICT=TRUE";
     576    PCSZ_WPURLDEFAULTSETTINGS = "WPURLDEFAULTSETTINGS";
    546577    WC_OBJECTWINDOW    =  "WC_OBJECTWINDOW";
    547578    WC_BUBBLE          =  "WC_BUBBLE";
     
    14091440    ULONG ulAppType;
    14101441
    1411     FullPath = searchapath(PCSZ_PATH, "LVMGUI.CMD");
     1442    FullPath = searchapath(PCSZ_PATH, PCSZ_LVMGUICMD);
    14121443    if (*FullPath)
    14131444      fLVMGui = TRUE;
    1414     if (!DosQueryAppType("DFSOS2.EXE", &ulAppType))
     1445    if (!DosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType))
    14151446      fDFSee = TRUE;
    1416     if (!DosQueryAppType("MINILVM.EXE", &ulAppType))
     1447    if (!DosQueryAppType(PCSZ_MINILVMEXE, &ulAppType))
    14171448      fMiniLVM = TRUE;
    1418     if (!DosQueryAppType("FDISK.EXE", &ulAppType))
     1449    if (!DosQueryAppType(PCSZ_FDISKPMEXE, &ulAppType))
    14191450      fFDisk = TRUE;
    1420     if (!DosQueryAppType("LVM.EXE", &ulAppType))
     1451    if (!DosQueryAppType(PCSZ_LVMEXE, &ulAppType))
    14211452      fLVM = TRUE;
    14221453
     
    17911822  PrfQueryProfileData(fmprof, FM3Str, "TrashCan", &fTrashCan, &size);
    17921823
    1793   LoadDetailsSwitches("DirCnr", &dsDirCnrDefault);
     1824  LoadDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault);
    17941825
    17951826  /* load pointers and icons we use */
  • trunk/dll/init.h

    r1398 r1400  
    1717  07 Feb 09 GKY Move repeated strings to PCSZs.
    1818  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     19  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    1920
    2021***********************************************************************/
     
    4142extern PCSZ PCSZ_FM2PLAYEXE;
    4243extern PCSZ PCSZ_FM2PLAYTEMP;
     44extern PCSZ PCSZ_LVMGUICMD;
     45extern PCSZ PCSZ_DFSOS2EXE;
     46extern PCSZ PCSZ_MINILVMEXE;
     47extern PCSZ PCSZ_FDISKPMEXE;
     48extern PCSZ PCSZ_LVMEXE;
     49extern PCSZ PCSZ_ARCCNR;
     50extern PCSZ PCSZ_COLLECTOR;
     51extern PCSZ PCSZ_DIRCNR;
     52extern PCSZ PCSZ_DIRSIZES;
     53extern PCSZ PCSZ_TOOLBAR;
     54extern PCSZ PCSZ_TREECNR;
    4355extern CHAR *CBSIFS;
    4456extern CHAR *DRMDRFFM2ARC;
     
    6274extern ULONG ulTimeFmt;
    6375extern ULONG ulDateFmt;
    64 extern CHAR *FNT_6HELVETICA;
    65 extern CHAR *FNT_8HELVETICA;
    66 extern CHAR *FNT_8HELVETICABOLD;
    67 extern CHAR *FNT_10SYSTEMMONOTEXT;
    68 extern CHAR *FNT_10SYSTEMPROPORT;
    69 extern CHAR *FNT_2SYSTEMVIO;
    70 extern CHAR *FNT_4SYSTEMVIO;
    71 extern CHAR *FNT_10SYSTEMVIO;
    72 extern CHAR *FNT_8TIMESNEWROMAN;
     76extern PCSZ FNT_6HELVETICA;
     77extern PCSZ FNT_8HELVETICA;
     78extern PCSZ FNT_8HELVETICABOLD;
     79extern PCSZ FNT_10SYSTEMMONOTEXT;
     80extern PCSZ FNT_10SYSTEMPROPORT;
     81extern PCSZ FNT_2SYSTEMVIO;
     82extern PCSZ FNT_4SYSTEMVIO;
     83extern PCSZ FNT_10SYSTEMVIO;
     84extern PCSZ FNT_8TIMESNEWROMAN;
    7385extern PCSZ PCSZ_DOSCREATEMUTEXSEM;
    7486extern PCSZ PCSZ_DOSDUPHANDLE;
     
    7688extern PCSZ PCSZ_DOSQUERYPATHINFO;
    7789extern PCSZ PCSZ_DOSSEARCHPATH;
     90extern PCSZ PCSZ_POSTMSG;
    7891extern PCSZ PCSZ_WINCREATEWINDOW;
    7992extern PCSZ PCSZ_WINLOADACCELTABLE;
     
    110123extern PCSZ PCSZ_DOTCOMMENTS;
    111124extern PCSZ PCSZ_PATH;
    112 extern CHAR *WC_ARCCONTAINER;
    113 extern CHAR *WC_ARCSTATUS;
    114 extern CHAR *WC_AUTOVIEW;
    115 extern CHAR *WC_BUBBLE;
    116 extern CHAR *WC_COLLECTOR;
    117 extern CHAR *WC_COLSTATUS;
    118 extern CHAR *WC_DATABAR;
    119 extern CHAR *WC_DIRCONTAINER;
    120 extern CHAR *WC_DIRSTATUS;
    121 extern CHAR *WC_DRIVEBACK;
    122 extern CHAR *WC_DRIVEBUTTONS;
    123 extern CHAR *WC_ERRORWND;
    124 extern CHAR *WC_INIEDITOR;
    125 extern CHAR *WC_LED;
    126 extern CHAR *WC_MAINWND2;
    127 extern CHAR *WC_MINITIME;
    128 extern CHAR *WC_MLEEDITOR;
    129 extern CHAR *WC_NEWVIEW;
    130 extern CHAR *WC_OBJECTWINDOW;
    131 extern CHAR *WC_SEEALL;
    132 extern CHAR *WC_SEESTATUS;
    133 extern CHAR *WC_STATUS;
    134 extern CHAR *WC_TOOLBACK;
    135 extern CHAR *WC_TOOLBUTTONS;
    136 extern CHAR *WC_TREECONTAINER;
    137 extern CHAR *WC_TREEOPENBUTTON;
    138 extern CHAR *WC_TREESTATUS;
    139 extern CHAR *WC_VIEWSTATUS;
     125extern PCSZ PCSZ_LIBPATH;
     126extern PCSZ PCSZ_WPURLDEFAULTSETTINGS;
     127extern PCSZ WC_ARCCONTAINER;
     128extern PCSZ WC_ARCSTATUS;
     129extern PCSZ WC_AUTOVIEW;
     130extern PCSZ WC_BUBBLE;
     131extern PCSZ WC_COLLECTOR;
     132extern PCSZ WC_COLSTATUS;
     133extern PCSZ WC_DATABAR;
     134extern PCSZ WC_DIRCONTAINER;
     135extern PCSZ WC_DIRSTATUS;
     136extern PCSZ WC_DRIVEBACK;
     137extern PCSZ WC_DRIVEBUTTONS;
     138extern PCSZ WC_ERRORWND;
     139extern PCSZ WC_INIEDITOR;
     140extern PCSZ WC_LED;
     141extern PCSZ WC_MAINWND2;
     142extern PCSZ WC_MINITIME;
     143extern PCSZ WC_MLEEDITOR;
     144extern PCSZ WC_NEWVIEW;
     145extern PCSZ WC_OBJECTWINDOW;
     146extern PCSZ WC_SEEALL;
     147extern PCSZ WC_SEESTATUS;
     148extern PCSZ WC_STATUS;
     149extern PCSZ WC_TOOLBACK;
     150extern PCSZ WC_TOOLBUTTONS;
     151extern PCSZ WC_TREECONTAINER;
     152extern PCSZ WC_TREEOPENBUTTON;
     153extern PCSZ WC_TREESTATUS;
     154extern PCSZ WC_VIEWSTATUS;
    140155extern BOOL fInitialDriveScan;
    141156extern BOOL fAmAV2;
     
    165180extern CHAR *pTmpDir;
    166181extern CHAR profile[CCHMAXPATH];
     182extern CHAR *pLibPathStrict;
    167183extern ULONGLONG ullTmpSpaceNeeded;
    168184extern HMTX hmtxFM2Globals;
  • trunk/dll/mainwnd.c

    r1398 r1400  
    8080  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
    8181  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     82  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     83  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     84  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    8285
    8386***********************************************************************/
     
    154157#include "select.h"                     // UnHilite
    155158#include "strips.h"                     // bstrip
    156 #include "commafmt.h"                   // CommaFmtULL
     159#include "i18nutil.h"                   // CommaFmtULL
    157160#include "valid.h"                      // IsFullName
    158161#include "dirs.h"                       // save_dir2
     
    26592662
    26602663  case WM_PRESPARAMCHANGED:
    2661     PresParamChanged(hwnd, "ToolBar", mp1, mp2);
     2664    PresParamChanged(hwnd, PCSZ_TOOLBAR, mp1, mp2);
    26622665    WinInvalidateRect(hwnd, NULL, TRUE);
    26632666    break;
     
    26682671      TOOL *tool;
    26692672
    2670       RestorePresParams(hwnd, "ToolBar");
     2673      RestorePresParams(hwnd, PCSZ_TOOLBAR);
    26712674      id = SHORT1FROMMP(mp1);
    26722675      tool = find_tool(id);
     
    29812984            PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & swp,
    29822985                                sizeof(SWP));
    2983             dcd =
    2984               WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
     2986            dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
    29852987            if (dcd) {
    29862988              sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, numsaves);
     
    30093011              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & flWindowAttr,
    30103012                                  sizeof(ULONG));
    3011               sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, numsaves);
    3012               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslongname,
    3013                                   sizeof(BOOL));
    3014               sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, numsaves);
    3015               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailssubject,
    3016                                   sizeof(BOOL));
    3017               sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, numsaves);
    3018               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailssize,
    3019                                   sizeof(BOOL));
    3020               sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, numsaves);
    3021               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsea,
    3022                                   sizeof(BOOL));
    3023               sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, numsaves);
    3024               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsattr,
    3025                                   sizeof(BOOL));
    3026               sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, numsaves);
    3027               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsicon,
    3028                                   sizeof(BOOL));
    3029               sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, numsaves);
    3030               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslwdate,
    3031                                   sizeof(BOOL));
    3032               sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, numsaves);
    3033               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslwtime,
    3034                                   sizeof(BOOL));
    3035               sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, numsaves);
    3036               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsladate,
    3037                                   sizeof(BOOL));
    3038               sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, numsaves);
    3039               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslatime,
    3040                                   sizeof(BOOL));
    3041               sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, numsaves);
    3042               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailscrdate,
    3043                                   sizeof(BOOL));
    3044               sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, numsaves);
    3045               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailscrtime,
    3046                                   sizeof(BOOL));
     3013              sprintf(szKey, "%sDirCnr.%lu", szPrefix, numsaves);
     3014              WriteDetailsSwitches(szKey, &dcd->ds);
    30473015              sprintf(szKey, "%sDirCnr.%lu", szPrefix, numsaves);
    30483016              SavePresParams(hwndDir, szKey);
     
    30683036      sprintf(szKey, "%sDirCnrView.%lu", szPrefix, ulTemp);
    30693037      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(ULONG));
    3070       sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, ulTemp);
    3071       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3072       sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, ulTemp);
    3073       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3074       sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, ulTemp);
    3075       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3076       sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, ulTemp);
    3077       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3078       sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, ulTemp);
    3079       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3080       sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, ulTemp);
    3081       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3082       sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, ulTemp);
    3083       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3084       sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, ulTemp);
    3085       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3086       sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, ulTemp);
    3087       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3088       sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, ulTemp);
    3089       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3090       sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, ulTemp);
    3091       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    3092       sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, ulTemp);
    3093       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
     3038
     3039      sprintf(szKey, "%sDirCnr.%lu", szPrefix, ulTemp);
     3040      WriteDetailsSwitches(szKey, NULL);
    30943041      sprintf(szKey, "%sDirCnrDir.%lu", szPrefix, ulTemp);
    30953042      PrfWriteProfileString(fmprof, FM3Str, szKey, NULL);
     
    32933240              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    32943241          }
    3295           localdcd.ds.detailssubject = dsDirCnrDefault.detailssubject;  // Set default
    3296           sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, x);
    3297           size = sizeof(BOOL);
    3298           if (PrfQueryProfileData(fmprof,
    3299                                   FM3Str,
    3300                                   szKey,
    3301                                   (PVOID) &localdcd.ds.detailssubject,
    3302                                   &size))
    3303           {
    3304             if (fDeleteState)
    3305               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3306           }
    3307           localdcd.ds.detailsea = dsDirCnrDefault.detailsea;  // Set default
    3308           sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, x);
    3309           size = sizeof(BOOL);
    3310           if (PrfQueryProfileData(fmprof,
    3311                                   FM3Str,
    3312                                   szKey,
    3313                                   (PVOID) &localdcd.ds.detailsea,
    3314                                   &size))
    3315           {
    3316             if (fDeleteState)
    3317               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3318           }
    3319           localdcd.ds.detailssize = dsDirCnrDefault.detailssize;  // Set default
    3320           sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, x);
    3321           size = sizeof(BOOL);
    3322           if (PrfQueryProfileData(fmprof,
    3323                                   FM3Str,
    3324                                   szKey,
    3325                                   (PVOID) &localdcd.ds.detailssize,
    3326                                   &size))
    3327           {
    3328             if (fDeleteState)
    3329               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3330           }
    3331           localdcd.ds.detailsicon = dsDirCnrDefault.detailsicon;  // Set default
    3332           sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, x);
    3333           size = sizeof(BOOL);
    3334           if (PrfQueryProfileData(fmprof,
    3335                                   FM3Str,
    3336                                   szKey,
    3337                                   (PVOID) &localdcd.ds.detailsicon,
    3338                                   &size))
    3339           {
    3340             if (fDeleteState)
    3341               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3342           }
    3343           localdcd.ds.detailsattr = dsDirCnrDefault.detailsattr;  // Set default
    3344           sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, x);
    3345           size = sizeof(BOOL);
    3346           if (PrfQueryProfileData(fmprof,
    3347                                   FM3Str,
    3348                                   szKey,
    3349                                   (PVOID) &localdcd.ds.detailsattr,
    3350                                   &size))
    3351           {
    3352             if (fDeleteState)
    3353               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3354           }
    3355           localdcd.ds.detailscrdate = dsDirCnrDefault.detailscrdate;  // Set default
    3356           sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, x);
    3357           size = sizeof(BOOL);
    3358           if (PrfQueryProfileData(fmprof,
    3359                                   FM3Str,
    3360                                   szKey,
    3361                                   (PVOID) &localdcd.ds.detailscrdate,
    3362                                   &size))
    3363           {
    3364             if (fDeleteState)
    3365               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3366           }
    3367           localdcd.ds.detailscrtime = dsDirCnrDefault.detailscrtime;  // Set default
    3368           sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, x);
    3369           size = sizeof(BOOL);
    3370           if (PrfQueryProfileData(fmprof,
    3371                                   FM3Str,
    3372                                   szKey,
    3373                                   (PVOID) &localdcd.ds.detailscrtime,
    3374                                   &size))
    3375           {
    3376             if (fDeleteState)
    3377               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3378           }
    3379           localdcd.ds.detailslwdate = dsDirCnrDefault.detailslwdate;  // Set default
    3380           sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, x);
    3381           size = sizeof(BOOL);
    3382           if (PrfQueryProfileData(fmprof,
    3383                                   FM3Str,
    3384                                   szKey,
    3385                                   (PVOID) &localdcd.ds.detailslwdate,
    3386                                   &size))
    3387           {
    3388             if (fDeleteState)
    3389               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3390           }
    3391           localdcd.ds.detailslwtime = dsDirCnrDefault.detailslwtime;  // Set default
    3392           sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, x);
    3393           size = sizeof(BOOL);
    3394           if (PrfQueryProfileData(fmprof,
    3395                                   FM3Str,
    3396                                   szKey,
    3397                                   (PVOID) &localdcd.ds.detailslwtime,
    3398                                   &size))
    3399           {
    3400             if (fDeleteState)
    3401               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3402           }
    3403           localdcd.ds.detailsladate = dsDirCnrDefault.detailsladate;  // Set default
    3404           sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, x);
    3405           size = sizeof(BOOL);
    3406           if (PrfQueryProfileData(fmprof,
    3407                                   FM3Str,
    3408                                   szKey,
    3409                                   (PVOID) &localdcd.ds.detailsladate,
    3410                                   &size))
    3411           {
    3412             if (fDeleteState)
    3413               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3414           }
    3415           localdcd.ds.detailslatime = dsDirCnrDefault.detailslatime;  // Set default
    3416           sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, x);
    3417           size = sizeof(BOOL);
    3418           if (PrfQueryProfileData(fmprof,
    3419                                   FM3Str,
    3420                                   szKey,
    3421                                   (PVOID) &localdcd.ds.detailslatime,
    3422                                   &size))
    3423           {
    3424             if (fDeleteState)
    3425               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
    3426           }
     3242
     3243          sprintf(szKey, "%sDirCnr.%lu", szPrefix, x);
     3244          LoadDetailsSwitches(szKey, &localdcd.ds);
     3245          if (fDeleteState)
     3246            WriteDetailsSwitches(szKey, NULL);
    34273247          hwndDir = (HWND) WinSendMsg(hwndClient,
    34283248                                      UM_SETDIR,
     
    34453265                                             HWND_TOP, (ULONG) -1, NULL, NULL);
    34463266                CopyPresParams(hwndPPSave, hwndC);
    3447                 RestorePresParams(hwndPPSave, "DirCnr");
     3267                RestorePresParams(hwndPPSave, PCSZ_DIRCNR);
    34483268              }
    34493269              sprintf(szKey, "%sDirCnr.%lu", szPrefix, x);
     
    35443364    } // for
    35453365    if (hwndPPSave) {
    3546       SavePresParams(hwndPPSave, "DirCnr");
     3366      SavePresParams(hwndPPSave, PCSZ_DIRCNR);
    35473367      WinDestroyWindow(hwndPPSave);
    35483368    }
     
    48604680                PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    48614681                sprintf(s, "%s.DirCnrView.%lu", szStateName, x);
    4862                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4863                 sprintf(s, "%s.DirCnr.%lu.DetailsLongname", szStateName, x);
    4864                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4865                 sprintf(s, "%s.DirCnr.%lu.DetailsSubject", szStateName, x);
    4866                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4867                 sprintf(s, "%s.DirCnr.%lu.DetailsSize", szStateName, x);
    4868                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4869                 sprintf(s, "%s.DirCnr.%lu.DetailsEA", szStateName, x);
    4870                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4871                 sprintf(s, "%s.DirCnr.%lu.DetailsAttr", szStateName, x);
    4872                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4873                 sprintf(s, "%s.DirCnr.%lu.DetailsIcon", szStateName, x);
    4874                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4875                 sprintf(s, "%s.DirCnr.%lu.DetailsLWDate", szStateName, x);
    4876                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4877                 sprintf(s, "%s.DirCnr.%lu.DetailsLWTime", szStateName, x);
    4878                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4879                 sprintf(s, "%s.DirCnr.%lu.DetailsLADate", szStateName, x);
    4880                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4881                 sprintf(s, "%s.DirCnr.%lu.DetailsLATime", szStateName, x);
    4882                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4883                 sprintf(s, "%s.DirCnr.%lu.DetailsCRDate", szStateName, x);
    4884                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
    4885                 sprintf(s, "%s.DirCnr.%lu.DetailsCRTime", szStateName, x);
    4886                 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
     4682                PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
     4683
     4684                sprintf(s, "%s.DirCnr.%lu", szStateName, x);
     4685                WriteDetailsSwitches(s, NULL);
    48874686                sprintf(s, "%s.DirCnr.%lu.Backgroundcolor", szStateName, x);
    48884687                PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
  • trunk/dll/misc.c

    r1398 r1400  
    5454  28 Dec 08 GKY Check for LVM.EXE and remove Refresh removable media menu item as appropriate
    5555  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     56  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     57  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     58  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    5659
    5760***********************************************************************/
     
    97100#include "subj.h"                       // Subject
    98101#include "wrappers.h"                   // xDosSetPathInfo
    99 #include "commafmt.h"                   // CommaFmtULL
     102#include "i18nutil.h"                   // CommaFmtULL
    100103#include "fortify.h"
    101104#include "info.h"                       // driveflags
     
    13141317}
    13151318
    1316 VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS * pds)
     1319VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds)
    13171320{
    13181321  ULONG size;
     
    13921395}
    13931396
     1397VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds)
     1398{
     1399  CHAR s[CCHMAXPATH], *eos = s;
     1400
     1401  strcpy(s, keyroot);
     1402  strcat(s, ".");
     1403  eos = &s[strlen(s)];
     1404  strcpy(eos, "DetailsLongname");
     1405  PrfWriteProfileData(fmprof, appname, s, &pds->detailslongname, sizeof(BOOL));
     1406  strcpy(eos, "DetailsSubject");
     1407  PrfWriteProfileData(fmprof, appname, s, &pds->detailssubject, sizeof(BOOL));
     1408  strcpy(eos, "DetailsEA");
     1409  PrfWriteProfileData(fmprof, appname, s, &pds->detailsea, sizeof(BOOL));
     1410  strcpy(eos, "DetailsSize");
     1411  PrfWriteProfileData(fmprof, appname, s, &pds->detailssize, sizeof(BOOL));
     1412  strcpy(eos, "DetailsIcon");
     1413  PrfWriteProfileData(fmprof, appname, s, &pds->detailsicon, sizeof(BOOL));
     1414  strcpy(eos, "DetailsAttr");
     1415  PrfWriteProfileData(fmprof, appname, s, &pds->detailsattr, sizeof(BOOL));
     1416  strcpy(eos, "DetailsCRDate");
     1417  PrfWriteProfileData(fmprof, appname, s, &pds->detailscrdate, sizeof(BOOL));
     1418  strcpy(eos, "DetailsCRTime");
     1419  PrfWriteProfileData(fmprof, appname, s, &pds->detailscrtime, sizeof(BOOL));
     1420  strcpy(eos, "DetailsLWDate");
     1421  PrfWriteProfileData(fmprof, appname, s, &pds->detailslwdate, sizeof(BOOL));
     1422  strcpy(eos, "DetailsLWTime");
     1423  PrfWriteProfileData(fmprof, appname, s, &pds->detailslwtime, sizeof(BOOL));
     1424  strcpy(eos, "DetailsLADate");
     1425  PrfWriteProfileData(fmprof, appname, s, &pds->detailsladate, sizeof(BOOL));
     1426  strcpy(eos, "DetailsLATime");
     1427  PrfWriteProfileData(fmprof, appname, s, &pds->detailslatime, sizeof(BOOL));
     1428  strcpy(eos, "SubjectInLeftPane");
     1429  PrfWriteProfileData(fmprof, appname, s, &pds->fSubjectInLeftPane, sizeof(BOOL));
     1430  strcpy(eos, "SubjectLengthMax");
     1431  PrfWriteProfileData(fmprof, appname, s, &pds->fSubjectLengthMax, sizeof(BOOL));
     1432  strcpy(eos, "SubjectDisplayWidth");
     1433  PrfWriteProfileData(fmprof, appname, s, &pds->SubjectDisplayWidth, sizeof(ULONG));
     1434}
     1435
     1436
    13941437HWND FindDirCnr(HWND hwndParent)
    13951438{
     
    21802223          if (!strnicmp(pswb->aswentry[i].swctl.szSwtitle, "AV/2", 4)
    21812224              || !stricmp(pswb->aswentry[i].swctl.szSwtitle, "File Manager/2")
    2182               || !stricmp(pswb->aswentry[i].swctl.szSwtitle, "Collector")
     2225              || !stricmp(pswb->aswentry[i].swctl.szSwtitle, PCSZ_COLLECTOR)
    21832226              || !strnicmp(pswb->aswentry[i].swctl.szSwtitle, "VTree", 5)
    21842227              || !strnicmp(pswb->aswentry[i].swctl.szSwtitle, "VDir", 4)
     
    23492392#pragma alloc_text(MISC3,SetupCommandMenu,AdjustDetailsSwitches)
    23502393#pragma alloc_text(MISC3,ViewHelp,GetCmdSpec)
    2351 #pragma alloc_text(MISC3,ExecFile,SetConditionalCascade,LoadDetailsSwitches)
     2394#pragma alloc_text(MISC3,ExecFile,SetConditionalCascade,LoadDetailsSwitches,WriteDetailsSwitches)
    23522395#pragma alloc_text(MISC4,PortholeInit,CheckMenu,Broadcast,SetupWinList,SwitchCommand)
    23532396#pragma alloc_text(MISC6,DrawTargetEmphasis,EmphasizeButton)
  • trunk/dll/misc.h

    r1394 r1400  
    1010
    1111  17 Jul 08 SHL Baseline
     12  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    1213
    1314***********************************************************************/
     
    5152VOID HeapThread(VOID * dummy);
    5253BOOL IsFm2Window(HWND hwnd, BOOL chkTid);
    53 VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS * pds);
     54VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds);
     55VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds);
    5456VOID LoadLibPath(PSZ str, LONG len);
    5557VOID OpenEdit(HWND hwnd);
  • trunk/dll/mle.c

    r1335 r1400  
    2222  06 Jul 08 GKY Rework LoadThread logic with Steven's help
    2323  10 Dec 08 SHL Integrate exception handler support
     24  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    2425
    2526***********************************************************************/
     
    203204
    204205              size = sizeof(WPSDefaultFtpRun);
    205               PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     206              PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    206207                                  "DefaultBrowserExe", WPSDefaultFtpRun, &size);
    207208              size = sizeof(WPSDefaultFtpRunDir);
    208               PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     209              PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    209210                                  "DefaultWorkingDir", WPSDefaultFtpRunDir, &size);
    210211              runemf2(SEPARATE | WINDOWED,
    211212                      h, pszSrcFile, __LINE__,
    212213                      WPSDefaultFtpRunDir,
    213                       fLibPathStrictFtpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     214                      fLibPathStrictFtpRun ? pLibPathStrict : NULL,
    214215                      "%s %s", WPSDefaultFtpRun, temp);
    215216            }
     
    224225
    225226              size = sizeof(WPSDefaultHttpRun);
    226               PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     227              PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    227228                                  "DefaultBrowserExe", WPSDefaultHttpRun, &size);
    228229              size = sizeof(WPSDefaultHttpRunDir);
    229               PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     230              PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    230231                                  "DefaultWorkingDir", WPSDefaultHttpRunDir, &size);
    231232              runemf2(SEPARATE | WINDOWED,
    232233                      h, pszSrcFile, __LINE__,
    233234                      WPSDefaultHttpRunDir,
    234                       fLibPathStrictHttpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     235                      fLibPathStrictHttpRun ? pLibPathStrict : NULL,
    235236                      "%s %s", WPSDefaultHttpRun, temp);
    236237            }
  • trunk/dll/newview.c

    r1398 r1400  
    3636  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    3737  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     38  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     39  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    3840
    3941***********************************************************************/
     
    8385#include "chklist.h"                    // PopupMenu
    8486#include "viewer.h"                     // StartMLEEditor
    85 #include "commafmt.h"                   // commafmt
     87#include "i18nutil.h"                   // commafmt
    8688#include "getnames.h"                   // export_filename
    8789#include "literal.h"                    // literal
     
    18231825                        PP_FONTNAMESIZE,
    18241826                        strlen(FNT_8HELVETICA) + 1,
    1825                         FNT_8HELVETICA);
     1827                        (PVOID) FNT_8HELVETICA);
    18261828      }
    18271829      temphwnd = WinCreateWindow(hwndFrame,
     
    18441846                        PP_FONTNAMESIZE,
    18451847                        strlen(FNT_8HELVETICA) + 1,
    1846                         FNT_8HELVETICA);
     1848                        (PVOID) FNT_8HELVETICA);
    18471849      }
    18481850      WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER5, 1000L);
     
    24692471
    24702472                    size = sizeof(WPSDefaultHttpRun);
    2471                     PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     2473                    PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    24722474                                        "DefaultBrowserExe", WPSDefaultHttpRun, &size);
    24732475                    size = sizeof(WPSDefaultHttpRunDir);
    2474                     PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     2476                    PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    24752477                                        "DefaultWorkingDir", WPSDefaultHttpRunDir, &size);
    24762478                    runemf2(SEPARATE | WINDOWED,
    24772479                            hwnd, pszSrcFile, __LINE__,
    24782480                            WPSDefaultHttpRunDir,
    2479                             fLibPathStrictHttpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     2481                            fLibPathStrictHttpRun ? pLibPathStrict : NULL,
    24802482                            "%s %s", WPSDefaultHttpRun, urld->url);
    24812483                  }
     
    24842486                            hwnd, pszSrcFile, __LINE__,
    24852487                            httprundir,
    2486                             fLibPathStrictHttpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     2488                            fLibPathStrictHttpRun ? pLibPathStrict : NULL,
    24872489                            "%s %s", httprun, urld->url);
    24882490                }
     
    24952497
    24962498                    size = sizeof(WPSDefaultFtpRun);
    2497                     PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     2499                    PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    24982500                                        "DefaultBrowserExe", WPSDefaultFtpRun, &size);
    24992501                    size = sizeof(WPSDefaultFtpRunDir);
    2500                     PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS",
     2502                    PrfQueryProfileData(HINI_USERPROFILE, PCSZ_WPURLDEFAULTSETTINGS,
    25012503                                        "DefaultWorkingDir", WPSDefaultFtpRunDir, &size);
    25022504                    runemf2(SEPARATE | WINDOWED,
    25032505                            hwnd, pszSrcFile, __LINE__,
    25042506                            WPSDefaultFtpRunDir,
    2505                             fLibPathStrictFtpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     2507                            fLibPathStrictFtpRun ? pLibPathStrict : NULL,
    25062508                            "%s %s", WPSDefaultFtpRun, urld->url);
    25072509                  }
     
    25102512                            hwnd, pszSrcFile, __LINE__,
    25112513                            ftprundir,
    2512                             fLibPathStrictFtpRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     2514                            fLibPathStrictFtpRun ? pLibPathStrict : NULL,
    25132515                            "%s %s", ftprun, urld->url);
    25142516                }
     
    25202522                          hwnd, pszSrcFile, __LINE__,
    25212523                          mailrundir,
    2522                           fLibPathStrictMailRun ? "SET LIBPATHSTRICT=TRUE" : NULL,
     2524                          fLibPathStrictMailRun ? pLibPathStrict : NULL,
    25232525                          "%s %s", mailrun, urld->url);
    25242526                }
     
    26372639                          PP_FONTNAMESIZE,
    26382640                          strlen(FNT_8HELVETICA) + 1,
    2639                           FNT_8HELVETICA);
     2641                          (PVOID) FNT_8HELVETICA);
    26402642      }
    26412643      if (ad->hwndPopup) {
  • trunk/dll/notebook.c

    r1398 r1400  
    4747  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    4848  07 Feb 09 GKY Move repeated strings to PCSZs.
     49  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     50  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    4951
    5052***********************************************************************/
     
    23382340    }
    23392341    dsDirCnrDefault.detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES);
    2340     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
    2341                         &dsDirCnrDefault.detailslongname, sizeof(BOOL));
    23422342    dsDirCnrDefault.detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
    2343     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
    2344                         &dsDirCnrDefault.detailssubject, sizeof(BOOL));
    2345     dsDirCnrDefault.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
    2346     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
    2347                         &dsDirCnrDefault.detailsea, sizeof(BOOL));
     2343    dsDirCnrDefault.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS);
    23482344    dsDirCnrDefault.detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE);
    2349     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
    2350                         &dsDirCnrDefault.detailssize, sizeof(BOOL));
    23512345    dsDirCnrDefault.detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON);
    2352     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
    2353                         &dsDirCnrDefault.detailsicon, sizeof(BOOL));
    23542346    dsDirCnrDefault.detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE);
    2355     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
    2356                         &dsDirCnrDefault.detailslwdate, sizeof(BOOL));
    23572347    dsDirCnrDefault.detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME);
    2358     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
    2359                         &dsDirCnrDefault.detailslwtime, sizeof(BOOL));
    23602348    dsDirCnrDefault.detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE);
    2361     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
    2362                         &dsDirCnrDefault.detailsladate, sizeof(BOOL));
    23632349    dsDirCnrDefault.detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME);
    2364     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
    2365                         &dsDirCnrDefault.detailslatime, sizeof(BOOL));
    23662350    dsDirCnrDefault.detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE);
    2367     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
    2368                         &dsDirCnrDefault.detailscrdate, sizeof(BOOL));
    23692351    dsDirCnrDefault.detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME);
    2370     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
    2371                         &dsDirCnrDefault.detailscrtime, sizeof(BOOL));
    23722352    dsDirCnrDefault.detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR);
    2373     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
    2374                         &dsDirCnrDefault.detailsattr, sizeof(BOOL));
    23752353    dsDirCnrDefault.fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE);
    2376     PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectInLeftPane",
    2377                         &dsDirCnrDefault.fSubjectInLeftPane, sizeof(BOOL));
    23782354    dsDirCnrDefault.fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX);
    2379     PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectLengthMax",
    2380                         &dsDirCnrDefault.fSubjectLengthMax, sizeof(BOOL));
    23812355    *mask.prompt = 0;
    23822356    PrfWriteProfileData(fmprof, appname, "DirFilter", &mask, sizeof(MASK));
     
    23922366        else
    23932367          dsDirCnrDefault.SubjectDisplayWidth = 0;
    2394         PrfWriteProfileData(fmprof,
    2395                             appname, "DirCnr.SubjectDisplayWidth",
    2396                             &dsDirCnrDefault.SubjectDisplayWidth, sizeof(ULONG));
    2397     }
     2368    }
     2369    WriteDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault);
    23982370    break;
    23992371  }
     
    26292601
    26302602      memset(&ds, 0, sizeof(ds));
    2631       LoadDetailsSwitches("Collector", &ds);
     2603      LoadDetailsSwitches(PCSZ_COLLECTOR, &ds);
    26322604      WinCheckButton(hwnd, CFG5_SHOWLNAMES, ds.detailslongname);
    26332605      WinCheckButton(hwnd, CFG5_SHOWSUBJECT, ds.detailssubject);
     
    27212693      memset(&ds, 0, sizeof(ds));
    27222694      ds.detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES);
    2723       PrfWriteProfileData(fmprof, appname, "Collector.DetailsLongname",
    2724                           &ds.detailslongname, sizeof(BOOL));
    27252695      ds.detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
    2726       PrfWriteProfileData(fmprof, appname, "Collector.DetailsSubject",
    2727                           &ds.detailssubject, sizeof(BOOL));
    27282696      ds.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS);
    2729       PrfWriteProfileData(fmprof, appname, "Collector.DetailsEA",
    2730                           &ds.detailsea, sizeof(BOOL));
    27312697      ds.detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE);
    2732       PrfWriteProfileData(fmprof, appname, "Collector.DetailsSize",
    2733                           &ds.detailssize, sizeof(BOOL));
    27342698      ds.detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON);
    2735       PrfWriteProfileData(fmprof, appname, "Collector.DetailsIcon",
    2736                           &ds.detailsicon, sizeof(BOOL));
    27372699      ds.detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE);
    2738       PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWDate",
    2739                           &ds.detailslwdate, sizeof(BOOL));
    27402700      ds.detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME);
    2741       PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWTime",
    2742                           &ds.detailslwtime, sizeof(BOOL));
    27432701      ds.detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE);
    2744       PrfWriteProfileData(fmprof, appname, "Collector.DetailsLADate",
    2745                           &ds.detailsladate, sizeof(BOOL));
    27462702      ds.detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME);
    2747       PrfWriteProfileData(fmprof, appname, "Collector.DetailsLATime",
    2748                           &ds.detailslatime, sizeof(BOOL));
    27492703      ds.detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE);
    2750       PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRDate",
    2751                           &ds.detailscrdate, sizeof(BOOL));
    27522704      ds.detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME);
    2753       PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRTime",
    2754                           &ds.detailscrtime, sizeof(BOOL));
    27552705      ds.detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR);
    2756       PrfWriteProfileData(fmprof, appname, "Collector.DetailsAttr",
    2757                           &ds.detailsattr, sizeof(BOOL));
    27582706      ds.fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE);
    2759       PrfWriteProfileData(fmprof, appname, "Collector.SubjectInLeftPane",
    2760                           &ds.fSubjectInLeftPane, sizeof(BOOL));
    27612707      ds.fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX);
    2762       PrfWriteProfileData(fmprof, appname, "Collector.SubjectLengthMax",
    2763                           &ds.fSubjectLengthMax, sizeof(BOOL));
    27642708      *mask.prompt = 0;
    27652709      PrfWriteProfileData(fmprof,
     
    27762720        else
    27772721          ds.SubjectDisplayWidth = 0;
    2778         PrfWriteProfileData(fmprof,
    2779                             appname, "Collector.SubjectDisplayWidth",
    2780                             &ds.SubjectDisplayWidth, sizeof(ULONG));
    2781       }
     2722      }
     2723    WriteDetailsSwitches(PCSZ_COLLECTOR, &ds);
    27822724    }
    27832725    break;
     
    30943036                            appname,
    30953037                            "Collector.Fontnamesize",
    3096                             FNT_8HELVETICA,
     3038                            (PVOID) FNT_8HELVETICA,
    30973039                            strlen(FNT_8HELVETICA) + 1);
    30983040      }
     
    31513093        //fixme to allow user to change presparams 1-10-09 GKY
    31523094        PrfWriteProfileData(fmprof, appname, "Collector.Fontnamesize",
    3153                             FNT_8HELVETICA,
     3095                            (PVOID) FNT_8HELVETICA,
    31543096                            strlen(FNT_8HELVETICA) + 1);
    31553097      }
     
    35853527    }
    35863528    // Save new details settings and refresh windows
    3587     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
    3588                         &dsDirCnrDefault.detailslongname, sizeof(BOOL));
    3589     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
    3590                         &dsDirCnrDefault.detailssubject, sizeof(BOOL));
    3591     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
    3592                         &dsDirCnrDefault.detailsea, sizeof(BOOL));
    3593     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
    3594                         &dsDirCnrDefault.detailssize, sizeof(BOOL));
    3595     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
    3596                         &dsDirCnrDefault.detailsicon, sizeof(BOOL));
    3597     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
    3598                         &dsDirCnrDefault.detailslwdate, sizeof(BOOL));
    3599     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
    3600                         &dsDirCnrDefault.detailslwtime, sizeof(BOOL));
    3601     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
    3602                         &dsDirCnrDefault.detailsladate, sizeof(BOOL));
    3603     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
    3604                         &dsDirCnrDefault.detailslatime, sizeof(BOOL));
    3605     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
    3606                         &dsDirCnrDefault.detailscrdate, sizeof(BOOL));
    3607     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
    3608                         &dsDirCnrDefault.detailscrtime, sizeof(BOOL));
    3609     PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
    3610                         &dsDirCnrDefault.detailsattr, sizeof(BOOL));
     3529    WriteDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault);
    36113530    if (hwndMain) {
    36123531      // Save state and restore to refresh windows with new settings
  • trunk/dll/presparm.c

    r1348 r1400  
    1313  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    1414  10 Dec 07 GKY Updated CopyPresParams to copy all parameter types
     15  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    1516
    1617***********************************************************************/
     
    373374
    374375VOID SetPresParams(HWND hwnd, RGB2 * back, RGB2 * fore, RGB2 * border,
    375                    CHAR * font)
     376                   PCSZ font)
    376377{
    377378  if (font)
     
    397398#endif
    398399
    399 VOID PresParamChanged(HWND hwnd, CHAR * keyroot, MPARAM mp1, MPARAM mp2)
     400VOID PresParamChanged(HWND hwnd, PCSZ keyroot, MPARAM mp1, MPARAM mp2)
    400401{
    401402  ULONG AttrFound, AttrValue[64], cbRetLen;
     
    435436}
    436437
    437 VOID RestorePresParams(HWND hwnd, CHAR * keyroot)
     438VOID RestorePresParams(HWND hwnd, PCSZ keyroot)
    438439{
    439440  CHAR s[81];
     
    475476   * Save the presentation parameters used by RestorePresParams
    476477   */
    477 VOID SavePresParams(HWND hwnd, CHAR *keyroot)
     478VOID SavePresParams(HWND hwnd, PCSZ keyroot)
    478479{
    479480
  • trunk/dll/presparm.h

    r1241 r1400  
    1010
    1111  Change log
     12  08 Mar 09 GKY Additional strings move to PCSZs in init.c (Delcare changes to PCSZ)
    1213
    1314***********************************************************************/
     
    1718
    1819VOID CopyPresParams(HWND target, HWND source);
    19 VOID PresParamChanged(HWND hwnd, CHAR * keyroot, MPARAM mp1, MPARAM mp2);
    20 VOID RestorePresParams(HWND hwnd, CHAR * keyroot);
    21 VOID SavePresParams(HWND hwnd, CHAR * keyroot);
     20VOID PresParamChanged(HWND hwnd, PCSZ keyroot, MPARAM mp1, MPARAM mp2);
     21VOID RestorePresParams(HWND hwnd, PCSZ keyroot);
     22VOID SavePresParams(HWND hwnd, PCSZ keyroot);
    2223#ifdef INCL_GPI
    2324VOID SetPresParams(HWND hwnd, RGB2 * back, RGB2 * fore, RGB2 * border,
    24                    CHAR * font);
     25                   PCSZ font);
    2526#endif
    2627
  • trunk/dll/rename.c

    r1397 r1400  
    1616  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    1717  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     18  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    1819
    1920***********************************************************************/
     
    3839#include "valid.h"                      // TestFDates
    3940#include "mkdir.h"                      // SetDir
    40 #include "commafmt.h"                   // CommaFmtULL
     41#include "i18nutil.h"                   // CommaFmtULL
    4142#include "strips.h"                     // bstrip
    4243#include "info.h"                       // driveflags
  • trunk/dll/saveclip.c

    r1398 r1400  
    2828  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
    2929  07 Feb 09 GKY Move repeated strings to PCSZs.
     30  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    3031
    3132***********************************************************************/
     
    5758#include "strips.h"                     // bstrip
    5859#include "misc.h"                       // CheckDriveSpaceAvail
    59 #include "commafmt.h"                   // CommaFmtULL
     60#include "i18nutil.h"                   // CommaFmtULL
    6061#include "valid.h"                      // IsRoot
    6162#include "dirs.h"                       // save_dir2
  • trunk/dll/seeall.c

    r1398 r1400  
    4545  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    4646  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     47  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     48  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    4749
    4850***********************************************************************/
     
    101103#include "collect.h"                    // StartCollector
    102104#include "subj.h"                       // Subject
    103 #include "commafmt.h"                   // commafmt
     105#include "i18nutil.h"                   // commafmt
    104106#include "literal.h"                    // wildcard
    105107#include "wrappers.h"                   // xDosFindNext
     
    33323334          WinSetPresParam(pAD->hwndPopup, PP_FONTNAMESIZE,
    33333335                          strlen(FNT_8HELVETICA) + 1,
    3334                           FNT_8HELVETICA);
     3336                          (PVOID) FNT_8HELVETICA);
    33353337          SetConditionalCascade(pAD->hwndPopup,
    33363338                                IDM_DELETESUBMENU,
  • trunk/dll/treecnr.c

    r1398 r1400  
    6262  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    6363  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     64  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     65  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     66  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    6467
    6568***********************************************************************/
     
    122125#include "newview.h"                    // StartViewer
    123126#include "walkem.h"                     // WalkAllDlgProc
    124 #include "commafmt.h"                   // CommaFmtULL
     127#include "i18nutil.h"                   // CommaFmtULL
    125128#include "wrappers.h"                   // xDosFindFirst
    126129#include "systemf.h"                    // runemf2
     
    181184      WinSetPresParam(hwnd, PP_FONTNAMESIZE,
    182185                      strlen(FNT_8TIMESNEWROMAN) + 1,
    183                       FNT_8TIMESNEWROMAN);
     186                      (PVOID) FNT_8TIMESNEWROMAN);
    184187      return rc;
    185188    }
     
    11151118
    11161119  case WM_PRESPARAMCHANGED:
    1117     PresParamChanged(hwnd, "TreeCnr", mp1, mp2);
     1120    PresParamChanged(hwnd, PCSZ_TREECNR, mp1, mp2);
    11181121    break;
    11191122
     
    12721275#       endif
    12731276
    1274         RestorePresParams(hwnd, "TreeCnr");
     1277        RestorePresParams(hwnd, PCSZ_TREECNR);
    12751278        memset(&cnri, 0, sizeof(CNRINFO));
    12761279        cnri.cb = sizeof(CNRINFO);
     
    23092312      else {
    23102313        if (!PostMsg(dcd->hwndObject, UM_COMMAND, mp1, mp2)) {
    2311           Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     2314          Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    23122315          FreeListInfo((LISTINFO *) mp1);
    23132316        }
     
    26002603        runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
    26012604                NULL, NULL,
    2602                 "%s", "MINILVM.EXE");
     2605                "%s", PCSZ_MINILVMEXE);
    26032606        break;
    26042607
     
    26062609        runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
    26072610                NULL, NULL,
    2608                 "%s", "DFSOS2.EXE");
     2611                "%s", PCSZ_DFSOS2EXE);
    26092612        break;
    26102613
     
    26122615        runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
    26132616                NULL, NULL,
    2614                 "%s", "LVMGUI.CMD");
     2617                "%s", PCSZ_LVMGUICMD);
    26152618        break;
    26162619
     
    26182621        runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
    26192622                NULL, NULL,
    2620                 "%s", "FDISKPM.EXE");
     2623                "%s", PCSZ_FDISKPMEXE);
    26212624        break;
    26222625
     
    26242627        runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED | WAIT,
    26252628                HWND_DESKTOP, pszSrcFile, __LINE__, NULL, NULL,
    2626                 "%s", "LVM.EXE /RediscoverPRM");
     2629                "%s %s", PCSZ_LVMEXE, "/RediscoverPRM");
    26272630         PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
    26282631        break;
     
    29932996              *li->targetpath = 0;
    29942997            if (!PostMsg(dcd->hwndObject, action, MPFROMP(li), MPVOID)) {
    2995               Runtime_Error(pszSrcFile, __LINE__, "PostMsg");
     2998              Runtime_Error(pszSrcFile, __LINE__, PCSZ_POSTMSG);
    29962999              FreeListInfo(li);
    29973000            }
  • trunk/dll/viewinf.c

    r1398 r1400  
    1919  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    2020  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     21  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    2122
    2223***********************************************************************/
     
    260261                        PP_FONTNAMESIZE,
    261262                        strlen(FNT_10SYSTEMMONOTEXT) + 1,
    262                         FNT_10SYSTEMMONOTEXT);
     263                        (PVOID) FNT_10SYSTEMMONOTEXT);
    263264      }
    264265      WinSetWindowText(hwnd, GetPString(IDS_VIEWHELPFILESTEXT));
  • trunk/dll/walkem.c

    r1398 r1400  
    10411041        if (rc)
    10421042          Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
    1043                     "xDosFindFirst");
     1043                    "DosFindFirst");
    10441044        else if (~findbuf.attrFile & FILE_DIRECTORY)
    10451045          Runtime_Error(pszSrcFile, __LINE__, "not a directory");
     
    10901090        if (rc)
    10911091          Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
    1092                     "xDosFindFirst");
     1092                    "DosFindFirst");
    10931093        else if (~findbuf.attrFile & FILE_DIRECTORY)
    10941094          Runtime_Error(pszSrcFile, __LINE__, "not a directory");
  • trunk/dll/winlist.c

    r1228 r1400  
    1212  22 Jul 06 SHL Check more run time errors
    1313  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     14  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    1415
    1516***********************************************************************/
     
    104105                 !strnicmp(pswb->aswentry[i].swctl.szSwtitle, "AV/2", 4) ||
    105106                 !stricmp(pswb->aswentry[i].swctl.szSwtitle, "File Manager/2")
    106                  || !stricmp(pswb->aswentry[i].swctl.szSwtitle, "Collector")
     107                 || !stricmp(pswb->aswentry[i].swctl.szSwtitle, PCSZ_COLLECTOR)
    107108                 || !strnicmp(pswb->aswentry[i].swctl.szSwtitle, "VTree", 5)
    108109                 || !strnicmp(pswb->aswentry[i].swctl.szSwtitle, "VDir", 4)
Note: See TracChangeset for help on using the changeset viewer.