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