source: trunk/dll/fm3dll.h@ 632

Last change on this file since 632 was 632, checked in by Gregg Young, 18 years ago

Move RunFM2Util from systemf.c to srchpath.c added error includes and header to srchpath.c

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