source: trunk/dll/fm3dll.h@ 756

Last change on this file since 756 was 751, checked in by Steven Levine, 18 years ago

Sync rest of code with CNRITEM mods
Sync code with ARCITEM mods
Get compare dialog working
Still some issues with status display
Still some issues with directory sizes tree display
Heap check diagnostic code mostly enabled

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