[907] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: $
|
---|
| 5 |
|
---|
| 6 | dircnrs common definitions
|
---|
| 7 |
|
---|
| 8 | Copyright (c) 1993-98 M. Kimes
|
---|
| 9 | Copyright (c) 2001, 2008 Steven H. Levine
|
---|
| 10 |
|
---|
| 11 | 05 Jan 08 SHL Move dircnrs.c definitions here
|
---|
| 12 |
|
---|
| 13 | ***********************************************************************/
|
---|
| 14 |
|
---|
| 15 | #if !defined(DIRCNRS_H)
|
---|
| 16 |
|
---|
| 17 | #define DIRCNRS_H
|
---|
| 18 |
|
---|
| 19 | #if !defined(OS2_INCLUDED)
|
---|
| 20 | #define INCL_WINSTDCNR // avl.h
|
---|
| 21 | #define INCL_LONGLONG
|
---|
| 22 | #include <os2.h>
|
---|
| 23 | #else
|
---|
| 24 | #if !defined(INCL_WINSTDCNR)
|
---|
| 25 | #error INCL_WINSTDCNR required by dircnrs.h
|
---|
| 26 | #endif
|
---|
| 27 | #if !defined(INCL_LONGLONG)
|
---|
| 28 | #error INCL_LONGLONG required
|
---|
| 29 | #endif
|
---|
| 30 | #endif
|
---|
| 31 |
|
---|
| 32 | #if defined(__IBMC__)
|
---|
| 33 | #if __IBMC__ != 430
|
---|
| 34 | #error VAC365 required for long long support
|
---|
| 35 | #endif
|
---|
| 36 | #if !defined(_LONG_LONG)
|
---|
| 37 | #error Long long support not enabled
|
---|
| 38 | #endif
|
---|
| 39 | #endif
|
---|
| 40 |
|
---|
| 41 | #include "avl.h" // ARC_TYPE
|
---|
| 42 |
|
---|
| 43 | #define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0) // FILEFINDBUF4L.cbList to logical EA size
|
---|
| 44 |
|
---|
| 45 | typedef struct _CNRITEM
|
---|
| 46 | { /* CONTAINER RECORD STRUCTURE */
|
---|
| 47 | MINIRECORDCORE rc; /* Base information */
|
---|
| 48 | HWND hwndCnr; /* The container holding this record */
|
---|
| 49 | PSZ pszFileName; // Points to buffer holding full pathname or NullStr
|
---|
| 50 | PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
|
---|
| 51 | CHAR *pszSubject; // Points subject buffer or Nullstr - used by fm/2 and by CFA_STRING
|
---|
| 52 | CHAR *pszDispAttr; // Points to szDispAttr - required by CFA_STRING
|
---|
| 53 | CDATE date; /* Last write date of file */
|
---|
| 54 | CTIME time; /* Last write time of file */
|
---|
| 55 | CDATE ladate; /* Last access date of file */
|
---|
| 56 | CTIME latime; /* Last access time of file */
|
---|
| 57 | CDATE crdate; /* Creation date of file */
|
---|
| 58 | CTIME crtime; /* Creation time of file */
|
---|
| 59 | CHAR *pszLongName; // Points to long name buffer - used by code and by CFA_STRING
|
---|
| 60 | CHAR *pszFmtFileSize; // Comma formatted file size for large file support
|
---|
| 61 | ULONGLONG cbFile; /* File size */
|
---|
| 62 | ULONGLONG easize; // Size of EAs - dirsize uses this - hack cough
|
---|
| 63 | ULONG attrFile; /* Attributes of this file */
|
---|
| 64 | ULONG flags;
|
---|
| 65 | }
|
---|
| 66 | CNRITEM, *PCNRITEM;
|
---|
| 67 |
|
---|
| 68 | typedef struct
|
---|
| 69 | {
|
---|
| 70 | CHAR szMask[CCHMAXPATH];
|
---|
| 71 | CHAR szMaskCopy[CCHMAXPATH];
|
---|
| 72 | CHAR *pszMasks[26];
|
---|
| 73 | ULONG attrFile;
|
---|
| 74 | ULONG antiattr;
|
---|
| 75 | BOOL fNoAttribs;
|
---|
| 76 | BOOL fShowDirs;
|
---|
| 77 | BOOL fNoDirs;
|
---|
| 78 | BOOL fIsTree;
|
---|
| 79 | BOOL fIsSeeAll;
|
---|
| 80 | BOOL fFilesIncluded;
|
---|
| 81 | BOOL fText;
|
---|
| 82 | CHAR szText[256];
|
---|
| 83 | CHAR prompt[80];
|
---|
| 84 | }
|
---|
| 85 | MASK;
|
---|
| 86 |
|
---|
| 87 | typedef struct DIRCNRDATA
|
---|
| 88 | {
|
---|
| 89 | USHORT size;
|
---|
| 90 | USHORT id;
|
---|
| 91 | INT type;
|
---|
| 92 | ULONG flWindowAttr;
|
---|
| 93 | HWND hwndParent;
|
---|
| 94 | HWND hwndCnr;
|
---|
| 95 | HWND hwndObject;
|
---|
| 96 | HWND hwndFrame;
|
---|
| 97 | HWND hwndClient;
|
---|
| 98 | HWND hwndLastMenu;
|
---|
| 99 | HWND hwndExtract;
|
---|
| 100 | HWND hwndLastDirCnr;
|
---|
| 101 | HWND hwndRestore;
|
---|
| 102 | CHAR directory[CCHMAXPATH];
|
---|
| 103 | CHAR previous[CCHMAXPATH];
|
---|
| 104 | ULONG fg, bg, hifg, hibg, border;
|
---|
| 105 | PFNWP oldproc;
|
---|
| 106 | CHAR font[CCHMAXPATH];
|
---|
| 107 | MASK mask;
|
---|
| 108 | ULONGLONG ullTotalBytes;
|
---|
| 109 | ULONGLONG selectedbytes;
|
---|
| 110 | ULONG selectedfiles;
|
---|
| 111 | ULONG totalfiles;
|
---|
| 112 | BOOL cnremphasized;
|
---|
| 113 | BOOL dontclose;
|
---|
| 114 | ARC_TYPE *info;
|
---|
| 115 | CHAR arcname[CCHMAXPATH];
|
---|
| 116 | CHAR command[257];
|
---|
| 117 | CHAR stopflag;
|
---|
| 118 | CHAR workdir[CCHMAXPATH];
|
---|
| 119 | CHAR lastfilename[CCHMAXPATH];
|
---|
| 120 | BOOL namecanchange;
|
---|
| 121 | BOOL fmoving;
|
---|
| 122 | BOOL amextracted;
|
---|
| 123 | INT lasthelp;
|
---|
| 124 | INT sortFlags;
|
---|
| 125 | BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
|
---|
| 126 | detailslongname, detailsea, detailssize, detailssubject,
|
---|
| 127 | detailslwdate, detailslwtime, detailsattr, detailsicon;
|
---|
| 128 | CHAR **lastselection;
|
---|
| 129 | USHORT shiftstate;
|
---|
| 130 | USHORT suspendview;
|
---|
| 131 | CHAR szCommonName[CCHMAXPATH];
|
---|
| 132 | ULONG lasttime;
|
---|
| 133 | BOOL arcfilled;
|
---|
| 134 | HMTX filling;
|
---|
| 135 | BOOL firsttree;
|
---|
| 136 | ULONG lastattr;
|
---|
| 137 | ULONG ulItemsToUnHilite;
|
---|
| 138 | }
|
---|
| 139 | DIRCNRDATA;
|
---|
| 140 |
|
---|
| 141 | MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
|
---|
| 142 | MPARAM mp2);
|
---|
| 143 | HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
|
---|
| 144 | ULONG flags);
|
---|
| 145 | MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 146 | MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 147 | MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 148 | MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 149 |
|
---|
| 150 | // 05 Jan 08 SHL fixme for dircnrs.c globals to be here
|
---|
| 151 |
|
---|
| 152 | #ifdef DEFINE_GLOBALS
|
---|
| 153 | #define DATADEF
|
---|
| 154 | #pragma data_seg(GLOBAL1)
|
---|
| 155 | #else
|
---|
| 156 | #define DATADEF extern
|
---|
| 157 | #endif
|
---|
| 158 |
|
---|
| 159 | #endif // DIRCNRS_H
|
---|