source: trunk/dll/fm3dll.h@ 787

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

Rework UM_FILLSETUPLIST IDM_SAVEDIRCNRSTATE and ..._setups() logic for ticket# 109 and #31
Add GetMSecTimer()
Use GetMSecTimer in DbgMsg
Tweak notebook.ipf scanning page
Move more #pragma alloc_text statements to end of files for OpenWatcom
Delete obsoletes
Revert ExpandAll() ShowTreeRec() DosSleeps to 0 - DosSleep(1) was slowing down inner loops
Drop afFilesToGet - use FilesToGet directly
Optimze ShowTreeRec() collapse logic - was really slow

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