source: trunk/dll/fm3dll.h@ 766

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

Replaced sprintf path building with BldFullPathName at functions for quoting path and file names

  • 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 763 2007-08-05 00:16:17Z 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
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#define CNRITEM_SMALLER 0x00010000
392#define CNRITEM_LARGER 0x00020000
393#define CNRITEM_NEWER 0x00040000
394#define CNRITEM_OLDER 0x00080000
395#define CNRITEM_EXISTS 0x00100000
396
397#define RECFLAGS_ENV 0x00000001
398#define RECFLAGS_NODRAG 0x00000002
399#define RECFLAGS_NODROP 0x00000004
400#define RECFLAGS_UNDERENV 0x00000008
401
402#define ARCFLAGS_REALDIR 0x00000001
403#define ARCFLAGS_PSEUDODIR 0x00000002
404
405#define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0) // FILEFINDBUF4.cbList to logical EA size
406
407typedef struct _CNRITEM
408{ /* CONTAINER RECORD STRUCTURE */
409 MINIRECORDCORE rc; /* Base information */
410 HWND hwndCnr; /* The container holding this record */
411 PSZ pszFileName; // Points to buffer holding full pathname or NullStr
412 PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
413 CHAR *pszSubject; // Points subject buffer or Nullstr - used by fm/2 and by CFA_STRING
414 CHAR *pszDispAttr; // Points to szDispAttr - required by CFA_STRING
415 CDATE date; /* Last write date of file */
416 CTIME time; /* Last write time of file */
417 CDATE ladate; /* Last access date of file */
418 CTIME latime; /* Last access time of file */
419 CDATE crdate; /* Creation date of file */
420 CTIME crtime; /* Creation time of file */
421 CHAR *pszLongName; // Points to long name buffer - used by code and by CFA_STRING
422 ULONGLONG cbFile; /* File size */
423 ULONGLONG easize; // Size of EAs - dirsize uses this - hack cough
424 ULONG attrFile; /* Attributes of this file */
425 ULONG flags;
426 CHAR szFileName[CCHMAXPATH]; // Full path name - fixed size for speed
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 */
625PSZ BldFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName);
626PSZ BldQuotedFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName);
627PSZ BldQuotedFileName(PSZ pszQuotedFileName, PSZ pszFileName);
628VOID EmptyCnr(HWND hwnd);
629const PSZ FileAttrToString(ULONG fileAttr);
630VOID FillDirCnr(HWND hwndCnr, CHAR *pszDirectory, DIRCNRDATA *pdcd,
631 PULONGLONG pullBytes);
632VOID FillTreeCnr(HWND hwndCnr, HWND hwndParent);
633VOID ProcessDirectory(const HWND hwndCnr, const PCNRITEM pciParent,
634 const CHAR *szDirBase, const BOOL filestoo,
635 const BOOL recurse, const BOOL partial,
636 CHAR *stopflag, DIRCNRDATA *pdcd,
637 PULONG pullTotalFiles, PULONGLONG pullTotalBytes);
638ULONGLONG FillInRecordFromFFB(HWND hwndCnr, PCNRITEM pci,
639 const PSZ pszDirectory,
640 const PFILEFINDBUF4 pffb, const BOOL partial,
641 DIRCNRDATA *pdcd);
642ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci,
643 const PSZ pszFileName, const PFILESTATUS4 pfsa4,
644 const BOOL partial, DIRCNRDATA *pdcd);
645VOID FreeCnrItem(HWND hwnd, PCNRITEM pci);
646VOID FreeCnrItemList(HWND hwnd, PCNRITEM pciFirst);
647VOID FreeCnrItemData(PCNRITEM pci);
648INT RemoveCnrItems(HWND hwnd, PCNRITEM pci, USHORT usCnt, USHORT usFlags);
649
650/* flesh.c */
651BOOL Stubby(HWND hwndCnr, PCNRITEM pciParent);
652BOOL Flesh(HWND hwndCnr, PCNRITEM pciParent);
653BOOL FleshEnv(HWND hwndCnr, PCNRITEM pciParent);
654BOOL UnFlesh(HWND hwndCnr, PCNRITEM pciParent);
655
656/* error.c */
657VOID DbgMsg(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
658INT Dos_Error(ULONG mb_type, ULONG ulRC, HWND hwndOwner,
659 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
660INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, PCSZ pszSrcFile,
661 UINT uSrcLineNo, UINT idMsg);
662VOID Runtime_Error(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
663VOID Runtime_Error2(PCSZ pszSrcFile, UINT uSrcLineNo, UINT idMsg);
664APIRET saymsg(ULONG mb_type, HWND hwnd, PCSZ pszTitle, PCSZ pszFmt, ...);
665VOID Win_Error(HWND hwndErr, HWND hwndOwner,
666 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
667VOID Win_Error2(HWND hwndErr, HWND hwndOwner, PCSZ pszSrcFile,
668 UINT uSrcLineNo, UINT idMsg);
669VOID Win_Error_NoMsgBox(HWND hwndErr, HWND hwndOwner,
670 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);
671
672/* valid.c */
673INT CheckDrive(CHAR Drive, CHAR * FileSystem, ULONG * type);
674int TestDates(char *file1, char *file2);
675BOOL IsNewer(char *file1, char *file2);
676BOOL IsRoot(CHAR * filename);
677BOOL IsFileSame(CHAR * filename1, CHAR * filename2);
678INT IsFile(CHAR * filename);
679BOOL IsFullName(CHAR * filename);
680BOOL IsValidDir(CHAR * test);
681BOOL IsValidDrive(CHAR drive);
682CHAR *MakeValidDir(CHAR * path);
683BOOL IsExecutable(CHAR * filename);
684VOID FillInDriveFlags(VOID * dummy);
685VOID DriveFlagsOne(INT x);
686VOID ArgDriveFlags(INT argc, CHAR ** argv);
687CHAR *assign_ignores(CHAR * s);
688BOOL needs_quoting(CHAR * f);
689BOOL IsBinary(CHAR * str, ULONG len);
690BOOL TestBinary(CHAR * filename);
691BOOL ParentIsDesktop(HWND hwnd, HWND hwndParent);
692BOOL IsDesktop(HAB hab, HWND hwnd);
693char *IsVowel(char a);
694VOID GetDesktopName(CHAR * objectpath, ULONG size);
695char *RootName(char *filename);
696APIRET MakeFullName(char *filename);
697
698/* misc.c */
699BOOL IsFm2Window(HWND hwnd, BOOL chkTid);
700VOID SetShiftState(VOID);
701void EmphasizeButton(HWND hwnd, BOOL on);
702void DrawTargetEmphasis(HWND hwnd, BOOL on);
703void BoxWindow(HWND hwnd, HPS hps, LONG color);
704VOID PaintRecessedWindow(HWND hwnd, HPS hps, BOOL outtie, BOOL dbl);
705void PaintSTextWindow(HWND hwnd, HPS hps);
706BOOL AdjustCnrColVis(HWND hwndCnr, CHAR * title, BOOL visible, BOOL toggle);
707BOOL AdjustCnrColRO(HWND hwndCnr, CHAR * title, BOOL readonly, BOOL toggle);
708VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd);
709VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd,
710 BOOL compare);
711BOOL SetCnrCols(HWND hwndCnr, BOOL compare);
712MRESULT CnrDirectEdit(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
713BOOL SetMenuCheck(HWND hwndMenu, USHORT id, BOOL * bool, BOOL toggle,
714 CHAR * savename);
715VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable);
716BOOL ViewHelp(CHAR * filename);
717VOID CloseHelp(VOID);
718INT ExecFile(HWND hwnd, CHAR * filename);
719VOID SetDetailsSwitches(HWND hwnd, DIRCNRDATA * dcd);
720VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd,
721 CHAR * directory, CHAR * keyroot, DIRCNRDATA * dcd,
722 BOOL compare);
723VOID FreeMallocedMem(VOID * mem);
724VOID FcloseFile(FILE * fp);
725VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def);
726VOID SetSortChecks(HWND hwndMenu, INT sortflags);
727VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr);
728VOID LoadDetailsSwitches(CHAR * keyroot, DIRCNRDATA * dcd);
729HWND FindDirCnr(HWND hwndParent);
730VOID HeapThread(VOID * dummy);
731VOID FixSwitchList(HWND hwnd, CHAR * text);
732VOID QuickPopup(HWND hwnd, DIRCNRDATA * dcd, HWND hwndMenu, USHORT id);
733PMINIRECORDCORE CurrentRecord(HWND hwndCnr);
734BOOL PostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
735VOID OpenEdit(HWND hwnd);
736VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
737HWND CheckMenu(HWND * hwndMenu, USHORT id);
738SHORT AddToListboxBottom(HWND hwnd, CHAR * str);
739VOID SetSysMenu(HWND hwndSysMenu);
740VOID LoadLibPath(CHAR * str, LONG len);
741void SaySort(HWND hwnd, INT sortflags, BOOL archive);
742void SayView(HWND hwnd, ULONG flWindowAttr);
743void SayFilter(HWND hwnd, MASK * mask, BOOL archive);
744void SetViewMenu(HWND hwndMenu, ULONG flWindowAttr);
745char *GetCmdSpec(BOOL dos);
746void Broadcast(HAB hab, HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
747void SetupWinList(HWND hwndMenu, HWND hwndTop, HWND hwndFrame);
748BOOL SwitchCommand(HWND hwndMenu, USHORT cmd);
749
750/* mainwnd.c */
751ULONG CountDirCnrs(HWND hwndParent);
752HWND TopWindow(HWND hwndParent, HWND exclude);
753HWND TopWindowName(HWND hwndParent, HWND exclude, CHAR * ret);
754HWND FindDirCnrByName(CHAR * directory, BOOL restore);
755MRESULT EXPENTRY MainWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
756VOID GetNextWindowPos(HWND hwndClient, PSWP pswp, ULONG * ulCntR,
757 ULONG * ulNumMinChildrenR);
758VOID TileChildren(HWND hwndClient, BOOL absolute);
759VOID FillClient(HWND hwndClient, PSWP pswp, PRECTL prectl, BOOL avoidtree);
760MRESULT EXPENTRY ToolBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
761MRESULT EXPENTRY DriveBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
762MRESULT EXPENTRY ChildButtonProc(HWND hwnd, ULONG msg, MPARAM mp1,
763 MPARAM mp2);
764MRESULT EXPENTRY DriveProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
765MRESULT EXPENTRY BubbleProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
766BOOL SaveDirCnrState(HWND hwndClient, CHAR * name);
767MRESULT EXPENTRY LEDProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
768MRESULT EXPENTRY StatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
769VOID BuildDriveBarButtons(HWND hwndT);
770VOID ResizeDrives(HWND hwndT, long xwidth);
771BOOL CloseChildren(HWND hwndClient);
772VOID BuildTools(HWND hwndT, BOOL resize);
773void BubbleHelp(HWND hwnd, BOOL other, BOOL data, BOOL above, char *help);
774VOID MakeBubble(HWND hwnd, BOOL above, CHAR * help);
775MRESULT EXPENTRY MainWMCommand(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
776VOID MakeMainObjWin(VOID * args);
777
778/* mainwnd2.c */
779MRESULT EXPENTRY MainWndProc2(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
780MRESULT EXPENTRY FileListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
781HWND StartFM32(HAB hab, INT argc, CHAR ** argv);
782
783/* treecnr.c */
784MRESULT EXPENTRY TreeStatProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
785MRESULT EXPENTRY TreeClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
786 MPARAM mp2);
787HWND StartTreeCnr(HWND hwndParent, ULONG flags);
788MRESULT EXPENTRY TreeObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
789VOID ShowTreeRec(HWND hwndCnr, CHAR * dirname, BOOL collapsefirst,
790 BOOL maketop);
791MRESULT EXPENTRY OpenButtonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
792
793/* dircnrs.c */
794MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
795 MPARAM mp2);
796HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
797 ULONG flags);
798MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
799MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
800MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
801MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
802
803/* presparm.c */
804VOID StoreWndPresParams(HWND hwnd, CHAR * tagname, HINI prof);
805
806#ifdef INCL_GPI
807VOID SetPresParams(HWND hwnd, RGB2 * back, RGB2 * fore, RGB2 * border,
808 CHAR * font);
809#endif
810VOID CopyPresParams(HWND target, HWND source);
811VOID IfNoParam(HWND hwnd, CHAR * keyroot, ULONG size, PVOID attrvalue);
812VOID PresParamChanged(HWND hwnd, CHAR * keyroot, MPARAM mp1, MPARAM mp2);
813VOID RestorePresParams(HWND hwnd, CHAR * keyroot);
814
815/* dirs.c */
816APIRET save_dir2(CHAR * curdir);
817APIRET save_dir(CHAR * curdir);
818APIRET switch_to(CHAR * s);
819
820/* strips.c */
821VOID chop_at_crnl(PSZ pszSrc);
822PSZ convert_nl_to_nul(PSZ pszSrc);
823void strip_lead_char(char *pszStripChars, char *pszSrc);
824void strip_trail_char(char *pszStripChars, char *pszSrc);
825
826#define lstrip(s) strip_lead_char(" \t",(s))
827#define rstrip(s) strip_trail_char(" \t",(s))
828#define stripcr(s) strip_trail_char("\r\n",(s))
829// Strip leading and trailing white
830#define bstrip(s) (strip_lead_char(" \t",(s)),strip_trail_char(" \t",(s)))
831// Strip leading and trailing white and trail cr/nl
832#define bstripcr(s) (strip_lead_char(" \t",(s)),strip_trail_char("\r\n \t",(s)))
833
834/* delims.c */
835char *skip_delim(char *a, register char *delim);
836char *to_delim(char *a, register char *delim);
837
838/* copyf.c */
839BOOL AdjustWildcardName(CHAR * oldname, CHAR * newname);
840CHAR default_disk(VOID);
841APIRET docopyf(INT type, CHAR * oldname, CHAR * newname, ...);
842
843#define COPY 0
844#define MOVE 1
845#define WPSCOPY 2
846#define WPSMOVE 4
847INT unlinkf(CHAR * string, ...);
848INT unlink_allf(CHAR * string, ...);
849INT wipeallf(CHAR * string, ...);
850INT make_deleteable(CHAR * filename);
851CHAR *TruncName(CHAR * oldname, CHAR * buffer);
852CHAR *GetLongName(CHAR * oldname, CHAR * buffer);
853BOOL WriteLongName(CHAR * filename, CHAR * longname);
854
855/* mkdir.c */
856APIRET SetDir(HWND hwndClient, HWND hwnd, CHAR * dir, INT flags);
857APIRET MassMkdir(HWND hwndClient, CHAR * dir);
858BOOL PMMkDir(HWND hwnd, CHAR * filename, BOOL copy);
859void SetTargetDir(HWND hwnd, BOOL justshow);
860
861/* srchpath.c */
862INT RunFM2Util(CHAR *appname, CHAR *filename);
863CHAR *first_path(CHAR * path, CHAR * ret);
864CHAR *searchapath(CHAR * path, CHAR * filename);
865CHAR *searchpath(CHAR * filename);
866
867/* literal.c */
868UINT literal(PSZ pszBuf);
869BOOL wildcard(const PSZ pszBuf, const PSZ pszWildCard,
870 const BOOL fNotFileSpec);
871PSZ fixup(const PCH pachInBuf, PSZ pszOutBuf, const UINT cBufBytes,
872 const UINT cInBytes);
873
874/* stristr.c */
875CHAR *stristr(const CHAR * t, const CHAR * s);
876CHAR *strnistr(register CHAR * t, CHAR * s, LONG len);
877CHAR *strnstr(register CHAR * t, CHAR * s, LONG len);
878CHAR *findstring(CHAR * findthis, ULONG lenthis, CHAR * findin,
879 ULONG lenin, BOOL insensitive);
880
881/* avl.c */
882ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig);
883ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig);
884INT load_archivers(VOID);
885BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime);
886
887/* avv.c */
888VOID rewrite_archiverbb2(CHAR * archiverbb2);
889MRESULT EXPENTRY ArcReviewDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
890 MPARAM mp2);
891VOID EditArchiverDefinition(HWND hwnd);
892
893/* systemf.c */
894BOOL ShowSession(HWND hwnd, PID pid);
895INT ExecOnList(HWND hwnd, CHAR * command, INT flags, CHAR * tpath,
896 CHAR ** list, CHAR * prompt);
897INT runemf2(INT type, HWND hwnd, CHAR * directory, CHAR * environment,
898 CHAR * formatstring, ...);
899HAPP Exec(HWND hwndNotify, BOOL child, char *startdir, char *env,
900 PROGTYPE * progt, ULONG fl, char *formatstring, ...);
901#define SYNCHRONOUS 1
902#define ASYNCHRONOUS 2
903#define DETACHED 3
904#define SEPARATE 4
905#define SEPARATEKEEP 5
906#define WINDOWED 16
907#define MAXIMIZED 32
908#define MINIMIZED 64
909#define FULLSCREEN 128
910#define INVISIBLE 256
911#define BACKGROUND 512
912#define WAIT 1024
913#define PROMPT 2048
914#define KEEP 4096
915#define ONCE 8192
916#define DIEAFTER 16384
917#define SEAMLESS 32768
918#define CHILD 65536
919
920/* cmdline.c */
921BOOL add_cmdline(CHAR * cmdline, BOOL big);
922VOID save_cmdlines(BOOL big);
923MRESULT EXPENTRY CmdLineDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
924MRESULT EXPENTRY CmdLine2DlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
925 MPARAM mp2);
926
927/* makelist.c */
928INT AddToList(CHAR * string, CHAR *** list, INT * numfiles, INT * numalloced);
929INT AddToFileList(CHAR * string, FILEFINDBUF4 * ffb4, FILELIST *** list,
930 INT * numfiles, INT * numalloced);
931CHAR **BuildList(HWND hwndCnr);
932VOID FreeListInfo(LISTINFO * li);
933VOID FreeList(CHAR ** list);
934VOID SortList(LISTINFO * li);
935CHAR **BuildArcList(HWND hwndCnr);
936CHAR **RemoveFromList(CHAR ** list, CHAR * item);
937CHAR **CombineLists(CHAR ** prime, CHAR ** add);
938
939/* chklist.c */
940VOID PosOverOkay(HWND hwnd);
941VOID CenterOverWindow(HWND hwnd);
942BOOL PopupMenu(HWND hwndParent, HWND hwndOwner, HWND hwndMenu);
943MRESULT EXPENTRY CheckListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
944MRESULT EXPENTRY DropListProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
945
946/* eas.c */
947VOID HexDump(HWND hwnd, CHAR * value, ULONG cbValue);
948HOLDFEA *GetFileEAs(CHAR * filename, BOOL ishandle, BOOL silentfail);
949VOID Free_FEAList(HOLDFEA * pFEA);
950MRESULT EXPENTRY DisplayEAsProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
951PVOID SaveEA(CHAR * filename, HOLDFEA * current, CHAR * newdata,
952 BOOL silentfail);
953
954/* inis.c */
955MRESULT EXPENTRY IniProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
956HWND StartIniEditor(HWND hwnd, CHAR * filename, INT flags);
957
958/* subj.c */
959INT Subject(HWND hwnd, CHAR * filename);
960
961/* dirsize.c */
962MRESULT EXPENTRY DirSizeProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
963
964/* getnames.c */
965BOOL insert_filename(HWND hwnd, CHAR * filename, INT loadit, BOOL newok);
966BOOL export_filename(HWND hwnd, CHAR * filename, INT overwrite);
967MRESULT EXPENTRY CustomFileDlg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
968
969/* input.c */
970MRESULT EXPENTRY InputDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
971
972/* select.c */
973VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list, ULONG ulItemsToUnHilite);
974VOID SelectList(HWND hwndCnr, BOOL partial, BOOL deselect, BOOL clearfirst,
975 PCNRITEM pciParent, CHAR * filename, CHAR ** list);
976VOID SelectAll(HWND hwndCnr, BOOL files, BOOL dirs, CHAR * mask, CHAR * text,
977 BOOL arc);
978VOID DeselectAll(HWND hwndCnr, BOOL files, BOOL dirs, CHAR * mask,
979 CHAR * text, BOOL arc);
980VOID Deselect(HWND hwndCnr);
981VOID HideAll(HWND hwndCnr);
982VOID RemoveAll(HWND hwndCnr, ULONGLONG * ullTotalBytes, ULONG * totalfiles);
983VOID MarkAll(HWND hwndCnr, BOOL quitit, BOOL target, BOOL source);
984VOID SetMask(CHAR * str, MASK * mask);
985VOID ExpandAll(HWND hwndCnr, BOOL expand, PCNRITEM pciParent);
986VOID InvertAll(HWND hwndCnr);
987VOID SpecialSelect(HWND hwndCnrS, HWND hwndCnrD, INT action, BOOL reset);
988VOID SpecialSelect2(HWND hwndParent, INT action);
989
990/* viewer.c */
991MRESULT EXPENTRY MLEEditorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
992HWND StartMLEEditor(HWND hwnd, INT flags, CHAR * filename, HWND hwndRestore);
993
994/* codepage.c */
995INT PickCodepage(HWND hwnd);
996
997/* fonts.c */
998VOID SetFont(HWND hwnd);
999FATTRS *SetMLEFont(HWND hwndMLE, FATTRS * fattrs, ULONG flags);
1000VOID SetPresParamFromFattrs(HWND hwnd, FATTRS * fattrs,
1001 SHORT sNominalPointSize, FIXED fxPointSize);
1002
1003/* saveclip.c */
1004BOOL SaveToClip(HWND hwnd, CHAR * text, BOOL append);
1005VOID ListToClipboard(HWND hwnd, CHAR ** list, BOOL append);
1006CHAR **ListFromClipboard(HWND hwnd);
1007BOOL SaveToClipHab(HAB hab, CHAR * text, BOOL append);
1008VOID ListToClipboardHab(HAB hab, CHAR ** list, BOOL append);
1009CHAR **ListFromClipboardHab(HAB hab);
1010MRESULT EXPENTRY SaveListDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1011 MPARAM mp2);
1012MRESULT EXPENTRY SaveAllListDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1013 MPARAM mp2);
1014
1015/* filter.c */
1016INT APIENTRY Filter(PMINIRECORDCORE rmini, PVOID arg);
1017BOOL FilterAttrs(PCNRITEM pci, MASK * mask);
1018VOID save_masks(VOID);
1019MRESULT EXPENTRY PickMaskDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1020 MPARAM mp2);
1021
1022/* archive.c */
1023MRESULT EXPENTRY ArchiveDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1024MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1025
1026/* extract.c */
1027MRESULT EXPENTRY ExtractDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1028
1029/* walkem.c */
1030VOID load_udirs(VOID);
1031VOID save_udirs(VOID);
1032BOOL add_udir(BOOL userdirs, CHAR * inpath);
1033BOOL remove_udir(CHAR * path);
1034BOOL remove_ldir(CHAR * path);
1035VOID load_setups(VOID);
1036VOID save_setups(VOID);
1037BOOL add_setup(CHAR * name);
1038BOOL remove_setup(CHAR * name);
1039VOID FillPathListBox(HWND hwnd, HWND hwnddrive, HWND hwnddir, CHAR * path,
1040 BOOL nounwriteable);
1041MRESULT EXPENTRY WalkDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1042MRESULT EXPENTRY WalkAllDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1043MRESULT EXPENTRY WalkCopyDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1044 MPARAM mp2);
1045MRESULT EXPENTRY WalkMoveDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1046 MPARAM mp2);
1047MRESULT EXPENTRY WalkExtractDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1048 MPARAM mp2);
1049MRESULT EXPENTRY WalkTargetDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1050 MPARAM mp2);
1051MRESULT EXPENTRY WalkTwoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1052MRESULT EXPENTRY WalkTwoCmpDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1053 MPARAM mp2);
1054MRESULT EXPENTRY WalkTwoSetDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1055 MPARAM mp2);
1056
1057/* arccnrs.c */
1058MRESULT EXPENTRY ArcClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1059 MPARAM mp2);
1060HWND StartArcCnr(HWND hwndParent, HWND hwndCaller, CHAR * arcname, INT flags,
1061 ARC_TYPE * sinfo);
1062MRESULT EXPENTRY ArcTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1063MRESULT EXPENTRY ArcFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1064MRESULT EXPENTRY ArcObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
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 */
1118MRESULT EXPENTRY CFileDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1119MRESULT EXPENTRY CompareDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1120
1121/* findrec.c */
1122PCNRITEM FindCnrRecord(HWND hwndCnr, CHAR * filename, PCNRITEM pciParent,
1123 BOOL partial, BOOL partmatch, BOOL noenv);
1124PCNRITEM FindParentRecord(HWND hwndCnr, PCNRITEM pciC);
1125VOID ShowCnrRecord(HWND hwndCnr, PMINIRECORDCORE pmi);
1126
1127/* update.c */
1128HPOINTER SelectDriveIcon(PCNRITEM pci);
1129PCNRITEM UpdateCnrRecord(HWND hwndCnr, CHAR * filename, BOOL partial,
1130 DIRCNRDATA * dcd);
1131BOOL UpdateCnrList(HWND hwndCnr, CHAR ** filename, INT howmany, BOOL partial,
1132 DIRCNRDATA * dcd);
1133
1134/* info.c */
1135MRESULT EXPENTRY DrvInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1136MRESULT EXPENTRY FileInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1137MRESULT EXPENTRY SetDrvProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1138
1139#if defined(__IBMC__)
1140/* fsopen.c */
1141FILE *_fsopen(CHAR * filename, CHAR * mode, INT sharemode, ...);
1142#endif
1143
1144/* seticon.c */
1145MRESULT EXPENTRY SetIconDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1146
1147/* objcnr.c */
1148MRESULT EXPENTRY ObjCnrDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1149
1150/* sortcnr.c */
1151SHORT APIENTRY SortTreeCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1152 PVOID pStorage);
1153SHORT APIENTRY SortDirCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1154 PVOID pStorage);
1155SHORT APIENTRY SortCollectorCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2,
1156 PVOID pStorage);
1157SHORT SortCnr(PMINIRECORDCORE p1, PMINIRECORDCORE p2, INT Sortflags);
1158
1159/* collect.c */
1160MRESULT EXPENTRY CollectorClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1161 MPARAM mp2);
1162MRESULT EXPENTRY CollectorTextProc(HWND hwnd, ULONG msg, MPARAM mp1,
1163 MPARAM mp2);
1164HWND StartCollector(HWND hwndParent, INT flags);
1165MRESULT EXPENTRY CollectorObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1166 MPARAM mp2);
1167
1168/* command.c */
1169VOID RunCommand(HWND hwnd, INT cx);
1170VOID EditCommands(HWND hwnd);
1171CHAR *command_title(INT cx);
1172VOID load_commands(VOID);
1173
1174/* instant.c */
1175MRESULT EXPENTRY InstantDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1176
1177/* undel.c */
1178MRESULT EXPENTRY UndeleteDlgProc(HWND hwnd, ULONG msg, MPARAM mp1,
1179 MPARAM mp2);
1180
1181/* killproc.c */
1182MRESULT EXPENTRY KillDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1183
1184/* sysinfo.c */
1185MRESULT EXPENTRY SysInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1186
1187/* objwin.c */
1188MRESULT EXPENTRY ObjectWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1189VOID MakeObjWin(VOID * args);
1190
1191/* progstup.c */
1192MRESULT EXPENTRY ProgDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1193
1194/* key.c */
1195MRESULT EXPENTRY AboutDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1196
1197/* notify.c */
1198MRESULT EXPENTRY NotifyWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1199HWND Notify(char *text);
1200HWND DoNotify(char *text);
1201VOID NotifyError(CHAR * filename, APIRET error);
1202VOID StartNotes(CHAR * s);
1203BOOL AddNote(CHAR * note);
1204VOID EndNote(VOID);
1205VOID ShowNote(VOID);
1206VOID HideNote(VOID);
1207
1208/* winlist.c */
1209VOID WindowList(HWND hwnd);
1210
1211/* viewinf.c */
1212MRESULT EXPENTRY ViewInfProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1213
1214/* notebook.c */
1215MRESULT EXPENTRY CfgDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1216
1217/* commafmt.c */
1218size_t commafmt(PSZ pszBuf, UINT cBufSize, LONG lNumber);
1219size_t CommaFmtUL(char *pszBuf, UINT cBufSize, ULONG ullNumber,
1220 CHAR chPreferred);
1221size_t CommaFmtULL(char *pszBuf, UINT cBufSize, ULONGLONG ullNumber,
1222 CHAR chPreferred);
1223
1224/* autoview.c */
1225BOOL WriteEA(HWND hwnd, CHAR * filename, CHAR * eaname, USHORT type,
1226 CHAR * data);
1227BOOL PutComments(HWND hwnd, CHAR * filename, CHAR * comments);
1228MRESULT EXPENTRY AutoViewProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1229ULONG CreateHexDump(CHAR * value, ULONG cbValue, CHAR * ret, ULONG retlen,
1230 ULONG startval, BOOL longlead);
1231
1232/* menu.c */
1233BOOL AddToMenu(CHAR * filename, HWND hwndMenu);
1234
1235/* worker.c */
1236VOID MassAction(VOID * args);
1237VOID Action(VOID * args);
1238
1239/* fm2cmd.c */
1240BOOL FM2Command(CHAR * directory, CHAR * command);
1241
1242/* seeall.c */
1243MRESULT EXPENTRY SeeAllWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1244MRESULT EXPENTRY SeeStatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1245HWND StartSeeAll(HWND hwndParent, BOOL standalone, CHAR * startpath);
1246
1247/* newview.c */
1248MRESULT EXPENTRY ViewWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1249MRESULT EXPENTRY ViewStatusProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1250HWND StartViewer(HWND hwndParent, USHORT flags, CHAR * filename,
1251 HWND hwndRestore);
1252
1253/* colors.c */
1254MRESULT EXPENTRY ColorDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1255
1256/* defview.c */
1257BOOL ShowMultimedia(CHAR * filename);
1258VOID DefaultView(HWND hwnd, HWND hwndFrame, HWND hwndParent, SWP * swp,
1259 ULONG flags, CHAR * filename);
1260VOID DefaultViewKeys(HWND hwnd, HWND hwndFrame, HWND hwndParent,
1261 SWP * swp, CHAR * filename);
1262#define QuickView(h,f) DefaultView(h,(HWND)0,(HWND)0,NULL,0,f)
1263#define QuickEdit(h,f) DefaultView(h,(HWND)0,(HWND)0,NULL,8,f)
1264
1265/* catalog.c */
1266MRESULT EXPENTRY CatalogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1267
1268/* uudecode.c */
1269int UUD(char *filename, char *outname);
1270MRESULT EXPENTRY MergeDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1271
1272/* loadbmp.c */
1273HBITMAP LoadBitmapFromFileNum(USHORT id);
1274HBITMAP LoadBitmapFromFile(CHAR * pszFileName);
1275
1276/* remap.c */
1277MRESULT EXPENTRY RemapDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1278
1279/* timer.c */
1280BOOL StartTimer(void);
1281void StopTimer(void);
1282
1283/* grep2.c */
1284MRESULT EXPENTRY GrepDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1285
1286/* common.c */
1287MRESULT EXPENTRY CommonFrameWndProc(USHORT id,
1288 HWND hwnd,
1289 ULONG msg, MPARAM mp1, MPARAM mp2);
1290MRESULT EXPENTRY CommonTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1291void CommonTextPaint(HWND hwnd, HPS hps);
1292void CommonCreateTextChildren(HWND hwnd, char *class, USHORT * ids);
1293void CommonDriveCmd(HWND hwnd, char *drive, USHORT cmd);
1294void CommonCreateMainChildren(HWND hwnd, SWP * swp);
1295MRESULT EXPENTRY CommonMainWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
1296 MPARAM mp2);
1297MRESULT EXPENTRY CommonTextButton(HWND hwnd, ULONG msg, MPARAM mp1,
1298 MPARAM mp2);
1299MRESULT EXPENTRY CommonCnrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
1300HWND OpenDirCnr(HWND hwnd, HWND hwndParent, HWND hwndRestore,
1301 BOOL noautotile, char *directory);
1302VOID IncrThreadUsage(VOID);
1303VOID DecrThreadUsage(VOID);
1304
1305/* string.c */
1306BOOL LoadStrings(char *filename);
1307char *GetPString(ULONG id);
1308BOOL StringsLoaded(void);
1309
1310/* wrappers.c */
1311PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
1312 UINT uiLineNumber);
1313PSZ xfgets_bstripcr(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
1314 UINT uiLineNumber);
1315FILE *xfopen(PCSZ pszFileName, PCSZ pszMode, PCSZ pszSrcFile,
1316 UINT uiLineNumber);
1317FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile,
1318 UINT uiLineNumber);
1319VOID xfree(PVOID pv);
1320PVOID xmalloc(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1321PVOID xmallocz(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1322PVOID xrealloc(PVOID pvIn, size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
1323PVOID xstrdup(PCSZ pszIn, PCSZ pszSrcFile, UINT uiLineNumber);
1324
1325//=====================================================================
1326
1327#ifdef DEFINE_GLOBALS
1328#define DATADEF
1329#else
1330#define DATADEF extern
1331#endif
1332
1333DATADEF ARC_TYPE *arcsighead;
1334DATADEF BOOL arcsigsloaded;
1335DATADEF BOOL arcsigsmodified;
1336DATADEF UINT arcsigs_header_lines; // Header comments line count in archiver.bb2
1337DATADEF UINT arcsigs_trailer_line_num; // Trailer comments start line number (1..n)
1338
1339DATADEF USHORT nodes, shiftstate;
1340DATADEF HEV CompactSem;
1341DATADEF HWND hwndMain, hwndTree, hwndStatus, hwndStatus2, hwndTrash,
1342 hwndButtonlist, hwndDrivelist, hwndStatelist, hwndUserlist,
1343 hwndAutoview, hwndAttr, hwndDate, hwndName, hwndBack,
1344 hwndLED, hwndLEDHdr, hwndAutoMLE, hwndCmdlist;
1345DATADEF HBITMAP hbmLEDon, hbmLEDoff;
1346DATADEF CHAR ArcTempRoot[9];
1347DATADEF HPOINTER hptrArrow, hptrBusy, hptrLast, hptrDir, hptrFile, hptrRemote,
1348 hptrFloppy, hptrDrive, hptrRemovable, hptrCDROM,hptrVirtual,hptrRamdisk,
1349 hptrFinger, hptrApp, hptrDunno, hptrSystem, hptrHidden,
1350 hptrReadonly, hptrNS, hptrZipstrm, hptrArc, hptrArt, hptrEW,
1351 hptrCommon, hptrEnv;
1352DATADEF PFNWP PFNWPCnr, PFNWPFrame, PFNWPButton, PFNWPStatic, PFNWPMLE;
1353DATADEF BOOL fLoadSubject, fLoadLongnames, fForceUpper, fForceLower,
1354 fSyncUpdates, fAutoTile, fDontMoveMouse, loadedudirs,
1355 fUnHilite, fWorkPlace, fConfirmDelete, fToolbar,
1356 fToolsChanged, MenuInvisible, fFreeTree, fFollowTree,
1357 fNoIconsFiles, fNoIconsDirs, fVerify, fDCOpens,
1358 fLinkSetsIcon, fSaveState, fTextTools, fCopyDefault,
1359 fToolTitles, fLogFile, fRealIdle, fNoSaveState,
1360 fSplitStatus, fArcStuffVisible, fUseMCI, fAmAV2,
1361 fNoTreeGap, fDummy, fVTreeOpensWPS, fUseQProcStat,
1362 fStartMinimized, fStartMaximized, fRemoteBug, fReminimize,
1363 fDragndropDlg, fMinOnOpen, fUserComboBox, loadedsetups,
1364 fQuickArcFind, fNoRemovableScan, fAutoView, fDataMin,
1365 fDataToFore, fDataShowDrives, fDataInclRemote,
1366 fExternalArcboxes, fExternalViewer, fExternalCollector,
1367 fExternalINIs, fDefaultDeletePerm, fIniExisted, fUseNewViewer,
1368 fTileBackwards, fFolderAfterExtract, fUserListSwitches,
1369 fGuessType, fAutoAddDirs, fUdirsChanged, fSelectedAlways,
1370 fToolbarHelp, fComments, fMoreButtons, fNoSearch, fOtherHelp,
1371 fKeepCmdLine, fAmClosing, fSeparateParms, fTopDir,
1372 fLookInDir, fSwitchTree, fSwitchTreeOnFocus, fDrivebar,
1373 fSwitchTreeExpand, fCollapseFirst, fFilesInTree, fNoDead,
1374 fThreadNotes, fOkayMinimize, fRunning, fDullMin, fBlueLED,
1375 fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu,
1376 fCustomFileDlg, fSaveMiniCmds, fSaveBigCmds, fNoTileUpdate,
1377 fFM2Deletes, fAutoAddAllDirs, fConfirmTarget, fChangeTarget,
1378 fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM;
1379DATADEF BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
1380 detailslongname, detailsea, detailssize, detailssubject,
1381 detailslwdate, detailslwtime, detailsattr, detailsicon;
1382DATADEF PID mypid;
1383DATADEF INT driveflags[26], driveserial[26];
1384DATADEF ULONG NoBrokenNotify, fwsAnimate, OS2ver[2], DriveLines;
1385DATADEF HINI fmprof;
1386DATADEF HELPINIT hini;
1387DATADEF HWND hwndHelp, LastDir, AboutBox, DirMenu, FileMenu, TreeMenu,
1388 ArcMenu, DirCnrMenu, TreeCnrMenu, ArcCnrMenu,
1389 CollectorCnrMenu, CollectorFileMenu, CollectorDirMenu,
1390 Collector, MainPopupMenu, DataHwnd, AutoMenu, hwndBubble,
1391 hwndToolback, MainObjectHwnd;
1392#ifdef DEFINE_GLOBALS
1393#pragma data_seg(GLOBAL2)
1394#endif
1395DATADEF CHAR *DEBUG_STRING, *FM3Str, *FM2Str, *NullStr, *Default, *Settings,
1396 *DRM_OS2FILE, *DRM_FM2ARCMEMBER, *DRF_FM2ARCHIVE,
1397 *DRMDRFLIST, *DRMDRFOS2FILE, *DRMDRFFM2ARC,
1398 *DRM_FM2INIRECORD, *DRF_FM2INI, *SUBJECT, *LONGNAME,
1399 *HPFS, *JFS, *CDFS, *FAT32, *HPFS386, *NDFS32, *CBSIFS, *ISOFS, *RAMFS, *NTFS,
1400 *WPProgram, *FM3Folder, *FM3Tools;
1401DATADEF RGB2 RGBGREY, RGBBLACK;
1402DATADEF CHAR archiverbb2[CCHMAXPATH], StopPrinting, profile[CCHMAXPATH];
1403DATADEF CHAR appname[12], realappname[12];
1404DATADEF CHAR editor[CCHMAXPATH], viewer[CCHMAXPATH],
1405 virus[CCHMAXPATH], printer[CCHMAXPATH],
1406 compare[CCHMAXPATH], extractpath[CCHMAXPATH],
1407 lastextractpath[CCHMAXPATH], lasttoolbox[CCHMAXPATH],
1408 HomePath[CCHMAXPATH], SwapperDat[CCHMAXPATH],
1409 binview[CCHMAXPATH], bined[CCHMAXPATH],
1410 dircompare[CCHMAXPATH], szDefArc[CCHMAXPATH],
1411 ftprun[CCHMAXPATH], httprun[CCHMAXPATH], targetdir[CCHMAXPATH];
1412DATADEF HMODULE FM3DllHandle, FM3ModHandle;
1413DATADEF CHAR *quicktool[50];
1414DATADEF BOOL qtloaded;
1415DATADEF INT sortFlags, TreesortFlags, CollectorsortFlags;
1416DATADEF INT butxsize, butysize;
1417DATADEF FILE *LogFileHandle;
1418DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL;
1419DATADEF long prnwidth, prnlength, prntmargin, prnbmargin, prnlmargin,
1420 prnrmargin, prnspacing, prntabspaces;
1421DATADEF BOOL prnpagenums, prnformat, prnformfeedbefore, prnformfeedafter,
1422 prnalt;
1423DATADEF LINKDIRS *udirhead, *ldirhead;
1424DATADEF LINKCMDS *cmdhead, *cmdtail;
1425DATADEF BOOL cmdloaded;
1426DATADEF CHAR *WC_OBJECTWINDOW, *WC_BUBBLE, *WC_TOOLBUTTONS, *WC_DRIVEBUTTONS, *WC_DIRCONTAINER,
1427 *WC_DIRSTATUS, *WC_TREECONTAINER, *WC_TREEOPENBUTTON, *WC_TREESTATUS, *WC_MAINWND,
1428 *WC_MAINWND2, *WC_AUTOVIEW, *WC_LED, *WC_COLLECTOR, *WC_COLSTATUS, *WC_STATUS, *WC_TOOLBACK,
1429 *WC_DRIVEBACK, *WC_ARCCONTAINER, *WC_ARCSTATUS, *WC_MLEEDITOR, *WC_INIEDITOR, *WC_SEEALL,
1430 *WC_NEWVIEW, *WC_SEESTATUS, *WC_VIEWSTATUS, *WC_ERRORWND, *WC_MINITIME, *WC_DATABAR;
1431
1432#ifdef DEFINE_GLOBALS
1433#pragma data_seg(GLOBAL3)
1434#endif
1435#define MAXNUMSETUPS 100
1436DATADEF CHAR lastsetups[MAXNUMSETUPS][13];
1437DATADEF INT lastsetup;
1438DATADEF LONG standardcolors[16];
1439
1440#ifdef INCL_MMIOOS2
1441#pragma pack(4)
1442/* definitions for MMPM/2 imports */
1443typedef DWORD(APIENTRY MMIOIDENTIFYFILE) (PSZ, PMMIOINFO, PMMFORMATINFO,
1444 PFOURCC, DWORD, DWORD);
1445typedef MMIOIDENTIFYFILE *PMMIOIDENTIFYFILE;
1446typedef DWORD(APIENTRY MMIOOPEN)( PSZ, PMMIOINFO, DWORD);
1447typedef MMIOOPEN *PMMIOOPEN;
1448typedef WORD (APIENTRY MMIOGETINFO)( HMMIO, PMMIOINFO, WORD);
1449typedef MMIOGETINFO *PMMIOGETINFO;
1450typedef WORD (APIENTRY MMIOCLOSE)( HMMIO, WORD);
1451typedef MMIOCLOSE *PMMIOCLOSE;
1452
1453#pragma pack()
1454#endif
1455
1456#ifdef DEFINE_GLOBALS
1457#pragma data_seg(GLOBAL4)
1458#endif
1459DATADEF HSWITCH switches[499];
1460DATADEF ULONG numswitches;
1461
1462#define priority_idle() DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L)
1463#define priority_normal() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L)
1464#define priority_tweaked() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)
1465#define priority_bumped() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L)
1466#define priority_critical() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,2L,0L)
1467#define priority_max() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,31L,0L)
1468#define SysVal(value) WinQuerySysValue(HWND_DESKTOP, (value))
Note: See TracBrowser for help on using the repository browser.