source: trunk/dll/fm3dll.h@ 858

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

Use CommaFmtULL to display large file sizes (Ticket 41). Remove autoset of to no large file support.

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