source: trunk/dll/init.c@ 789

Last change on this file since 789 was 789, checked in by Steven Levine, 18 years ago

Rework SaveDirCnrState to return better error info
Make FILESTOGET_MIN/MAX to avoid hardcoded numbers
Ensure FilesToGet in valid range on init
Correct load_setups error reporting

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