Changeset 189 for trunk/dll/init.c
- Timestamp:
- Jun 6, 2005, 5:45:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r179 r189 14 14 23 May 05 SHL Use datamin.h 15 15 26 May 05 SHL Comments 16 06 Jun 05 SHL indent -i2 16 17 17 18 ***********************************************************************/ … … 44 45 #pragma alloc_text(INIT1,StartFM3,FindSwapperDat) 45 46 46 extern int 47 extern int _CRT_init(void); 47 48 extern void _CRT_term(void); 48 49 49 50 /* 50 extern HMODULE FM3ResHandle; 51 extern ULONG RVMajor,RVMinor; 52 */ 53 54 55 VOID FindSwapperDat (VOID) { 56 57 CHAR *filename = "C:\\CONFIG.SYS",input[8192],*p,*pp; 58 FILE *fp; 51 extern HMODULE FM3ResHandle; 52 extern ULONG RVMajor,RVMinor; 53 */ 54 55 VOID FindSwapperDat(VOID) 56 { 57 CHAR *filename = "C:\\CONFIG.SYS", input[8192], *p, *pp; 58 FILE *fp; 59 59 FILEFINDBUF3 ffb; 60 ULONG nm = 1L,size = sizeof(SwapperDat);61 HDIR 62 APIRET 60 ULONG nm = 1L, size = sizeof(SwapperDat); 61 HDIR hdir = HDIR_CREATE; 62 APIRET rc = 1L; 63 63 64 64 *SwapperDat = 0; 65 65 PrfQueryProfileData(fmprof, 66 FM3Str, 67 "SwapperDat", 68 (PVOID)SwapperDat, 69 &size); 70 if(*SwapperDat) { 66 FM3Str, 67 "SwapperDat", 68 (PVOID) SwapperDat, 69 &size); 70 if (*SwapperDat) 71 { 71 72 rc = DosFindFirst(SwapperDat, 72 &hdir, 73 FILE_NORMAL | FILE_ARCHIVED | 74 FILE_HIDDEN | FILE_SYSTEM | FILE_READONLY, 75 &ffb, 76 sizeof(ffb), 77 &nm, 78 FIL_STANDARD); 79 if(!rc) { 73 &hdir, 74 FILE_NORMAL | FILE_ARCHIVED | 75 FILE_HIDDEN | FILE_SYSTEM | FILE_READONLY, 76 &ffb, 77 sizeof(ffb), 78 &nm, 79 FIL_STANDARD); 80 if (!rc) 81 { 80 82 DosFindClose(hdir); 81 fp = fopen(SwapperDat,"r"); 82 if(fp) { 83 fclose(fp); 84 *SwapperDat = 0; 85 rc = 1L; 83 fp = fopen(SwapperDat, "r"); 84 if (fp) 85 { 86 fclose(fp); 87 *SwapperDat = 0; 88 rc = 1L; 86 89 } 87 90 } … … 89 92 *SwapperDat = 0; 90 93 } 91 if(rc) { 92 if(DosQuerySysInfo(QSV_BOOT_DRIVE, 93 QSV_BOOT_DRIVE, 94 (PVOID)&nm, 95 (ULONG)sizeof(ULONG))) 94 if (rc) 95 { 96 if (DosQuerySysInfo(QSV_BOOT_DRIVE, 97 QSV_BOOT_DRIVE, 98 (PVOID) & nm, 99 (ULONG) sizeof(ULONG))) 96 100 nm = 3L; 97 *filename = (CHAR)nm + '@'; 98 fp = _fsopen(filename,"r",SH_DENYNO); 99 if(fp) { 100 while(!feof(fp)) { 101 if(!fgets(input,8192,fp)) 102 break; 103 input[8191] = 0; 104 lstrip(input); 105 if(!strnicmp(input,"SWAPPATH",8)) { 106 p = input + 8; 107 while(*p == ' ') 108 p++; 109 if(*p == '=') { 110 p++; 111 stripcr(p); 112 rstrip(p); 113 while(*p == ' ') 114 p++; 115 if(*p == '\"') { 116 p++; 117 pp = p; 118 while(*pp && *pp != '\"') 119 *pp++; 120 if(*pp) 121 *pp = 0; 122 } 123 else { 124 pp = strchr(p,' '); 125 if(pp) 126 *pp = 0; 127 } 128 if(*p) { 129 strncpy(SwapperDat,p,CCHMAXPATH); 130 SwapperDat[CCHMAXPATH - 1] = 0; 131 if(SwapperDat[strlen(SwapperDat) - 1] != '\\') 132 strcat(SwapperDat,"\\"); 133 strcat(SwapperDat,"SWAPPER.DAT"); 134 hdir = HDIR_CREATE; 135 nm = 1L; 136 if(!DosFindFirst(SwapperDat, 137 &hdir, 138 FILE_NORMAL | FILE_ARCHIVED | 139 FILE_HIDDEN | FILE_SYSTEM | FILE_READONLY, 140 &ffb, 141 sizeof(ffb), 142 &nm, 143 FIL_STANDARD)) { 144 DosFindClose(hdir); 145 PrfWriteProfileString(fmprof, 146 FM3Str, 147 "SwapperDat", 148 SwapperDat); 149 } 150 else 151 *SwapperDat = 0; 152 break; 153 } 154 } 155 } 101 *filename = (CHAR) nm + '@'; 102 fp = _fsopen(filename, "r", SH_DENYNO); 103 if (fp) 104 { 105 while (!feof(fp)) 106 { 107 if (!fgets(input, 8192, fp)) 108 break; 109 input[8191] = 0; 110 lstrip(input); 111 if (!strnicmp(input, "SWAPPATH", 8)) 112 { 113 p = input + 8; 114 while (*p == ' ') 115 p++; 116 if (*p == '=') 117 { 118 p++; 119 stripcr(p); 120 rstrip(p); 121 while (*p == ' ') 122 p++; 123 if (*p == '\"') 124 { 125 p++; 126 pp = p; 127 while (*pp && *pp != '\"') 128 *pp++; 129 if (*pp) 130 *pp = 0; 131 } 132 else 133 { 134 pp = strchr(p, ' '); 135 if (pp) 136 *pp = 0; 137 } 138 if (*p) 139 { 140 strncpy(SwapperDat, p, CCHMAXPATH); 141 SwapperDat[CCHMAXPATH - 1] = 0; 142 if (SwapperDat[strlen(SwapperDat) - 1] != '\\') 143 strcat(SwapperDat, "\\"); 144 strcat(SwapperDat, "SWAPPER.DAT"); 145 hdir = HDIR_CREATE; 146 nm = 1L; 147 if (!DosFindFirst(SwapperDat, 148 &hdir, 149 FILE_NORMAL | FILE_ARCHIVED | 150 FILE_HIDDEN | FILE_SYSTEM | FILE_READONLY, 151 &ffb, 152 sizeof(ffb), 153 &nm, 154 FIL_STANDARD)) 155 { 156 DosFindClose(hdir); 157 PrfWriteProfileString(fmprof, 158 FM3Str, 159 "SwapperDat", 160 SwapperDat); 161 } 162 else 163 *SwapperDat = 0; 164 break; 165 } 166 } 167 } 156 168 } 157 169 fclose(fp); … … 160 172 } 161 173 162 163 unsigned long _System _DLL_InitTerm (unsigned long hModule, 164 unsigned long ulFlag) { 165 166 switch(ulFlag) { 167 case 0: 168 if(_CRT_init() == -1) 169 return 0UL; 170 FM3DllHandle = hModule; 174 unsigned long _System _DLL_InitTerm(unsigned long hModule, 175 unsigned long ulFlag) 176 { 177 178 switch (ulFlag) 179 { 180 case 0: 181 if (_CRT_init() == -1) 182 return 0UL; 183 FM3DllHandle = hModule; 184 { 185 char *env, stringfile[CCHMAXPATH]; 186 187 strcpy(stringfile, "FM3RES.STR"); 188 env = getenv("FM3INI"); 189 if (env) 171 190 { 172 char *env,stringfile[CCHMAXPATH]; 173 174 strcpy(stringfile,"FM3RES.STR"); 175 env = getenv("FM3INI"); 176 if(env) { 177 178 FILESTATUS3 fsa; 179 APIRET rc; 180 181 DosError(FERR_DISABLEHARDERR); 182 rc = DosQueryPathInfo(env, 183 FIL_STANDARD, 184 &fsa, 185 (ULONG)sizeof(fsa)); 186 if(!rc) { 187 if(fsa.attrFile & FILE_DIRECTORY) { 188 strcpy(stringfile,env); 189 if(stringfile[strlen(stringfile) - 1] != '\\') 190 strcat(stringfile,"\\"); 191 strcat(stringfile,"FM3RES.STR"); 192 DosError(FERR_DISABLEHARDERR); 193 if(DosQueryPathInfo(stringfile, 194 FIL_STANDARD, 195 &fsa, 196 sizeof(fsa))) 197 strcpy(stringfile,"FM3RES.STR"); 198 } 199 } 200 } 201 LoadStrings(stringfile); 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) 201 { 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 } 215 } 202 216 } 203 DosError(FERR_DISABLEHARDERR); 204 /* strings here to prevent multiple occurences in DLL */ 205 FM2Str = "FM/2"; 206 FM3Str = "FM/3"; 207 NullStr = ""; 208 Default = "DEFAULT"; 209 Settings = "SETTINGS"; 210 WPProgram = "WPProgram"; 211 FM3Folder = "<FM3_Folder>"; 212 FM3Tools = "<FM3_Tools>"; 213 DRM_OS2FILE = "DRM_OS2FILE"; 214 DRM_FM2ARCMEMBER = "DRM_FM2ARCMEMBER"; 215 DRF_FM2ARCHIVE = "DRF_FM2ARCHIVE"; 216 DRMDRFLIST = "<DRM_OS2FILE,DRF_UNKNOWN>," 217 "<DRM_DISCARD,DRF_UNKNOWN>," 218 "<DRM_PRINT,DRF_UNKNOWN>"; 219 DRMDRFOS2FILE = "<DRM_OS2FILE,DRF_UNKNOWN>"; 220 DRMDRFFM2ARC = "<DRM_FM2ARCMEMBER,DRF_FM2ARCHIVE>"; 221 DRM_FM2INIRECORD = "DRM_FM2INIRECORD"; 222 DRF_FM2INI = "DRF_FM2INI"; 223 SUBJECT = ".SUBJECT"; 224 LONGNAME = ".LONGNAME"; 225 HPFS = "HPFS"; 226 JFS = "JFS"; 227 CDFS = "CDFS"; 228 FAT32 = "FAT32"; 229 HPFS386 = "HPFS386"; 230 CBSIFS = "CBSIFS"; 231 /* end of strings */ 232 memset(&RGBBLACK,0,sizeof(RGB2)); 233 RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = 204; 234 RGBGREY.fcOptions = 0; 235 FM3UL = *(ULONG *)FM3Str; 236 DEBUG_STRING = "Debug -- please report to author"; 237 break; 238 case 1: 239 StopPrinting = 1; 240 if(fmprof) 241 PrfCloseProfile(fmprof); 242 DosError(FERR_ENABLEHARDERR); 243 _CRT_term(); 244 break; 245 default: 246 return 0UL; 217 LoadStrings(stringfile); 218 } 219 DosError(FERR_DISABLEHARDERR); 220 /* strings here to prevent multiple occurences in DLL */ 221 FM2Str = "FM/2"; 222 FM3Str = "FM/3"; 223 NullStr = ""; 224 Default = "DEFAULT"; 225 Settings = "SETTINGS"; 226 WPProgram = "WPProgram"; 227 FM3Folder = "<FM3_Folder>"; 228 FM3Tools = "<FM3_Tools>"; 229 DRM_OS2FILE = "DRM_OS2FILE"; 230 DRM_FM2ARCMEMBER = "DRM_FM2ARCMEMBER"; 231 DRF_FM2ARCHIVE = "DRF_FM2ARCHIVE"; 232 DRMDRFLIST = "<DRM_OS2FILE,DRF_UNKNOWN>," 233 "<DRM_DISCARD,DRF_UNKNOWN>," 234 "<DRM_PRINT,DRF_UNKNOWN>"; 235 DRMDRFOS2FILE = "<DRM_OS2FILE,DRF_UNKNOWN>"; 236 DRMDRFFM2ARC = "<DRM_FM2ARCMEMBER,DRF_FM2ARCHIVE>"; 237 DRM_FM2INIRECORD = "DRM_FM2INIRECORD"; 238 DRF_FM2INI = "DRF_FM2INI"; 239 SUBJECT = ".SUBJECT"; 240 LONGNAME = ".LONGNAME"; 241 HPFS = "HPFS"; 242 JFS = "JFS"; 243 CDFS = "CDFS"; 244 FAT32 = "FAT32"; 245 HPFS386 = "HPFS386"; 246 CBSIFS = "CBSIFS"; 247 /* end of strings */ 248 memset(&RGBBLACK, 0, sizeof(RGB2)); 249 RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = 204; 250 RGBGREY.fcOptions = 0; 251 FM3UL = *(ULONG *) FM3Str; 252 DEBUG_STRING = "Debug -- please report to author"; 253 break; 254 case 1: 255 StopPrinting = 1; 256 if (fmprof) 257 PrfCloseProfile(fmprof); 258 DosError(FERR_ENABLEHARDERR); 259 _CRT_term(); 260 break; 261 default: 262 return 0UL; 247 263 } 248 264 return 1UL; 249 265 } 250 266 251 252 VOID APIENTRY DeInitFM3DLL (ULONG why) { 253 267 VOID APIENTRY DeInitFM3DLL(ULONG why) 268 { 254 269 /* cleanup */ 255 static CHAR 256 CHAR 257 HDIR 258 ULONG 270 static CHAR s[CCHMAXPATH]; 271 CHAR *enddir; 272 HDIR search_handle; 273 ULONG num_matches; 259 274 static FILEFINDBUF3 f; 260 275 … … 262 277 StopPrinting = 1; 263 278 264 if (LogFileHandle)279 if (LogFileHandle) 265 280 fclose(LogFileHandle); 266 281 267 if(fmprof) { 282 if (fmprof) 283 { 268 284 PrfCloseProfile(fmprof); 269 fmprof = (HINI)0; 270 if(fIniExisted) { 285 fmprof = (HINI) 0; 286 if (fIniExisted) 287 { 271 288 DosError(FERR_DISABLEHARDERR); 272 289 DosCopy("FM3.INI", 273 274 275 } 276 } 277 278 if (fToolsChanged)290 "FM3INI.BAK", 291 DCPY_EXISTING); 292 } 293 } 294 295 if (fToolsChanged) 279 296 save_tools(NULL); 280 297 … … 282 299 283 300 save_dir(s); 284 if (s[strlen(s) - 1] != '\\')285 strcat(s, "\\");301 if (s[strlen(s) - 1] != '\\') 302 strcat(s, "\\"); 286 303 enddir = &s[strlen(s)]; 287 if(*ArcTempRoot) { 288 strcat(s,ArcTempRoot); 289 strcat(s,"*"); 304 if (*ArcTempRoot) 305 { 306 strcat(s, ArcTempRoot); 307 strcat(s, "*"); 290 308 search_handle = HDIR_CREATE; 291 309 num_matches = 1L; 292 if(!DosFindFirst(s, 293 &search_handle, 294 FILE_NORMAL | FILE_DIRECTORY | 295 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 296 FILE_ARCHIVED, 297 &f, 298 sizeof(FILEFINDBUF3), 299 &num_matches, 300 FIL_STANDARD)) { 301 do { 302 strcpy(enddir,f.achName); 303 if(f.attrFile & FILE_DIRECTORY) { 304 wipeallf("%s\\*",s); 305 DosDeleteDir(s); 306 } 307 else 308 unlinkf("%s",s); 309 } while(!DosFindNext(search_handle, 310 &f, 311 sizeof(FILEFINDBUF3), 312 &num_matches)); 310 if (!DosFindFirst(s, 311 &search_handle, 312 FILE_NORMAL | FILE_DIRECTORY | 313 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 314 FILE_ARCHIVED, 315 &f, 316 sizeof(FILEFINDBUF3), 317 &num_matches, 318 FIL_STANDARD)) 319 { 320 do 321 { 322 strcpy(enddir, f.achName); 323 if (f.attrFile & FILE_DIRECTORY) 324 { 325 wipeallf("%s\\*", s); 326 DosDeleteDir(s); 327 } 328 else 329 unlinkf("%s", s); 330 } 331 while (!DosFindNext(search_handle, 332 &f, 333 sizeof(FILEFINDBUF3), 334 &num_matches)); 313 335 DosFindClose(search_handle); 314 336 } … … 316 338 317 339 save_dir(s); 318 if (s[strlen(s) - 1] != '\\')319 strcat(s, "\\");340 if (s[strlen(s) - 1] != '\\') 341 strcat(s, "\\"); 320 342 enddir = &s[strlen(s)]; 321 strcat(s, LISTTEMPROOT);322 strcat(s, "???");343 strcat(s, LISTTEMPROOT); 344 strcat(s, "???"); 323 345 search_handle = HDIR_CREATE; 324 346 num_matches = 1L; 325 if(!DosFindFirst(s, 326 &search_handle, 327 FILE_NORMAL | FILE_DIRECTORY | 328 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 329 FILE_ARCHIVED, 330 &f, 331 sizeof(FILEFINDBUF3), 332 &num_matches, 333 FIL_STANDARD)) { 334 do { 335 if(!(f.attrFile & FILE_DIRECTORY)) { 336 strcpy(enddir,f.achName); 337 unlinkf("%s",s); 347 if (!DosFindFirst(s, 348 &search_handle, 349 FILE_NORMAL | FILE_DIRECTORY | 350 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 351 FILE_ARCHIVED, 352 &f, 353 sizeof(FILEFINDBUF3), 354 &num_matches, 355 FIL_STANDARD)) 356 { 357 do 358 { 359 if (!(f.attrFile & FILE_DIRECTORY)) 360 { 361 strcpy(enddir, f.achName); 362 unlinkf("%s", s); 338 363 } 339 } while(!DosFindNext(search_handle, 340 &f, 341 sizeof(FILEFINDBUF3), 342 &num_matches)); 364 } 365 while (!DosFindNext(search_handle, 366 &f, 367 sizeof(FILEFINDBUF3), 368 &num_matches)); 343 369 DosFindClose(search_handle); 344 370 } … … 348 374 EndNote(); 349 375 350 if (FM3ModHandle)376 if (FM3ModHandle) 351 377 DosFreeModule(FM3ModHandle); 352 378 353 379 DosExitList(EXLST_REMOVE, 354 380 DeInitFM3DLL); 355 381 } 356 382 357 358 BOOL InitFM3DLL (HAB hab,int argc,char **argv) { 359 383 BOOL InitFM3DLL(HAB hab, int argc, char **argv) 384 { 360 385 /* 361 386 * this function should be called by any application using this DLL right … … 364 389 365 390 CLASSINFO clinfo; 366 BOOL okay = FALSE; 367 368 if(!StringsLoaded()) { 369 DosBeep(50,100); 391 BOOL okay = FALSE; 392 393 if (!StringsLoaded()) 394 { 395 DosBeep(50, 100); 370 396 saymsg(MB_ENTER, 371 372 373 374 397 HWND_DESKTOP, 398 "Error", 399 "FM3RES.STR isn't in right format, at least " 400 "for this version of FM/2."); 375 401 return FALSE; 376 402 } 377 403 378 { 379 APIRET rcl = 1, rcq = 1;380 PFN pfnResVersion = (PFN)NULL;381 ULONG RVMajor = 0,RVMinor = 0,ret = 0;382 char *env,dllfile[CCHMAXPATH];383 384 strcpy(dllfile, "FM3RES");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"); 385 411 env = getenv("FM3INI"); 386 if(env) { 412 if (env) 413 { 387 414 388 415 FILESTATUS3 fsa; 389 APIRET 416 APIRET rc; 390 417 391 418 DosError(FERR_DISABLEHARDERR); 392 419 rc = DosQueryPathInfo(env, 393 FIL_STANDARD, 394 &fsa, 395 (ULONG)sizeof(fsa)); 396 if(!rc) { 397 if(fsa.attrFile & FILE_DIRECTORY) { 398 strcpy(dllfile,env); 399 if(dllfile[strlen(dllfile) - 1] != '\\') 400 strcat(dllfile,"\\"); 401 strcat(dllfile,"FM3RES"); 402 DosError(FERR_DISABLEHARDERR); 403 if(DosQueryPathInfo(dllfile, 404 FIL_STANDARD, 405 &fsa, 406 sizeof(fsa))) 407 strcpy(dllfile,"FM3RES"); 408 } 420 FIL_STANDARD, 421 &fsa, 422 (ULONG) sizeof(fsa)); 423 if (!rc) 424 { 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 } 409 438 } 410 439 } 411 440 rcl = DosLoadModule(NULL, 412 0, 413 dllfile, 414 &FM3ModHandle); 415 if(!rcl) { 416 if(DosExitList(EXLST_ADD, 417 DeInitFM3DLL)) 418 DosBeep(500,100); 441 0, 442 dllfile, 443 &FM3ModHandle); 444 if (!rcl) 445 { 446 if (DosExitList(EXLST_ADD, 447 DeInitFM3DLL)) 448 DosBeep(500, 100); 419 449 rcq = DosQueryProcAddr(FM3ModHandle, 420 1, 421 "ResVersion", 422 &pfnResVersion); 423 if(!rcq) 424 ret = pfnResVersion(&RVMajor,&RVMinor); 425 } 426 else { 450 1, 451 "ResVersion", 452 &pfnResVersion); 453 if (!rcq) 454 ret = pfnResVersion(&RVMajor, &RVMinor); 455 } 456 else 457 { 427 458 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 428 429 430 459 HWND_DESKTOP, 460 GetPString(IDS_ERRORTEXT), 461 GetPString(IDS_FM3RESERROR1TEXT)); 431 462 return FALSE; 432 463 } 433 if(RVMajor < VERMAJOR || 434 (RVMajor == VERMAJOR && RVMinor < VERMINOR)) { 435 DosBeep(50,100); 464 if (RVMajor < VERMAJOR || 465 (RVMajor == VERMAJOR && RVMinor < VERMINOR)) 466 { 467 DosBeep(50, 100); 436 468 saymsg(MB_ENTER, 437 438 439 440 441 442 443 444 445 446 447 448 449 469 HWND_DESKTOP, 470 GetPString(IDS_ERRORTEXT), 471 GetPString(IDS_FM3RESERROR2TEXT), 472 (!rcq) ? 473 GetPString(IDS_FM3RESERROR3TEXT) : 474 (!rcl) ? 475 GetPString(IDS_FM3RESERROR4TEXT) : 476 GetPString(IDS_FM3RESERROR5TEXT), 477 RVMajor, 478 RVMinor, 479 rcl, 480 rcq, 481 ret); 450 482 return FALSE; 451 483 } 452 484 } 453 485 454 ArgDriveFlags(argc, argv);486 ArgDriveFlags(argc, argv); 455 487 FillInDriveFlags(NULL); 456 488 457 { 458 CHAR curpath[CCHMAXPATH + 8],*env;489 { /* try to ensure that FM/2 Utilities are available */ 490 CHAR curpath[CCHMAXPATH + 8], *env; 459 491 FILESTATUS3 fs3; 460 492 461 493 save_dir2(curpath); 462 strcat(curpath,"\\UTILS"); 463 if(!DosQueryPathInfo(curpath, 464 FIL_STANDARD, 465 &fs3, 466 sizeof(fs3)) && 467 (fs3.attrFile & FILE_DIRECTORY)) { 494 strcat(curpath, "\\UTILS"); 495 if (!DosQueryPathInfo(curpath, 496 FIL_STANDARD, 497 &fs3, 498 sizeof(fs3)) && 499 (fs3.attrFile & FILE_DIRECTORY)) 500 { 468 501 env = getenv("PATH"); 469 if(env) { 470 if(!stristr(curpath,env)) 471 fAddUtils = TRUE; 502 if (env) 503 { 504 if (!stristr(curpath, env)) 505 fAddUtils = TRUE; 472 506 } 473 507 } 474 508 } 475 if (!*profile)476 strcpy(profile, "FM3.INI");509 if (!*profile) 510 strcpy(profile, "FM3.INI"); 477 511 mypid = getpid(); 478 512 /* give default appname if none set by caller */ 479 if (!*appname)480 strcpy(appname, FM3Str);513 if (!*appname) 514 strcpy(appname, FM3Str); 481 515 /* save appname; may be reset below */ 482 strcpy(realappname, appname);483 if (!strcmp(appname,FM3Str))516 strcpy(realappname, appname); 517 if (!strcmp(appname, FM3Str)) 484 518 DosSetMaxFH(100L); 485 else if (!strcmp(appname,"VDir") ||486 !strcmp(appname,"VTree") ||487 !strcmp(appname,"VCollect") ||488 !strcmp(appname,"SEEALL") ||489 !strcmp(appname,"FM/4"))519 else if (!strcmp(appname, "VDir") || 520 !strcmp(appname, "VTree") || 521 !strcmp(appname, "VCollect") || 522 !strcmp(appname, "SEEALL") || 523 !strcmp(appname, "FM/4")) 490 524 DosSetMaxFH(60L); 491 525 else 492 526 DosSetMaxFH(40L); 493 527 494 if(DosQuerySysInfo(QSV_VERSION_MAJOR, 495 QSV_VERSION_MINOR, 496 (PVOID)OS2ver, 497 (ULONG)sizeof(OS2ver))) { 528 if (DosQuerySysInfo(QSV_VERSION_MAJOR, 529 QSV_VERSION_MINOR, 530 (PVOID) OS2ver, 531 (ULONG) sizeof(OS2ver))) 532 { 498 533 OS2ver[0] = 2; 499 534 OS2ver[1] = 1; … … 501 536 502 537 /* set up default root names for temp archive goodies */ 503 if (!fAmAV2)504 strcpy(ArcTempRoot, "$FM$ARC$");538 if (!fAmAV2) 539 strcpy(ArcTempRoot, "$FM$ARC$"); 505 540 else 506 strcpy(ArcTempRoot, "$AV$ARC$");541 strcpy(ArcTempRoot, "$AV$ARC$"); 507 542 508 543 /* initialize random number generator */ … … 512 547 513 548 /* _heapmin() is done in a separate thread -- start it */ 514 if(_beginthread(HeapThread, 515 NULL, 516 32768, 517 NULL) == 518 -1 || 519 /* timer messages are sent from a separate thread -- start it */ 520 !StartTimer()) { 521 DosBeep(50,100); 549 if (_beginthread(HeapThread, 550 NULL, 551 32768, 552 NULL) == 553 -1 || 554 /* timer messages are sent from a separate thread -- start it */ 555 !StartTimer()) 556 { 557 DosBeep(50, 100); 522 558 DosSleep(10); 523 DosBeep(50, 100);559 DosBeep(50, 100); 524 560 return FALSE; 525 561 } 526 562 527 { 563 { /* are we the workplace? */ 528 564 CHAR *env; 529 565 530 566 env = getenv("WORKPLACE__PROCESS"); 531 if (!env || stricmp(env,"NO"))567 if (!env || stricmp(env, "NO")) 532 568 fWorkPlace = TRUE; 533 569 } 534 570 535 if((!strchr(profile,'\\') && !strchr(profile,':')) || 536 !(fmprof = PrfOpenProfile((HAB)0,profile))) { 571 if ((!strchr(profile, '\\') && !strchr(profile, ':')) || 572 !(fmprof = PrfOpenProfile((HAB) 0, profile))) 573 { 537 574 538 575 /* figure out where to put INI file... */ 539 CHAR *env, inipath[CCHMAXPATH];576 CHAR *env, inipath[CCHMAXPATH]; 540 577 541 578 DosError(FERR_DISABLEHARDERR); 542 579 save_dir2(HomePath); 543 580 DosError(FERR_DISABLEHARDERR); 544 memset(driveserial, -1,sizeof(driveserial));581 memset(driveserial, -1, sizeof(driveserial)); 545 582 *inipath = 0; 546 583 env = getenv("FM3INI"); 547 if(env) { 584 if (env) 585 { 548 586 549 587 FILESTATUS3 fsa; 550 APIRET 551 552 strcpy(inipath, env);588 APIRET rc; 589 590 strcpy(inipath, env); 553 591 DosError(FERR_DISABLEHARDERR); 554 592 rc = DosQueryPathInfo(inipath, 555 FIL_STANDARD, 556 &fsa, 557 (ULONG)sizeof(fsa)); 558 if(!rc) { 559 if(fsa.attrFile & FILE_DIRECTORY) { 560 if(inipath[strlen(inipath) - 1] != '\\') 561 strcat(inipath,"\\"); 562 strcat(inipath,profile); 563 } 593 FIL_STANDARD, 594 &fsa, 595 (ULONG) sizeof(fsa)); 596 if (!rc) 597 { 598 if (fsa.attrFile & FILE_DIRECTORY) 599 { 600 if (inipath[strlen(inipath) - 1] != '\\') 601 strcat(inipath, "\\"); 602 strcat(inipath, profile); 603 } 564 604 } 565 605 } 566 if(!env) { 606 if (!env) 607 { 567 608 env = searchpath(profile); 568 if (!env)569 570 strcpy(inipath, env);609 if (!env) 610 env = profile; 611 strcpy(inipath, env); 571 612 } 572 613 /* in some odd cases the INI file can get set to readonly status */ … … 575 616 FILESTATUS3 fsa; 576 617 577 if (!*inipath)578 strcpy(inipath,profile);618 if (!*inipath) 619 strcpy(inipath, profile); 579 620 DosError(FERR_DISABLEHARDERR); 580 if(!DosQueryPathInfo(inipath,FIL_STANDARD,&fsa,(ULONG)sizeof(fsa))) { 581 fIniExisted = TRUE; 582 if(fsa.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) { 583 fsa.attrFile &= (~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)); 584 if(DosSetPathInfo(inipath,FIL_STANDARD,(PVOID)&fsa, 585 (ULONG)sizeof(fsa),0L)) 586 saymsg(MB_ENTER, 587 HWND_DESKTOP, 588 GetPString(IDS_ERRORTEXT), 589 GetPString(IDS_INIREADONLYTEXT), 590 inipath); 591 } 621 if (!DosQueryPathInfo(inipath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa))) 622 { 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 } 592 635 } 593 636 } 594 fmprof = PrfOpenProfile((HAB)0,inipath); 595 if(!fmprof) { 596 strcpy(inipath,"FM3.INI"); 597 fmprof = PrfOpenProfile((HAB)0,inipath); 598 } 599 if(!fmprof) { 600 DosBeep(50,100); 637 fmprof = PrfOpenProfile((HAB) 0, inipath); 638 if (!fmprof) 639 { 640 strcpy(inipath, "FM3.INI"); 641 fmprof = PrfOpenProfile((HAB) 0, inipath); 642 } 643 if (!fmprof) 644 { 645 DosBeep(50, 100); 601 646 DosSleep(10); 602 DosBeep(50, 100);647 DosBeep(50, 100); 603 648 DosSleep(10); 604 DosBeep(50, 100);649 DosBeep(50, 100); 605 650 return FALSE; 606 651 } … … 613 658 614 659 PrfQueryProfileData(fmprof, 615 616 617 (PVOID)&fSeparateParms,618 619 if (!fSeparateParms)660 FM3Str, 661 "SeparateParms", 662 (PVOID) & fSeparateParms, 663 &size); 664 if (!fSeparateParms) 620 665 strcpy(appname, 621 666 FM3Str); 622 667 } 623 668 624 669 /* start help */ 625 memset(&hini, 0,sizeof(HELPINIT));670 memset(&hini, 0, sizeof(HELPINIT)); 626 671 hini.cb = sizeof(HELPINIT); 627 672 hini.ulReturnCode = 0L; 628 673 hini.pszTutorialName = NULL; 629 hini.phtHelpTable = (PHELPTABLE) MAKELONG(ID_HELPTABLE,0xffff);630 hini.hmodAccelActionBarModule = (HMODULE) 0;674 hini.phtHelpTable = (PHELPTABLE) MAKELONG(ID_HELPTABLE, 0xffff); 675 hini.hmodAccelActionBarModule = (HMODULE) 0; 631 676 hini.idAccelTable = 0; 632 677 hini.idActionBar = 0; … … 634 679 hini.fShowPanelId = CMIC_HIDE_PANEL_ID; 635 680 hini.pszHelpLibraryName = "FM3.HLP"; 636 hwndHelp = WinCreateHelpInstance(hab,&hini); 637 if(!hwndHelp) { 638 639 CHAR *env; 681 hwndHelp = WinCreateHelpInstance(hab, &hini); 682 if (!hwndHelp) 683 { 684 685 CHAR *env; 640 686 static CHAR helppath[CCHMAXPATH]; 641 687 642 688 env = getenv("FM3INI"); 643 if(env) { 689 if (env) 690 { 644 691 645 692 FILESTATUS3 fsa; 646 APIRET 647 648 strcpy(helppath, env);693 APIRET rc; 694 695 strcpy(helppath, env); 649 696 DosError(FERR_DISABLEHARDERR); 650 rc = DosQueryPathInfo(helppath,FIL_STANDARD,&fsa,(ULONG)sizeof(fsa)); 651 if(!rc) { 652 if(fsa.attrFile & FILE_DIRECTORY) { 653 if(helppath[strlen(helppath) - 1] != '\\') 654 strcat(helppath,"\\"); 655 strcat(helppath,"FM3.HLP"); 656 hini.pszHelpLibraryName = helppath; 657 hwndHelp = WinCreateHelpInstance(hab,&hini); 658 } 697 rc = DosQueryPathInfo(helppath, FIL_STANDARD, &fsa, (ULONG) sizeof(fsa)); 698 if (!rc) 699 { 700 if (fsa.attrFile & FILE_DIRECTORY) 701 { 702 if (helppath[strlen(helppath) - 1] != '\\') 703 strcat(helppath, "\\"); 704 strcat(helppath, "FM3.HLP"); 705 hini.pszHelpLibraryName = helppath; 706 hwndHelp = WinCreateHelpInstance(hab, &hini); 707 } 659 708 } 660 709 } 661 710 } 662 if(!hwndHelp) { 711 if (!hwndHelp) 712 { 663 713 saymsg(MB_ENTER | MB_ICONEXCLAMATION, 664 665 666 667 714 HWND_DESKTOP, 715 GetPString(IDS_FM2TROUBLETEXT), 716 GetPString(IDS_CANTLOADHELPTEXT), 717 GetPString(IDS_NOHELPACCEPTTEXT)); 668 718 } 669 719 670 720 /* a couple of default window procs so we don't have to look them up later */ 671 if (WinQueryClassInfo(hab,WC_CONTAINER,&clinfo))721 if (WinQueryClassInfo(hab, WC_CONTAINER, &clinfo)) 672 722 PFNWPCnr = clinfo.pfnWindowProc; 673 723 // saymsg(MB_ENTER,HWND_DESKTOP,"Container flags:","%08lx",clinfo.flClassStyle); 674 if (WinQueryClassInfo(hab,WC_FRAME,&clinfo))724 if (WinQueryClassInfo(hab, WC_FRAME, &clinfo)) 675 725 PFNWPFrame = clinfo.pfnWindowProc; 676 726 // saymsg(MB_ENTER,HWND_DESKTOP,"Frame flags:","%08lx",clinfo.flClassStyle); 677 if (WinQueryClassInfo(hab,WC_BUTTON,&clinfo))727 if (WinQueryClassInfo(hab, WC_BUTTON, &clinfo)) 678 728 PFNWPButton = clinfo.pfnWindowProc; 679 729 // saymsg(MB_ENTER,HWND_DESKTOP,"Button flags:","%08lx",clinfo.flClassStyle); 680 if (WinQueryClassInfo(hab,WC_STATIC,&clinfo))730 if (WinQueryClassInfo(hab, WC_STATIC, &clinfo)) 681 731 PFNWPStatic = clinfo.pfnWindowProc; 682 732 // saymsg(MB_ENTER,HWND_DESKTOP,"Static flags:","%08lx",clinfo.flClassStyle); 683 if (WinQueryClassInfo(hab,WC_MLE,&clinfo))733 if (WinQueryClassInfo(hab, WC_MLE, &clinfo)) 684 734 PFNWPMLE = clinfo.pfnWindowProc; 685 735 // saymsg(MB_ENTER,HWND_DESKTOP,"MLE flags:","%08lx",clinfo.flClassStyle); 686 if(!PFNWPCnr || !PFNWPFrame || !PFNWPButton || !PFNWPStatic || !PFNWPMLE) { 687 DosBeep(50,100); 688 DosSleep(10); 689 DosBeep(50,100); 690 DosSleep(10); 691 DosBeep(50,100); 692 DosSleep(10); 693 DosBeep(50,100); 736 if (!PFNWPCnr || !PFNWPFrame || !PFNWPButton || !PFNWPStatic || !PFNWPMLE) 737 { 738 DosBeep(50, 100); 739 DosSleep(10); 740 DosBeep(50, 100); 741 DosSleep(10); 742 DosBeep(50, 100); 743 DosSleep(10); 744 DosBeep(50, 100); 694 745 return FALSE; 695 746 } … … 697 748 /* register window classes we use */ 698 749 WinRegisterClass(hab, 699 700 701 702 703 WinRegisterClass(hab, 704 705 706 707 708 WinRegisterClass(hab, 709 710 711 712 713 WinRegisterClass(hab, 714 715 716 717 718 WinRegisterClass(hab, 719 720 721 722 723 WinRegisterClass(hab, 724 725 726 727 728 WinRegisterClass(hab, 729 730 731 732 733 WinRegisterClass(hab, 734 735 736 737 738 WinRegisterClass(hab, 739 740 741 742 743 WinRegisterClass(hab, 744 745 746 747 748 WinRegisterClass(hab, 749 750 751 752 753 WinRegisterClass(hab, 754 755 756 757 758 WinRegisterClass(hab, 759 760 761 762 763 WinRegisterClass(hab, 764 765 766 767 768 WinRegisterClass(hab, 769 770 771 772 773 WinRegisterClass(hab, 774 775 776 777 778 WinRegisterClass(hab, 779 780 781 782 783 WinRegisterClass(hab, 784 785 786 787 788 WinRegisterClass(hab, 789 790 791 792 793 WinRegisterClass(hab, 794 795 796 797 798 WinRegisterClass(hab, 799 800 801 802 803 WinRegisterClass(hab, 804 805 806 807 808 WinRegisterClass(hab, 809 810 811 812 813 WinRegisterClass(hab, 814 815 816 817 818 WinRegisterClass(hab, 819 820 821 822 823 WinRegisterClass(hab, 824 825 826 827 828 WinRegisterClass(hab, 829 830 831 832 833 WinRegisterClass(hab, 834 835 836 837 750 GetPString(IDS_WCMAINWND), 751 MainWndProc, 752 CS_SIZEREDRAW | CS_CLIPCHILDREN, 753 sizeof(PVOID) * 8); 754 WinRegisterClass(hab, 755 GetPString(IDS_WCMAINWND2), 756 MainWndProc2, 757 CS_SIZEREDRAW | CS_CLIPCHILDREN, 758 sizeof(PVOID) * 4); 759 WinRegisterClass(hab, 760 GetPString(IDS_WCTREECONTAINER), 761 TreeClientWndProc, 762 CS_SIZEREDRAW | CS_CLIPCHILDREN, 763 sizeof(PVOID) * 2); 764 WinRegisterClass(hab, 765 GetPString(IDS_WCDIRCONTAINER), 766 DirClientWndProc, 767 CS_SIZEREDRAW | CS_CLIPCHILDREN, 768 sizeof(PVOID) * 2); 769 WinRegisterClass(hab, 770 GetPString(IDS_WCCOLLECTOR), 771 CollectorClientWndProc, 772 CS_SIZEREDRAW | CS_CLIPCHILDREN, 773 sizeof(PVOID) * 2); 774 WinRegisterClass(hab, 775 GetPString(IDS_WCARCCONTAINER), 776 ArcClientWndProc, 777 CS_SIZEREDRAW | CS_CLIPCHILDREN, 778 sizeof(PVOID) * 2); 779 WinRegisterClass(hab, 780 GetPString(IDS_WCMLEEDITOR), 781 MLEEditorProc, 782 CS_SIZEREDRAW | CS_CLIPCHILDREN, 783 sizeof(PVOID) * 2); 784 WinRegisterClass(hab, 785 GetPString(IDS_WCINIEDITOR), 786 IniProc, 787 CS_SIZEREDRAW | CS_CLIPCHILDREN, 788 sizeof(PVOID) * 2); 789 WinRegisterClass(hab, 790 GetPString(IDS_WCTOOLBACK), 791 ToolBackProc, 792 CS_SIZEREDRAW, 793 sizeof(PVOID)); 794 WinRegisterClass(hab, 795 GetPString(IDS_WCDRIVEBACK), 796 DriveBackProc, 797 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 798 sizeof(PVOID)); 799 WinRegisterClass(hab, 800 GetPString(IDS_WCSEEALL), 801 SeeAllWndProc, 802 CS_SIZEREDRAW | CS_CLIPCHILDREN, 803 sizeof(PVOID)); 804 WinRegisterClass(hab, 805 GetPString(IDS_WCNEWVIEW), 806 ViewWndProc, 807 CS_SIZEREDRAW | CS_CLIPCHILDREN, 808 sizeof(PVOID)); 809 WinRegisterClass(hab, 810 GetPString(IDS_WCTOOLBUTTONS), 811 ChildButtonProc, 812 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 813 sizeof(PVOID)); 814 WinRegisterClass(hab, 815 GetPString(IDS_WCDRIVEBUTTONS), 816 DriveProc, 817 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 818 sizeof(PVOID)); 819 WinRegisterClass(hab, 820 GetPString(IDS_WCBUBBLE), 821 BubbleProc, 822 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 823 sizeof(ULONG) * 2); 824 WinRegisterClass(hab, 825 GetPString(IDS_WCSTATUS), 826 StatusProc, 827 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 828 sizeof(ULONG)); 829 WinRegisterClass(hab, 830 GetPString(IDS_WCDIRSTATUS), 831 DirTextProc, 832 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 833 sizeof(ULONG)); 834 WinRegisterClass(hab, 835 GetPString(IDS_WCTREESTATUS), 836 TreeStatProc, 837 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 838 sizeof(ULONG)); 839 WinRegisterClass(hab, 840 GetPString(IDS_WCARCSTATUS), 841 ArcTextProc, 842 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 843 sizeof(ULONG)); 844 WinRegisterClass(hab, 845 GetPString(IDS_WCCOLSTATUS), 846 CollectorTextProc, 847 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 848 sizeof(ULONG)); 849 WinRegisterClass(hab, 850 GetPString(IDS_WCSEESTATUS), 851 SeeStatusProc, 852 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 853 sizeof(ULONG)); 854 WinRegisterClass(hab, 855 GetPString(IDS_WCVIEWSTATUS), 856 ViewStatusProc, 857 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 858 sizeof(ULONG)); 859 WinRegisterClass(hab, 860 GetPString(IDS_WCERRORWND), 861 NotifyWndProc, 862 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 863 sizeof(PVOID)); 864 WinRegisterClass(hab, 865 GetPString(IDS_WCMINITIME), 866 MiniTimeProc, 867 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 868 sizeof(PVOID) * 2); 869 WinRegisterClass(hab, 870 GetPString(IDS_WCDATABAR), 871 DataProc, 872 CS_SIZEREDRAW, 873 sizeof(PVOID)); 874 WinRegisterClass(hab, 875 GetPString(IDS_WCTREEOPENBUTTON), 876 OpenButtonProc, 877 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 878 sizeof(PVOID)); 879 WinRegisterClass(hab, 880 GetPString(IDS_WCAUTOVIEW), 881 AutoViewProc, 882 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 883 sizeof(PVOID)); 884 WinRegisterClass(hab, 885 GetPString(IDS_WCLED), 886 LEDProc, 887 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 888 sizeof(PVOID)); 838 889 839 890 /* … … 842 893 */ 843 894 detailssize = detailsea = detailslwdate = detailslwtime = detailsattr = 844 detailsicon = fAutoTile = fConfirmDelete = fLoadSubject = fUnHilite =845 fLoadLongnames = fToolbar = fSaveState = fGuessType = fToolbarHelp =846 fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives =847 fSplitStatus = fDragndropDlg = fQuickArcFind = fKeepCmdLine =848 fMoreButtons = fDrivebar = fCollapseFirst = fSwitchTree =849 fSwitchTreeExpand = fNoSearch = fCustomFileDlg = fOtherHelp =850 fSaveMiniCmds = fUserComboBox = fFM2Deletes = fConfirmTarget =851 fShowTarget = fDrivebarHelp = fCheckMM = TRUE;895 detailsicon = fAutoTile = fConfirmDelete = fLoadSubject = fUnHilite = 896 fLoadLongnames = fToolbar = fSaveState = fGuessType = fToolbarHelp = 897 fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives = 898 fSplitStatus = fDragndropDlg = fQuickArcFind = fKeepCmdLine = 899 fMoreButtons = fDrivebar = fCollapseFirst = fSwitchTree = 900 fSwitchTreeExpand = fNoSearch = fCustomFileDlg = fOtherHelp = 901 fSaveMiniCmds = fUserComboBox = fFM2Deletes = fConfirmTarget = 902 fShowTarget = fDrivebarHelp = fCheckMM = TRUE; 852 903 ulCnrType = CCS_EXTENDSEL; 853 904 FilesToGet = 128L; 854 905 AutoviewHeight = 48L; 855 strcpy(printer, "PRN");906 strcpy(printer, "PRN"); 856 907 prnwidth = 80; 857 908 prnlength = 66; … … 872 923 size = sizeof(BOOL); 873 924 PrfQueryProfileData(fmprof, 874 875 876 (PVOID)&fShowTarget,877 878 size = sizeof(BOOL); 879 PrfQueryProfileData(fmprof, 880 881 882 (PVOID)&fCheckMM,883 884 size = sizeof(BOOL); 885 PrfQueryProfileData(fmprof, 886 887 888 (PVOID)&fChangeTarget,889 890 size = sizeof(BOOL); 891 PrfQueryProfileData(fmprof, 892 893 894 (PVOID)&fConfirmTarget,895 896 size = sizeof(BOOL); 897 PrfQueryProfileData(fmprof, 898 899 900 (PVOID)&fCustomFileDlg,901 902 size = sizeof(BOOL); 903 PrfQueryProfileData(fmprof, 904 905 906 (PVOID)&fSaveMiniCmds,907 908 size = sizeof(BOOL); 909 PrfQueryProfileData(fmprof, 910 911 912 (PVOID)&fSaveBigCmds,913 914 size = sizeof(BOOL); 915 PrfQueryProfileData(fmprof, 916 917 918 (PVOID)&fNoFoldMenu,919 920 size = sizeof(BOOL); 921 PrfQueryProfileData(fmprof, 922 923 924 (PVOID)&fThreadNotes,925 926 size = sizeof(BOOL); 927 PrfQueryProfileData(fmprof, FM3Str,"Prnpagenums",(PVOID)&prnpagenums,&size);928 size = sizeof(BOOL); 929 PrfQueryProfileData(fmprof, FM3Str,"Prnalt",(PVOID)&prnalt,&size);930 size = sizeof(BOOL); 931 PrfQueryProfileData(fmprof, FM3Str,"Prnformat",(PVOID)&prnformat,&size);932 size = sizeof(BOOL); 933 PrfQueryProfileData(fmprof, FM3Str,"Prnformfeedbefore",934 (PVOID)&prnformfeedbefore,&size);935 size = sizeof(BOOL); 936 PrfQueryProfileData(fmprof, 937 938 939 (PVOID)&prnformfeedafter,940 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, 946 &size); 947 size = sizeof(BOOL); 948 PrfQueryProfileData(fmprof, 949 FM3Str, 950 "CustomFileDlg", 951 (PVOID) & fCustomFileDlg, 952 &size); 953 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); 941 992 size = sizeof(ULONG); 942 PrfQueryProfileData(fmprof, FM3Str,"Prntabspaces",943 (PVOID)&prntabspaces,&size);993 PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", 994 (PVOID) & prntabspaces, &size); 944 995 size = sizeof(ULONG); 945 PrfQueryProfileData(fmprof, FM3Str,"Prnwidth",(PVOID)&prnwidth,&size);996 PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", (PVOID) & prnwidth, &size); 946 997 size = sizeof(ULONG); 947 PrfQueryProfileData(fmprof, FM3Str,"Prnlength",(PVOID)&prnlength,&size);998 PrfQueryProfileData(fmprof, FM3Str, "Prnlength", (PVOID) & prnlength, &size); 948 999 size = sizeof(ULONG); 949 PrfQueryProfileData(fmprof, FM3Str,"Prntmargin",(PVOID)&prntmargin,&size);1000 PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", (PVOID) & prntmargin, &size); 950 1001 size = sizeof(ULONG); 951 PrfQueryProfileData(fmprof, FM3Str,"Prnbmargin",(PVOID)&prnbmargin,&size);1002 PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", (PVOID) & prnbmargin, &size); 952 1003 size = sizeof(ULONG); 953 PrfQueryProfileData(fmprof, FM3Str,"Prnlmargin",(PVOID)&prnlmargin,&size);1004 PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", (PVOID) & prnlmargin, &size); 954 1005 size = sizeof(ULONG); 955 PrfQueryProfileData(fmprof, FM3Str,"Prnrmargin",(PVOID)&prnrmargin,&size);1006 PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", (PVOID) & prnrmargin, &size); 956 1007 size = sizeof(ULONG); 957 PrfQueryProfileData(fmprof, FM3Str,"Prnspacing",(PVOID)&prnspacing,&size);958 size = sizeof(BOOL); 959 PrfQueryProfileData(fmprof, FM3Str,"NoDead",(PVOID)&fNoDead,&size);960 size = sizeof(BOOL); 961 PrfQueryProfileData(fmprof, FM3Str,"NoFinger",(PVOID)&fNoFinger,&size);962 size = sizeof(BOOL); 963 PrfQueryProfileData(fmprof, appname,"SwitchTree",(PVOID)&fSwitchTree,964 965 size = sizeof(BOOL); 966 PrfQueryProfileData(fmprof, appname,"SwitchTreeExpand",967 (PVOID)&fSwitchTreeExpand,&size);968 size = sizeof(BOOL); 969 PrfQueryProfileData(fmprof, appname,"SwitchTreeOnFocus",970 (PVOID)&fSwitchTreeOnFocus,&size);971 size = sizeof(BOOL); 972 PrfQueryProfileData(fmprof, appname,"CollapseFirst",973 (PVOID)&fCollapseFirst,&size);974 size = sizeof(BOOL); 975 PrfQueryProfileData(fmprof, appname,"FilesInTree",976 (PVOID)&fFilesInTree,&size);977 size = sizeof(BOOL); 978 PrfQueryProfileData(fmprof, FM3Str,"TopDir",(PVOID)&fTopDir,&size);979 size = sizeof(BOOL); 980 PrfQueryProfileData(fmprof, FM3Str,"LookInDir",(PVOID)&fLookInDir,&size);981 PrfQueryProfileString(fmprof, appname,"DefArc",NULL,szDefArc,sizeof(szDefArc));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)); 982 1033 size = sizeof(ULONG); 983 PrfQueryProfileData(fmprof,FM3Str,"AutoviewHeight", 984 (PVOID)&AutoviewHeight,&size); 985 size = sizeof(BOOL); 986 PrfQueryProfileData(fmprof,FM3Str,"KeepCmdLine",(PVOID)&fKeepCmdLine,&size); 987 if(strcmp(realappname,"FM/4")) { 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 { 988 1040 size = sizeof(BOOL); 989 1041 PrfQueryProfileData(fmprof, 990 991 992 (PVOID)&fMoreButtons,993 1042 FM3Str, 1043 "MoreButtons", 1044 (PVOID) & fMoreButtons, 1045 &size); 994 1046 size = sizeof(BOOL); 995 1047 PrfQueryProfileData(fmprof, 996 997 998 (PVOID)&fDrivebar,999 1048 FM3Str, 1049 "Drivebar", 1050 (PVOID) & fDrivebar, 1051 &size); 1000 1052 } 1001 1053 else … … 1003 1055 size = sizeof(BOOL); 1004 1056 PrfQueryProfileData(fmprof, 1005 1006 1007 (PVOID)&fNoSearch,1008 1009 size = sizeof(BOOL); 1010 PrfQueryProfileData(fmprof, 1011 1012 1013 (PVOID)&fGuessType,1014 1015 size = sizeof(BOOL); 1016 PrfQueryProfileData(fmprof, 1017 1018 1019 (PVOID)&fViewChild,1020 1021 size = sizeof(BOOL); 1022 PrfQueryProfileData(fmprof, 1023 1024 1025 (PVOID)&fShowEnv,1026 1027 size = sizeof(BOOL); 1028 PrfQueryProfileData(fmprof, 1029 1030 1031 (PVOID)&fLeaveTree,1032 1033 size = sizeof(BOOL); 1034 PrfQueryProfileData(fmprof, FM3Str,"Comments",(PVOID)&fComments,&size);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); 1035 1087 size = sizeof(ULONG); 1036 PrfQueryProfileData(fmprof, appname,"WS_ANIMATE",(PVOID)&fwsAnimate,&size);1037 if (fwsAnimate)1088 PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", (PVOID) & fwsAnimate, &size); 1089 if (fwsAnimate) 1038 1090 fwsAnimate = WS_ANIMATE; 1039 1091 size = sizeof(ULONG); 1040 1092 size = sizeof(BOOL); 1041 PrfQueryProfileData(fmprof, appname,"SelectedAlways",1042 (PVOID)&fSelectedAlways,&size);1043 size = sizeof(BOOL); 1044 PrfQueryProfileData(fmprof, FM3Str,"ToolbarHelp",(PVOID)&fToolbarHelp,&size);1045 size = sizeof(BOOL); 1046 PrfQueryProfileData(fmprof, FM3Str,"OtherHelp",(PVOID)&fOtherHelp,&size);1047 size = sizeof(BOOL); 1048 PrfQueryProfileData(fmprof, FM3Str,"DrivebarHelp",(PVOID)&fDrivebarHelp,&size);1049 size = sizeof(BOOL); 1050 PrfQueryProfileData(fmprof, 1051 1052 1053 (PVOID)&fAutoAddDirs,1054 1055 size = sizeof(BOOL); 1056 PrfQueryProfileData(fmprof, 1057 1058 1059 (PVOID)&fAutoAddAllDirs,1060 1061 size = sizeof(BOOL); 1062 PrfQueryProfileData(fmprof, FM3Str,"UserListSwitches",1063 (PVOID)&fUserListSwitches,&size);1064 size = sizeof(BOOL); 1065 PrfQueryProfileData(fmprof, appname,"UseNewViewer",1066 (PVOID)&fUseNewViewer,&size);1067 size = sizeof(BOOL); 1068 PrfQueryProfileData(fmprof, appname,"DefaultDeletePerm",1069 (PVOID)&fDefaultDeletePerm,&size);1070 size = sizeof(BOOL); 1071 PrfQueryProfileData(fmprof, FM3Str,"ExternalINIs",1072 (PVOID)&fExternalINIs,&size);1073 size = sizeof(BOOL); 1074 PrfQueryProfileData(fmprof, FM3Str,"ExternalCollector",1075 (PVOID)&fExternalCollector,&size);1076 size = sizeof(BOOL); 1077 PrfQueryProfileData(fmprof, FM3Str,"ExternalArcboxes",1078 (PVOID)&fExternalArcboxes,&size);1079 size = sizeof(BOOL); 1080 PrfQueryProfileData(fmprof, FM3Str,"ExternalViewer",1081 (PVOID)&fExternalViewer,&size);1082 size = sizeof(BOOL); 1083 PrfQueryProfileData(fmprof, FM3Str,"UseQProcStat",1084 (PVOID)&fUseQProcStat,&size);1085 size = sizeof(BOOL); 1086 PrfQueryProfileData(fmprof, FM3Str,"DataMin",(PVOID)&fDataMin,&size);1087 size = sizeof(BOOL); 1088 PrfQueryProfileData(fmprof, appname,"DataToFore",(PVOID)&fDataToFore,&size);1089 size = sizeof(BOOL); 1090 PrfQueryProfileData(fmprof, appname,"DataShowDrives",1091 (PVOID)&fDataShowDrives,&size);1092 size = sizeof(BOOL); 1093 PrfQueryProfileData(fmprof, appname,"DataInclRemote",1094 (PVOID)&fDataInclRemote,&size);1095 size = sizeof(BOOL); 1096 PrfQueryProfileData(fmprof, FM3Str,"SplitStatus",(PVOID)&fSplitStatus,&size);1097 size = sizeof(BOOL); 1098 PrfQueryProfileData(fmprof, appname,"FolderAfterExtract",1099 (PVOID)&fFolderAfterExtract,&size);1100 size = sizeof(BOOL); 1101 PrfQueryProfileData(fmprof, FM3Str,"DullDatabar",(PVOID)&fDullMin,&size);1102 size = sizeof(BOOL); 1103 PrfQueryProfileData(fmprof, appname,"BlueLED",(PVOID)&fBlueLED,&size);1104 size = sizeof(BOOL); 1105 PrfQueryProfileData(fmprof, appname,"ConfirmDelete",(PVOID)&fConfirmDelete,&size);1106 size = sizeof(BOOL); 1107 PrfQueryProfileData(fmprof, FM3Str,"SaveState",(PVOID)&fSaveState,&size);1108 size = sizeof(BOOL); 1109 PrfQueryProfileData(fmprof, appname,"SyncUpdates",(PVOID)&fSyncUpdates,&size);1110 size = sizeof(BOOL); 1111 PrfQueryProfileData(fmprof, appname,"LoadSubject",(PVOID)&fLoadSubject,&size);1112 size = sizeof(BOOL); 1113 PrfQueryProfileData(fmprof, appname,"UnHilite",(PVOID)&fUnHilite,&size);1114 size = sizeof(BOOL); 1115 PrfQueryProfileData(fmprof, FM3Str,"TileBackwards",(PVOID)&fTileBackwards,1116 1117 size = sizeof(BOOL); 1118 PrfQueryProfileData(fmprof, appname,"LoadLongname",(PVOID)&fLoadLongnames,&size);1119 size = sizeof(BOOL); 1120 PrfQueryProfileData(fmprof, appname,"VerifyWrites",(PVOID)&fVerify,&size);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); 1121 1173 DosSetVerify(fVerify); 1122 1174 size = sizeof(BOOL); 1123 PrfQueryProfileData(fmprof, appname,"DontMoveMouse",(PVOID)&fDontMoveMouse,&size);1124 size = sizeof(BOOL); 1125 PrfQueryProfileData(fmprof, appname,"NoIconsFiles",(PVOID)&fNoIconsFiles,&size);1126 size = sizeof(BOOL); 1127 PrfQueryProfileData(fmprof, appname,"NoIconsDirs",(PVOID)&fNoIconsDirs,&size);1128 size = sizeof(BOOL); 1129 PrfQueryProfileData(fmprof, appname,"ForceUpper",(PVOID)&fForceUpper,&size);1130 size = sizeof(BOOL); 1131 PrfQueryProfileData(fmprof, appname,"ForceLower",(PVOID)&fForceLower,&size);1132 size = sizeof(BOOL); 1133 PrfQueryProfileData(fmprof, FM3Str,"TextTools",(PVOID)&fTextTools,&size);1134 size = sizeof(BOOL); 1135 PrfQueryProfileData(fmprof, FM3Str,"ToolTitles",(PVOID)&fToolTitles,&size);1136 size = sizeof(BOOL); 1137 PrfQueryProfileData(fmprof, appname,"DoubleClickOpens",(PVOID)&fDCOpens,&size);1138 size = sizeof(BOOL); 1139 PrfQueryProfileData(fmprof, appname,"LinkSetsIcon",(PVOID)&fLinkSetsIcon,&size);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); 1140 1192 size = sizeof(INT); 1141 PrfQueryProfileData(fmprof, appname,"Sort",(PVOID)&sortFlags,&size);1193 PrfQueryProfileData(fmprof, appname, "Sort", (PVOID) & sortFlags, &size); 1142 1194 size = sizeof(INT); 1143 PrfQueryProfileData(fmprof, appname,"TreeSort",(PVOID)&TreesortFlags,&size);1195 PrfQueryProfileData(fmprof, appname, "TreeSort", (PVOID) & TreesortFlags, &size); 1144 1196 size = sizeof(INT); 1145 1197 PrfQueryProfileData(fmprof, 1146 1147 1148 (PVOID)&CollectorsortFlags,1149 1198 appname, 1199 "CollectorSort", 1200 (PVOID) & CollectorsortFlags, 1201 &size); 1150 1202 size = sizeof(targetdir); 1151 1203 PrfQueryProfileData(fmprof, 1152 1153 1154 (PVOID)targetdir,1155 1156 if (!IsValidDir(targetdir))1204 appname, 1205 "Targetdir", 1206 (PVOID) targetdir, 1207 &size); 1208 if (!IsValidDir(targetdir)) 1157 1209 *targetdir = 0; 1158 1210 size = sizeof(extractpath); 1159 1211 PrfQueryProfileData(fmprof, 1160 1161 1162 (PVOID)extractpath,1163 1164 if (!IsValidDir(extractpath))1212 appname, 1213 "ExtractPath", 1214 (PVOID) extractpath, 1215 &size); 1216 if (!IsValidDir(extractpath)) 1165 1217 *extractpath = 0; 1166 1218 size = sizeof(printer); 1167 PrfQueryProfileData(fmprof, appname,"Printer",(PVOID)printer,&size);1219 PrfQueryProfileData(fmprof, appname, "Printer", (PVOID) printer, &size); 1168 1220 size = sizeof(dircompare); 1169 PrfQueryProfileData(fmprof, appname,"DirCompare",(PVOID)dircompare,&size);1221 PrfQueryProfileData(fmprof, appname, "DirCompare", (PVOID) dircompare, &size); 1170 1222 size = sizeof(viewer); 1171 PrfQueryProfileData(fmprof, appname,"Viewer",(PVOID)viewer,&size);1223 PrfQueryProfileData(fmprof, appname, "Viewer", (PVOID) viewer, &size); 1172 1224 size = sizeof(editor); 1173 PrfQueryProfileData(fmprof, appname,"Editor",(PVOID)editor,&size);1225 PrfQueryProfileData(fmprof, appname, "Editor", (PVOID) editor, &size); 1174 1226 size = sizeof(binview); 1175 PrfQueryProfileData(fmprof, appname,"BinView",(PVOID)binview,&size);1227 PrfQueryProfileData(fmprof, appname, "BinView", (PVOID) binview, &size); 1176 1228 size = sizeof(bined); 1177 PrfQueryProfileData(fmprof, appname,"BinEd",(PVOID)bined,&size);1229 PrfQueryProfileData(fmprof, appname, "BinEd", (PVOID) bined, &size); 1178 1230 size = sizeof(compare); 1179 PrfQueryProfileData(fmprof, appname,"Compare",(PVOID)compare,&size);1231 PrfQueryProfileData(fmprof, appname, "Compare", (PVOID) compare, &size); 1180 1232 size = sizeof(virus); 1181 PrfQueryProfileData(fmprof, appname,"Virus",(PVOID)virus,&size);1233 PrfQueryProfileData(fmprof, appname, "Virus", (PVOID) virus, &size); 1182 1234 size = sizeof(ftprun); 1183 PrfQueryProfileData(fmprof, appname,"FTPRun",(PVOID)ftprun,&size);1184 if (!*ftprun && !size)1185 strcpy(ftprun, "ftppm.exe");1235 PrfQueryProfileData(fmprof, appname, "FTPRun", (PVOID) ftprun, &size); 1236 if (!*ftprun && !size) 1237 strcpy(ftprun, "ftppm.exe"); 1186 1238 size = sizeof(httprun); 1187 PrfQueryProfileData(fmprof, appname,"HTTPRun",(PVOID)httprun,&size);1188 if (!*httprun && !size)1189 strcpy(httprun, "explore.exe -q");1239 PrfQueryProfileData(fmprof, appname, "HTTPRun", (PVOID) httprun, &size); 1240 if (!*httprun && !size) 1241 strcpy(httprun, "explore.exe -q"); 1190 1242 size = sizeof(lasttoolbox); 1191 PrfQueryProfileData(fmprof,FM3Str,"LastToolBox",(PVOID)lasttoolbox,&size); 1192 size = sizeof(BOOL); 1193 PrfQueryProfileData(fmprof,appname,"FollowTree",(PVOID)&fFollowTree,&size); 1194 size = sizeof(BOOL); 1195 PrfQueryProfileData(fmprof,appname,"StartMaximized",(PVOID)&fStartMaximized,&size); 1196 if(!fStartMaximized) { 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 { 1197 1250 size = sizeof(BOOL); 1198 PrfQueryProfileData(fmprof, appname,"StartMinimized",(PVOID)&fStartMinimized,&size);1199 } 1200 size = sizeof(BOOL); 1201 PrfQueryProfileData(fmprof, appname,"DefaultCopy",(PVOID)&fCopyDefault,&size);1202 size = sizeof(BOOL); 1203 PrfQueryProfileData(fmprof, appname,"IdleCopy",(PVOID)&fRealIdle,&size);1204 size = sizeof(BOOL); 1205 PrfQueryProfileData(fmprof, appname,"ArcStuffVisible",1206 (PVOID)&fArcStuffVisible,&size);1207 size = sizeof(BOOL); 1208 PrfQueryProfileData(fmprof, FM3Str,"NoTreeGap",(PVOID)&fNoTreeGap,&size);1209 size = sizeof(BOOL); 1210 PrfQueryProfileData(fmprof, FM3Str,"VTreeOpensWPS",(PVOID)&fVTreeOpensWPS,1211 1212 size = sizeof(BOOL); 1213 PrfQueryProfileData(fmprof, appname,"RemoteBug",(PVOID)&fRemoteBug,&size);1214 size = sizeof(BOOL); 1215 PrfQueryProfileData(fmprof, appname,"Drag&DropDlg",(PVOID)&fDragndropDlg,1216 1217 size = sizeof(BOOL); 1218 PrfQueryProfileData(fmprof, FM3Str,"UserComboBox",(PVOID)&fUserComboBox,1219 1220 size = sizeof(BOOL); 1221 PrfQueryProfileData(fmprof, FM3Str,"MinDirOnOpen",(PVOID)&fMinOnOpen,1222 1223 size = sizeof(BOOL); 1224 PrfQueryProfileData(fmprof, appname,"QuickArcFind",(PVOID)&fQuickArcFind,1225 1226 size = sizeof(BOOL); 1227 PrfQueryProfileData(fmprof, FM3Str,"NoRemovableScan",(PVOID)&fNoRemovableScan,1228 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); 1229 1282 size = sizeof(ULONG); 1230 PrfQueryProfileData(fmprof, FM3Str,"NoBrokenNotify",(PVOID)&NoBrokenNotify,1231 1283 PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify", (PVOID) & NoBrokenNotify, 1284 &size); 1232 1285 size = sizeof(ULONG); 1233 PrfQueryProfileData(fmprof, appname,"ContainerType",(PVOID)&ulCnrType,&size);1286 PrfQueryProfileData(fmprof, appname, "ContainerType", (PVOID) & ulCnrType, &size); 1234 1287 size = sizeof(ULONG); 1235 PrfQueryProfileData(fmprof, appname,"FilesToGet",(PVOID)&FilesToGet,&size);1236 size = sizeof(BOOL); 1237 PrfQueryProfileData(fmprof, FM3Str,"AutoView",(PVOID)&fAutoView,&size);1238 size = sizeof(BOOL); 1239 PrfQueryProfileData(fmprof, FM3Str,"FM2Deletes",(PVOID)&fFM2Deletes,&size);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); 1240 1293 } 1241 1294 1242 1295 /* load pointers and icons we use */ 1243 hptrArrow = WinQuerySysPointer(HWND_DESKTOP,SPTR_ARROW,FALSE);1244 hptrBusy = WinQuerySysPointer(HWND_DESKTOP,SPTR_WAIT,FALSE);1245 hptrNS = WinQuerySysPointer(HWND_DESKTOP,SPTR_SIZENS,FALSE);1246 hptrEW = WinQuerySysPointer(HWND_DESKTOP,SPTR_SIZEWE,FALSE);1247 hptrFloppy = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FLOPPY_ICON);1248 hptrDrive = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,DRIVE_ICON);1249 hptrRemovable = WinLoadPointer(HWND_DESKTOP, FM3ModHandle,REMOVABLE_ICON);1250 hptrCDROM = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,CDROM_ICON);1251 hptrFile = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FILE_ICON);1252 hptrDir = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,DIR_FRAME);1253 hptrArc = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,ARC_FRAME);1254 hptrArt = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,ART_ICON);1255 hptrSystem = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FILE_SYSTEM_ICON);1256 hptrHidden = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FILE_HIDDEN_ICON);1257 hptrReadonly = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FILE_READONLY_ICON);1258 hptrLast = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,LASTITEM_ICON);1259 hptrRemote = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,REMOTE_ICON);1260 if (!fNoDead)1261 hptrFinger = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FINGER_ICON);1296 hptrArrow = WinQuerySysPointer(HWND_DESKTOP, SPTR_ARROW, FALSE); 1297 hptrBusy = WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE); 1298 hptrNS = WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZENS, FALSE); 1299 hptrEW = WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE); 1300 hptrFloppy = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FLOPPY_ICON); 1301 hptrDrive = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, DRIVE_ICON); 1302 hptrRemovable = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, REMOVABLE_ICON); 1303 hptrCDROM = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, CDROM_ICON); 1304 hptrFile = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FILE_ICON); 1305 hptrDir = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, DIR_FRAME); 1306 hptrArc = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, ARC_FRAME); 1307 hptrArt = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, ART_ICON); 1308 hptrSystem = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FILE_SYSTEM_ICON); 1309 hptrHidden = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FILE_HIDDEN_ICON); 1310 hptrReadonly = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FILE_READONLY_ICON); 1311 hptrLast = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, LASTITEM_ICON); 1312 hptrRemote = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, REMOTE_ICON); 1313 if (!fNoDead) 1314 hptrFinger = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FINGER_ICON); 1262 1315 else 1263 hptrFinger = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,FINGER2_ICON);1264 hptrApp = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,APP_ICON);1265 hptrDunno = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,DUNNO_ICON);1266 hptrEnv = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,ENV_ICON);1267 hptrZipstrm = WinLoadPointer(HWND_DESKTOP,FM3ModHandle,ZIPSTREAM_ICON);1316 hptrFinger = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FINGER2_ICON); 1317 hptrApp = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, APP_ICON); 1318 hptrDunno = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, DUNNO_ICON); 1319 hptrEnv = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, ENV_ICON); 1320 hptrZipstrm = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, ZIPSTREAM_ICON); 1268 1321 1269 1322 /* 1270 1323 * set up color array used by seeall.c and newview.c color dialog 1271 1324 */ 1272 standardcolors[0] 1273 standardcolors[1] 1274 standardcolors[2] 1275 standardcolors[3] 1276 standardcolors[4] 1277 standardcolors[5] 1278 standardcolors[6] 1279 standardcolors[7] 1280 standardcolors[8] 1281 standardcolors[9] 1325 standardcolors[0] = CLR_WHITE; 1326 standardcolors[1] = CLR_BLACK; 1327 standardcolors[2] = CLR_BLUE; 1328 standardcolors[3] = CLR_RED; 1329 standardcolors[4] = CLR_PINK; 1330 standardcolors[5] = CLR_GREEN; 1331 standardcolors[6] = CLR_CYAN; 1332 standardcolors[7] = CLR_YELLOW; 1333 standardcolors[8] = CLR_DARKGRAY; 1334 standardcolors[9] = CLR_DARKBLUE; 1282 1335 standardcolors[10] = CLR_DARKRED; 1283 1336 standardcolors[11] = CLR_DARKPINK; … … 1290 1343 } 1291 1344 1292 1293 HWND StartFM3 (HAB hab,INT argc,CHAR **argv) { 1294 1295 HWND hwndFrame,hwndClient; 1296 ULONG FrameFlags = FCF_TITLEBAR | FCF_SYSMENU | 1297 FCF_SIZEBORDER | FCF_MINMAX | 1298 FCF_ACCELTABLE | FCF_MENU | 1299 FCF_ICON | FCF_TASKLIST | 1300 FCF_NOBYTEALIGN; 1345 HWND StartFM3(HAB hab, INT argc, CHAR ** argv) 1346 { 1347 HWND hwndFrame, hwndClient; 1348 ULONG FrameFlags = FCF_TITLEBAR | FCF_SYSMENU | 1349 FCF_SIZEBORDER | FCF_MINMAX | 1350 FCF_ACCELTABLE | FCF_MENU | 1351 FCF_ICON | FCF_TASKLIST | 1352 FCF_NOBYTEALIGN; 1301 1353 1302 1354 { 1303 1355 INT x; 1304 1356 1305 for(x = 1;x < argc;x++) { 1306 if(*argv[x] == '~' && !argv[x][1]) 1307 fReminimize = TRUE; 1308 if(*argv[x] == '+' && !argv[x][1]) 1309 fLogFile = TRUE; 1310 if(*argv[x] == '-') { 1311 if(!argv[x][1]) 1312 fNoSaveState = TRUE; 1313 else 1314 strcpy(profile,&argv[x][1]); 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]); 1315 1369 } 1316 1370 } … … 1318 1372 1319 1373 hwndFrame = WinCreateStdWindow(HWND_DESKTOP, 1320 WS_VISIBLE, 1321 &FrameFlags, 1322 GetPString(IDS_WCMAINWND), 1323 NULL, 1324 WS_VISIBLE | WS_ANIMATE, 1325 FM3ModHandle, 1326 MAIN_FRAME, 1327 &hwndClient); 1328 if(hwndFrame) { 1374 WS_VISIBLE, 1375 &FrameFlags, 1376 GetPString(IDS_WCMAINWND), 1377 NULL, 1378 WS_VISIBLE | WS_ANIMATE, 1379 FM3ModHandle, 1380 MAIN_FRAME, 1381 &hwndClient); 1382 if (hwndFrame) 1383 { 1329 1384 WinSetWindowUShort(hwndFrame, 1330 QWS_ID, 1331 MAIN_FRAME); 1332 if(!WinRestoreWindowPos(FM2Str, 1333 "MainWindowPos", 1334 hwndFrame)) { 1385 QWS_ID, 1386 MAIN_FRAME); 1387 if (!WinRestoreWindowPos(FM2Str, 1388 "MainWindowPos", 1389 hwndFrame)) 1390 { 1335 1391 1336 1392 ULONG fl = SWP_MOVE | SWP_SIZE; 1337 1393 RECTL rcl; 1338 ULONG icz = WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 3L;1339 ULONG bsz = WinQuerySysValue(HWND_DESKTOP, SV_CYSIZEBORDER);1394 ULONG icz = WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 3L; 1395 ULONG bsz = WinQuerySysValue(HWND_DESKTOP, SV_CYSIZEBORDER); 1340 1396 1341 1397 WinQueryWindowRect(HWND_DESKTOP, 1342 1398 &rcl); 1343 1399 rcl.yBottom += icz; 1344 1400 rcl.yTop -= bsz; … … 1346 1402 rcl.xRight -= bsz; 1347 1403 WinSetWindowPos(hwndFrame, 1348 1349 1350 1351 1352 rcl.yTop - rcl.yBottom,fl);1353 } 1354 if (fLogFile)1404 HWND_TOP, 1405 rcl.xLeft, 1406 rcl.yBottom, 1407 rcl.xRight - rcl.xLeft, 1408 rcl.yTop - rcl.yBottom, fl); 1409 } 1410 if (fLogFile) 1355 1411 LogFileHandle = _fsopen("FM2.LOG", 1356 1357 1358 if (hwndHelp)1412 "a+", 1413 SH_DENYWR); 1414 if (hwndHelp) 1359 1415 WinAssociateHelpInstance(hwndHelp, 1360 1416 hwndFrame); 1361 1417 PostMsg(hwndClient, 1362 1363 1364 1418 UM_SETUP, 1419 MPFROMLONG(argc), 1420 MPFROMP(argv)); 1365 1421 } 1366 1422 return hwndFrame; 1367 1423 } 1368 1424 1369 int CheckVersion (int vermajor,int verminor) {1370 1425 int CheckVersion(int vermajor, int verminor) 1426 { 1371 1427 int ok = 0; 1372 1428 … … 1374 1430 1375 1431 #if 0 1376 if(vermajor && verminor) { 1432 if (vermajor && verminor) 1433 { 1377 1434 *vermajor = VERMAJOR; 1378 1435 *verminor = VERMINOR; … … 1380 1437 } 1381 1438 #endif 1439 1382 1440 ok = 1; 1383 1441
Note:
See TracChangeset
for help on using the changeset viewer.