source: trunk/dll/fm3dll.h@ 904

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

Allow includes to be used standalone
Document include dependencies

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