source: trunk/dll/fm3dll.h@ 779

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

Correct some compare directories collector nits
Use BldQuoted... functions
Move BldQuoted... functions near primary callers
Add RUNTYPE_MASK
Use Runtime_Error2 more

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