source: trunk/dll/fm3dll.h@ 869

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

Use the thousand separator from NLS Country info for file sizes. Repalce dir.ico & pmap.bmp with new versions from David

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