source: trunk/dll/fm3dll.h@ 689

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

Commit OpenWatcom compatibility updates

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