source: trunk/dll/fm3dll.h@ 642

Last change on this file since 642 was 636, checked in by Steven Levine, 19 years ago

Add Win_Error_NoMsgBox. Sync others to use common code.

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