source: trunk/dll/fm3dll.h@ 574

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

Updated arc visible viewer child hang fix; fixed 70 misid of files by showMM

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