Changeset 201 for trunk/dll/init.c
- Timestamp:
- Jun 8, 2005, 7:55:16 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r189 r201 15 15 26 May 05 SHL Comments 16 16 06 Jun 05 SHL indent -i2 17 06 Jun 05 SHL Rework FindSwapperDat for VAC3.65 compat 17 18 18 19 ***********************************************************************/ … … 50 51 /* 51 52 extern HMODULE FM3ResHandle; 52 extern ULONG 53 extern ULONG RVMajor,RVMinor; 53 54 */ 54 55 55 56 VOID FindSwapperDat(VOID) 56 57 { 57 CHAR *filename = "C:\\CONFIG.SYS", input[8192], *p, *pp; 58 CHAR filename[] = "C:\\CONFIG.SYS"; 59 CHAR input[8192]; 60 CHAR *p; 61 CHAR *pp; 58 62 FILE *fp; 59 63 FILEFINDBUF3 ffb; 60 ULONG nm = 1L, size = sizeof(SwapperDat); 64 ULONG nm; 65 ULONG size = sizeof(SwapperDat); 61 66 HDIR hdir = HDIR_CREATE; 62 APIRET rc = 1 L;67 APIRET rc = 1; 63 68 64 69 *SwapperDat = 0; 70 // Check already known 65 71 PrfQueryProfileData(fmprof, 66 72 FM3Str, … … 70 76 if (*SwapperDat) 71 77 { 78 nm = 1; 72 79 rc = DosFindFirst(SwapperDat, 73 80 &hdir, … … 86 93 fclose(fp); 87 94 *SwapperDat = 0; 88 rc = 1 L;95 rc = 1; // Force config.sys scan 89 96 } 90 97 } … … 92 99 *SwapperDat = 0; 93 100 } 101 // If not defined in INI or INI wrong, scan config.sys for SWAPPATH statement 94 102 if (rc) 95 103 { 96 104 if (DosQuerySysInfo(QSV_BOOT_DRIVE, 97 105 QSV_BOOT_DRIVE, 98 (PVOID) &nm,106 (PVOID)&nm, 99 107 (ULONG) sizeof(ULONG))) 100 nm = 3L; 101 *filename = (CHAR) nm + '@'; 108 { 109 nm = 3; // Assume drive C: 110 } 111 *filename = (CHAR)nm + '@'; 102 112 fp = _fsopen(filename, "r", SH_DENYNO); 103 113 if (fp) … … 144 154 strcat(SwapperDat, "SWAPPER.DAT"); 145 155 hdir = HDIR_CREATE; 146 nm = 1 L;156 nm = 1; 147 157 if (!DosFindFirst(SwapperDat, 148 158 &hdir, … … 165 175 } 166 176 } 167 } 168 } 177 } // if SWAPPATH 178 } // while 169 179 fclose(fp); 170 180 } … … 175 185 unsigned long ulFlag) 176 186 { 187 CHAR *env; 188 CHAR stringfile[CCHMAXPATH]; 189 FILESTATUS3 fsa; 190 APIRET rc; 177 191 178 192 switch (ulFlag) … … 182 196 return 0UL; 183 197 FM3DllHandle = hModule; 184 { 185 char *env, stringfile[CCHMAXPATH]; 186 187 strcpy(stringfile, "FM3RES.STR"); 188 env = getenv("FM3INI"); 189 if (env) 198 strcpy(stringfile, "FM3RES.STR"); 199 env = getenv("FM3INI"); 200 if (env) 201 { 202 DosError(FERR_DISABLEHARDERR); 203 rc = DosQueryPathInfo(env, 204 FIL_STANDARD, 205 &fsa, 206 (ULONG) sizeof(fsa)); 207 if (!rc) 190 208 { 191 192 FILESTATUS3 fsa; 193 APIRET rc; 194 195 DosError(FERR_DISABLEHARDERR); 196 rc = DosQueryPathInfo(env, 197 FIL_STANDARD, 198 &fsa, 199 (ULONG) sizeof(fsa)); 200 if (!rc) 209 if (fsa.attrFile & FILE_DIRECTORY) 201 210 { 202 if (fsa.attrFile & FILE_DIRECTORY) 203 { 204 strcpy(stringfile, env); 205 if (stringfile[strlen(stringfile) - 1] != '\\') 206 strcat(stringfile, "\\"); 207 strcat(stringfile, "FM3RES.STR"); 208 DosError(FERR_DISABLEHARDERR); 209 if (DosQueryPathInfo(stringfile, 210 FIL_STANDARD, 211 &fsa, 212 sizeof(fsa))) 213 strcpy(stringfile, "FM3RES.STR"); 214 } 211 strcpy(stringfile, env); 212 if (stringfile[strlen(stringfile) - 1] != '\\') 213 strcat(stringfile, "\\"); 214 strcat(stringfile, "FM3RES.STR"); 215 DosError(FERR_DISABLEHARDERR); 216 if (DosQueryPathInfo(stringfile, 217 FIL_STANDARD, 218 &fsa, 219 sizeof(fsa))) 220 strcpy(stringfile, "FM3RES.STR"); 215 221 } 216 222 } 217 LoadStrings(stringfile); 218 } 223 } 224 LoadStrings(stringfile); 225 219 226 DosError(FERR_DISABLEHARDERR); 220 227 /* strings here to prevent multiple occurences in DLL */ … … 249 256 RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = 204; 250 257 RGBGREY.fcOptions = 0; 251 FM3UL = *(ULONG *) 258 FM3UL = *(ULONG *)FM3Str; 252 259 DEBUG_STRING = "Debug -- please report to author"; 253 260 break; … … 389 396 390 397 CLASSINFO clinfo; 391 BOOL okay = FALSE; 398 APIRET rc; 399 APIRET rcl = 1; 400 APIRET rcq = 1; 401 PFN pfnResVersion = (PFN)NULL; 402 ULONG RVMajor = 0; 403 ULONG RVMinor = 0; 404 ULONG ret = 0; 405 FILESTATUS3 fsa; 406 CHAR *env; 407 CHAR dllfile[CCHMAXPATH]; 408 ULONG size; 392 409 393 410 if (!StringsLoaded()) … … 402 419 } 403 420 404 { /* Load resource DLL FM3RES.DLL */ 405 APIRET rcl = 1, rcq = 1; 406 PFN pfnResVersion = (PFN) NULL; 407 ULONG RVMajor = 0, RVMinor = 0, ret = 0; 408 char *env, dllfile[CCHMAXPATH]; 409 410 strcpy(dllfile, "FM3RES"); 411 env = getenv("FM3INI"); 412 if (env) 413 { 414 415 FILESTATUS3 fsa; 416 APIRET rc; 417 418 DosError(FERR_DISABLEHARDERR); 419 rc = DosQueryPathInfo(env, 420 FIL_STANDARD, 421 &fsa, 422 (ULONG) sizeof(fsa)); 423 if (!rc) 421 strcpy(dllfile, "FM3RES"); 422 env = getenv("FM3INI"); 423 if (env) 424 { 425 FILESTATUS3 fsa; 426 APIRET rc; 427 428 DosError(FERR_DISABLEHARDERR); 429 rc = DosQueryPathInfo(env, 430 FIL_STANDARD, 431 &fsa, 432 (ULONG) sizeof(fsa)); 433 if (!rc) 434 { 435 if (fsa.attrFile & FILE_DIRECTORY) 424 436 { 425 if (fsa.attrFile & FILE_DIRECTORY) 426 { 427 strcpy(dllfile, env); 428 if (dllfile[strlen(dllfile) - 1] != '\\') 429 strcat(dllfile, "\\"); 430 strcat(dllfile, "FM3RES"); 431 DosError(FERR_DISABLEHARDERR); 432 if (DosQueryPathInfo(dllfile, 433 FIL_STANDARD, 434 &fsa, 435 sizeof(fsa))) 436 strcpy(dllfile, "FM3RES"); 437 } 437 strcpy(dllfile, env); 438 if (dllfile[strlen(dllfile) - 1] != '\\') 439 strcat(dllfile, "\\"); 440 strcat(dllfile, "FM3RES"); 441 DosError(FERR_DISABLEHARDERR); 442 if (DosQueryPathInfo(dllfile, 443 FIL_STANDARD, 444 &fsa, 445 sizeof(fsa))) 446 strcpy(dllfile, "FM3RES"); 438 447 } 439 448 } 440 rcl = DosLoadModule(NULL, 441 0, 442 dllfile, 443 &FM3ModHandle); 444 if (!rcl) 445 { 446 if (DosExitList(EXLST_ADD, 447 DeInitFM3DLL)) 448 DosBeep(500, 100); 449 rcq = DosQueryProcAddr(FM3ModHandle, 450 1, 451 "ResVersion", 452 &pfnResVersion); 453 if (!rcq) 454 ret = pfnResVersion(&RVMajor, &RVMinor); 455 } 456 else 457 { 458 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 459 HWND_DESKTOP, 460 GetPString(IDS_ERRORTEXT), 461 GetPString(IDS_FM3RESERROR1TEXT)); 462 return FALSE; 463 } 464 if (RVMajor < VERMAJOR || 465 (RVMajor == VERMAJOR && RVMinor < VERMINOR)) 466 { 467 DosBeep(50, 100); 468 saymsg(MB_ENTER, 469 HWND_DESKTOP, 470 GetPString(IDS_ERRORTEXT), 471 GetPString(IDS_FM3RESERROR2TEXT), 472 (!rcq) ? 449 } 450 rcl = DosLoadModule(NULL, 451 0, 452 dllfile, 453 &FM3ModHandle); 454 if (!rcl) 455 { 456 if (DosExitList(EXLST_ADD, 457 DeInitFM3DLL)) 458 DosBeep(500, 100); 459 rcq = DosQueryProcAddr(FM3ModHandle, 460 1, 461 "ResVersion", 462 &pfnResVersion); 463 if (!rcq) 464 ret = pfnResVersion(&RVMajor, &RVMinor); 465 } 466 else 467 { 468 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 469 HWND_DESKTOP, 470 GetPString(IDS_ERRORTEXT), 471 GetPString(IDS_FM3RESERROR1TEXT)); 472 return FALSE; 473 } 474 if (RVMajor < VERMAJOR || 475 (RVMajor == VERMAJOR && RVMinor < VERMINOR)) 476 { 477 DosBeep(50, 100); 478 saymsg(MB_ENTER, 479 HWND_DESKTOP, 480 GetPString(IDS_ERRORTEXT), 481 GetPString(IDS_FM3RESERROR2TEXT), 482 !rcq ? 473 483 GetPString(IDS_FM3RESERROR3TEXT) : 474 (!rcl) ? 475 GetPString(IDS_FM3RESERROR4TEXT) : 476 GetPString(IDS_FM3RESERROR5TEXT), 477 RVMajor, 478 RVMinor, 479 rcl, 480 rcq, 481 ret); 482 return FALSE; 483 } 484 !rcl ? 485 GetPString(IDS_FM3RESERROR4TEXT) : 486 GetPString(IDS_FM3RESERROR5TEXT), 487 RVMajor, 488 RVMinor, 489 rcl, 490 rcq, 491 ret); 492 return FALSE; 484 493 } 485 494 … … 487 496 FillInDriveFlags(NULL); 488 497 489 { /* try to ensure that FM/2 Utilities are available */ 498 { 499 /* try to ensure that FM/2 Utilities are available */ 490 500 CHAR curpath[CCHMAXPATH + 8], *env; 491 501 FILESTATUS3 fs3; … … 561 571 } 562 572 563 { /* are we the workplace? */ 564 CHAR *env; 565 566 env = getenv("WORKPLACE__PROCESS"); 567 if (!env || stricmp(env, "NO")) 568 fWorkPlace = TRUE; 569 } 573 /* are we the workplace? */ 574 env = getenv("WORKPLACE__PROCESS"); 575 if (!env || stricmp(env, "NO")) 576 fWorkPlace = TRUE; 570 577 571 578 if ((!strchr(profile, '\\') && !strchr(profile, ':')) || 572 579 !(fmprof = PrfOpenProfile((HAB) 0, profile))) 573 580 { 574 575 581 /* figure out where to put INI file... */ 576 582 CHAR *env, inipath[CCHMAXPATH]; … … 584 590 if (env) 585 591 { 586 587 FILESTATUS3 fsa;588 APIRET rc;589 590 592 strcpy(inipath, env); 591 593 DosError(FERR_DISABLEHARDERR); … … 611 613 strcpy(inipath, env); 612 614 } 615 613 616 /* in some odd cases the INI file can get set to readonly status */ 614 617 /* here we test it and reset the readonly bit if necessary */ 615 {616 FILESTATUS3 fsa;617 618 if (!*inipath)619 strcpy(inipath, profile); 620 DosError(FERR_DISABLEHARDERR);621 if ( !DosQueryPathInfo(inipath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa)))618 if (!*inipath) 619 strcpy(inipath, profile); 620 DosError(FERR_DISABLEHARDERR); 621 if (!DosQueryPathInfo(inipath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa))) 622 { 623 fIniExisted = TRUE; 624 if (fsa.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) 622 625 { 623 fIniExisted = TRUE; 624 if (fsa.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) 625 { 626 fsa.attrFile &= (~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)); 627 if (DosSetPathInfo(inipath, FIL_STANDARD, (PVOID) & fsa, 628 (ULONG) sizeof(fsa), 0L)) 629 saymsg(MB_ENTER, 630 HWND_DESKTOP, 631 GetPString(IDS_ERRORTEXT), 632 GetPString(IDS_INIREADONLYTEXT), 633 inipath); 634 } 626 fsa.attrFile &= (~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)); 627 if (DosSetPathInfo(inipath, FIL_STANDARD, (PVOID) & fsa, 628 (ULONG) sizeof(fsa), 0L)) 629 saymsg(MB_ENTER, 630 HWND_DESKTOP, 631 GetPString(IDS_ERRORTEXT), 632 GetPString(IDS_INIREADONLYTEXT), 633 inipath); 635 634 } 636 635 } 636 637 637 fmprof = PrfOpenProfile((HAB) 0, inipath); 638 638 if (!fmprof) … … 641 641 fmprof = PrfOpenProfile((HAB) 0, inipath); 642 642 } 643 643 644 if (!fmprof) 644 645 { … … 654 655 FindSwapperDat(); 655 656 656 { 657 ULONG size = sizeof(BOOL); 658 659 PrfQueryProfileData(fmprof, 660 FM3Str, 661 "SeparateParms", 662 (PVOID) & fSeparateParms, 663 &size); 664 if (!fSeparateParms) 665 strcpy(appname, 666 FM3Str); 667 } 657 size = sizeof(BOOL); 658 PrfQueryProfileData(fmprof, 659 FM3Str, 660 "SeparateParms", 661 (PVOID) & fSeparateParms, 662 &size); 663 if (!fSeparateParms) 664 strcpy(appname, FM3Str); 668 665 669 666 /* start help */ … … 682 679 if (!hwndHelp) 683 680 { 684 685 CHAR *env; 686 static CHAR helppath[CCHMAXPATH]; 681 static CHAR helppath[CCHMAXPATH]; // fixme to be local? 687 682 688 683 env = getenv("FM3INI"); 689 684 if (env) 690 685 { 691 692 686 FILESTATUS3 fsa; 693 687 APIRET rc; … … 889 883 890 884 /* 891 * set some defaults (note: 885 * set some defaults (note: everything else automatically initialized 892 886 * to 0) 893 887 */ … … 915 909 CollectorsortFlags = sortFlags = SORT_DIRSFIRST; 916 910 917 /* 918 * load preferences from profile (INI) file 919 */ 920 { 921 ULONG size; 922 911 // load preferences from profile (INI) file 912 size = sizeof(BOOL); 913 PrfQueryProfileData(fmprof, 914 appname, 915 "ShowTarget", 916 (PVOID) & fShowTarget, 917 &size); 918 size = sizeof(BOOL); 919 PrfQueryProfileData(fmprof, 920 appname, 921 "CheckMM", 922 (PVOID) & fCheckMM, 923 &size); 924 size = sizeof(BOOL); 925 PrfQueryProfileData(fmprof, 926 appname, 927 "ChangeTarget", 928 (PVOID) & fChangeTarget, 929 &size); 930 size = sizeof(BOOL); 931 PrfQueryProfileData(fmprof, 932 appname, 933 "ConfirmTarget", 934 (PVOID) & fConfirmTarget, 935 &size); 936 size = sizeof(BOOL); 937 PrfQueryProfileData(fmprof, 938 FM3Str, 939 "CustomFileDlg", 940 (PVOID) & fCustomFileDlg, 941 &size); 942 size = sizeof(BOOL); 943 PrfQueryProfileData(fmprof, 944 FM3Str, 945 "SaveMiniCmds", 946 (PVOID) & fSaveMiniCmds, 947 &size); 948 size = sizeof(BOOL); 949 PrfQueryProfileData(fmprof, 950 appname, 951 "SaveBigCmds", 952 (PVOID) & fSaveBigCmds, 953 &size); 954 size = sizeof(BOOL); 955 PrfQueryProfileData(fmprof, 956 appname, 957 "NoFoldMenu", 958 (PVOID) & fNoFoldMenu, 959 &size); 960 size = sizeof(BOOL); 961 PrfQueryProfileData(fmprof, 962 FM3Str, 963 "ThreadNotes", 964 (PVOID) & fThreadNotes, 965 &size); 966 size = sizeof(BOOL); 967 PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", (PVOID) & prnpagenums, &size); 968 size = sizeof(BOOL); 969 PrfQueryProfileData(fmprof, FM3Str, "Prnalt", (PVOID) & prnalt, &size); 970 size = sizeof(BOOL); 971 PrfQueryProfileData(fmprof, FM3Str, "Prnformat", (PVOID) & prnformat, &size); 972 size = sizeof(BOOL); 973 PrfQueryProfileData(fmprof, FM3Str, "Prnformfeedbefore", 974 (PVOID) & prnformfeedbefore, &size); 975 size = sizeof(BOOL); 976 PrfQueryProfileData(fmprof, 977 FM3Str, 978 "Prnformfeedafter", 979 (PVOID) & prnformfeedafter, 980 &size); 981 size = sizeof(ULONG); 982 PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", 983 (PVOID) & prntabspaces, &size); 984 size = sizeof(ULONG); 985 PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", (PVOID) & prnwidth, &size); 986 size = sizeof(ULONG); 987 PrfQueryProfileData(fmprof, FM3Str, "Prnlength", (PVOID) & prnlength, &size); 988 size = sizeof(ULONG); 989 PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", (PVOID) & prntmargin, &size); 990 size = sizeof(ULONG); 991 PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", (PVOID) & prnbmargin, &size); 992 size = sizeof(ULONG); 993 PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", (PVOID) & prnlmargin, &size); 994 size = sizeof(ULONG); 995 PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", (PVOID) & prnrmargin, &size); 996 size = sizeof(ULONG); 997 PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", (PVOID) & prnspacing, &size); 998 size = sizeof(BOOL); 999 PrfQueryProfileData(fmprof, FM3Str, "NoDead", (PVOID) & fNoDead, &size); 1000 size = sizeof(BOOL); 1001 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", (PVOID) & fNoFinger, &size); 1002 size = sizeof(BOOL); 1003 PrfQueryProfileData(fmprof, appname, "SwitchTree", (PVOID) & fSwitchTree, 1004 &size); 1005 size = sizeof(BOOL); 1006 PrfQueryProfileData(fmprof, appname, "SwitchTreeExpand", 1007 (PVOID) & fSwitchTreeExpand, &size); 1008 size = sizeof(BOOL); 1009 PrfQueryProfileData(fmprof, appname, "SwitchTreeOnFocus", 1010 (PVOID) & fSwitchTreeOnFocus, &size); 1011 size = sizeof(BOOL); 1012 PrfQueryProfileData(fmprof, appname, "CollapseFirst", 1013 (PVOID) & fCollapseFirst, &size); 1014 size = sizeof(BOOL); 1015 PrfQueryProfileData(fmprof, appname, "FilesInTree", 1016 (PVOID) & fFilesInTree, &size); 1017 size = sizeof(BOOL); 1018 PrfQueryProfileData(fmprof, FM3Str, "TopDir", (PVOID) & fTopDir, &size); 1019 size = sizeof(BOOL); 1020 PrfQueryProfileData(fmprof, FM3Str, "LookInDir", (PVOID) & fLookInDir, &size); 1021 PrfQueryProfileString(fmprof, appname, "DefArc", NULL, szDefArc, sizeof(szDefArc)); 1022 size = sizeof(ULONG); 1023 PrfQueryProfileData(fmprof, FM3Str, "AutoviewHeight", 1024 (PVOID) & AutoviewHeight, &size); 1025 size = sizeof(BOOL); 1026 PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", (PVOID) & fKeepCmdLine, &size); 1027 if (strcmp(realappname, "FM/4")) 1028 { 923 1029 size = sizeof(BOOL); 924 1030 PrfQueryProfileData(fmprof, 925 appname, 926 "ShowTarget", 927 (PVOID) & fShowTarget, 928 &size); 929 size = sizeof(BOOL); 930 PrfQueryProfileData(fmprof, 931 appname, 932 "CheckMM", 933 (PVOID) & fCheckMM, 934 &size); 935 size = sizeof(BOOL); 936 PrfQueryProfileData(fmprof, 937 appname, 938 "ChangeTarget", 939 (PVOID) & fChangeTarget, 940 &size); 941 size = sizeof(BOOL); 942 PrfQueryProfileData(fmprof, 943 appname, 944 "ConfirmTarget", 945 (PVOID) & fConfirmTarget, 1031 FM3Str, 1032 "MoreButtons", 1033 (PVOID) & fMoreButtons, 946 1034 &size); 947 1035 size = sizeof(BOOL); 948 1036 PrfQueryProfileData(fmprof, 949 1037 FM3Str, 950 " CustomFileDlg",951 (PVOID) & f CustomFileDlg,1038 "Drivebar", 1039 (PVOID) & fDrivebar, 952 1040 &size); 1041 } 1042 else 1043 fDrivebar = fMoreButtons = TRUE; 1044 size = sizeof(BOOL); 1045 PrfQueryProfileData(fmprof, 1046 appname, 1047 "NoSearch", 1048 (PVOID) & fNoSearch, 1049 &size); 1050 size = sizeof(BOOL); 1051 PrfQueryProfileData(fmprof, 1052 appname, 1053 "GuessType", 1054 (PVOID) & fGuessType, 1055 &size); 1056 size = sizeof(BOOL); 1057 PrfQueryProfileData(fmprof, 1058 appname, 1059 "ViewChild", 1060 (PVOID) & fViewChild, 1061 &size); 1062 size = sizeof(BOOL); 1063 PrfQueryProfileData(fmprof, 1064 appname, 1065 "ShowEnv", 1066 (PVOID) & fShowEnv, 1067 &size); 1068 size = sizeof(BOOL); 1069 PrfQueryProfileData(fmprof, 1070 appname, 1071 "LeaveTree", 1072 (PVOID) & fLeaveTree, 1073 &size); 1074 size = sizeof(BOOL); 1075 PrfQueryProfileData(fmprof, FM3Str, "Comments", (PVOID) & fComments, &size); 1076 size = sizeof(ULONG); 1077 PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", (PVOID) & fwsAnimate, &size); 1078 if (fwsAnimate) 1079 fwsAnimate = WS_ANIMATE; 1080 size = sizeof(ULONG); 1081 size = sizeof(BOOL); 1082 PrfQueryProfileData(fmprof, appname, "SelectedAlways", 1083 (PVOID) & fSelectedAlways, &size); 1084 size = sizeof(BOOL); 1085 PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", (PVOID) & fToolbarHelp, &size); 1086 size = sizeof(BOOL); 1087 PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", (PVOID) & fOtherHelp, &size); 1088 size = sizeof(BOOL); 1089 PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", (PVOID) & fDrivebarHelp, &size); 1090 size = sizeof(BOOL); 1091 PrfQueryProfileData(fmprof, 1092 appname, 1093 "AutoAddDirs", 1094 (PVOID) & fAutoAddDirs, 1095 &size); 1096 size = sizeof(BOOL); 1097 PrfQueryProfileData(fmprof, 1098 appname, 1099 "AutoAddAllDirs", 1100 (PVOID) & fAutoAddAllDirs, 1101 &size); 1102 size = sizeof(BOOL); 1103 PrfQueryProfileData(fmprof, FM3Str, "UserListSwitches", 1104 (PVOID) & fUserListSwitches, &size); 1105 size = sizeof(BOOL); 1106 PrfQueryProfileData(fmprof, appname, "UseNewViewer", 1107 (PVOID) & fUseNewViewer, &size); 1108 size = sizeof(BOOL); 1109 PrfQueryProfileData(fmprof, appname, "DefaultDeletePerm", 1110 (PVOID) & fDefaultDeletePerm, &size); 1111 size = sizeof(BOOL); 1112 PrfQueryProfileData(fmprof, FM3Str, "ExternalINIs", 1113 (PVOID) & fExternalINIs, &size); 1114 size = sizeof(BOOL); 1115 PrfQueryProfileData(fmprof, FM3Str, "ExternalCollector", 1116 (PVOID) & fExternalCollector, &size); 1117 size = sizeof(BOOL); 1118 PrfQueryProfileData(fmprof, FM3Str, "ExternalArcboxes", 1119 (PVOID) & fExternalArcboxes, &size); 1120 size = sizeof(BOOL); 1121 PrfQueryProfileData(fmprof, FM3Str, "ExternalViewer", 1122 (PVOID) & fExternalViewer, &size); 1123 size = sizeof(BOOL); 1124 PrfQueryProfileData(fmprof, FM3Str, "UseQProcStat", 1125 (PVOID) & fUseQProcStat, &size); 1126 size = sizeof(BOOL); 1127 PrfQueryProfileData(fmprof, FM3Str, "DataMin", (PVOID) & fDataMin, &size); 1128 size = sizeof(BOOL); 1129 PrfQueryProfileData(fmprof, appname, "DataToFore", (PVOID) & fDataToFore, &size); 1130 size = sizeof(BOOL); 1131 PrfQueryProfileData(fmprof, appname, "DataShowDrives", 1132 (PVOID) & fDataShowDrives, &size); 1133 size = sizeof(BOOL); 1134 PrfQueryProfileData(fmprof, appname, "DataInclRemote", 1135 (PVOID) & fDataInclRemote, &size); 1136 size = sizeof(BOOL); 1137 PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", (PVOID) & fSplitStatus, &size); 1138 size = sizeof(BOOL); 1139 PrfQueryProfileData(fmprof, appname, "FolderAfterExtract", 1140 (PVOID) & fFolderAfterExtract, &size); 1141 size = sizeof(BOOL); 1142 PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", (PVOID) & fDullMin, &size); 1143 size = sizeof(BOOL); 1144 PrfQueryProfileData(fmprof, appname, "BlueLED", (PVOID) & fBlueLED, &size); 1145 size = sizeof(BOOL); 1146 PrfQueryProfileData(fmprof, appname, "ConfirmDelete", (PVOID) & fConfirmDelete, &size); 1147 size = sizeof(BOOL); 1148 PrfQueryProfileData(fmprof, FM3Str, "SaveState", (PVOID) & fSaveState, &size); 1149 size = sizeof(BOOL); 1150 PrfQueryProfileData(fmprof, appname, "SyncUpdates", (PVOID) & fSyncUpdates, &size); 1151 size = sizeof(BOOL); 1152 PrfQueryProfileData(fmprof, appname, "LoadSubject", (PVOID) & fLoadSubject, &size); 1153 size = sizeof(BOOL); 1154 PrfQueryProfileData(fmprof, appname, "UnHilite", (PVOID) & fUnHilite, &size); 1155 size = sizeof(BOOL); 1156 PrfQueryProfileData(fmprof, FM3Str, "TileBackwards", (PVOID) & fTileBackwards, 1157 &size); 1158 size = sizeof(BOOL); 1159 PrfQueryProfileData(fmprof, appname, "LoadLongname", (PVOID) & fLoadLongnames, &size); 1160 size = sizeof(BOOL); 1161 PrfQueryProfileData(fmprof, appname, "VerifyWrites", (PVOID) & fVerify, &size); 1162 DosSetVerify(fVerify); 1163 size = sizeof(BOOL); 1164 PrfQueryProfileData(fmprof, appname, "DontMoveMouse", (PVOID) & fDontMoveMouse, &size); 1165 size = sizeof(BOOL); 1166 PrfQueryProfileData(fmprof, appname, "NoIconsFiles", (PVOID) & fNoIconsFiles, &size); 1167 size = sizeof(BOOL); 1168 PrfQueryProfileData(fmprof, appname, "NoIconsDirs", (PVOID) & fNoIconsDirs, &size); 1169 size = sizeof(BOOL); 1170 PrfQueryProfileData(fmprof, appname, "ForceUpper", (PVOID) & fForceUpper, &size); 1171 size = sizeof(BOOL); 1172 PrfQueryProfileData(fmprof, appname, "ForceLower", (PVOID) & fForceLower, &size); 1173 size = sizeof(BOOL); 1174 PrfQueryProfileData(fmprof, FM3Str, "TextTools", (PVOID) & fTextTools, &size); 1175 size = sizeof(BOOL); 1176 PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", (PVOID) & fToolTitles, &size); 1177 size = sizeof(BOOL); 1178 PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", (PVOID) & fDCOpens, &size); 1179 size = sizeof(BOOL); 1180 PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", (PVOID) & fLinkSetsIcon, &size); 1181 size = sizeof(INT); 1182 PrfQueryProfileData(fmprof, appname, "Sort", (PVOID) & sortFlags, &size); 1183 size = sizeof(INT); 1184 PrfQueryProfileData(fmprof, appname, "TreeSort", (PVOID) & TreesortFlags, &size); 1185 size = sizeof(INT); 1186 PrfQueryProfileData(fmprof, 1187 appname, 1188 "CollectorSort", 1189 (PVOID) & CollectorsortFlags, 1190 &size); 1191 size = sizeof(targetdir); 1192 PrfQueryProfileData(fmprof, 1193 appname, 1194 "Targetdir", 1195 (PVOID) targetdir, 1196 &size); 1197 if (!IsValidDir(targetdir)) 1198 *targetdir = 0; 1199 size = sizeof(extractpath); 1200 PrfQueryProfileData(fmprof, 1201 appname, 1202 "ExtractPath", 1203 (PVOID) extractpath, 1204 &size); 1205 if (!IsValidDir(extractpath)) 1206 *extractpath = 0; 1207 size = sizeof(printer); 1208 PrfQueryProfileData(fmprof, appname, "Printer", (PVOID) printer, &size); 1209 size = sizeof(dircompare); 1210 PrfQueryProfileData(fmprof, appname, "DirCompare", (PVOID) dircompare, &size); 1211 size = sizeof(viewer); 1212 PrfQueryProfileData(fmprof, appname, "Viewer", (PVOID) viewer, &size); 1213 size = sizeof(editor); 1214 PrfQueryProfileData(fmprof, appname, "Editor", (PVOID) editor, &size); 1215 size = sizeof(binview); 1216 PrfQueryProfileData(fmprof, appname, "BinView", (PVOID) binview, &size); 1217 size = sizeof(bined); 1218 PrfQueryProfileData(fmprof, appname, "BinEd", (PVOID) bined, &size); 1219 size = sizeof(compare); 1220 PrfQueryProfileData(fmprof, appname, "Compare", (PVOID) compare, &size); 1221 size = sizeof(virus); 1222 PrfQueryProfileData(fmprof, appname, "Virus", (PVOID) virus, &size); 1223 size = sizeof(ftprun); 1224 PrfQueryProfileData(fmprof, appname, "FTPRun", (PVOID) ftprun, &size); 1225 if (!*ftprun && !size) 1226 strcpy(ftprun, "ftppm.exe"); 1227 size = sizeof(httprun); 1228 PrfQueryProfileData(fmprof, appname, "HTTPRun", (PVOID) httprun, &size); 1229 if (!*httprun && !size) 1230 strcpy(httprun, "explore.exe -q"); 1231 size = sizeof(lasttoolbox); 1232 PrfQueryProfileData(fmprof, FM3Str, "LastToolBox", (PVOID) lasttoolbox, &size); 1233 size = sizeof(BOOL); 1234 PrfQueryProfileData(fmprof, appname, "FollowTree", (PVOID) & fFollowTree, &size); 1235 size = sizeof(BOOL); 1236 PrfQueryProfileData(fmprof, appname, "StartMaximized", (PVOID) & fStartMaximized, &size); 1237 if (!fStartMaximized) 1238 { 953 1239 size = sizeof(BOOL); 954 PrfQueryProfileData(fmprof, 955 FM3Str, 956 "SaveMiniCmds", 957 (PVOID) & fSaveMiniCmds, 958 &size); 959 size = sizeof(BOOL); 960 PrfQueryProfileData(fmprof, 961 appname, 962 "SaveBigCmds", 963 (PVOID) & fSaveBigCmds, 964 &size); 965 size = sizeof(BOOL); 966 PrfQueryProfileData(fmprof, 967 appname, 968 "NoFoldMenu", 969 (PVOID) & fNoFoldMenu, 970 &size); 971 size = sizeof(BOOL); 972 PrfQueryProfileData(fmprof, 973 FM3Str, 974 "ThreadNotes", 975 (PVOID) & fThreadNotes, 976 &size); 977 size = sizeof(BOOL); 978 PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", (PVOID) & prnpagenums, &size); 979 size = sizeof(BOOL); 980 PrfQueryProfileData(fmprof, FM3Str, "Prnalt", (PVOID) & prnalt, &size); 981 size = sizeof(BOOL); 982 PrfQueryProfileData(fmprof, FM3Str, "Prnformat", (PVOID) & prnformat, &size); 983 size = sizeof(BOOL); 984 PrfQueryProfileData(fmprof, FM3Str, "Prnformfeedbefore", 985 (PVOID) & prnformfeedbefore, &size); 986 size = sizeof(BOOL); 987 PrfQueryProfileData(fmprof, 988 FM3Str, 989 "Prnformfeedafter", 990 (PVOID) & prnformfeedafter, 991 &size); 992 size = sizeof(ULONG); 993 PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", 994 (PVOID) & prntabspaces, &size); 995 size = sizeof(ULONG); 996 PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", (PVOID) & prnwidth, &size); 997 size = sizeof(ULONG); 998 PrfQueryProfileData(fmprof, FM3Str, "Prnlength", (PVOID) & prnlength, &size); 999 size = sizeof(ULONG); 1000 PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", (PVOID) & prntmargin, &size); 1001 size = sizeof(ULONG); 1002 PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", (PVOID) & prnbmargin, &size); 1003 size = sizeof(ULONG); 1004 PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", (PVOID) & prnlmargin, &size); 1005 size = sizeof(ULONG); 1006 PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", (PVOID) & prnrmargin, &size); 1007 size = sizeof(ULONG); 1008 PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", (PVOID) & prnspacing, &size); 1009 size = sizeof(BOOL); 1010 PrfQueryProfileData(fmprof, FM3Str, "NoDead", (PVOID) & fNoDead, &size); 1011 size = sizeof(BOOL); 1012 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", (PVOID) & fNoFinger, &size); 1013 size = sizeof(BOOL); 1014 PrfQueryProfileData(fmprof, appname, "SwitchTree", (PVOID) & fSwitchTree, 1015 &size); 1016 size = sizeof(BOOL); 1017 PrfQueryProfileData(fmprof, appname, "SwitchTreeExpand", 1018 (PVOID) & fSwitchTreeExpand, &size); 1019 size = sizeof(BOOL); 1020 PrfQueryProfileData(fmprof, appname, "SwitchTreeOnFocus", 1021 (PVOID) & fSwitchTreeOnFocus, &size); 1022 size = sizeof(BOOL); 1023 PrfQueryProfileData(fmprof, appname, "CollapseFirst", 1024 (PVOID) & fCollapseFirst, &size); 1025 size = sizeof(BOOL); 1026 PrfQueryProfileData(fmprof, appname, "FilesInTree", 1027 (PVOID) & fFilesInTree, &size); 1028 size = sizeof(BOOL); 1029 PrfQueryProfileData(fmprof, FM3Str, "TopDir", (PVOID) & fTopDir, &size); 1030 size = sizeof(BOOL); 1031 PrfQueryProfileData(fmprof, FM3Str, "LookInDir", (PVOID) & fLookInDir, &size); 1032 PrfQueryProfileString(fmprof, appname, "DefArc", NULL, szDefArc, sizeof(szDefArc)); 1033 size = sizeof(ULONG); 1034 PrfQueryProfileData(fmprof, FM3Str, "AutoviewHeight", 1035 (PVOID) & AutoviewHeight, &size); 1036 size = sizeof(BOOL); 1037 PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", (PVOID) & fKeepCmdLine, &size); 1038 if (strcmp(realappname, "FM/4")) 1039 { 1040 size = sizeof(BOOL); 1041 PrfQueryProfileData(fmprof, 1042 FM3Str, 1043 "MoreButtons", 1044 (PVOID) & fMoreButtons, 1045 &size); 1046 size = sizeof(BOOL); 1047 PrfQueryProfileData(fmprof, 1048 FM3Str, 1049 "Drivebar", 1050 (PVOID) & fDrivebar, 1051 &size); 1052 } 1053 else 1054 fDrivebar = fMoreButtons = TRUE; 1055 size = sizeof(BOOL); 1056 PrfQueryProfileData(fmprof, 1057 appname, 1058 "NoSearch", 1059 (PVOID) & fNoSearch, 1060 &size); 1061 size = sizeof(BOOL); 1062 PrfQueryProfileData(fmprof, 1063 appname, 1064 "GuessType", 1065 (PVOID) & fGuessType, 1066 &size); 1067 size = sizeof(BOOL); 1068 PrfQueryProfileData(fmprof, 1069 appname, 1070 "ViewChild", 1071 (PVOID) & fViewChild, 1072 &size); 1073 size = sizeof(BOOL); 1074 PrfQueryProfileData(fmprof, 1075 appname, 1076 "ShowEnv", 1077 (PVOID) & fShowEnv, 1078 &size); 1079 size = sizeof(BOOL); 1080 PrfQueryProfileData(fmprof, 1081 appname, 1082 "LeaveTree", 1083 (PVOID) & fLeaveTree, 1084 &size); 1085 size = sizeof(BOOL); 1086 PrfQueryProfileData(fmprof, FM3Str, "Comments", (PVOID) & fComments, &size); 1087 size = sizeof(ULONG); 1088 PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", (PVOID) & fwsAnimate, &size); 1089 if (fwsAnimate) 1090 fwsAnimate = WS_ANIMATE; 1091 size = sizeof(ULONG); 1092 size = sizeof(BOOL); 1093 PrfQueryProfileData(fmprof, appname, "SelectedAlways", 1094 (PVOID) & fSelectedAlways, &size); 1095 size = sizeof(BOOL); 1096 PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", (PVOID) & fToolbarHelp, &size); 1097 size = sizeof(BOOL); 1098 PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", (PVOID) & fOtherHelp, &size); 1099 size = sizeof(BOOL); 1100 PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", (PVOID) & fDrivebarHelp, &size); 1101 size = sizeof(BOOL); 1102 PrfQueryProfileData(fmprof, 1103 appname, 1104 "AutoAddDirs", 1105 (PVOID) & fAutoAddDirs, 1106 &size); 1107 size = sizeof(BOOL); 1108 PrfQueryProfileData(fmprof, 1109 appname, 1110 "AutoAddAllDirs", 1111 (PVOID) & fAutoAddAllDirs, 1112 &size); 1113 size = sizeof(BOOL); 1114 PrfQueryProfileData(fmprof, FM3Str, "UserListSwitches", 1115 (PVOID) & fUserListSwitches, &size); 1116 size = sizeof(BOOL); 1117 PrfQueryProfileData(fmprof, appname, "UseNewViewer", 1118 (PVOID) & fUseNewViewer, &size); 1119 size = sizeof(BOOL); 1120 PrfQueryProfileData(fmprof, appname, "DefaultDeletePerm", 1121 (PVOID) & fDefaultDeletePerm, &size); 1122 size = sizeof(BOOL); 1123 PrfQueryProfileData(fmprof, FM3Str, "ExternalINIs", 1124 (PVOID) & fExternalINIs, &size); 1125 size = sizeof(BOOL); 1126 PrfQueryProfileData(fmprof, FM3Str, "ExternalCollector", 1127 (PVOID) & fExternalCollector, &size); 1128 size = sizeof(BOOL); 1129 PrfQueryProfileData(fmprof, FM3Str, "ExternalArcboxes", 1130 (PVOID) & fExternalArcboxes, &size); 1131 size = sizeof(BOOL); 1132 PrfQueryProfileData(fmprof, FM3Str, "ExternalViewer", 1133 (PVOID) & fExternalViewer, &size); 1134 size = sizeof(BOOL); 1135 PrfQueryProfileData(fmprof, FM3Str, "UseQProcStat", 1136 (PVOID) & fUseQProcStat, &size); 1137 size = sizeof(BOOL); 1138 PrfQueryProfileData(fmprof, FM3Str, "DataMin", (PVOID) & fDataMin, &size); 1139 size = sizeof(BOOL); 1140 PrfQueryProfileData(fmprof, appname, "DataToFore", (PVOID) & fDataToFore, &size); 1141 size = sizeof(BOOL); 1142 PrfQueryProfileData(fmprof, appname, "DataShowDrives", 1143 (PVOID) & fDataShowDrives, &size); 1144 size = sizeof(BOOL); 1145 PrfQueryProfileData(fmprof, appname, "DataInclRemote", 1146 (PVOID) & fDataInclRemote, &size); 1147 size = sizeof(BOOL); 1148 PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", (PVOID) & fSplitStatus, &size); 1149 size = sizeof(BOOL); 1150 PrfQueryProfileData(fmprof, appname, "FolderAfterExtract", 1151 (PVOID) & fFolderAfterExtract, &size); 1152 size = sizeof(BOOL); 1153 PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", (PVOID) & fDullMin, &size); 1154 size = sizeof(BOOL); 1155 PrfQueryProfileData(fmprof, appname, "BlueLED", (PVOID) & fBlueLED, &size); 1156 size = sizeof(BOOL); 1157 PrfQueryProfileData(fmprof, appname, "ConfirmDelete", (PVOID) & fConfirmDelete, &size); 1158 size = sizeof(BOOL); 1159 PrfQueryProfileData(fmprof, FM3Str, "SaveState", (PVOID) & fSaveState, &size); 1160 size = sizeof(BOOL); 1161 PrfQueryProfileData(fmprof, appname, "SyncUpdates", (PVOID) & fSyncUpdates, &size); 1162 size = sizeof(BOOL); 1163 PrfQueryProfileData(fmprof, appname, "LoadSubject", (PVOID) & fLoadSubject, &size); 1164 size = sizeof(BOOL); 1165 PrfQueryProfileData(fmprof, appname, "UnHilite", (PVOID) & fUnHilite, &size); 1166 size = sizeof(BOOL); 1167 PrfQueryProfileData(fmprof, FM3Str, "TileBackwards", (PVOID) & fTileBackwards, 1168 &size); 1169 size = sizeof(BOOL); 1170 PrfQueryProfileData(fmprof, appname, "LoadLongname", (PVOID) & fLoadLongnames, &size); 1171 size = sizeof(BOOL); 1172 PrfQueryProfileData(fmprof, appname, "VerifyWrites", (PVOID) & fVerify, &size); 1173 DosSetVerify(fVerify); 1174 size = sizeof(BOOL); 1175 PrfQueryProfileData(fmprof, appname, "DontMoveMouse", (PVOID) & fDontMoveMouse, &size); 1176 size = sizeof(BOOL); 1177 PrfQueryProfileData(fmprof, appname, "NoIconsFiles", (PVOID) & fNoIconsFiles, &size); 1178 size = sizeof(BOOL); 1179 PrfQueryProfileData(fmprof, appname, "NoIconsDirs", (PVOID) & fNoIconsDirs, &size); 1180 size = sizeof(BOOL); 1181 PrfQueryProfileData(fmprof, appname, "ForceUpper", (PVOID) & fForceUpper, &size); 1182 size = sizeof(BOOL); 1183 PrfQueryProfileData(fmprof, appname, "ForceLower", (PVOID) & fForceLower, &size); 1184 size = sizeof(BOOL); 1185 PrfQueryProfileData(fmprof, FM3Str, "TextTools", (PVOID) & fTextTools, &size); 1186 size = sizeof(BOOL); 1187 PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", (PVOID) & fToolTitles, &size); 1188 size = sizeof(BOOL); 1189 PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", (PVOID) & fDCOpens, &size); 1190 size = sizeof(BOOL); 1191 PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", (PVOID) & fLinkSetsIcon, &size); 1192 size = sizeof(INT); 1193 PrfQueryProfileData(fmprof, appname, "Sort", (PVOID) & sortFlags, &size); 1194 size = sizeof(INT); 1195 PrfQueryProfileData(fmprof, appname, "TreeSort", (PVOID) & TreesortFlags, &size); 1196 size = sizeof(INT); 1197 PrfQueryProfileData(fmprof, 1198 appname, 1199 "CollectorSort", 1200 (PVOID) & CollectorsortFlags, 1201 &size); 1202 size = sizeof(targetdir); 1203 PrfQueryProfileData(fmprof, 1204 appname, 1205 "Targetdir", 1206 (PVOID) targetdir, 1207 &size); 1208 if (!IsValidDir(targetdir)) 1209 *targetdir = 0; 1210 size = sizeof(extractpath); 1211 PrfQueryProfileData(fmprof, 1212 appname, 1213 "ExtractPath", 1214 (PVOID) extractpath, 1215 &size); 1216 if (!IsValidDir(extractpath)) 1217 *extractpath = 0; 1218 size = sizeof(printer); 1219 PrfQueryProfileData(fmprof, appname, "Printer", (PVOID) printer, &size); 1220 size = sizeof(dircompare); 1221 PrfQueryProfileData(fmprof, appname, "DirCompare", (PVOID) dircompare, &size); 1222 size = sizeof(viewer); 1223 PrfQueryProfileData(fmprof, appname, "Viewer", (PVOID) viewer, &size); 1224 size = sizeof(editor); 1225 PrfQueryProfileData(fmprof, appname, "Editor", (PVOID) editor, &size); 1226 size = sizeof(binview); 1227 PrfQueryProfileData(fmprof, appname, "BinView", (PVOID) binview, &size); 1228 size = sizeof(bined); 1229 PrfQueryProfileData(fmprof, appname, "BinEd", (PVOID) bined, &size); 1230 size = sizeof(compare); 1231 PrfQueryProfileData(fmprof, appname, "Compare", (PVOID) compare, &size); 1232 size = sizeof(virus); 1233 PrfQueryProfileData(fmprof, appname, "Virus", (PVOID) virus, &size); 1234 size = sizeof(ftprun); 1235 PrfQueryProfileData(fmprof, appname, "FTPRun", (PVOID) ftprun, &size); 1236 if (!*ftprun && !size) 1237 strcpy(ftprun, "ftppm.exe"); 1238 size = sizeof(httprun); 1239 PrfQueryProfileData(fmprof, appname, "HTTPRun", (PVOID) httprun, &size); 1240 if (!*httprun && !size) 1241 strcpy(httprun, "explore.exe -q"); 1242 size = sizeof(lasttoolbox); 1243 PrfQueryProfileData(fmprof, FM3Str, "LastToolBox", (PVOID) lasttoolbox, &size); 1244 size = sizeof(BOOL); 1245 PrfQueryProfileData(fmprof, appname, "FollowTree", (PVOID) & fFollowTree, &size); 1246 size = sizeof(BOOL); 1247 PrfQueryProfileData(fmprof, appname, "StartMaximized", (PVOID) & fStartMaximized, &size); 1248 if (!fStartMaximized) 1249 { 1250 size = sizeof(BOOL); 1251 PrfQueryProfileData(fmprof, appname, "StartMinimized", (PVOID) & fStartMinimized, &size); 1252 } 1253 size = sizeof(BOOL); 1254 PrfQueryProfileData(fmprof, appname, "DefaultCopy", (PVOID) & fCopyDefault, &size); 1255 size = sizeof(BOOL); 1256 PrfQueryProfileData(fmprof, appname, "IdleCopy", (PVOID) & fRealIdle, &size); 1257 size = sizeof(BOOL); 1258 PrfQueryProfileData(fmprof, appname, "ArcStuffVisible", 1259 (PVOID) & fArcStuffVisible, &size); 1260 size = sizeof(BOOL); 1261 PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", (PVOID) & fNoTreeGap, &size); 1262 size = sizeof(BOOL); 1263 PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS", (PVOID) & fVTreeOpensWPS, 1264 &size); 1265 size = sizeof(BOOL); 1266 PrfQueryProfileData(fmprof, appname, "RemoteBug", (PVOID) & fRemoteBug, &size); 1267 size = sizeof(BOOL); 1268 PrfQueryProfileData(fmprof, appname, "Drag&DropDlg", (PVOID) & fDragndropDlg, 1269 &size); 1270 size = sizeof(BOOL); 1271 PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", (PVOID) & fUserComboBox, 1272 &size); 1273 size = sizeof(BOOL); 1274 PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", (PVOID) & fMinOnOpen, 1275 &size); 1276 size = sizeof(BOOL); 1277 PrfQueryProfileData(fmprof, appname, "QuickArcFind", (PVOID) & fQuickArcFind, 1278 &size); 1279 size = sizeof(BOOL); 1280 PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan", (PVOID) & fNoRemovableScan, 1281 &size); 1282 size = sizeof(ULONG); 1283 PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify", (PVOID) & NoBrokenNotify, 1284 &size); 1285 size = sizeof(ULONG); 1286 PrfQueryProfileData(fmprof, appname, "ContainerType", (PVOID) & ulCnrType, &size); 1287 size = sizeof(ULONG); 1288 PrfQueryProfileData(fmprof, appname, "FilesToGet", (PVOID) & FilesToGet, &size); 1289 size = sizeof(BOOL); 1290 PrfQueryProfileData(fmprof, FM3Str, "AutoView", (PVOID) & fAutoView, &size); 1291 size = sizeof(BOOL); 1292 PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", (PVOID) & fFM2Deletes, &size); 1293 } 1240 PrfQueryProfileData(fmprof, appname, "StartMinimized", (PVOID) & fStartMinimized, &size); 1241 } 1242 size = sizeof(BOOL); 1243 PrfQueryProfileData(fmprof, appname, "DefaultCopy", (PVOID) & fCopyDefault, &size); 1244 size = sizeof(BOOL); 1245 PrfQueryProfileData(fmprof, appname, "IdleCopy", (PVOID) & fRealIdle, &size); 1246 size = sizeof(BOOL); 1247 PrfQueryProfileData(fmprof, appname, "ArcStuffVisible", 1248 (PVOID) & fArcStuffVisible, &size); 1249 size = sizeof(BOOL); 1250 PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", (PVOID) & fNoTreeGap, &size); 1251 size = sizeof(BOOL); 1252 PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS", (PVOID) & fVTreeOpensWPS, 1253 &size); 1254 size = sizeof(BOOL); 1255 PrfQueryProfileData(fmprof, appname, "RemoteBug", (PVOID) & fRemoteBug, &size); 1256 size = sizeof(BOOL); 1257 PrfQueryProfileData(fmprof, appname, "Drag&DropDlg", (PVOID) & fDragndropDlg, 1258 &size); 1259 size = sizeof(BOOL); 1260 PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", (PVOID) & fUserComboBox, 1261 &size); 1262 size = sizeof(BOOL); 1263 PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", (PVOID) & fMinOnOpen, 1264 &size); 1265 size = sizeof(BOOL); 1266 PrfQueryProfileData(fmprof, appname, "QuickArcFind", (PVOID) & fQuickArcFind, 1267 &size); 1268 size = sizeof(BOOL); 1269 PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan", (PVOID) & fNoRemovableScan, 1270 &size); 1271 size = sizeof(ULONG); 1272 PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify", (PVOID) & NoBrokenNotify, 1273 &size); 1274 size = sizeof(ULONG); 1275 PrfQueryProfileData(fmprof, appname, "ContainerType", (PVOID) & ulCnrType, &size); 1276 size = sizeof(ULONG); 1277 PrfQueryProfileData(fmprof, appname, "FilesToGet", (PVOID) & FilesToGet, &size); 1278 size = sizeof(BOOL); 1279 PrfQueryProfileData(fmprof, FM3Str, "AutoView", (PVOID) & fAutoView, &size); 1280 size = sizeof(BOOL); 1281 PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", (PVOID) & fFM2Deletes, &size); 1294 1282 1295 1283 /* load pointers and icons we use */ … … 1320 1308 hptrZipstrm = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, ZIPSTREAM_ICON); 1321 1309 1322 /* 1323 * set up color array used by seeall.c and newview.c color dialog 1324 */ 1310 // set up color array used by seeall.c and newview.c color dialog 1311 1325 1312 standardcolors[0] = CLR_WHITE; 1326 1313 standardcolors[1] = CLR_BLACK; … … 1345 1332 HWND StartFM3(HAB hab, INT argc, CHAR ** argv) 1346 1333 { 1347 HWND hwndFrame, hwndClient; 1334 HWND hwndFrame; 1335 HWND hwndClient; 1336 UINT x; 1348 1337 ULONG FrameFlags = FCF_TITLEBAR | FCF_SYSMENU | 1349 FCF_SIZEBORDER | FCF_MINMAX | 1350 FCF_ACCELTABLE | FCF_MENU | 1351 FCF_ICON | FCF_TASKLIST | 1352 FCF_NOBYTEALIGN; 1353 1354 { 1355 INT x; 1356 1357 for (x = 1; x < argc; x++) 1358 { 1359 if (*argv[x] == '~' && !argv[x][1]) 1360 fReminimize = TRUE; 1361 if (*argv[x] == '+' && !argv[x][1]) 1362 fLogFile = TRUE; 1363 if (*argv[x] == '-') 1364 { 1365 if (!argv[x][1]) 1366 fNoSaveState = TRUE; 1367 else 1368 strcpy(profile, &argv[x][1]); 1369 } 1338 FCF_SIZEBORDER | FCF_MINMAX | 1339 FCF_ACCELTABLE | FCF_MENU | 1340 FCF_ICON | FCF_TASKLIST | 1341 FCF_NOBYTEALIGN; 1342 1343 for (x = 1; x < argc; x++) 1344 { 1345 if (*argv[x] == '~' && !argv[x][1]) 1346 fReminimize = TRUE; 1347 if (*argv[x] == '+' && !argv[x][1]) 1348 fLogFile = TRUE; 1349 if (*argv[x] == '-') 1350 { 1351 if (!argv[x][1]) 1352 fNoSaveState = TRUE; 1353 else 1354 strcpy(profile, &argv[x][1]); 1370 1355 } 1371 1356 }
Note:
See TracChangeset
for help on using the changeset viewer.