source: trunk/dll/fm3dll.h@ 696

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

More OpenWatcom compatibility updates

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