source: trunk/dll/fm3dll.h@ 794

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