source: trunk/dll/fm3dll.h@ 895

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

Added remove_first_occurence_of_character to strip.c; Refined mailrun to use <mailto:> syntax;

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