source: trunk/dll/fm3dll.h@ 616

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

Drag drop work around for number of files limitation in PM

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