source: trunk/dll/fm3dll.h@ 892

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

Dialog and menu changes for mailrun and use of WPURLDEFAULTSETTINGS for runftp and runhttp if not supplied by user (libpathstrict option added)

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