source: trunk/dll/fm3dll.h@ 796

Last change on this file since 796 was 796, checked in by Gregg Young, 18 years ago

Make subject column in dircnrs movable from one pane to the other; allow column to be sized truncating long subjects

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