source: trunk/dll/dircnrs.h@ 1498

Last change on this file since 1498 was 1498, checked in by Gregg Young, 16 years ago

Changes to get FM2 to compile with the latest watcom 1.9 beta (mostly type casts of CHAR CONSTANT * to CHAR *). Changes to get the environment settings working everywhere again (broken by the change that moved commands to the INI); Added an environment size variable (set to 2048 which was the largest I found hard coded). Still need to find everywhere the environment size is set and use this variable.

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 5.3 KB
Line 
1
2/***********************************************************************
3
4 $Id: dircnrs.h 1498 2010-01-18 00:57:01Z gyoung $
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 11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating
14 all the details view settings (both the global variables and those in the
15 DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
16 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
17
18***********************************************************************/
19
20#if !defined(DIRCNRS_H)
21
22#define DIRCNRS_H
23
24#if !defined(OS2_INCLUDED)
25#define INCL_WINSTDCNR // avl.h
26#define INCL_LONGLONG
27#include <os2.h>
28#else
29#if !defined(INCL_WINSTDCNR)
30#error INCL_WINSTDCNR required by dircnrs.h
31#endif
32#if !defined(INCL_LONGLONG)
33#error INCL_LONGLONG required
34#endif
35#endif
36
37#include "avl.h" // ARC_TYPE
38
39#define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0) // FILEFINDBUF4L.cbList to logical EA size
40
41typedef struct _CNRITEM
42{ /* CONTAINER RECORD STRUCTURE */
43 MINIRECORDCORE rc; /* Base information */
44 HWND hwndCnr; /* The container holding this record */
45 PSZ pszFileName; // Points to buffer holding full pathname or NullStr
46 PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
47 CHAR *pszSubject; // Points subject buffer or Nullstr - used by fm/2 and by CFA_STRING
48 CHAR *pszDispAttr; // Points to szDispAttr - required by CFA_STRING
49 CDATE date; /* Last write date of file */
50 CTIME time; /* Last write time of file */
51 CDATE ladate; /* Last access date of file */
52 CTIME latime; /* Last access time of file */
53 CDATE crdate; /* Creation date of file */
54 CTIME crtime; /* Creation time of file */
55 CHAR *pszLongName; // Points to long name buffer - used by code and by CFA_STRING
56 CHAR *pszFmtFileSize; // Comma formatted file size for large file support
57 ULONGLONG cbFile; /* File size */
58 ULONGLONG easize; // Size of EAs - dirsize uses this - hack cough
59 ULONG attrFile; /* Attributes of this file */
60 ULONG flags;
61}
62CNRITEM, *PCNRITEM;
63
64// Compare directory flags
65#define CNRITEM_SMALLER 0x00010000 // file exists in both containers and this one is smaller
66#define CNRITEM_LARGER 0x00020000
67#define CNRITEM_NEWER 0x00040000
68#define CNRITEM_OLDER 0x00080000
69#define CNRITEM_EXISTS 0x00100000 // file exists in both containers
70
71#define EXTRA_RECORD_BYTES (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
72
73typedef struct
74{
75 CHAR szMask[CCHMAXPATH];
76 CHAR szMaskCopy[CCHMAXPATH];
77 CHAR *pszMasks[26];
78 ULONG attrFile;
79 ULONG antiattr;
80 BOOL fNoAttribs;
81 BOOL fShowDirs;
82 BOOL fNoDirs;
83 BOOL fIsTree;
84 BOOL fIsSeeAll;
85 BOOL fFilesIncluded;
86 BOOL fText;
87 CHAR szText[256];
88 CHAR prompt[80];
89}
90MASK;
91
92typedef struct DETAILS_SETTINGS
93{
94 BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
95 detailslongname, detailsea, detailssize, detailssubject,
96 detailslwdate, detailslwtime, detailsattr, detailsicon,
97 fSubjectInLeftPane, fSubjectLengthMax;
98 ULONG SubjectDisplayWidth;
99}
100DETAILS_SETTINGS;
101
102typedef struct DIRCNRDATA
103{
104 USHORT size;
105 USHORT id;
106 INT type;
107 ULONG flWindowAttr;
108 HWND hwndParent;
109 HWND hwndCnr;
110 HWND hwndObject;
111 HWND hwndFrame;
112 HWND hwndClient;
113 HWND hwndLastMenu;
114 HWND hwndExtract;
115 HWND hwndLastDirCnr;
116 HWND hwndRestore;
117 CHAR directory[CCHMAXPATH];
118 CHAR previous[CCHMAXPATH];
119 ULONG fg, bg, hifg, hibg, border;
120 PFNWP oldproc;
121 CHAR font[CCHMAXPATH];
122 MASK mask;
123 ULONGLONG ullTotalBytes;
124 ULONGLONG selectedbytes;
125 ULONG selectedfiles;
126 ULONG totalfiles;
127 BOOL cnremphasized;
128 BOOL dontclose;
129 ARC_TYPE *info;
130 CHAR arcname[CCHMAXPATH];
131 CHAR command[257];
132 CHAR stopflag;
133 CHAR workdir[CCHMAXPATH];
134 CHAR lastfilename[CCHMAXPATH];
135 BOOL namecanchange;
136 BOOL fmoving;
137 BOOL amextracted;
138 INT lasthelp;
139 INT sortFlags;
140 DETAILS_SETTINGS ds;
141 CHAR **lastselection;
142 USHORT shiftstate;
143 USHORT suspendview;
144 CHAR szCommonName[CCHMAXPATH];
145 ULONG lasttime;
146 BOOL arcfilled;
147#ifdef INCL_DOSSEMAPHORES
148 HMTX filling;
149#endif
150 BOOL firsttree;
151 ULONG lastattr;
152 ULONG ulItemsToUnHilite;
153}
154DIRCNRDATA;
155
156MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
157 MPARAM mp2);
158HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
159 ULONG flags);
160MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
161MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
162MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
163MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
164
165MRESULT EXPENTRY SearchContainer(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
166
167// 05 Jan 08 SHL fixme for dircnrs.c globals to be here
168
169#ifdef DEFINE_GLOBALS
170#define DATADEF
171#pragma data_seg(GLOBAL1)
172#else
173#define DATADEF extern
174#endif
175
176// Data declarations
177extern HWND DirCnrMenu;
178extern HWND hwndAttr;
179extern HWND hwndDate;
180extern INT sortFlags;
181
182#endif // DIRCNRS_H
Note: See TracBrowser for help on using the repository browser.