source: trunk/dll/fm3dll.h@ 738

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

More ticket #24 updates

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