source: trunk/dll/fm3dll.h@ 672

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

Use dcd->ulItemsToUnHilite
Sync UnHilite calls with arg mods

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