Changeset 803 for trunk/dll/init.c


Ignore:
Timestamp:
Aug 25, 2007, 9:18:39 PM (18 years ago)
Author:
Steven Levine
Message:

InitFM3DLL: report INI file DosSetPathInfo error correctly
Use BldFullPathName
Work around DosSetPathInfo kernel defect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r796 r803  
    3232  19 Aug 07 SHL Ensure FilesToGet in valid range
    3333  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
     34  23 Aug 07 SHL InitFM3DLL: report INI file DosSetPathInfo error correctly
     35  23 Aug 07 SHL Use BldFullPathName
     36  25 Aug 07 SHL Work around DosSetPathInfo kernel defect
    3437
    3538***********************************************************************/
    3639
    37 #define DEFINE_GLOBALS 1
    38 
    39 #define INCL_DOS
    40 #define INCL_WIN
    41 #define INCL_MMIOOS2
    42 #define INCL_GPI
    43 
    44 #include <os2.h>
    45 #include <os2me.h>
    4640#include <stdlib.h>
    4741#include <stdio.h>
     
    5145#include <time.h>
    5246#include <process.h>
     47
     48#define INCL_DOS
     49#define INCL_WIN
     50#define INCL_MMIOOS2
     51#define INCL_GPI
     52#define INCL_DOSERRORS
     53#include <os2.h>
     54#include <os2me.h>
     55
     56#define DEFINE_GLOBALS 1
    5357
    5458#include "fm3dll.h"
     
    8488  *SwapperDat = 0;
    8589  // Check already known
    86   PrfQueryProfileData(fmprof,
    87                       FM3Str, "SwapperDat", (PVOID) SwapperDat, &size);
     90  PrfQueryProfileData(fmprof, FM3Str, "SwapperDat", SwapperDat, &size);
    8891  if (*SwapperDat) {
    8992    nm = 1;
     
    109112    if (DosQuerySysInfo(QSV_BOOT_DRIVE,
    110113                        QSV_BOOT_DRIVE,
    111                         (PVOID) & nm, (ULONG) sizeof(ULONG))) {
     114                        &nm,
     115                        sizeof(ULONG))) {
    112116      nm = 3;                           // Assume drive C:
    113117    }
     
    145149              strncpy(SwapperDat, p, CCHMAXPATH);
    146150              SwapperDat[CCHMAXPATH - 1] = 0;
    147               if (SwapperDat[strlen(SwapperDat) - 1] != '\\')
    148                 strcat(SwapperDat, "\\");
    149               strcat(SwapperDat, "SWAPPER.DAT");
     151              BldFullPathName(SwapperDat, SwapperDat, "SWAPPER.DAT");
    150152              hdir = HDIR_CREATE;
    151153              nm = 1;
     
    191193    if (env) {
    192194      DosError(FERR_DISABLEHARDERR);
    193       rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa));
     195      rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, sizeof(fsa));
    194196      if (!rc) {
    195197        if (fsa.attrFile & FILE_DIRECTORY) {
    196           strcpy(stringfile, env);
    197           if (stringfile[strlen(stringfile) - 1] != '\\')
    198             strcat(stringfile, "\\");
    199           strcat(stringfile, "FM3RES.STR");
     198          BldFullPathName(stringfile, env, "FM3RES.STR");
    200199          DosError(FERR_DISABLEHARDERR);
    201200          if (DosQueryPathInfo(stringfile, FIL_STANDARD, &fsa, sizeof(fsa)))
     
    271270    RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = (BYTE)204;
    272271    RGBGREY.fcOptions = 0;
    273     FM3UL = *(ULONG *) FM3Str;
     272    FM3UL = *(ULONG *)FM3Str;
    274273    DEBUG_STRING = "Debug -- please report to author";
    275274    break;
     
    307306    if (env) {
    308307      DosError(FERR_DISABLEHARDERR);
    309       rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa));
     308      rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, sizeof(fsa));
    310309      if (!rc) {
    311310        if (fsa.attrFile & FILE_DIRECTORY) {
    312           strcpy(stringfile, env);
    313           if (stringfile[strlen(stringfile) - 1] != '\\')
    314             strcat(stringfile, "\\");
    315           strcat(stringfile, "FM3RES.STR");
     311          BldFullPathName(stringfile, env, "FM3RES.STR");
    316312          DosError(FERR_DISABLEHARDERR);
    317313          if (DosQueryPathInfo(stringfile, FIL_STANDARD, &fsa, sizeof(fsa)))
     
    387383    RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = (BYTE)204;
    388384    RGBGREY.fcOptions = 0;
    389     FM3UL = *(ULONG *) FM3Str;
     385    FM3UL = *(ULONG *)FM3Str;
    390386    DEBUG_STRING = "Debug -- please report to author";
    391387    break;
     
    514510  APIRET rcl = 1;
    515511  APIRET rcq = 1;
    516   PFN pfnResVersion = (PFN) NULL;
     512  PFN pfnResVersion = (PFN)NULL;
    517513  ULONG RVMajor = 0;
    518514  ULONG RVMinor = 0;
    519515  ULONG ret = 0;
    520   FILESTATUS3 fsa;
    521   CHAR *env;
     516  FILESTATUS3 fs3;                      // 25 Aug 07 SHL
     517  PSZ env;
    522518  CHAR dllfile[CCHMAXPATH];
    523519  ULONG size;
     
    535531  env = getenv("FM3INI");
    536532  if (env) {
    537     FILESTATUS3 fsa;
    538     APIRET rc;
    539 
    540533    DosError(FERR_DISABLEHARDERR);
    541     rc = DosQueryPathInfo(env, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa));
     534    rc = DosQueryPathInfo(env, FIL_STANDARD, &fs3, sizeof(fs3));
    542535    if (!rc) {
    543       if (fsa.attrFile & FILE_DIRECTORY) {
    544         strcpy(dllfile, env);
    545         if (dllfile[strlen(dllfile) - 1] != '\\')
    546           strcat(dllfile, "\\");
    547         strcat(dllfile, "FM3RES");
     536      if (fs3.attrFile & FILE_DIRECTORY) {
     537        BldFullPathName(dllfile, env, "FM3RES");        // 23 Aug 07 SHL
    548538        DosError(FERR_DISABLEHARDERR);
    549         if (DosQueryPathInfo(dllfile, FIL_STANDARD, &fsa, sizeof(fsa)))
     539        if (DosQueryPathInfo(dllfile, FIL_STANDARD, (PVOID)&fs3, (ULONG)sizeof(fs3)))
    550540          strcpy(dllfile, "FM3RES");
    551541      }
     
    562552    rc = DosExitList(EXLST_ADD, DeInitFM3DLL);
    563553    if (rc) {
    564       Dos_Error(MB_ENTER,
    565                 rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosExitList failed");
     554      Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     555               "DosExitList");
    566556    }
    567557    rcq = DosQueryProcAddr(FM3ModHandle, 1, "ResVersion", &pfnResVersion);
     
    595585  strcpy(realappname, appname);
    596586  if (!strcmp(appname, FM3Str))
    597     DosSetMaxFH(100L);
     587    DosSetMaxFH(100);
    598588  else if (!strcmp(appname, "VDir") ||
    599589           !strcmp(appname, "VTree") ||
    600590           !strcmp(appname, "VCollect") ||
    601591           !strcmp(appname, "SEEALL") || !strcmp(appname, "FM/4"))
    602     DosSetMaxFH(60L);
     592    DosSetMaxFH(60);
    603593  else
    604     DosSetMaxFH(40L);
     594    DosSetMaxFH(40);
    605595
    606596  if (DosQuerySysInfo(QSV_VERSION_MAJOR,
    607597                      QSV_VERSION_MINOR,
    608                       (PVOID) OS2ver, (ULONG) sizeof(OS2ver))) {
     598                      OS2ver,
     599                      sizeof(OS2ver))) {
    609600    OS2ver[0] = 2;
    610601    OS2ver[1] = 1;
     
    629620  }
    630621  /* timer messages are sent from a separate thread -- start it */
    631   if (!StartTimer())
     622  if (!StartTimer()) {
     623    Runtime_Error(pszSrcFile, __LINE__,
     624                  GetPString(IDS_COULDNTSTARTTHREADTEXT));
    632625    return FALSE;
     626  }
    633627
    634628  /* Are we the workplace shell? */
     
    638632
    639633  if ((!strchr(profile, '\\') && !strchr(profile, ':')) ||
    640       !(fmprof = PrfOpenProfile((HAB) 0, profile))) {
     634      !(fmprof = PrfOpenProfile((HAB)0, profile)))
     635  {
    641636    /* figure out where to put INI file... */
    642     CHAR *env, inipath[CCHMAXPATH];
     637    CHAR inipath[CCHMAXPATH];
     638    // PSZ env;
    643639
    644640    DosError(FERR_DISABLEHARDERR);
     
    651647      strcpy(inipath, env);
    652648      DosError(FERR_DISABLEHARDERR);
    653       rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa));
     649      rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3));
    654650      if (!rc) {
    655         if (fsa.attrFile & FILE_DIRECTORY) {
    656           if (inipath[strlen(inipath) - 1] != '\\')
    657             strcat(inipath, "\\");
    658           strcat(inipath, profile);
    659         }
     651        if (fs3.attrFile & FILE_DIRECTORY)
     652          BldFullPathName(inipath, inipath, profile);
    660653      }
    661654    }
     
    672665      strcpy(inipath, profile);
    673666    DosError(FERR_DISABLEHARDERR);
    674     if (!DosQueryPathInfo(inipath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa))) {
     667
     668    if (!DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3))) {
    675669      fIniExisted = TRUE;
    676       if (fsa.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) {
    677         fsa.attrFile &= (~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM));
    678         if (DosSetPathInfo(inipath, FIL_STANDARD, (PVOID) & fsa,
    679                            (ULONG) sizeof(fsa), 0L))
    680           saymsg(MB_ENTER,
    681                  HWND_DESKTOP,
    682                  GetPString(IDS_ERRORTEXT),
    683                  GetPString(IDS_INIREADONLYTEXT), inipath);
     670      if (fs3.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) {
     671        fs3.attrFile &= ~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM);
     672        rc = DosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0);
     673        if (rc) {
     674          /* Some kernels to do not handle fs3 buffers that cross 64K boundaries
     675             and return ERROR_INVALID_NAME
     676             If code works around the problem because if fs3 crosses the boundary
     677             fsa2 will not because we don't have enough data on the stack for this
     678             to occur 25 Aug 07 SHL
     679          */
     680          if (rc == ERROR_INVALID_NAME) {
     681            FILESTATUS3 fs3x;
     682            fs3x = fs3;
     683            rc = DosSetPathInfo(inipath, FIL_STANDARD, &fs3x, sizeof(fs3x), 0);
     684          }
     685          if (rc) {
     686            Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     687                      GetPString(IDS_INIREADONLYTEXT), inipath);
     688          }
     689        }
    684690      }
    685691    }
    686692
    687     fmprof = PrfOpenProfile((HAB) 0, inipath);
     693    fmprof = PrfOpenProfile((HAB)0, inipath);
    688694    if (!fmprof) {
    689695      strcpy(inipath, "FM3.INI");
    690       fmprof = PrfOpenProfile((HAB) 0, inipath);
     696      fmprof = PrfOpenProfile((HAB)0, inipath);
    691697    }
    692698
    693699    if (!fmprof) {
    694700      Win_Error(NULLHANDLE, NULLHANDLE, pszSrcFile, __LINE__,
    695                 "PrfOpenProfile failed");
     701                "PrfOpenProfile");
    696702      return FALSE;
    697703    }
     
    703709  PrfQueryProfileData(fmprof,
    704710                      FM3Str,
    705                       "SeparateParms", (PVOID) & fSeparateParms, &size);
     711                      "SeparateParms",
     712                      &fSeparateParms,
     713                      &size);
    706714  if (!fSeparateParms)
    707715    strcpy(appname, FM3Str);
     
    725733    env = getenv("FM3INI");
    726734    if (env) {
    727       FILESTATUS3 fsa;
    728       APIRET rc;
    729 
    730735      strcpy(helppath, env);
    731736      DosError(FERR_DISABLEHARDERR);
    732       rc =
    733         DosQueryPathInfo(helppath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa));
     737      rc = DosQueryPathInfo(helppath, FIL_STANDARD, &fs3, sizeof(fs3));
    734738      if (!rc) {
    735         if (fsa.attrFile & FILE_DIRECTORY) {
    736           if (helppath[strlen(helppath) - 1] != '\\')
    737             strcat(helppath, "\\");
    738           strcat(helppath, "FM3.HLP");
     739        if (fs3.attrFile & FILE_DIRECTORY) {
     740          BldFullPathName(helppath, helppath, "FM3.HLP");
    739741          hini.pszHelpLibraryName = helppath;
    740742          hwndHelp = WinCreateHelpInstance(hab, &hini);
     
    929931  // load preferences from profile (INI) file
    930932  size = sizeof(BOOL);
    931   PrfQueryProfileData(fmprof,
    932                       appname, "ShowTarget", (PVOID) & fShowTarget, &size);
    933   size = sizeof(BOOL);
    934   PrfQueryProfileData(fmprof, appname, "CheckMM", (PVOID) & fCheckMM, &size);
    935   size = sizeof(BOOL);
    936   PrfQueryProfileData(fmprof,
    937                       appname,
    938                       "ChangeTarget", (PVOID) & fChangeTarget, &size);
    939   size = sizeof(BOOL);
    940   PrfQueryProfileData(fmprof,
    941                       appname,
    942                       "ConfirmTarget", (PVOID) & fConfirmTarget, &size);
    943   size = sizeof(BOOL);
    944   PrfQueryProfileData(fmprof,
    945                       FM3Str,
    946                       "CustomFileDlg", (PVOID) & fCustomFileDlg, &size);
    947   size = sizeof(BOOL);
    948   PrfQueryProfileData(fmprof,
    949                       FM3Str, "SaveMiniCmds", (PVOID) & fSaveMiniCmds, &size);
    950   size = sizeof(BOOL);
    951   PrfQueryProfileData(fmprof,
    952                       appname, "SaveBigCmds", (PVOID) & fSaveBigCmds, &size);
    953   size = sizeof(BOOL);
    954   PrfQueryProfileData(fmprof,
    955                       appname, "NoFoldMenu", (PVOID) & fNoFoldMenu, &size);
    956   size = sizeof(BOOL);
    957   PrfQueryProfileData(fmprof,
    958                       FM3Str, "ThreadNotes", (PVOID) & fThreadNotes, &size);
    959   size = sizeof(BOOL);
    960   PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", (PVOID) & prnpagenums,
    961                       &size);
    962   size = sizeof(BOOL);
    963   PrfQueryProfileData(fmprof, FM3Str, "Prnalt", (PVOID) & prnalt, &size);
    964   size = sizeof(BOOL);
    965   PrfQueryProfileData(fmprof, FM3Str, "Prnformat", (PVOID) & prnformat,
    966                       &size);
     933  PrfQueryProfileData(fmprof, appname, "ShowTarget", &fShowTarget, &size);
     934  size = sizeof(BOOL);
     935  PrfQueryProfileData(fmprof, appname, "CheckMM", &fCheckMM, &size);
     936  size = sizeof(BOOL);
     937  PrfQueryProfileData(fmprof, appname, "ChangeTarget", &fChangeTarget, &size);
     938  size = sizeof(BOOL);
     939  PrfQueryProfileData(fmprof, appname, "ConfirmTarget", &fConfirmTarget, &size);
     940  size = sizeof(BOOL);
     941  PrfQueryProfileData(fmprof, FM3Str, "CustomFileDlg", &fCustomFileDlg, &size);
     942  size = sizeof(BOOL);
     943  PrfQueryProfileData(fmprof, FM3Str, "SaveMiniCmds", &fSaveMiniCmds, &size);
     944  size = sizeof(BOOL);
     945  PrfQueryProfileData(fmprof, appname, "SaveBigCmds", &fSaveBigCmds, &size);
     946  size = sizeof(BOOL);
     947  PrfQueryProfileData(fmprof, appname, "NoFoldMenu", &fNoFoldMenu, &size);
     948  size = sizeof(BOOL);
     949  PrfQueryProfileData(fmprof, FM3Str, "ThreadNotes", &fThreadNotes, &size);
     950  size = sizeof(BOOL);
     951  PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", &prnpagenums, &size);
     952  size = sizeof(BOOL);
     953  PrfQueryProfileData(fmprof, FM3Str, "Prnalt", &prnalt, &size);
     954  size = sizeof(BOOL);
     955  PrfQueryProfileData(fmprof, FM3Str, "Prnformat", &prnformat, &size);
    967956  size = sizeof(BOOL);
    968957  PrfQueryProfileData(fmprof, FM3Str, "Prnformfeedbefore",
    969                       (PVOID) & prnformfeedbefore, &size);
    970   size = sizeof(BOOL);
    971   PrfQueryProfileData(fmprof,
    972                       FM3Str,
    973                       "Prnformfeedafter", (PVOID) & prnformfeedafter, &size);
    974   size = sizeof(ULONG);
    975   PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces",
    976                       (PVOID) & prntabspaces, &size);
    977   size = sizeof(ULONG);
    978   PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", (PVOID) & prnwidth, &size);
    979   size = sizeof(ULONG);
    980   PrfQueryProfileData(fmprof, FM3Str, "Prnlength", (PVOID) & prnlength,
    981                       &size);
    982   size = sizeof(ULONG);
    983   PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", (PVOID) & prntmargin,
    984                       &size);
    985   size = sizeof(ULONG);
    986   PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", (PVOID) & prnbmargin,
    987                       &size);
    988   size = sizeof(ULONG);
    989   PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", (PVOID) & prnlmargin,
    990                       &size);
    991   size = sizeof(ULONG);
    992   PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", (PVOID) & prnrmargin,
    993                       &size);
    994   size = sizeof(ULONG);
    995   PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", (PVOID) & prnspacing,
    996                       &size);
    997   size = sizeof(BOOL);
    998   PrfQueryProfileData(fmprof, FM3Str, "NoDead", (PVOID) & fNoDead, &size);
    999   size = sizeof(BOOL);
    1000   PrfQueryProfileData(fmprof, FM3Str, "NoFinger", (PVOID) & fNoFinger, &size);
    1001   size = sizeof(BOOL);
    1002   PrfQueryProfileData(fmprof, appname, "SwitchTree", (PVOID) & fSwitchTree,
    1003                       &size);
     958                      &prnformfeedbefore, &size);
     959  size = sizeof(BOOL);
     960  PrfQueryProfileData(fmprof, FM3Str,
     961                      "Prnformfeedafter",&prnformfeedafter, &size);
     962  size = sizeof(ULONG);
     963  PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", &prntabspaces, &size);
     964  size = sizeof(ULONG);
     965  PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", &prnwidth, &size);
     966  size = sizeof(ULONG);
     967  PrfQueryProfileData(fmprof, FM3Str, "Prnlength", &prnlength, &size);
     968  size = sizeof(ULONG);
     969  PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", &prntmargin, &size);
     970  size = sizeof(ULONG);
     971  PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", &prnbmargin, &size);
     972  size = sizeof(ULONG);
     973  PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", &prnlmargin, &size);
     974  size = sizeof(ULONG);
     975  PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", &prnrmargin, &size);
     976  size = sizeof(ULONG);
     977  PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", &prnspacing, &size);
     978  size = sizeof(BOOL);
     979  PrfQueryProfileData(fmprof, FM3Str, "NoDead", &fNoDead, &size);
     980  size = sizeof(BOOL);
     981  PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &size);
     982  size = sizeof(BOOL);
     983  PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &size);
    1004984  size = sizeof(BOOL);
    1005985  PrfQueryProfileData(fmprof, appname, "SwitchTreeExpand",
    1006                       (PVOID) & fSwitchTreeExpand, &size);
     986                      &fSwitchTreeExpand, &size);
    1007987  size = sizeof(BOOL);
    1008988  PrfQueryProfileData(fmprof, appname, "SwitchTreeOnFocus",
    1009                       (PVOID) & fSwitchTreeOnFocus, &size);
     989                      &fSwitchTreeOnFocus, &size);
    1010990  size = sizeof(BOOL);
    1011991  PrfQueryProfileData(fmprof, appname, "CollapseFirst",
    1012                       (PVOID) & fCollapseFirst, &size);
     992                      &fCollapseFirst, &size);
    1013993  size = sizeof(BOOL);
    1014994  PrfQueryProfileData(fmprof, appname, "FilesInTree",
    1015                       (PVOID) & fFilesInTree, &size);
    1016   size = sizeof(BOOL);
    1017   PrfQueryProfileData(fmprof, FM3Str, "TopDir", (PVOID) & fTopDir, &size);
    1018   size = sizeof(BOOL);
    1019   PrfQueryProfileData(fmprof, FM3Str, "LookInDir", (PVOID) & fLookInDir,
    1020                       &size);
     995                      &fFilesInTree, &size);
     996  size = sizeof(BOOL);
     997  PrfQueryProfileData(fmprof, FM3Str, "TopDir", &fTopDir, &size);
     998  size = sizeof(BOOL);
     999  PrfQueryProfileData(fmprof, FM3Str, "LookInDir", &fLookInDir, &size);
    10211000  PrfQueryProfileString(fmprof, appname, "DefArc", NULL, szDefArc,
    10221001                        sizeof(szDefArc));
    10231002  size = sizeof(ULONG);
    10241003  PrfQueryProfileData(fmprof, FM3Str, "AutoviewHeight",
    1025                       (PVOID) & AutoviewHeight, &size);
    1026   size = sizeof(BOOL);
    1027   PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", (PVOID) & fKeepCmdLine,
    1028                       &size);
     1004                      &AutoviewHeight, &size);
     1005  size = sizeof(BOOL);
     1006  PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", &fKeepCmdLine, &size);
    10291007  if (strcmp(realappname, "FM/4")) {
    10301008    size = sizeof(BOOL);
    1031     PrfQueryProfileData(fmprof,
    1032                         FM3Str, "MoreButtons", (PVOID) & fMoreButtons, &size);
     1009    PrfQueryProfileData(fmprof, FM3Str, "MoreButtons", &fMoreButtons, &size);
    10331010    size = sizeof(BOOL);
    1034     PrfQueryProfileData(fmprof,
    1035                         FM3Str, "Drivebar", (PVOID) & fDrivebar, &size);
     1011    PrfQueryProfileData(fmprof, FM3Str, "Drivebar", &fDrivebar, &size);
    10361012  }
    10371013  else
    10381014    fDrivebar = fMoreButtons = TRUE;
    10391015  size = sizeof(BOOL);
    1040   PrfQueryProfileData(fmprof,
    1041                       appname, "NoSearch", (PVOID) & fNoSearch, &size);
    1042   size = sizeof(BOOL);
    1043   PrfQueryProfileData(fmprof,
    1044                       appname, "GuessType", (PVOID) & fGuessType, &size);
    1045   size = sizeof(BOOL);
    1046   PrfQueryProfileData(fmprof,
    1047                       appname, "ViewChild", (PVOID) & fViewChild, &size);
    1048   size = sizeof(BOOL);
    1049   PrfQueryProfileData(fmprof, appname, "ShowEnv", (PVOID) & fShowEnv, &size);
    1050   size = sizeof(BOOL);
    1051   PrfQueryProfileData(fmprof,
    1052                       appname, "LeaveTree", (PVOID) & fLeaveTree, &size);
    1053   size = sizeof(BOOL);
    1054   PrfQueryProfileData(fmprof, FM3Str, "Comments", (PVOID) & fComments, &size);
    1055   size = sizeof(ULONG);
    1056   PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", (PVOID) & fwsAnimate,
    1057                       &size);
     1016  PrfQueryProfileData(fmprof, appname, "NoSearch", &fNoSearch, &size);
     1017  size = sizeof(BOOL);
     1018  PrfQueryProfileData(fmprof, appname, "GuessType", &fGuessType, &size);
     1019  size = sizeof(BOOL);
     1020  PrfQueryProfileData(fmprof, appname, "ViewChild", &fViewChild, &size);
     1021  size = sizeof(BOOL);
     1022  PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &size);
     1023  size = sizeof(BOOL);
     1024  PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &size);
     1025  size = sizeof(BOOL);
     1026  PrfQueryProfileData(fmprof, FM3Str, "Comments", &fComments, &size);
     1027  size = sizeof(ULONG);
     1028  PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", &fwsAnimate, &size);
    10581029  if (fwsAnimate)
    10591030    fwsAnimate = WS_ANIMATE;
     
    10611032  size = sizeof(BOOL);
    10621033  PrfQueryProfileData(fmprof, appname, "SelectedAlways",
    1063                       (PVOID) & fSelectedAlways, &size);
    1064   size = sizeof(BOOL);
    1065   PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", (PVOID) & fToolbarHelp,
    1066                       &size);
    1067   size = sizeof(BOOL);
    1068   PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", (PVOID) & fOtherHelp,
    1069                       &size);
    1070   size = sizeof(BOOL);
    1071   PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", (PVOID) & fDrivebarHelp,
    1072                       &size);
    1073   size = sizeof(BOOL);
    1074   PrfQueryProfileData(fmprof,
    1075                       appname, "AutoAddDirs", (PVOID) & fAutoAddDirs, &size);
    1076   size = sizeof(BOOL);
    1077   PrfQueryProfileData(fmprof,
    1078                       appname,
    1079                       "AutoAddAllDirs", (PVOID) & fAutoAddAllDirs, &size);
     1034                      &fSelectedAlways, &size);
     1035  size = sizeof(BOOL);
     1036  PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", &fToolbarHelp, &size);
     1037  size = sizeof(BOOL);
     1038  PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", &fOtherHelp, &size);
     1039  size = sizeof(BOOL);
     1040  PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", &fDrivebarHelp, &size);
     1041  size = sizeof(BOOL);
     1042  PrfQueryProfileData(fmprof, appname, "AutoAddDirs", &fAutoAddDirs, &size);
     1043  size = sizeof(BOOL);
     1044  PrfQueryProfileData(fmprof, appname,
     1045                      "AutoAddAllDirs", &fAutoAddAllDirs, &size);
    10801046  size = sizeof(BOOL);
    10811047  PrfQueryProfileData(fmprof, FM3Str, "UserListSwitches",
    1082                       (PVOID) & fUserListSwitches, &size);
     1048                      &fUserListSwitches, &size);
    10831049  size = sizeof(BOOL);
    10841050  PrfQueryProfileData(fmprof, appname, "UseNewViewer",
    1085                       (PVOID) & fUseNewViewer, &size);
     1051                      &fUseNewViewer, &size);
    10861052  size = sizeof(BOOL);
    10871053  PrfQueryProfileData(fmprof, appname, "DefaultDeletePerm",
    1088                       (PVOID) & fDefaultDeletePerm, &size);
     1054                      &fDefaultDeletePerm, &size);
    10891055  size = sizeof(BOOL);
    10901056  PrfQueryProfileData(fmprof, FM3Str, "ExternalINIs",
    1091                       (PVOID) & fExternalINIs, &size);
     1057                      &fExternalINIs, &size);
    10921058  size = sizeof(BOOL);
    10931059  PrfQueryProfileData(fmprof, FM3Str, "ExternalCollector",
    1094                       (PVOID) & fExternalCollector, &size);
     1060                      &fExternalCollector, &size);
    10951061  size = sizeof(BOOL);
    10961062  PrfQueryProfileData(fmprof, FM3Str, "ExternalArcboxes",
    1097                       (PVOID) & fExternalArcboxes, &size);
     1063                      &fExternalArcboxes, &size);
    10981064  size = sizeof(BOOL);
    10991065  PrfQueryProfileData(fmprof, FM3Str, "ExternalViewer",
    1100                       (PVOID) & fExternalViewer, &size);
     1066                      &fExternalViewer, &size);
    11011067  size = sizeof(BOOL);
    11021068  PrfQueryProfileData(fmprof, FM3Str, "UseQProcStat",
    1103                       (PVOID) & fUseQProcStat, &size);
    1104   size = sizeof(BOOL);
    1105   PrfQueryProfileData(fmprof, FM3Str, "DataMin", (PVOID) & fDataMin, &size);
    1106   size = sizeof(BOOL);
    1107   PrfQueryProfileData(fmprof, appname, "DataToFore", (PVOID) & fDataToFore,
    1108                       &size);
     1069                      &fUseQProcStat, &size);
     1070  size = sizeof(BOOL);
     1071  PrfQueryProfileData(fmprof, FM3Str, "DataMin", &fDataMin, &size);
     1072  size = sizeof(BOOL);
     1073  PrfQueryProfileData(fmprof, appname, "DataToFore", &fDataToFore, &size);
    11091074  size = sizeof(BOOL);
    11101075  PrfQueryProfileData(fmprof, appname, "DataShowDrives",
    1111                       (PVOID) & fDataShowDrives, &size);
     1076                      &fDataShowDrives, &size);
    11121077  size = sizeof(BOOL);
    11131078  PrfQueryProfileData(fmprof, appname, "DataInclRemote",
    1114                       (PVOID) & fDataInclRemote, &size);
    1115   size = sizeof(BOOL);
    1116   PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", (PVOID) & fSplitStatus,
    1117                       &size);
     1079                      &fDataInclRemote, &size);
     1080  size = sizeof(BOOL);
     1081  PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", &fSplitStatus, &size);
    11181082  size = sizeof(BOOL);
    11191083  PrfQueryProfileData(fmprof, appname, "FolderAfterExtract",
    1120                       (PVOID) & fFolderAfterExtract, &size);
    1121   size = sizeof(BOOL);
    1122   PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", (PVOID) & fDullMin,
    1123                       &size);
    1124   size = sizeof(BOOL);
    1125   PrfQueryProfileData(fmprof, appname, "BlueLED", (PVOID) & fBlueLED, &size);
     1084                      &fFolderAfterExtract, &size);
     1085  size = sizeof(BOOL);
     1086  PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", &fDullMin, &size);
     1087  size = sizeof(BOOL);
     1088  PrfQueryProfileData(fmprof, appname, "BlueLED", &fBlueLED, &size);
    11261089  size = sizeof(BOOL);
    11271090  PrfQueryProfileData(fmprof, appname, "ConfirmDelete",
    1128                       (PVOID) & fConfirmDelete, &size);
    1129   size = sizeof(BOOL);
    1130   PrfQueryProfileData(fmprof, FM3Str, "SaveState", (PVOID) & fSaveState,
    1131                       &size);
    1132   size = sizeof(BOOL);
    1133   PrfQueryProfileData(fmprof, appname, "SyncUpdates", (PVOID) & fSyncUpdates,
    1134                       &size);
    1135   size = sizeof(BOOL);
    1136   PrfQueryProfileData(fmprof, appname, "LoadSubject", (PVOID) & fLoadSubject,
    1137                       &size);
    1138   size = sizeof(BOOL);
    1139   PrfQueryProfileData(fmprof, appname, "UnHilite", (PVOID) & fUnHilite,
    1140                       &size);
    1141   size = sizeof(BOOL);
    1142   PrfQueryProfileData(fmprof, FM3Str, "TileBackwards",
    1143                       (PVOID) & fTileBackwards, &size);
    1144   size = sizeof(BOOL);
    1145   PrfQueryProfileData(fmprof, appname, "LoadLongname",
    1146                       (PVOID) & fLoadLongnames, &size);
    1147   size = sizeof(BOOL);
    1148   PrfQueryProfileData(fmprof, appname, "VerifyWrites", (PVOID) & fVerify,
    1149                       &size);
     1091                      &fConfirmDelete, &size);
     1092  size = sizeof(BOOL);
     1093  PrfQueryProfileData(fmprof, FM3Str, "SaveState", &fSaveState, &size);
     1094  size = sizeof(BOOL);
     1095  PrfQueryProfileData(fmprof, appname, "SyncUpdates", &fSyncUpdates, &size);
     1096  size = sizeof(BOOL);
     1097  PrfQueryProfileData(fmprof, appname, "LoadSubject", &fLoadSubject, &size);
     1098  size = sizeof(BOOL);
     1099  PrfQueryProfileData(fmprof, appname, "UnHilite", &fUnHilite, &size);
     1100  size = sizeof(BOOL);
     1101  PrfQueryProfileData(fmprof, FM3Str, "TileBackwards", &fTileBackwards, &size);
     1102  size = sizeof(BOOL);
     1103  PrfQueryProfileData(fmprof, appname, "LoadLongname", &fLoadLongnames, &size);
     1104  size = sizeof(BOOL);
     1105  PrfQueryProfileData(fmprof, appname, "VerifyWrites", &fVerify, &size);
    11501106  DosSetVerify(fVerify);
    11511107  size = sizeof(BOOL);
    1152   PrfQueryProfileData(fmprof, appname, "DontMoveMouse",
    1153                       (PVOID) & fDontMoveMouse, &size);
    1154   size = sizeof(BOOL);
    1155   PrfQueryProfileData(fmprof, appname, "NoIconsFiles",
    1156                       (PVOID) & fNoIconsFiles, &size);
    1157   size = sizeof(BOOL);
    1158   PrfQueryProfileData(fmprof, appname, "NoIconsDirs", (PVOID) & fNoIconsDirs,
    1159                       &size);
    1160   size = sizeof(BOOL);
    1161   PrfQueryProfileData(fmprof, appname, "ForceUpper", (PVOID) & fForceUpper,
    1162                       &size);
    1163   size = sizeof(BOOL);
    1164   PrfQueryProfileData(fmprof, appname, "ForceLower", (PVOID) & fForceLower,
    1165                       &size);
    1166   size = sizeof(BOOL);
    1167   PrfQueryProfileData(fmprof, FM3Str, "TextTools", (PVOID) & fTextTools,
    1168                       &size);
    1169   size = sizeof(BOOL);
    1170   PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", (PVOID) & fToolTitles,
    1171                       &size);
    1172   size = sizeof(BOOL);
    1173   PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", (PVOID) & fDCOpens,
    1174                       &size);
    1175   size = sizeof(BOOL);
    1176   PrfQueryProfileData(fmprof, appname, "LinkSetsIcon",
    1177                       (PVOID) & fLinkSetsIcon, &size);
     1108  PrfQueryProfileData(fmprof, appname, "DontMoveMouse", &fDontMoveMouse, &size);
     1109  size = sizeof(BOOL);
     1110  PrfQueryProfileData(fmprof, appname, "NoIconsFiles", &fNoIconsFiles, &size);
     1111  size = sizeof(BOOL);
     1112  PrfQueryProfileData(fmprof, appname, "NoIconsDirs", &fNoIconsDirs, &size);
     1113  size = sizeof(BOOL);
     1114  PrfQueryProfileData(fmprof, appname, "ForceUpper", &fForceUpper, &size);
     1115  size = sizeof(BOOL);
     1116  PrfQueryProfileData(fmprof, appname, "ForceLower", &fForceLower, &size);
     1117  size = sizeof(BOOL);
     1118  PrfQueryProfileData(fmprof, FM3Str, "TextTools", &fTextTools, &size);
     1119  size = sizeof(BOOL);
     1120  PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", &fToolTitles, &size);
     1121  size = sizeof(BOOL);
     1122  PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, &size);
     1123  size = sizeof(BOOL);
     1124  PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", &fLinkSetsIcon, &size);
    11781125  size = sizeof(INT);
    1179   PrfQueryProfileData(fmprof, appname, "Sort", (PVOID) & sortFlags, &size);
     1126  PrfQueryProfileData(fmprof, appname, "Sort", &sortFlags, &size);
    11801127  size = sizeof(INT);
    1181   PrfQueryProfileData(fmprof, appname, "TreeSort", (PVOID) & TreesortFlags,
    1182                       &size);
     1128  PrfQueryProfileData(fmprof, appname, "TreeSort", &TreesortFlags, &size);
    11831129  size = sizeof(INT);
    1184   PrfQueryProfileData(fmprof,
    1185                       appname,
    1186                       "CollectorSort", (PVOID) & CollectorsortFlags, &size);
     1130  PrfQueryProfileData(fmprof, appname,
     1131                      "CollectorSort", &CollectorsortFlags, &size);
    11871132  size = sizeof(targetdir);
    1188   PrfQueryProfileData(fmprof, appname, "Targetdir", (PVOID) targetdir, &size);
     1133  PrfQueryProfileData(fmprof, appname, "Targetdir", targetdir, &size);
    11891134  if (!IsValidDir(targetdir))
    11901135    *targetdir = 0;
    11911136  size = sizeof(extractpath);
    1192   PrfQueryProfileData(fmprof,
    1193                       appname, "ExtractPath", (PVOID) extractpath, &size);
     1137  PrfQueryProfileData(fmprof, appname, "ExtractPath", extractpath, &size);
    11941138  if (!IsValidDir(extractpath))
    11951139    *extractpath = 0;
    11961140  size = sizeof(printer);
    1197   PrfQueryProfileData(fmprof, appname, "Printer", (PVOID) printer, &size);
     1141  PrfQueryProfileData(fmprof, appname, "Printer", printer, &size);
    11981142  size = sizeof(dircompare);
    1199   PrfQueryProfileData(fmprof, appname, "DirCompare", (PVOID) dircompare,
     1143  PrfQueryProfileData(fmprof, appname, "DirCompare", dircompare,
    12001144                      &size);
    12011145  size = sizeof(viewer);
    1202   PrfQueryProfileData(fmprof, appname, "Viewer", (PVOID) viewer, &size);
     1146  PrfQueryProfileData(fmprof, appname, "Viewer", viewer, &size);
    12031147  size = sizeof(editor);
    1204   PrfQueryProfileData(fmprof, appname, "Editor", (PVOID) editor, &size);
     1148  PrfQueryProfileData(fmprof, appname, "Editor", editor, &size);
    12051149  size = sizeof(binview);
    1206   PrfQueryProfileData(fmprof, appname, "BinView", (PVOID) binview, &size);
     1150  PrfQueryProfileData(fmprof, appname, "BinView", binview, &size);
    12071151  size = sizeof(bined);
    1208   PrfQueryProfileData(fmprof, appname, "BinEd", (PVOID) bined, &size);
     1152  PrfQueryProfileData(fmprof, appname, "BinEd", bined, &size);
    12091153  size = sizeof(compare);
    1210   PrfQueryProfileData(fmprof, appname, "Compare", (PVOID) compare, &size);
     1154  PrfQueryProfileData(fmprof, appname, "Compare", compare, &size);
    12111155  size = sizeof(virus);
    1212   PrfQueryProfileData(fmprof, appname, "Virus", (PVOID) virus, &size);
     1156  PrfQueryProfileData(fmprof, appname, "Virus", virus, &size);
    12131157  size = sizeof(ftprun);
    1214   PrfQueryProfileData(fmprof, appname, "FTPRun", (PVOID) ftprun, &size);
     1158  PrfQueryProfileData(fmprof, appname, "FTPRun", ftprun, &size);
    12151159  if (!*ftprun && !size)
    12161160    strcpy(ftprun, "ftppm.exe");
    12171161  size = sizeof(httprun);
    1218   PrfQueryProfileData(fmprof, appname, "HTTPRun", (PVOID) httprun, &size);
     1162  PrfQueryProfileData(fmprof, appname, "HTTPRun", httprun, &size);
    12191163  if (!*httprun && !size)
    12201164    strcpy(httprun, "explore.exe -q");
    12211165  size = sizeof(lasttoolbox);
    1222   PrfQueryProfileData(fmprof, FM3Str, "LastToolBox", (PVOID) lasttoolbox,
     1166  PrfQueryProfileData(fmprof, FM3Str, "LastToolBox", lasttoolbox,
    12231167                      &size);
    12241168  size = sizeof(BOOL);
    1225   PrfQueryProfileData(fmprof, appname, "FollowTree", (PVOID) & fFollowTree,
     1169  PrfQueryProfileData(fmprof, appname, "FollowTree", &fFollowTree,
    12261170                      &size);
    12271171  size = sizeof(BOOL);
    12281172  PrfQueryProfileData(fmprof, appname, "StartMaximized",
    1229                       (PVOID) & fStartMaximized, &size);
     1173                      &fStartMaximized, &size);
    12301174  if (!fStartMaximized) {
    12311175    size = sizeof(BOOL);
    12321176    PrfQueryProfileData(fmprof, appname, "StartMinimized",
    1233                         (PVOID) & fStartMinimized, &size);
    1234   }
    1235   size = sizeof(BOOL);
    1236   PrfQueryProfileData(fmprof, appname, "DefaultCopy", (PVOID) & fCopyDefault,
     1177                        &fStartMinimized, &size);
     1178  }
     1179  size = sizeof(BOOL);
     1180  PrfQueryProfileData(fmprof, appname, "DefaultCopy", &fCopyDefault, &size);
     1181  size = sizeof(BOOL);
     1182  PrfQueryProfileData(fmprof, appname, "IdleCopy", &fRealIdle, &size);
     1183  size = sizeof(BOOL);
     1184  PrfQueryProfileData(fmprof, appname, "ArcStuffVisible",
     1185                      &fArcStuffVisible, &size);
     1186  size = sizeof(BOOL);
     1187  PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", &fNoTreeGap, &size);
     1188  size = sizeof(BOOL);
     1189  PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS",
     1190                      &fVTreeOpensWPS, &size);
     1191  size = sizeof(BOOL);
     1192  PrfQueryProfileData(fmprof, appname, "RemoteBug", &fRemoteBug, &size);
     1193  size = sizeof(BOOL);
     1194  PrfQueryProfileData(fmprof, appname, "Drag&DropDlg",
     1195                      &fDragndropDlg, &size);
     1196  size = sizeof(BOOL);
     1197  PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", &fUserComboBox, &size);
     1198  size = sizeof(BOOL);
     1199  PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", &fMinOnOpen, &size);
     1200  size = sizeof(BOOL);
     1201  PrfQueryProfileData(fmprof, appname, "QuickArcFind",
     1202                      &fQuickArcFind, &size);
     1203  size = sizeof(BOOL);
     1204  PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan",
     1205                      &fNoRemovableScan, &size);
     1206  size = sizeof(ULONG);
     1207  PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify",
     1208                      &NoBrokenNotify, &size);
     1209  size = sizeof(ULONG);
     1210  PrfQueryProfileData(fmprof, appname, "ContainerType", &ulCnrType,
    12371211                      &size);
    1238   size = sizeof(BOOL);
    1239   PrfQueryProfileData(fmprof, appname, "IdleCopy", (PVOID) & fRealIdle,
    1240                       &size);
    1241   size = sizeof(BOOL);
    1242   PrfQueryProfileData(fmprof, appname, "ArcStuffVisible",
    1243                       (PVOID) & fArcStuffVisible, &size);
    1244   size = sizeof(BOOL);
    1245   PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", (PVOID) & fNoTreeGap,
    1246                       &size);
    1247   size = sizeof(BOOL);
    1248   PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS",
    1249                       (PVOID) & fVTreeOpensWPS, &size);
    1250   size = sizeof(BOOL);
    1251   PrfQueryProfileData(fmprof, appname, "RemoteBug", (PVOID) & fRemoteBug,
    1252                       &size);
    1253   size = sizeof(BOOL);
    1254   PrfQueryProfileData(fmprof, appname, "Drag&DropDlg",
    1255                       (PVOID) & fDragndropDlg, &size);
    1256   size = sizeof(BOOL);
    1257   PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", (PVOID) & fUserComboBox,
    1258                       &size);
    1259   size = sizeof(BOOL);
    1260   PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", (PVOID) & fMinOnOpen,
    1261                       &size);
    1262   size = sizeof(BOOL);
    1263   PrfQueryProfileData(fmprof, appname, "QuickArcFind",
    1264                       (PVOID) & fQuickArcFind, &size);
    1265   size = sizeof(BOOL);
    1266   PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan",
    1267                       (PVOID) & fNoRemovableScan, &size);
    1268   size = sizeof(ULONG);
    1269   PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify",
    1270                       (PVOID) & NoBrokenNotify, &size);
    1271   size = sizeof(ULONG);
    1272   PrfQueryProfileData(fmprof, appname, "ContainerType", (PVOID) & ulCnrType,
    1273                       &size);
    1274   size = sizeof(ULONG);
    1275   PrfQueryProfileData(fmprof, appname, "FilesToGet", (PVOID) &FilesToGet,
    1276                       &size);
     1212  size = sizeof(ULONG);
     1213  PrfQueryProfileData(fmprof, appname, "FilesToGet", &FilesToGet, &size);
    12771214  if (FilesToGet < FILESTOGET_MIN)
    12781215    FilesToGet = FILESTOGET_MIN;
     
    12801217    FilesToGet = FILESTOGET_MAX;
    12811218  size = sizeof(BOOL);
    1282   PrfQueryProfileData(fmprof, FM3Str, "AutoView", (PVOID) & fAutoView, &size);
    1283   size = sizeof(BOOL);
    1284   PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", (PVOID) & fFM2Deletes,
     1219  PrfQueryProfileData(fmprof, FM3Str, "AutoView", &fAutoView, &size);
     1220  size = sizeof(BOOL);
     1221  PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", &fFM2Deletes, &size);
     1222
     1223  size = sizeof(BOOL);
     1224  PrfQueryProfileData(fmprof, appname, "DetailsLWDate", &detailslwdate, &size);
     1225  size = sizeof(BOOL);
     1226  PrfQueryProfileData(fmprof, appname, "DetailsLWTime", &detailslwtime, &size);
     1227  size = sizeof(BOOL);
     1228  PrfQueryProfileData(fmprof, appname, "DetailsLADate", &detailsladate, &size);
     1229  size = sizeof(BOOL);
     1230  PrfQueryProfileData(fmprof, appname, "DetailsLATime", &detailslatime, &size);
     1231  size = sizeof(BOOL);
     1232  PrfQueryProfileData(fmprof, appname, "DetailsCRDate", &detailscrdate, &size);
     1233  size = sizeof(BOOL);
     1234  PrfQueryProfileData(fmprof, appname, "DetailsCRTime", &detailscrtime, &size);
     1235  size = sizeof(BOOL);
     1236  PrfQueryProfileData(fmprof, appname, "DetailsLongname", &detailslongname, &size);
     1237  size = sizeof(BOOL);
     1238  PrfQueryProfileData(fmprof, appname, "DetailsEA", &detailsea, &size);
     1239  size = sizeof(BOOL);
     1240  PrfQueryProfileData(fmprof, appname, "DetailsSize", &detailssize, &size);
     1241  size = sizeof(BOOL);
     1242  PrfQueryProfileData(fmprof, appname, "DetailsSubject", &detailssubject, &size);
     1243  size = sizeof(BOOL);
     1244  PrfQueryProfileData(fmprof, appname, "DetailsAttr", &detailsattr, &size);
     1245  size = sizeof(BOOL);
     1246  PrfQueryProfileData(fmprof, appname, "DetailsIcon", &detailsicon, &size);
     1247  size = sizeof(BOOL);
     1248  PrfQueryProfileData(fmprof, appname, "SubjectInLeftPane", &fSubjectInLeftPane,
    12851249                      &size);
    1286 
    1287   size = sizeof(BOOL);
    1288   PrfQueryProfileData(fmprof, appname, "DetailsLWDate", (PVOID) &detailslwdate,
    1289                       &size);
    1290   size = sizeof(BOOL);
    1291   PrfQueryProfileData(fmprof, appname, "DetailsLWTime", (PVOID) &detailslwtime,
    1292                       &size);
    1293   size = sizeof(BOOL);
    1294   PrfQueryProfileData(fmprof, appname, "DetailsLADate", (PVOID) &detailsladate,
    1295                       &size);
    1296   size = sizeof(BOOL);
    1297   PrfQueryProfileData(fmprof, appname, "DetailsLATime", (PVOID) &detailslatime,
    1298                       &size);
    1299   size = sizeof(BOOL);
    1300   PrfQueryProfileData(fmprof, appname, "DetailsCRDate", (PVOID) &detailscrdate,
    1301                       &size);
    1302   size = sizeof(BOOL);
    1303   PrfQueryProfileData(fmprof, appname, "DetailsCRTime", (PVOID) &detailscrtime,
    1304                       &size);
    1305   size = sizeof(BOOL);
    1306   PrfQueryProfileData(fmprof, appname, "DetailsLongname", (PVOID) &detailslongname,
    1307                       &size);
    1308   size = sizeof(BOOL);
    1309   PrfQueryProfileData(fmprof, appname, "DetailsEA", (PVOID) &detailsea,
    1310                       &size);
    1311   size = sizeof(BOOL);
    1312   PrfQueryProfileData(fmprof, appname, "DetailsSize", (PVOID) &detailssize,
    1313                       &size);
    1314   size = sizeof(BOOL);
    1315   PrfQueryProfileData(fmprof, appname, "DetailsSubject", (PVOID) &detailssubject,
    1316                       &size);
    1317   size = sizeof(BOOL);
    1318   PrfQueryProfileData(fmprof, appname, "DetailsAttr", (PVOID) &detailsattr,
    1319                       &size);
    1320   size = sizeof(BOOL);
    1321   PrfQueryProfileData(fmprof, appname, "DetailsIcon", (PVOID) &detailsicon,
    1322                       &size);
    1323   size = sizeof(BOOL);
    1324   PrfQueryProfileData(fmprof, appname, "SubjectInLeftPane", (PVOID) &fSubjectInLeftPane,
    1325                       &size);
    1326   size = sizeof(ULONG);
    1327   PrfQueryProfileData(fmprof, appname, "SubjectDisplayWidth", (PVOID) &SubjectDisplayWidth,
    1328                       &size);
     1250  size = sizeof(ULONG);
     1251  PrfQueryProfileData(fmprof, appname, "SubjectDisplayWidth",
     1252                      &SubjectDisplayWidth, &size);
    13291253  if (SubjectDisplayWidth < 50)
    13301254    SubjectDisplayWidth = 0;
     
    13321256    SubjectDisplayWidth = 1000;
    13331257  size = sizeof(BOOL);
    1334   PrfQueryProfileData(fmprof, appname, "SubjectLengthMax", (PVOID) &fSubjectLengthMax,
    1335                       &size);
     1258  PrfQueryProfileData(fmprof, appname, "SubjectLengthMax", &fSubjectLengthMax,
     1259                      &size);
    13361260
    13371261  /* load pointers and icons we use */
     
    14671391#pragma alloc_text(INIT1,StartFM3,FindSwapperDat)
    14681392#endif
    1469 
Note: See TracChangeset for help on using the changeset viewer.