source: trunk/dll/fm3dll.h@ 739

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

More ticket #24 updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 50.0 KB
Line 
1
2/***********************************************************************
3
4 $Id: fm3dll.h 739 2007-07-24 04:06:59Z stevenhl $
5
6 Common definitions
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2001, 2007 Steven H. Levine
10
11 12 Feb 03 SHL Add CBLIST_TO_EASIZE
12 11 Jun 03 SHL Add JFS and FAT32 support
13 06 Jan 04 SHL Drop hundfmt
14 01 Aug 04 SHL Optimze strippers
15 01 Aug 04 SHL Drop avv local functions
16 23 May 05 SHL Split datamin to datamin.h
17 24 May 05 SHL Rework Win_Error usage
18 25 May 05 SHL Require VAC 3.65
19 25 May 05 SHL Rename comnam to szCommonName
20 25 May 05 SHL Rework for FillInRecordFromFFB
21 25 May 05 SHL Add CommaFmtULL CommaFmtUL
22 28 May 05 SHL Drop local functions
23 06 Jun 05 SHL Use QWL_USER
24 11 Aug 05 SHL Renames
25 29 May 06 SHL Rework EditArchiverDefinition
26 16 Jun 06 SHL ARC_TYPE: support non-string signatures
27 26 Jun 06 SHL ARC_TYPE: support preserving comments
28 28 Jun 06 SHL DIRCNRDATA: drop unused
29 05 Jul 06 SHL Support Hide not selected
30 13 Jul 06 SHL Add Runtime_Error
31 22 Jul 06 SHL Add memory.c functions
32 26 Jul 06 SHL Add strips.c functions
33 26 Jul 06 SHL Add more error.c functions
34 29 Jul 06 SHL Add xfgets, xfgets_bstripcr
35 22 Oct 06 GKY Add NDFS32 support
36 03 Nov 06 SHL Renames
37 17 Jan 07 SHL Resize extractdir
38 17 Feb 07 GKY Add more file system types
39 17 Feb 07 GKY Add SelectDriveIcon to streamline update.c
40 18 Mar 07 GKY Add MM import typedefines for fix for files misindentified as multimedia
41 30 Mar 07 GKY Defined golbals for removing GetPString for window class names
42 06 Apr 07 GKY Work around PM DragInfo and DrgFreeDISH limits NumItemsToUnhilite & DeleteDragitemStrHandles
43 06 Apr 07 GKY Add some error checking in drag/drop
44 19 Apr 07 SHL Rework DeleteDragitemStrHandles to be FreeDragInfoData
45 19 Apr 07 SHL Add DbgMsg. Sync with AcceptOneDrop GetOneDrop mods.
46 21 Apr 07 GKY Find FM2Utils by path or utils directory eliminate fAddUtils global
47 23 Apr 07 SHL Add Win_Error_NoMsgBox
48 12 May 07 SHL Add ulItemsToUnHilite to DIRCNRDATA, pass to Unhilite as arg
49 05 Jun 07 SHL Update for OpenWatcom
50 10 Jun 07 GKY Add CheckPmDrgLimit including IsFm2Window as part of work around PM drag limit
51 16 Jun 07 GKY Add CheckPmDrgLimit including IsFm2Window as part of work around PM drag limit
52 16 Jun 07 SHL Update more for OpenWatcom
53 22 Jul 07 GKY Update CNRITEM to optimize RAM usage
54 23 Jul 07 SHL More CNRITEM updates (ticket#24)
55
56***********************************************************************/
57
58#if defined(__IBMC__)
59#if __IBMC__ != 430
60#error VAC365 required for long long support
61#endif
62#if !defined(_LONG_LONG)
63#error Long long support not enabled
64#endif
65#endif
66
67#ifdef DEFINE_GLOBALS
68#pragma data_seg(GLOBAL1)
69#endif
70
71#define PP_MAX PP_MENUDISABLEBGNDCOLORINDEX
72#define PP_MAXBUF 384
73
74#ifndef MM_PORTHOLEINIT
75#define MM_PORTHOLEINIT 0x01fb
76#endif
77#ifndef MS_POPUP
78#define MS_POPUP 0x00000010L
79#endif
80#ifndef CCS_MINIICONS
81#define CCS_MINIICONS 0x0800
82#endif
83#ifndef CRA_SOURCE
84#define CRA_SOURCE 0x00004000
85#endif
86#ifndef CV_EXACTMATCH
87#define CV_EXACTMATCH 0x10000000
88#endif
89#ifndef CBN_SETFOCUS
90#define CBN_SETFOCUS 20
91#endif
92#ifndef CBN_KILLFOCUS
93#define CBN_KILLFOCUS 21
94#endif
95#ifndef CN_VERIFYEDIT
96#define CN_VERIFYEDIT 134
97#endif
98#ifndef CN_PICKUP
99#define CN_PICKUP 135
100#endif
101#ifndef CN_DROPNOTIFY
102#define CN_DROPNOTIFY 136
103#endif
104#ifndef CN_GRIDRESIZED
105#define CN_GRIDRESIZED 137
106#endif
107#ifndef BKS_MERLINSTYLE
108#define BKS_MERLINSTYLE 0x0800
109#endif
110
111// PMBITMAP_INCLUDED - IBM Toolkit
112// INCL_GPIBITMAPS - OpenWatcom Toolkit
113#if !defined(PMBITMAP_INCLUDED) && !defined(INCL_GPIBITMAPS)
114typedef struct _RGB2 /* rgb2 */
115{
116 BYTE bBlue; /* Blue component of the color definition */
117 BYTE bGreen; /* Green component of the color definition */
118 BYTE bRed; /* Red component of the color definition */
119 BYTE fcOptions; /* Reserved, must be zero */
120}
121RGB2;
122typedef RGB2 *PRGB2;
123#endif
124
125 /**************************************************/
126 /* Lazy Drag API's. */
127 /**************************************************/
128BOOL APIENTRY DrgLazyDrag(HWND hwndSource,
129 PDRAGINFO pdinfo,
130 PDRAGIMAGE pdimg, ULONG cdimg, PVOID pRsvd);
131
132BOOL APIENTRY DrgCancelLazyDrag(VOID);
133
134BOOL APIENTRY DrgLazyDrop(HWND hwndTarget,
135 ULONG ulOperation, PPOINTL pptlDrop);
136
137PDRAGINFO APIENTRY DrgQueryDraginfoPtr(PDRAGINFO pRsvd);
138
139PDRAGINFO APIENTRY DrgQueryDraginfoPtrFromHwnd(HWND hwndSource);
140
141PDRAGINFO APIENTRY DrgQueryDraginfoPtrFromDragitem(PDRAGITEM pditem);
142
143ULONG APIENTRY DrgQueryDragStatus(VOID);
144
145PDRAGINFO APIENTRY DrgReallocDraginfo(PDRAGINFO pdinfoOld, ULONG cditem);
146
147 /* Drag Status Flags */
148#define DGS_DRAGINPROGRESS 0x0001 /* Standard Drag in Progress. */
149#define DGS_LAZYDRAGINPROGRESS 0x0002 /* Lazy Drag in Progress. */
150
151#define LINES_PER_ARCSIG 21 // Lines in each archiver.bb2 definition
152#define CON_COLS 6
153#define INSTDATA(h) WinQueryWindowPtr((h),QWL_USER)
154#define DIR_SPLITBAR_OFFSET 18 * 12 /* Pixel offset of details splitbar */
155#define CONTAINER_COLUMNS 13 /* Number of columns in details view */
156#define RGBFROMPARTS(r,g,b) (((r) * 65536) + ((g) * 256) + (b))
157#define EXTRA_RECORD_BYTES2 (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
158#define EXTRA_RECORD_BYTES (EXTRA_RECORD_BYTES2 + (CCHMAXPATHCOMP - 1))
159#define EXTRA_ARCRECORD_BYTES (sizeof(ARCITEM) - sizeof(MINIRECORDCORE))
160#define ALLATTRS (FILE_NORMAL | FILE_DIRECTORY | FILE_ARCHIVED |\
161 FILE_HIDDEN | FILE_READONLY | FILE_SYSTEM)
162#define LISTTEMPROOT "$FM2LI$T."
163
164#include "fm3dll2.h" // SHL
165
166#define UM_PAINT (WM_USER)
167#define UM_SETUP (WM_USER + 1)
168#define UM_RESCAN (WM_USER + 2)
169#define UM_INITIALSIZE (WM_USER + 3)
170#define UM_CONTROL (WM_USER + 4)
171#define UM_COMMAND (WM_USER + 5)
172#define UM_SIZE (WM_USER + 6)
173#define UM_FOCUSME (WM_USER + 7)
174#define UM_FIXEDITNAME (WM_USER + 8)
175#define UM_UPDATERECORD (WM_USER + 9)
176#define UM_SETDIR (WM_USER + 10)
177#define UM_CONTAINER_FILLED (WM_USER + 11)
178#define UM_STRETCH (WM_USER + 12)
179#define UM_LOADFILE (WM_USER + 13)
180#define UM_MOUSEMOVE (WM_USER + 14)
181#define UM_ENTER (WM_USER + 15)
182#define UM_CLOSE (WM_USER + 16)
183#define UM_ACTION (WM_USER + 17)
184#define UM_MASSACTION (WM_USER + 18)
185#define UM_UPDATERECORDLIST (WM_USER + 19)
186#define UM_FILESMENU (WM_USER + 20)
187#define UM_SELECT (WM_USER + 21)
188#define UM_VIEWSMENU (WM_USER + 22)
189#define UM_CONTAINERHWND (WM_USER + 23)
190#define UM_OPENWINDOWFORME (WM_USER + 24)
191#define UM_FOLDUP (WM_USER + 25)
192#define UM_INITMENU (WM_USER + 26)
193#define UM_COMPARE (WM_USER + 27)
194#define UM_EXPAND (WM_USER + 28)
195#define UM_REPLACEFOCUS (WM_USER + 29)
196#define UM_UNDO (WM_USER + 30)
197#define UM_RENDER (WM_USER + 31)
198#define UM_BUTTON2DOWN (WM_USER + 32)
199#define UM_BUTTON2UP (WM_USER + 33)
200#define UM_COLLECTFROMFILE (WM_USER + 34)
201#define UM_TIMER (WM_USER + 35)
202#define UM_HELPON (WM_USER + 36)
203#define UM_SETUP2 (WM_USER + 37)
204#define UM_SETUP3 (WM_USER + 38)
205#define UM_CONTEXTMENU (WM_USER + 39)
206#define UM_FILLUSERLIST (WM_USER + 40)
207#define UM_CONTAINERDIR (WM_USER + 41)
208#define UM_SETUP4 (WM_USER + 42)
209#define UM_FILLSETUPLIST (WM_USER + 43)
210#define UM_ARRANGEICONS (WM_USER + 44)
211#define UM_SETUP5 (WM_USER + 45)
212#define UM_NOTIFY (WM_USER + 46)
213#define UM_INSERTRECORD (WM_USER + 47)
214#define UM_ADDTOMENU (WM_USER + 48)
215#define UM_COLLECT (WM_USER + 49)
216#define UM_RESTOREDC (WM_USER + 50)
217#define UM_MINIMIZE (WM_USER + 51)
218#define UM_MAXIMIZE (WM_USER + 52)
219#define UM_BUTTON1MOTIONSTART (WM_USER + 53)
220#define UM_SETUP6 (WM_USER + 54)
221#define UM_FILLBUTTONLIST (WM_USER + 55)
222#define UM_SETUSERLISTNAME (WM_USER + 56)
223#define UM_FILTER (WM_USER + 57)
224#define UM_SORTRECORD (WM_USER + 58)
225#define UM_SIZE2 (WM_USER + 59)
226#define UM_RESTORE (WM_USER + 60)
227#define UM_TOPDIR (WM_USER + 61)
228#define UM_SHOWME (WM_USER + 62)
229#define UM_RESCAN2 (WM_USER + 63)
230#define UM_BUILDDRIVEBAR (WM_USER + 64)
231#define UM_THREADUSE (WM_USER + 65)
232#define UM_DRIVECMD (WM_USER + 66)
233#define UM_ADVISEFOCUS (WM_USER + 67)
234#define UM_FIXCNRMLE (WM_USER + 68)
235#define UM_FLESH (WM_USER + 69)
236#define UM_FILLCMDLIST (WM_USER + 70)
237#define UM_CLICKED (WM_USER + 71)
238#define UM_CLICKED3 (WM_USER + 72)
239#define UM_HIDENOTSELECTED (WM_USER + 73)
240
241typedef struct
242{
243 USHORT size;
244 USHORT dummy;
245 CHAR szCurrentPath1[CCHMAXPATH];
246 CHAR szCurrentPath2[CCHMAXPATH];
247}
248WALK2;
249
250typedef struct LINKDIRS
251{
252 CHAR *path;
253 struct LINKDIRS *next;
254}
255LINKDIRS;
256
257typedef struct
258{
259 USHORT size;
260 USHORT numcolors;
261 USHORT flags;
262 USHORT currentcolor;
263 ULONG prompt;
264 long *colors;
265 ULONG descriptions;
266 long *origs;
267}
268COLORS;
269
270typedef struct LINKCMDS
271{
272 CHAR *cl;
273 CHAR *title;
274 ULONG flags;
275 struct LINKCMDS *next;
276 struct LINKCMDS *prev;
277}
278LINKCMDS;
279
280typedef struct
281{
282 CHAR szMask[CCHMAXPATH];
283 CHAR szMaskCopy[CCHMAXPATH];
284 CHAR *pszMasks[26];
285 ULONG attrFile;
286 ULONG antiattr;
287 BOOL fNoAttribs;
288 BOOL fShowDirs;
289 BOOL fNoDirs;
290 BOOL fIsTree;
291 BOOL fIsSeeAll;
292 BOOL fFilesIncluded;
293 BOOL fText;
294 CHAR szText[256];
295 CHAR prompt[80];
296}
297MASK;
298
299typedef struct
300{
301 CHAR *title; /* title of dialog */
302 CHAR *prompt; /* prompt to user */
303 CHAR *ret; /* buffer out, default in */
304 CHAR *help; /* help text */
305 INT inputlen; /* max len of ret */
306}
307STRINGINPARMS;
308
309typedef struct
310{
311 CHAR *source;
312 CHAR target[CCHMAXPATH];
313 BOOL rename;
314 BOOL skip;
315 BOOL dontask;
316 BOOL overold;
317 BOOL overnew;
318 BOOL overwrite;
319}
320MOVEIT;
321
322typedef struct HOLDFEA
323{
324 PFEA2 pfea;
325 CHAR *name;
326 CHAR *value;
327 BYTE fEA;
328 BYTE cbName;
329 USHORT cbValue;
330 struct HOLDFEA *next;
331}
332HOLDFEA;
333
334typedef struct
335{
336 HWND hwnd;
337 HWND hwndS;
338 USHORT type;
339 USHORT id;
340 INT flags;
341 struct __arc_type__ *info;
342 CHAR **list;
343 ULONG *ulitemID;
344 ULONG *cbFile;
345 CHAR targetpath[CCHMAXPATH + 6];
346 CHAR arcname[CCHMAXPATH];
347 CHAR runfile[CCHMAXPATH];
348}
349LISTINFO;
350
351typedef struct
352{
353 USHORT size;
354 USHORT dummy;
355 CHAR directory[CCHMAXPATH];
356 HWND hwndParent;
357 HWND hwndFrame;
358 HWND hwndClient;
359 HWND hwndCnr;
360 LISTINFO *li;
361}
362WORKER;
363
364typedef struct
365{
366 USHORT size;
367 USHORT flags;
368 USHORT cmd;
369 USHORT dummy;
370 CHAR *prompt;
371 CHAR **list;
372}
373CHECKLIST;
374
375typedef struct
376{
377 ULONG flags;
378 CHAR *commandline;
379 CHAR path[CCHMAXPATH];
380 CHAR environment[1001];
381 CHAR tempprompt[128];
382 CHAR title[80];
383 BOOL dropped;
384}
385EXECARGS;
386
387#pragma pack(1)
388
389#define CNRITEM_SMALLER 0x00010000
390#define CNRITEM_LARGER 0x00020000
391#define CNRITEM_NEWER 0x00040000
392#define CNRITEM_OLDER 0x00080000
393#define CNRITEM_EXISTS 0x00100000
394
395#define RECFLAGS_ENV 0x00000001
396#define RECFLAGS_NODRAG 0x00000002
397#define RECFLAGS_NODROP 0x00000004
398#define RECFLAGS_UNDERENV 0x00000008
399
400#define ARCFLAGS_REALDIR 0x00000001
401#define ARCFLAGS_PSEUDODIR 0x00000002
402
403#define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0) // FILEFINDBUF4.cbList to logical EA size
404
405typedef struct _CNRITEM
406{ /* CONTAINER RECORD STRUCTURE */
407 MINIRECORDCORE rc; /* Base information */
408 HWND hwndCnr; /* The container holding this record */
409 PSZ pszFileName; // Points to buffer holding full pathname
410 PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
411 //CHAR szFileName[CCHMAXPATH]; // Path name - fixme to rename to szPathName?
412 //CHAR szSubject[40]; /* Subject string */
413 CHAR *pszSubject; // Points subject buffer - used by fm/2 and by CFA_STRING
414 CHAR *pszDispAttr; // Points to szDispAttr - required by CFA_STRING
415 CDATE date; /* Last write date of file */
416 CTIME time; /* Last write time of file */
417 CDATE ladate; /* Last access date of file */
418 CTIME latime; /* Last access time of file */
419 CDATE crdate; /* Creation date of file */
420 CTIME crtime; /* Creation time of file */
421 CHAR szDispAttr[6]; /* Attrib string for details display */
422 CHAR *pszLongname; // Points to long name buffer - used by code and by CFA_STRING
423 ULONGLONG cbFile; /* File size */
424 ULONGLONG easize; // Size of EAs - dirsize uses this - hack cough
425 ULONG attrFile; /* Attributes of this file */
426 ULONG flags;
427 //CHAR szLongname[1]; // Holds .LONGNAME EA or root flag
428}
429CNRITEM, *PCNRITEM;
430
431typedef struct _ARCITEM
432{ // ARCHIVE CONTAINER RECORD STRUCTURE
433 MINIRECORDCORE rc; // Base information
434 HWND hwndCnr; /* Container holding this record */
435 PSZ pszFileName; // Pointer to full path name
436 PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
437 // CHAR szFileName[CCHMAXPATH]; // File name
438 CHAR szDate[40]; // File's assembled date
439 PSZ pszDate; // Pointer to date
440 CDATE date; // if we know date format
441 CTIME time; // if we know time format
442 ULONG cbFile; // File's original size
443 ULONG cbComp; // File's compressed size
444 ULONG flags;
445}
446ARCITEM, *PARCITEM;
447
448#pragma pack()
449
450typedef struct
451{
452 ULONG attrFile;
453 ULONG cbFile;
454 ULONG easize;
455 FDATE date;
456 FTIME time;
457 FDATE ladate;
458 FTIME latime;
459 FDATE crdate;
460 FTIME crtime;
461 CHAR fname[1];
462}
463FILELIST;
464
465typedef struct __arc_type__
466{
467 CHAR *id; // User id
468 CHAR *ext; // Extension (without leading dot)
469 LONG file_offset; // Offset to signature (0..n)
470 CHAR *list; // List command
471 CHAR *extract; // Extract command
472 CHAR *exwdirs; // Extract with directories command
473 CHAR *test; // Test command
474 CHAR *create; // Create without directories
475 CHAR *move; // Move into archive without directories
476 CHAR *createrecurse; // Create with recurse and directories
477 CHAR *createwdirs; // Create with directories
478 CHAR *movewdirs; // Move into archive with directories
479 CHAR *delete; // Delete from archive
480 CHAR *signature; // Archiver signature
481 CHAR *startlist; // Listing start marker (blank means no start marker)
482 CHAR *endlist; // Listing end marker (blank means next blank line or EOF)
483 INT siglen; // Signature length in bytes
484 INT osizepos; // Original file size position (0..n) or -1
485 INT nsizepos; // Compressed file size position or -1
486 INT fdpos; // File date position or -1
487 INT fdflds; // File date element count (typically 3) or -1
488 INT fnpos; // File name position or -1 if last
489 INT datetype; // Date field format
490 UINT comment_line_num; // Comment start in old sig file (1..n), 0 if none
491 UINT defn_line_num; // Definition start in old sig file (1..n), 0 if none
492 BOOL nameislast; // Name is last item on line
493 BOOL nameisnext; // File name is on next line
494 BOOL nameisfirst; // File name is first item on line
495 struct __arc_type__ *next;
496 struct __arc_type__ *prev;
497}
498ARC_TYPE;
499
500typedef struct
501{
502 USHORT size;
503 ARC_TYPE *info;
504 CHAR *arcname;
505 CHAR masks[257];
506 CHAR command[257];
507 CHAR extractdir[CCHMAXPATH];
508 INT ret;
509}
510EXTRDATA;
511
512typedef struct
513{
514 ARC_TYPE *info;
515 CHAR listname[CCHMAXPATH];
516 CHAR arcname[CCHMAXPATH];
517 CHAR *errmsg;
518}
519ARCDUMP;
520
521typedef struct DIRCNRDATA
522{
523 USHORT size;
524 USHORT id;
525 INT type;
526 ULONG flWindowAttr;
527 HWND hwndParent;
528 HWND hwndCnr;
529 HWND hwndObject;
530 HWND hwndFrame;
531 HWND hwndClient;
532 HWND hwndLastMenu;
533 HWND hwndExtract;
534 HWND hwndLastDirCnr;
535 HWND hwndRestore;
536 CHAR directory[CCHMAXPATH];
537 CHAR previous[CCHMAXPATH];
538 ULONG fg, bg, hifg, hibg, border;
539 PFNWP oldproc;
540 CHAR font[CCHMAXPATH];
541 MASK mask;
542 ULONGLONG ullTotalBytes;
543 ULONGLONG selectedbytes;
544 ULONG selectedfiles;
545 ULONG totalfiles;
546 BOOL cnremphasized;
547 BOOL dontclose;
548 ARC_TYPE *info;
549 CHAR arcname[CCHMAXPATH];
550 CHAR command[257];
551 CHAR stopflag;
552 CHAR workdir[CCHMAXPATH];
553 CHAR lastfilename[CCHMAXPATH];
554 BOOL namecanchange;
555 BOOL fmoving;
556 BOOL amextracted;
557 INT lasthelp;
558 INT sortFlags;
559 BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
560 detailslongname, detailsea, detailssize, detailssubject,
561 detailslwdate, detailslwtime, detailsattr, detailsicon;
562 CHAR **lastselection;
563 USHORT shiftstate;
564 USHORT suspendview;
565 CHAR szCommonName[CCHMAXPATH];
566 ULONG lasttime;
567 BOOL arcfilled;
568 HMTX filling;
569 BOOL firsttree;
570 ULONG lastattr;
571 ULONG ulItemsToUnHilite;
572}
573DIRCNRDATA;
574
575typedef struct
576{
577 USHORT size;
578 HWND hwndCnr;
579 CHAR directory[CCHMAXPATH];
580 BOOL collapsefirst;
581 DIRCNRDATA *dcd;
582}
583SHOWREC;
584
585typedef struct
586{
587 USHORT size;
588 USHORT dummy;
589 CHAR file1[CCHMAXPATH];
590 CHAR file2[CCHMAXPATH];
591 HWND hwndParent;
592 HWND hwndList;
593 HWND hwndReport;
594 HWND hwndHelp;
595}
596FCOMPARE;
597
598typedef struct COMPARE
599{
600 USHORT size;
601 HWND hwnd;
602 HWND hwndParent;
603 CHAR leftdir[CCHMAXPATH + 2];
604 CHAR rightdir[CCHMAXPATH + 2];
605 BOOL forcescroll;
606 BOOL filling;
607 BOOL includesubdirs;
608 INT action;
609 INT selleft;
610 INT selright;
611 INT totalleft;
612 INT totalright;
613 CHAR rightlist[CCHMAXPATH]; // Snapshot file name
614 BOOL reset;
615 HWND hwndCalling;
616 struct COMPARE *cmp; // callers compare defintion
617 struct DIRCNRDATA dcd;
618}
619COMPARE;
620
621/* init.c */
622VOID FindSwapperDat(VOID);
623BOOL InitFM3DLL(HAB hab, int argc, char **argv);
624HWND StartFM3(HAB hab, INT argc, CHAR ** argv);
625
626/* filldir.c */
627VOID FillDirCnr(HWND hwndCnr, CHAR * pszDirectory, DIRCNRDATA * pdcd,
628 PULONGLONG pullBytes);
629VOID FillTreeCnr(HWND hwndCnr, HWND hwndParent);
630VOID ProcessDirectory(const HWND hwndCnr, const PCNRITEM pciParent,
631 const CHAR * szDirBase, const BOOL filestoo,
632 const BOOL recurse, const BOOL partial,
633 CHAR * stopflag, DIRCNRDATA * pdcd,
634 PULONG pullTotalFiles, PULONGLONG pullTotalBytes);
635ULONGLONG FillInRecordFromFFB(HWND hwndCnr, PCNRITEM pci,
636 const PSZ pszDirectory,
637 const PFILEFINDBUF4 pffb, const BOOL partial,
638 DIRCNRDATA * pdcd);
639ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci,
640 const PSZ pszFileName, const PFILESTATUS4 pfsa4,
641 const BOOL partial, DIRCNRDATA * pdcd);
642
643/* flesh.c */
644BOOL Stubby(HWND hwndCnr, PCNRITEM pciParent);
645BOOL Flesh(HWND hwndCnr, PCNRITEM pciParent);
646BOOL FleshEnv(HWND hwndCnr, PCNRITEM pciParent);
647BOOL UnFlesh(HWND hwndCnr, PCNRITEM pciParent);
648
649/* error.c */
650VOID DbgMsg(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
651INT Dos_Error(ULONG mb_type, ULONG ulRC, HWND hwndOwner,
652 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
653INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, PCSZ pszSrcFile,
654 UINT uSrcLineNo, UINT idMsg);
655VOID Runtime_Error(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
656VOID Runtime_Error2(PCSZ pszSrcFile, UINT uSrcLineNo, UINT idMsg);
657APIRET saymsg(ULONG mb_type, HWND hwnd, PCSZ pszTitle, PCSZ pszFmt, ...);
658VOID Win_Error(HWND hwndErr, HWND hwndOwner,
659 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
660VOID Win_Error2(HWND hwndErr, HWND hwndOwner, PCSZ pszSrcFile,
661 UINT uSrcLineNo, UINT idMsg);
662VOID Win_Error_NoMsgBox(HWND hwndErr, HWND hwndOwner,
663 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
664
665/* valid.c */
666INT CheckDrive(CHAR Drive, CHAR * FileSystem, ULONG * type);
667int TestDates(char *file1, char *file2);
668BOOL IsNewer(char *file1, char *file2);
669BOOL IsRoot(CHAR * filename);
670BOOL IsFileSame(CHAR * filename1, CHAR * filename2);
671INT IsFile(CHAR * filename);
672BOOL IsFullName(CHAR * filename);
673BOOL IsValidDir(CHAR * test);
674BOOL IsValidDrive(CHAR drive);
675CHAR *MakeValidDir(CHAR * path);
676BOOL IsExecutable(CHAR * filename);
677VOID FillInDriveFlags(VOID * dummy);
678VOID DriveFlagsOne(INT x);
679VOID ArgDriveFlags(INT argc, CHAR ** argv);
680CHAR *assign_ignores(CHAR * s);
681BOOL needs_quoting(CHAR * f);
682BOOL IsBinary(CHAR * str, ULONG len);
683BOOL TestBinary(CHAR * filename);
684BOOL ParentIsDesktop(HWND hwnd, HWND hwndParent);
685BOOL IsDesktop(HAB hab, HWND hwnd);
686char *IsVowel(char a);
687VOID GetDesktopName(CHAR * objectpath, ULONG size);
688char *RootName(char *filename);
689APIRET MakeFullName(char *filename);
690
691/* misc.c */
692BOOL IsFm2Window(HWND hwnd, BOOL chkTid);
693VOID SetShiftState(VOID);
694void EmphasizeButton(HWND hwnd, BOOL on);
695void DrawTargetEmphasis(HWND hwnd, BOOL on);
696void BoxWindow(HWND hwnd, HPS hps, LONG color);
697VOID PaintRecessedWindow(HWND hwnd, HPS hps, BOOL outtie, BOOL dbl);
698void PaintSTextWindow(HWND hwnd, HPS hps);
699BOOL AdjustCnrColVis(HWND hwndCnr, CHAR * title, BOOL visible, BOOL toggle);
700BOOL AdjustCnrColRO(HWND hwndCnr, CHAR * title, BOOL readonly, BOOL toggle);
701VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd);
702VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd,
703 BOOL compare);
704BOOL SetCnrCols(HWND hwndCnr, BOOL compare);
705MRESULT CnrDirectEdit(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
706BOOL SetMenuCheck(HWND hwndMenu, USHORT id, BOOL * bool, BOOL toggle,
707 CHAR * savename);
708VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable);
709BOOL ViewHelp(CHAR * filename);
710VOID CloseHelp(VOID);
711INT ExecFile(HWND hwnd, CHAR * filename);
712VOID EmptyCnr(HWND hwnd);
713VOID SetDetailsSwitches(HWND hwnd, DIRCNRDATA * dcd);
714VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd,
715 CHAR * directory, CHAR * keyroot, DIRCNRDATA * dcd,
716 BOOL compare);
717VOID FreeMallocedMem(VOID * mem);
718VOID FcloseFile(FILE * fp);
719VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def);
720VOID SetSortChecks(HWND hwndMenu, INT sortflags);
721VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr);
722VOID LoadDetailsSwitches(CHAR * keyroot, DIRCNRDATA * dcd);
723HWND FindDirCnr(HWND hwndParent);
724VOID HeapThread(VOID * dummy);
725VOID FixSwitchList(HWND hwnd, CHAR * text);
726VOID QuickPopup(HWND hwnd, DIRCNRDATA * dcd, HWND hwndMenu, USHORT id);
727PMINIRECORDCORE CurrentRecord(HWND hwndCnr);
728BOOL PostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
729VOID OpenEdit(HWND hwnd);
730VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
731HWND CheckMenu(HWND * hwndMenu, USHORT id);
732SHORT AddToListboxBottom(HWND hwnd, CHAR * str);
733VOID SetSysMenu(HWND hwndSysMenu);
734VOID LoadLibPath(CHAR * str, LONG len);
735void SaySort(HWND hwnd, INT sortflags, BOOL archive);
736void SayView(HWND hwnd, ULONG flWindowAttr);
737void SayFilter(HWND hwnd, MASK * mask, BOOL archive);
738void SetViewMenu(HWND hwndMenu, ULONG flWindowAttr);
739char *GetCmdSpec(BOOL dos);
740void Broadcast(HAB hab, HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
741void SetupWinList(HWND hwndMenu, HWND hwndTop, HWND hwndFrame);
742BOOL SwitchCommand(HWND hwndMenu, USHORT cmd);
743
744/* mainwnd.c */
745ULONG CountDirCnrs(HWND hwndParent);
746HWND TopWindow(HWND hwndParent, HWND exclude);
747HWND TopWindowName(HWND hwndParent, HWND exclude, CHAR * ret);
748HWND FindDirCnrByName(CHAR * directory, BOOL restore);
749MRESULT EXPENTRY MainWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
750VOID GetNextWindowPos(HWND hwndClient, PSWP pswp, ULONG * ulCntR,
751 ULONG * ulNumMinChildrenR);
752VOID TileChildren(HWND hwndClient, BOOL absolute);
753VOID FillClient(HWND hwndClient, PSWP pswp, PRECTL prectl, BOOL avoidtree);
754MRESULT EXPENTRY ToolBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
755MRESULT EXPENTRY DriveBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
756MRESULT EXPENTRY ChildButtonProc(HWND hwnd, ULONG msg, MPARAM mp1,
757 MPARAM mp2);
758MRESULT EXPENTRY DriveProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
759MRESULT EXPENTRY BubbleProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
760BOOL SaveDirCnrState(HWND hwndClient, CHAR * name);
761MRESULT EXPENTRY LEDProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
762MRESULT EXPENTRY StatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
763VOID BuildDriveBarButtons(HWND hwndT);
764VOID ResizeDrives(HWND hwndT, long xwidth);
765BOOL CloseChildren(HWND hwndClient);
766VOID BuildTools(HWND hwndT, BOOL resize);
767void BubbleHelp(HWND hwnd, BOOL other, BOOL data, BOOL above, char *help);
768VOID MakeBubble(HWND hwnd, BOOL above, CHAR * help);
769MRESULT EXPENTRY MainWMCommand(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
770VOID MakeMainObjWin(VOID * args);
771
772/* mainwnd2.c */
773MRESULT EXPENTRY MainWndProc2(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
774MRESULT EXPENTRY FileListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
775HWND StartFM32(HAB hab, INT argc, CHAR ** argv);
776
777/* treecnr.c */
778MRESULT EXPENTRY TreeStatProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
779MRESULT EXPENTRY TreeClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
780 MPARAM mp2);
781HWND StartTreeCnr(HWND hwndParent, ULONG flags);
782MRESULT EXPENTRY TreeObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
783VOID ShowTreeRec(HWND hwndCnr, CHAR * dirname, BOOL collapsefirst,
784 BOOL maketop);
785MRESULT EXPENTRY OpenButtonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
786
787/* dircnrs.c */
788MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
789 MPARAM mp2);
790HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
791 ULONG flags);
792MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
793MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
794MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
795MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
796
797/* presparm.c */
798VOID StoreWndPresParams(HWND hwnd, CHAR * tagname, HINI prof);
799
800#ifdef INCL_GPI
801VOID SetPresParams(HWND hwnd, RGB2 * back, RGB2 * fore, RGB2 * border,
802 CHAR * font);
803#endif
804VOID CopyPresParams(HWND target, HWND source);
805VOID IfNoParam(HWND hwnd, CHAR * keyroot, ULONG size, PVOID attrvalue);
806VOID PresParamChanged(HWND hwnd, CHAR * keyroot, MPARAM mp1, MPARAM mp2);
807VOID RestorePresParams(HWND hwnd, CHAR * keyroot);
808
809/* dirs.c */
810APIRET save_dir2(CHAR * curdir);
811APIRET save_dir(CHAR * curdir);
812APIRET switch_to(CHAR * s);
813
814/* strips.c */
815VOID chop_at_crnl(PSZ pszSrc);
816PSZ convert_nl_to_nul(PSZ pszSrc);
817void strip_lead_char(char *pszStripChars, char *pszSrc);
818void strip_trail_char(char *pszStripChars, char *pszSrc);
819
820#define lstrip(s) strip_lead_char(" \t",(s))
821#define rstrip(s) strip_trail_char(" \t",(s))
822#define stripcr(s) strip_trail_char("\r\n",(s))
823// Strip leading and trailing white
824#define bstrip(s) (strip_lead_char(" \t",(s)),strip_trail_char(" \t",(s)))
825// Strip leading and trailing white and trail cr/nl
826#define bstripcr(s) (strip_lead_char(" \t",(s)),strip_trail_char("\r\n \t",(s)))
827
828/* delims.c */
829char *skip_delim(char *a, register char *delim);
830char *to_delim(char *a, register char *delim);
831
832/* copyf.c */
833BOOL AdjustWildcardName(CHAR * oldname, CHAR * newname);
834CHAR default_disk(VOID);
835APIRET docopyf(INT type, CHAR * oldname, CHAR * newname, ...);
836
837#define COPY 0
838#define MOVE 1
839#define WPSCOPY 2
840#define WPSMOVE 4
841INT unlinkf(CHAR * string, ...);
842INT unlink_allf(CHAR * string, ...);
843INT wipeallf(CHAR * string, ...);
844INT make_deleteable(CHAR * filename);
845CHAR *TruncName(CHAR * oldname, CHAR * buffer);
846CHAR *GetLongName(CHAR * oldname, CHAR * buffer);
847BOOL WriteLongName(CHAR * filename, CHAR * longname);
848
849/* mkdir.c */
850APIRET SetDir(HWND hwndClient, HWND hwnd, CHAR * dir, INT flags);
851APIRET MassMkdir(HWND hwndClient, CHAR * dir);
852BOOL PMMkDir(HWND hwnd, CHAR * filename, BOOL copy);
853void SetTargetDir(HWND hwnd, BOOL justshow);
854
855/* srchpath.c */
856INT RunFM2Util(CHAR *appname, CHAR *filename);
857CHAR *first_path(CHAR * path, CHAR * ret);
858CHAR *searchapath(CHAR * path, CHAR * filename);
859CHAR *searchpath(CHAR * filename);
860
861/* literal.c */
862UINT literal(PSZ pszBuf);
863BOOL wildcard(const PSZ pszBuf, const PSZ pszWildCard,
864 const BOOL fNotFileSpec);
865PSZ fixup(const PCH pachInBuf, PSZ pszOutBuf, const UINT cBufBytes,
866 const UINT cInBytes);
867
868/* stristr.c */
869CHAR *stristr(const CHAR * t, const CHAR * s);
870CHAR *strnistr(register CHAR * t, CHAR * s, LONG len);
871CHAR *strnstr(register CHAR * t, CHAR * s, LONG len);
872CHAR *findstring(CHAR * findthis, ULONG lenthis, CHAR * findin,
873 ULONG lenin, BOOL insensitive);
874
875/* avl.c */
876ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig);
877ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig);
878INT load_archivers(VOID);
879BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime);
880
881/* avv.c */
882VOID rewrite_archiverbb2(CHAR * archiverbb2);
883MRESULT EXPENTRY ArcReviewDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
884 MPARAM mp2);
885VOID EditArchiverDefinition(HWND hwnd);
886
887/* systemf.c */
888BOOL ShowSession(HWND hwnd, PID pid);
889INT ExecOnList(HWND hwnd, CHAR * command, INT flags, CHAR * tpath,
890 CHAR ** list, CHAR * prompt);
891INT runemf2(INT type, HWND hwnd, CHAR * directory, CHAR * environment,
892 CHAR * formatstring, ...);
893HAPP Exec(HWND hwndNotify, BOOL child, char *startdir, char *env,
894 PROGTYPE * progt, ULONG fl, char *formatstring, ...);
895#define SYNCHRONOUS 1
896#define ASYNCHRONOUS 2
897#define DETACHED 3
898#define SEPARATE 4
899#define SEPARATEKEEP 5
900#define WINDOWED 16
901#define MAXIMIZED 32
902#define MINIMIZED 64
903#define FULLSCREEN 128
904#define INVISIBLE 256
905#define BACKGROUND 512
906#define WAIT 1024
907#define PROMPT 2048
908#define KEEP 4096
909#define ONCE 8192
910#define DIEAFTER 16384
911#define SEAMLESS 32768
912#define CHILD 65536
913
914/* cmdline.c */
915BOOL add_cmdline(CHAR * cmdline, BOOL big);
916VOID save_cmdlines(BOOL big);
917MRESULT EXPENTRY CmdLineDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
918MRESULT EXPENTRY CmdLine2DlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
919 MPARAM mp2);
920
921/* makelist.c */
922INT AddToList(CHAR * string, CHAR *** list, INT * numfiles, INT * numalloced);
923INT AddToFileList(CHAR * string, FILEFINDBUF4 * ffb4, FILELIST *** list,
924 INT * numfiles, INT * numalloced);
925CHAR **BuildList(HWND hwndCnr);
926VOID FreeListInfo(LISTINFO * li);
927VOID FreeList(CHAR ** list);
928VOID SortList(LISTINFO * li);
929CHAR **BuildArcList(HWND hwndCnr);
930CHAR **RemoveFromList(CHAR ** list, CHAR * item);
931CHAR **CombineLists(CHAR ** prime, CHAR ** add);
932
933/* chklist.c */
934VOID PosOverOkay(HWND hwnd);
935VOID CenterOverWindow(HWND hwnd);
936BOOL PopupMenu(HWND hwndParent, HWND hwndOwner, HWND hwndMenu);
937MRESULT EXPENTRY CheckListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
938MRESULT EXPENTRY DropListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
939
940/* eas.c */
941VOID HexDump(HWND hwnd, CHAR * value, ULONG cbValue);
942HOLDFEA *GetFileEAs(CHAR * filename, BOOL ishandle, BOOL silentfail);
943VOID Free_FEAList(HOLDFEA * pFEA);
944MRESULT EXPENTRY DisplayEAsProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
945PVOID SaveEA(CHAR * filename, HOLDFEA * current, CHAR * newdata,
946 BOOL silentfail);
947
948/* inis.c */
949MRESULT EXPENTRY IniProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
950HWND StartIniEditor(HWND hwnd, CHAR * filename, INT flags);
951
952/* subj.c */
953INT Subject(HWND hwnd, CHAR * filename);
954
955/* dirsize.c */
956MRESULT EXPENTRY DirSizeProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
957
958/* getnames.c */
959BOOL insert_filename(HWND hwnd, CHAR * filename, INT loadit, BOOL newok);
960BOOL export_filename(HWND hwnd, CHAR * filename, INT overwrite);
961MRESULT EXPENTRY CustomFileDlg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
962
963/* input.c */
964MRESULT EXPENTRY InputDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
965
966/* select.c */
967VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list, ULONG ulItemsToUnHilite);
968VOID SelectList(HWND hwndCnr, BOOL partial, BOOL deselect, BOOL clearfirst,
969 PCNRITEM pciParent, CHAR * filename, CHAR ** list);
970VOID SelectAll(HWND hwndCnr, BOOL files, BOOL dirs, CHAR * mask, CHAR * text,
971 BOOL arc);
972VOID DeselectAll(HWND hwndCnr, BOOL files, BOOL dirs, CHAR * mask,
973 CHAR * text, BOOL arc);
974VOID Deselect(HWND hwndCnr);
975VOID HideAll(HWND hwndCnr);
976VOID RemoveAll(HWND hwndCnr, ULONGLONG * ullTotalBytes, ULONG * totalfiles);
977VOID MarkAll(HWND hwndCnr, BOOL quitit, BOOL target, BOOL source);
978VOID SetMask(CHAR * str, MASK * mask);
979VOID ExpandAll(HWND hwndCnr, BOOL expand, PCNRITEM pciParent);
980VOID InvertAll(HWND hwndCnr);
981VOID SpecialSelect(HWND hwndCnrS, HWND hwndCnrD, INT action, BOOL reset);
982VOID SpecialSelect2(HWND hwndParent, INT action);
983
984/* viewer.c */
985MRESULT EXPENTRY MLEEditorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
986HWND StartMLEEditor(HWND hwnd, INT flags, CHAR * filename, HWND hwndRestore);
987
988/* codepage.c */
989INT PickCodepage(HWND hwnd);
990
991/* fonts.c */
992VOID SetFont(HWND hwnd);
993FATTRS *SetMLEFont(HWND hwndMLE, FATTRS * fattrs, ULONG flags);
994VOID SetPresParamFromFattrs(HWND hwnd, FATTRS * fattrs,
995 SHORT sNominalPointSize, FIXED fxPointSize);
996
997/* saveclip.c */
998BOOL SaveToClip(HWND hwnd, CHAR * text, BOOL append);
999VOID ListToClipboard(HWND hwnd, CHAR ** list, BOOL append);
1000CHAR **ListFromClipboard(HWND hwnd);
1001BOOL SaveToClipHab(HAB hab, CHAR * text, BOOL append);
1002VOID ListToClipboardHab(HAB hab, CHAR ** list, BOOL append);
1003CHAR **ListFromClipboardHab(HAB hab);
1004MRESULT EXPENTRY SaveListDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1005 MPARAM mp2);
1006MRESULT EXPENTRY SaveAllListDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1007 MPARAM mp2);
1008
1009/* filter.c */
1010INT APIENTRY Filter(PMINIRECORDCORE rmini, PVOID arg);
1011BOOL FilterAttrs(PCNRITEM pci, MASK * mask);
1012VOID save_masks(VOID);
1013MRESULT EXPENTRY PickMaskDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1014 MPARAM mp2);
1015
1016/* archive.c */
1017MRESULT EXPENTRY ArchiveDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1018MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1019
1020/* extract.c */
1021MRESULT EXPENTRY ExtractDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1022
1023/* walkem.c */
1024VOID load_udirs(VOID);
1025VOID save_udirs(VOID);
1026BOOL add_udir(BOOL userdirs, CHAR * inpath);
1027BOOL remove_udir(CHAR * path);
1028BOOL remove_ldir(CHAR * path);
1029VOID load_setups(VOID);
1030VOID save_setups(VOID);
1031BOOL add_setup(CHAR * name);
1032BOOL remove_setup(CHAR * name);
1033VOID FillPathListBox(HWND hwnd, HWND hwnddrive, HWND hwnddir, CHAR * path,
1034 BOOL nounwriteable);
1035MRESULT EXPENTRY WalkDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1036MRESULT EXPENTRY WalkAllDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1037MRESULT EXPENTRY WalkCopyDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1038 MPARAM mp2);
1039MRESULT EXPENTRY WalkMoveDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1040 MPARAM mp2);
1041MRESULT EXPENTRY WalkExtractDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1042 MPARAM mp2);
1043MRESULT EXPENTRY WalkTargetDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1044 MPARAM mp2);
1045MRESULT EXPENTRY WalkTwoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1046MRESULT EXPENTRY WalkTwoCmpDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1047 MPARAM mp2);
1048MRESULT EXPENTRY WalkTwoSetDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1049 MPARAM mp2);
1050
1051/* arccnrs.c */
1052MRESULT EXPENTRY ArcClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1053 MPARAM mp2);
1054HWND StartArcCnr(HWND hwndParent, HWND hwndCaller, CHAR * arcname, INT flags,
1055 ARC_TYPE * sinfo);
1056MRESULT EXPENTRY ArcTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1057MRESULT EXPENTRY ArcFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1058MRESULT EXPENTRY ArcObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1059
1060/* assoc.c */
1061INT ExecAssociation(HWND hwnd, CHAR * datafile);
1062VOID EditAssociations(HWND hwnd);
1063VOID load_associations(VOID);
1064VOID save_associations(VOID);
1065
1066/*draglist.c */
1067HWND DoFileDrag(HWND hwndCnr, HWND hwndObj, PCNRDRAGINIT pcd, CHAR * arcfile,
1068 CHAR * directory, BOOL moveok);
1069HWND DragOne(HWND hwndCnr, HWND hwndObj, CHAR * filename, BOOL moveok);
1070HWND DragList(HWND hwnd, HWND hwndObj, CHAR ** list, BOOL moveok);
1071BOOL PickUp(HWND hwndCnr, HWND hwndObj, PCNRDRAGINIT pcd);
1072
1073/* droplist.c */
1074void DropHelp(MPARAM mp1, MPARAM mp2, HWND hwnd, char *text);
1075BOOL AcceptOneDrop(HWND hwnd, MPARAM mp1, MPARAM mp2);
1076BOOL GetOneDrop(HWND hwnd, MPARAM mp1, MPARAM mp2, char *buffer, ULONG buflen);
1077BOOL FullDrgName(PDRAGITEM pDItem, CHAR * buffer, ULONG buflen);
1078BOOL TwoDrgNames(PDRAGITEM pDItem, CHAR * buffer1, ULONG buflen1,
1079 char *buffer2, ULONG buflen2);
1080LISTINFO *DoFileDrop(HWND hwndCnr, CHAR * directory, BOOL arcfilesok,
1081 MPARAM mp1, MPARAM mp2);
1082VOID FreeDragInfoData (HWND hwnd, PDRAGINFO pDInfo);
1083BOOL CheckPmDrgLimit(PDRAGINFO pDInfo);
1084
1085/* shadow.c */
1086HOBJECT CreateProgramObject(CHAR * objtitle, CHAR * location, CHAR * path,
1087 CHAR * cnr);
1088HOBJECT CreateDataObject(CHAR * objtitle, CHAR * location, CHAR * path,
1089 CHAR * cnr);
1090HOBJECT CreateFolderObject(CHAR * objtitle, CHAR * cnr);
1091HOBJECT CreateShadowObject(CHAR * objtitle, CHAR * location, CHAR * path,
1092 BOOL executable, CHAR * cnr);
1093VOID MakeShadows(HWND hwnd, CHAR ** list, ULONG Shadows, CHAR * cnr,
1094 CHAR * foldername);
1095VOID OpenObject(CHAR * filename, CHAR * type, HWND hwnd);
1096BOOL RunSeamless(CHAR * exename, CHAR * args, HWND hwnd);
1097
1098/* printer.c */
1099BOOL PrinterReady(CHAR * printdevname);
1100BOOL SayPrinterReady(HWND hwnd);
1101VOID PrintListThread(VOID * arg);
1102MRESULT EXPENTRY PrintDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1103
1104/* attribs.c */
1105MRESULT EXPENTRY AttrListDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1106 MPARAM mp2);
1107
1108/* rename.c */
1109MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1110
1111/* comp.c */
1112MRESULT EXPENTRY CFileDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1113MRESULT EXPENTRY CompareDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1114
1115/* findrec.c */
1116PCNRITEM FindCnrRecord(HWND hwndCnr, CHAR * filename, PCNRITEM pciParent,
1117 BOOL partial, BOOL partmatch, BOOL noenv);
1118PCNRITEM FindParentRecord(HWND hwndCnr, PCNRITEM pciC);
1119VOID ShowCnrRecord(HWND hwndCnr, PMINIRECORDCORE pmi);
1120
1121/* update.c */
1122HPOINTER SelectDriveIcon(PCNRITEM pci);
1123PCNRITEM UpdateCnrRecord(HWND hwndCnr, CHAR * filename, BOOL partial,
1124 DIRCNRDATA * dcd);
1125BOOL UpdateCnrList(HWND hwndCnr, CHAR ** filename, INT howmany, BOOL partial,
1126 DIRCNRDATA * dcd);
1127
1128/* info.c */
1129MRESULT EXPENTRY DrvInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1130MRESULT EXPENTRY FileInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1131MRESULT EXPENTRY SetDrvProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1132
1133#if defined(__IBMC__)
1134/* fsopen.c */
1135FILE *_fsopen(CHAR * filename, CHAR * mode, INT sharemode, ...);
1136#endif
1137
1138/* seticon.c */
1139MRESULT EXPENTRY SetIconDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1140
1141/* objcnr.c */
1142MRESULT EXPENTRY ObjCnrDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1143
1144/* sortcnr.c */
1145SHORT APIENTRY SortTreeCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1146 PVOID pStorage);
1147SHORT APIENTRY SortDirCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1148 PVOID pStorage);
1149SHORT APIENTRY SortCollectorCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1150 PVOID pStorage);
1151SHORT SortCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2, INT Sortflags);
1152
1153/* collect.c */
1154MRESULT EXPENTRY CollectorClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1155 MPARAM mp2);
1156MRESULT EXPENTRY CollectorTextProc(HWND hwnd, ULONG msg, MPARAM mp1,
1157 MPARAM mp2);
1158HWND StartCollector(HWND hwndParent, INT flags);
1159MRESULT EXPENTRY CollectorObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1160 MPARAM mp2);
1161
1162/* command.c */
1163VOID RunCommand(HWND hwnd, INT cx);
1164VOID EditCommands(HWND hwnd);
1165CHAR *command_title(INT cx);
1166VOID load_commands(VOID);
1167
1168/* instant.c */
1169MRESULT EXPENTRY InstantDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1170
1171/* undel.c */
1172MRESULT EXPENTRY UndeleteDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1173 MPARAM mp2);
1174
1175/* killproc.c */
1176MRESULT EXPENTRY KillDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1177
1178/* sysinfo.c */
1179MRESULT EXPENTRY SysInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1180
1181/* objwin.c */
1182MRESULT EXPENTRY ObjectWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1183VOID MakeObjWin(VOID * args);
1184
1185/* progstup.c */
1186MRESULT EXPENTRY ProgDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1187
1188/* key.c */
1189MRESULT EXPENTRY AboutDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1190
1191/* notify.c */
1192MRESULT EXPENTRY NotifyWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1193HWND Notify(char *text);
1194HWND DoNotify(char *text);
1195VOID NotifyError(CHAR * filename, APIRET error);
1196VOID StartNotes(CHAR * s);
1197BOOL AddNote(CHAR * note);
1198VOID EndNote(VOID);
1199VOID ShowNote(VOID);
1200VOID HideNote(VOID);
1201
1202/* winlist.c */
1203VOID WindowList(HWND hwnd);
1204
1205/* viewinf.c */
1206MRESULT EXPENTRY ViewInfProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1207
1208/* notebook.c */
1209MRESULT EXPENTRY CfgDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1210
1211/* commafmt.c */
1212size_t commafmt(PSZ pszBuf, UINT cBufSize, LONG lNumber);
1213size_t CommaFmtUL(char *pszBuf, UINT cBufSize, ULONG ullNumber,
1214 CHAR chPreferred);
1215size_t CommaFmtULL(char *pszBuf, UINT cBufSize, ULONGLONG ullNumber,
1216 CHAR chPreferred);
1217
1218/* autoview.c */
1219BOOL WriteEA(HWND hwnd, CHAR * filename, CHAR * eaname, USHORT type,
1220 CHAR * data);
1221BOOL PutComments(HWND hwnd, CHAR * filename, CHAR * comments);
1222MRESULT EXPENTRY AutoViewProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1223ULONG CreateHexDump(CHAR * value, ULONG cbValue, CHAR * ret, ULONG retlen,
1224 ULONG startval, BOOL longlead);
1225
1226/* menu.c */
1227BOOL AddToMenu(CHAR * filename, HWND hwndMenu);
1228
1229/* worker.c */
1230VOID MassAction(VOID * args);
1231VOID Action(VOID * args);
1232
1233/* fm2cmd.c */
1234BOOL FM2Command(CHAR * directory, CHAR * command);
1235
1236/* seeall.c */
1237MRESULT EXPENTRY SeeAllWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1238MRESULT EXPENTRY SeeStatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1239HWND StartSeeAll(HWND hwndParent, BOOL standalone, CHAR * startpath);
1240
1241/* newview.c */
1242MRESULT EXPENTRY ViewWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1243MRESULT EXPENTRY ViewStatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1244HWND StartViewer(HWND hwndParent, USHORT flags, CHAR * filename,
1245 HWND hwndRestore);
1246
1247/* colors.c */
1248MRESULT EXPENTRY ColorDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1249
1250/* defview.c */
1251BOOL ShowMultimedia(CHAR * filename);
1252VOID DefaultView(HWND hwnd, HWND hwndFrame, HWND hwndParent, SWP * swp,
1253 ULONG flags, CHAR * filename);
1254VOID DefaultViewKeys(HWND hwnd, HWND hwndFrame, HWND hwndParent,
1255 SWP * swp, CHAR * filename);
1256#define QuickView(h,f) DefaultView(h,(HWND)0,(HWND)0,NULL,0,f)
1257#define QuickEdit(h,f) DefaultView(h,(HWND)0,(HWND)0,NULL,8,f)
1258
1259/* catalog.c */
1260MRESULT EXPENTRY CatalogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1261
1262/* uudecode.c */
1263int UUD(char *filename, char *outname);
1264MRESULT EXPENTRY MergeDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1265
1266/* loadbmp.c */
1267HBITMAP LoadBitmapFromFileNum(USHORT id);
1268HBITMAP LoadBitmapFromFile(CHAR * pszFileName);
1269
1270/* remap.c */
1271MRESULT EXPENTRY RemapDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1272
1273/* timer.c */
1274BOOL StartTimer(void);
1275void StopTimer(void);
1276
1277/* grep2.c */
1278MRESULT EXPENTRY GrepDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1279
1280/* common.c */
1281MRESULT EXPENTRY CommonFrameWndProc(USHORT id,
1282 HWND hwnd,
1283 ULONG msg, MPARAM mp1, MPARAM mp2);
1284MRESULT EXPENTRY CommonTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1285void CommonTextPaint(HWND hwnd, HPS hps);
1286void CommonCreateTextChildren(HWND hwnd, char *class, USHORT * ids);
1287void CommonDriveCmd(HWND hwnd, char *drive, USHORT cmd);
1288void CommonCreateMainChildren(HWND hwnd, SWP * swp);
1289MRESULT EXPENTRY CommonMainWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1290 MPARAM mp2);
1291MRESULT EXPENTRY CommonTextButton(HWND hwnd, ULONG msg, MPARAM mp1,
1292 MPARAM mp2);
1293MRESULT EXPENTRY CommonCnrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1294HWND OpenDirCnr(HWND hwnd, HWND hwndParent, HWND hwndRestore,
1295 BOOL noautotile, char *directory);
1296VOID IncrThreadUsage(VOID);
1297VOID DecrThreadUsage(VOID);
1298
1299/* string.c */
1300BOOL LoadStrings(char *filename);
1301char *GetPString(ULONG id);
1302BOOL StringsLoaded(void);
1303
1304/* wrappers.c */
1305PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
1306 UINT uiLineNumber);
1307PSZ xfgets_bstripcr(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
1308 UINT uiLineNumber);
1309FILE *xfopen(PCSZ pszFileName, PCSZ pszMode, PCSZ pszSrcFile,
1310 UINT uiLineNumber);
1311FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile,
1312 UINT uiLineNumber);
1313VOID xfree(PVOID pv);
1314PVOID xmalloc(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1315PVOID xmallocz(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1316PVOID xrealloc(PVOID pvIn, size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1317PVOID xstrdup(PCSZ pszIn, PCSZ pszSrcFile, UINT uiLineNumber);
1318
1319//=====================================================================
1320
1321#ifdef DEFINE_GLOBALS
1322#define DATADEF
1323#else
1324#define DATADEF extern
1325#endif
1326
1327DATADEF ARC_TYPE *arcsighead;
1328DATADEF BOOL arcsigsloaded;
1329DATADEF BOOL arcsigsmodified;
1330DATADEF UINT arcsigs_header_lines; // Header comments line count in archiver.bb2
1331DATADEF UINT arcsigs_trailer_line_num; // Trailer comments start line number (1..n)
1332
1333DATADEF USHORT nodes, shiftstate;
1334DATADEF HEV CompactSem;
1335DATADEF HWND hwndMain, hwndTree, hwndStatus, hwndStatus2, hwndTrash,
1336 hwndButtonlist, hwndDrivelist, hwndStatelist, hwndUserlist,
1337 hwndAutoview, hwndAttr, hwndDate, hwndName, hwndBack,
1338 hwndLED, hwndLEDHdr, hwndAutoMLE, hwndCmdlist;
1339DATADEF HBITMAP hbmLEDon, hbmLEDoff;
1340DATADEF CHAR ArcTempRoot[9];
1341DATADEF HPOINTER hptrArrow, hptrBusy, hptrLast, hptrDir, hptrFile, hptrRemote,
1342 hptrFloppy, hptrDrive, hptrRemovable, hptrCDROM,hptrVirtual,hptrRamdisk,
1343 hptrFinger, hptrApp, hptrDunno, hptrSystem, hptrHidden,
1344 hptrReadonly, hptrNS, hptrZipstrm, hptrArc, hptrArt, hptrEW,
1345 hptrCommon, hptrEnv;
1346DATADEF PFNWP PFNWPCnr, PFNWPFrame, PFNWPButton, PFNWPStatic, PFNWPMLE;
1347DATADEF BOOL fLoadSubject, fLoadLongnames, fForceUpper, fForceLower,
1348 fSyncUpdates, fAutoTile, fDontMoveMouse, loadedudirs,
1349 fUnHilite, fWorkPlace, fConfirmDelete, fToolbar,
1350 fToolsChanged, MenuInvisible, fFreeTree, fFollowTree,
1351 fNoIconsFiles, fNoIconsDirs, fVerify, fDCOpens,
1352 fLinkSetsIcon, fSaveState, fTextTools, fCopyDefault,
1353 fToolTitles, fLogFile, fRealIdle, fNoSaveState,
1354 fSplitStatus, fArcStuffVisible, fUseMCI, fAmAV2,
1355 fNoTreeGap, fDummy, fVTreeOpensWPS, fUseQProcStat,
1356 fStartMinimized, fStartMaximized, fRemoteBug, fReminimize,
1357 fDragndropDlg, fMinOnOpen, fUserComboBox, loadedsetups,
1358 fQuickArcFind, fNoRemovableScan, fAutoView, fDataMin,
1359 fDataToFore, fDataShowDrives, fDataInclRemote,
1360 fExternalArcboxes, fExternalViewer, fExternalCollector,
1361 fExternalINIs, fDefaultDeletePerm, fIniExisted, fUseNewViewer,
1362 fTileBackwards, fFolderAfterExtract, fUserListSwitches,
1363 fGuessType, fAutoAddDirs, fUdirsChanged, fSelectedAlways,
1364 fToolbarHelp, fComments, fMoreButtons, fNoSearch, fOtherHelp,
1365 fKeepCmdLine, fAmClosing, fSeparateParms, fTopDir,
1366 fLookInDir, fSwitchTree, fSwitchTreeOnFocus, fDrivebar,
1367 fSwitchTreeExpand, fCollapseFirst, fFilesInTree, fNoDead,
1368 fThreadNotes, fOkayMinimize, fRunning, fDullMin, fBlueLED,
1369 fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu,
1370 fCustomFileDlg, fSaveMiniCmds, fSaveBigCmds, fNoTileUpdate,
1371 fFM2Deletes, fAutoAddAllDirs, fConfirmTarget, fChangeTarget,
1372 fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM;
1373DATADEF BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
1374 detailslongname, detailsea, detailssize, detailssubject,
1375 detailslwdate, detailslwtime, detailsattr, detailsicon;
1376DATADEF PID mypid;
1377DATADEF INT driveflags[26], driveserial[26];
1378DATADEF ULONG NoBrokenNotify, fwsAnimate, OS2ver[2], DriveLines;
1379DATADEF HINI fmprof;
1380DATADEF HELPINIT hini;
1381DATADEF HWND hwndHelp, LastDir, AboutBox, DirMenu, FileMenu, TreeMenu,
1382 ArcMenu, DirCnrMenu, TreeCnrMenu, ArcCnrMenu,
1383 CollectorCnrMenu, CollectorFileMenu, CollectorDirMenu,
1384 Collector, MainPopupMenu, DataHwnd, AutoMenu, hwndBubble,
1385 hwndToolback, MainObjectHwnd;
1386#ifdef DEFINE_GLOBALS
1387#pragma data_seg(GLOBAL2)
1388#endif
1389DATADEF CHAR *DEBUG_STRING, *FM3Str, *FM2Str, *NullStr, *Default, *Settings,
1390 *DRM_OS2FILE, *DRM_FM2ARCMEMBER, *DRF_FM2ARCHIVE,
1391 *DRMDRFLIST, *DRMDRFOS2FILE, *DRMDRFFM2ARC,
1392 *DRM_FM2INIRECORD, *DRF_FM2INI, *SUBJECT, *LONGNAME,
1393 *HPFS, *JFS, *CDFS, *FAT32, *HPFS386, *NDFS32, *CBSIFS, *ISOFS, *RAMFS, *NTFS,
1394 *WPProgram, *FM3Folder, *FM3Tools;
1395DATADEF RGB2 RGBGREY, RGBBLACK;
1396DATADEF CHAR archiverbb2[CCHMAXPATH], StopPrinting, profile[CCHMAXPATH];
1397DATADEF CHAR appname[12], realappname[12];
1398DATADEF CHAR editor[CCHMAXPATH], viewer[CCHMAXPATH],
1399 virus[CCHMAXPATH], printer[CCHMAXPATH],
1400 compare[CCHMAXPATH], extractpath[CCHMAXPATH],
1401 lastextractpath[CCHMAXPATH], lasttoolbox[CCHMAXPATH],
1402 HomePath[CCHMAXPATH], SwapperDat[CCHMAXPATH],
1403 binview[CCHMAXPATH], bined[CCHMAXPATH],
1404 dircompare[CCHMAXPATH], szDefArc[CCHMAXPATH],
1405 ftprun[CCHMAXPATH], httprun[CCHMAXPATH], targetdir[CCHMAXPATH];
1406DATADEF HMODULE FM3DllHandle, FM3ModHandle;
1407DATADEF CHAR *quicktool[50];
1408DATADEF BOOL qtloaded;
1409DATADEF INT sortFlags, TreesortFlags, CollectorsortFlags;
1410DATADEF INT butxsize, butysize;
1411DATADEF FILE *LogFileHandle;
1412DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL;
1413DATADEF long prnwidth, prnlength, prntmargin, prnbmargin, prnlmargin,
1414 prnrmargin, prnspacing, prntabspaces;
1415DATADEF BOOL prnpagenums, prnformat, prnformfeedbefore, prnformfeedafter,
1416 prnalt;
1417DATADEF LINKDIRS *udirhead, *ldirhead;
1418DATADEF LINKCMDS *cmdhead, *cmdtail;
1419DATADEF BOOL cmdloaded;
1420DATADEF CHAR *WC_OBJECTWINDOW, *WC_BUBBLE, *WC_TOOLBUTTONS, *WC_DRIVEBUTTONS, *WC_DIRCONTAINER,
1421 *WC_DIRSTATUS, *WC_TREECONTAINER, *WC_TREEOPENBUTTON, *WC_TREESTATUS, *WC_MAINWND,
1422 *WC_MAINWND2, *WC_AUTOVIEW, *WC_LED, *WC_COLLECTOR, *WC_COLSTATUS, *WC_STATUS, *WC_TOOLBACK,
1423 *WC_DRIVEBACK, *WC_ARCCONTAINER, *WC_ARCSTATUS, *WC_MLEEDITOR, *WC_INIEDITOR, *WC_SEEALL,
1424 *WC_NEWVIEW, *WC_SEESTATUS, *WC_VIEWSTATUS, *WC_ERRORWND, *WC_MINITIME, *WC_DATABAR;
1425
1426#ifdef DEFINE_GLOBALS
1427#pragma data_seg(GLOBAL3)
1428#endif
1429#define MAXNUMSETUPS 100
1430DATADEF CHAR lastsetups[MAXNUMSETUPS][13];
1431DATADEF INT lastsetup;
1432DATADEF LONG standardcolors[16];
1433
1434#ifdef INCL_MMIOOS2
1435#pragma pack(4)
1436/* definitions for MMPM/2 imports */
1437typedef DWORD(APIENTRY MMIOIDENTIFYFILE) (PSZ, PMMIOINFO, PMMFORMATINFO,
1438 PFOURCC, DWORD, DWORD);
1439typedef MMIOIDENTIFYFILE *PMMIOIDENTIFYFILE;
1440typedef DWORD(APIENTRY MMIOOPEN)( PSZ, PMMIOINFO, DWORD);
1441typedef MMIOOPEN *PMMIOOPEN;
1442typedef WORD (APIENTRY MMIOGETINFO)( HMMIO, PMMIOINFO, WORD);
1443typedef MMIOGETINFO *PMMIOGETINFO;
1444typedef WORD (APIENTRY MMIOCLOSE)( HMMIO, WORD);
1445typedef MMIOCLOSE *PMMIOCLOSE;
1446
1447#pragma pack()
1448#endif
1449
1450#ifdef DEFINE_GLOBALS
1451#pragma data_seg(GLOBAL4)
1452#endif
1453DATADEF HSWITCH switches[499];
1454DATADEF ULONG numswitches;
1455
1456#define priority_idle() DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L)
1457#define priority_normal() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L)
1458#define priority_tweaked() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)
1459#define priority_bumped() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L)
1460#define priority_critical() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,2L,0L)
1461#define priority_max() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,31L,0L)
1462#define SysVal(value) WinQuerySysValue(HWND_DESKTOP, (value))
Note: See TracBrowser for help on using the repository browser.