source: trunk/dll/fm3dll.h@ 558

Last change on this file since 558 was 557, checked in by Gregg Young, 19 years ago

Changes for 3.05 beta mostly drive flag/tree related

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