[49] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: fm3dll.h 1189 2008-09-10 21:58:57Z jbs $
|
---|
| 5 |
|
---|
| 6 | Common definitions
|
---|
| 7 |
|
---|
| 8 | Copyright (c) 1993-98 M. Kimes
|
---|
[902] | 9 | Copyright (c) 2001, 2008 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)
|
---|
[787] | 56 | 14 Aug 07 SHL Add GetMSecTimer
|
---|
| 57 | 14 Aug 07 SHL Delete obsoletes
|
---|
| 58 | 16 Aug 07 SHL Update for ticket# 109 - status update
|
---|
| 59 | 18 Aug 07 SHL Update for ticket# 31 - states length
|
---|
[789] | 60 | 19 Aug 07 SHL Move FILESTOGET_MIN/MAX here
|
---|
| 61 | 19 Aug 07 SHL Update SaveDirCnrState return
|
---|
[835] | 62 | 21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the right to the left pane
|
---|
| 63 | 01 Sep 07 GKY Add xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundary
|
---|
[856] | 64 | 04 Nov 07 GKY Add pszFmtFileSize to CNRITEM to display large file sizes
|
---|
[860] | 65 | 10 Nov 07 GKY Add ThousandSeparator variable for file sizes NLS tseparator.
|
---|
[872] | 66 | 22 Nov 07 GKY Use CopyPresParams in CheckMenu to fix presparam inconsistencies in menus
|
---|
[888] | 67 | 17 Dec 07 GKY Add variables for using WPURLDEFAULTSETTINGS as the fall back for ftphttprun
|
---|
[895] | 68 | 29 Dec 07 GKY Add remove_first_occurence_of_character
|
---|
[896] | 69 | 30 Dec 07 GKY Change TestDates to TestFDates can compare by filename or FDATE/FTIME data
|
---|
| 70 | 30 Dec 07 GKY Add TestCDates to compare CNRITEMs by CDATE/CTIME data
|
---|
[902] | 71 | 04 Jan 08 SHL Allow standalone usage
|
---|
[907] | 72 | 05 Jan 08 SHL Move comp.c definitions to comp.h
|
---|
| 73 | 05 Jan 08 SHL Move dircnr.c definitions to dircnr.h
|
---|
| 74 | 05 Jan 08 SHL Move makelist.c definitions to makelist.h
|
---|
| 75 | 05 Jan 08 SHL Move error.c definitions to errutil.h
|
---|
| 76 | 05 Jan 08 SHL Move string.c definitions to strutil.h
|
---|
[917] | 77 | 10 Jan 08 SHL Add UM_FIRSTTIME
|
---|
[924] | 78 | 12 Jan 08 SHL Localize SpecialSelect to comp.c
|
---|
[953] | 79 | 14 Feb 08 SHL Refactor CfgDlgProc to notebook.h
|
---|
[985] | 80 | 29 Feb 08 GKY Refactor global command line variables to notebook.h
|
---|
[1029] | 81 | 22 Jun 08 GKY Changed some variable types to fix compiler warnings
|
---|
[1065] | 82 | 11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating
|
---|
| 83 | all the details view settings (both the global variables and those in the
|
---|
| 84 | DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
|
---|
[1075] | 85 | 16 JUL 08 GKY Use TMP directory for temp files
|
---|
[1082] | 86 | 19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use MakeTempName; Remove LISTTEMPROOT
|
---|
[49] | 87 |
|
---|
| 88 | ***********************************************************************/
|
---|
| 89 |
|
---|
[902] | 90 | #if !defined(FM3DLL_H)
|
---|
| 91 |
|
---|
| 92 | #define FM3DLL_H
|
---|
| 93 |
|
---|
| 94 | #include <stdio.h> // FILE
|
---|
| 95 | #include <time.h> // time_t
|
---|
| 96 |
|
---|
| 97 | #if !defined(OS2_INCLUDED)
|
---|
| 98 | #define INCL_WINSTDDRAG
|
---|
| 99 | #define INCL_WINSTDCNR
|
---|
| 100 | #define INCL_WINPROGRAMLIST
|
---|
| 101 | #define INCL_WINHELP
|
---|
[907] | 102 | #define INCL_LONGLONG // 05 Jan 08 SHL fixme to be gone eventually
|
---|
[902] | 103 | #include <os2.h>
|
---|
| 104 | #else
|
---|
| 105 | #if !defined(INCL_WINSTDDRAG)
|
---|
| 106 | #error INCL_WINSTDDRAG required
|
---|
| 107 | #endif
|
---|
| 108 | #if !defined(INCL_WINSTDCNR)
|
---|
| 109 | #error INCL_WINSTDCNR required
|
---|
| 110 | #endif
|
---|
| 111 | #if !defined(INCL_WINPROGRAMLIST)
|
---|
| 112 | #error INCL_WINPROGRAMLIST required
|
---|
| 113 | #endif
|
---|
| 114 | #if !defined(INCL_WINHELP)
|
---|
| 115 | #error INCL_WINHELP required
|
---|
| 116 | #endif
|
---|
[907] | 117 | #if !defined(INCL_LONGLONG)
|
---|
| 118 | #error INCL_LONGLONG required
|
---|
| 119 | #endif
|
---|
[902] | 120 | #endif // OS2_INCLUDED
|
---|
| 121 |
|
---|
[689] | 122 | #if defined(__IBMC__)
|
---|
[165] | 123 | #if __IBMC__ != 430
|
---|
| 124 | #error VAC365 required for long long support
|
---|
| 125 | #endif
|
---|
| 126 | #if !defined(_LONG_LONG)
|
---|
| 127 | #error Long long support not enabled
|
---|
| 128 | #endif
|
---|
[689] | 129 | #endif
|
---|
[165] | 130 |
|
---|
[907] | 131 | #include "dircnrs.h" // 05 Jan 08 SHL fixme to be gone when DIRCNRDATA refs gone
|
---|
| 132 | #include "makelist.h" // 05 Jan 08 SHL fixme to be gone when LISTINFO refs gone
|
---|
[989] | 133 | #include "command.h" // 01 Mar 08 GKY fixme to be gone when LINKCMDS refs gone
|
---|
[907] | 134 |
|
---|
[2] | 135 | #ifdef DEFINE_GLOBALS
|
---|
[551] | 136 | #pragma data_seg(GLOBAL1)
|
---|
[2] | 137 | #endif
|
---|
| 138 |
|
---|
| 139 | #define PP_MAX PP_MENUDISABLEBGNDCOLORINDEX
|
---|
| 140 | #define PP_MAXBUF 384
|
---|
| 141 |
|
---|
| 142 | #ifndef MM_PORTHOLEINIT
|
---|
[551] | 143 | #define MM_PORTHOLEINIT 0x01fb
|
---|
[2] | 144 | #endif
|
---|
| 145 | #ifndef MS_POPUP
|
---|
[551] | 146 | #define MS_POPUP 0x00000010L
|
---|
[2] | 147 | #endif
|
---|
| 148 | #ifndef CCS_MINIICONS
|
---|
[551] | 149 | #define CCS_MINIICONS 0x0800
|
---|
[2] | 150 | #endif
|
---|
| 151 | #ifndef CRA_SOURCE
|
---|
[551] | 152 | #define CRA_SOURCE 0x00004000
|
---|
[2] | 153 | #endif
|
---|
| 154 | #ifndef CV_EXACTMATCH
|
---|
[551] | 155 | #define CV_EXACTMATCH 0x10000000
|
---|
[2] | 156 | #endif
|
---|
| 157 | #ifndef CBN_SETFOCUS
|
---|
[551] | 158 | #define CBN_SETFOCUS 20
|
---|
[2] | 159 | #endif
|
---|
| 160 | #ifndef CBN_KILLFOCUS
|
---|
[551] | 161 | #define CBN_KILLFOCUS 21
|
---|
[2] | 162 | #endif
|
---|
| 163 | #ifndef CN_VERIFYEDIT
|
---|
[551] | 164 | #define CN_VERIFYEDIT 134
|
---|
[2] | 165 | #endif
|
---|
| 166 | #ifndef CN_PICKUP
|
---|
[551] | 167 | #define CN_PICKUP 135
|
---|
[2] | 168 | #endif
|
---|
| 169 | #ifndef CN_DROPNOTIFY
|
---|
[551] | 170 | #define CN_DROPNOTIFY 136
|
---|
[2] | 171 | #endif
|
---|
| 172 | #ifndef CN_GRIDRESIZED
|
---|
[551] | 173 | #define CN_GRIDRESIZED 137
|
---|
[2] | 174 | #endif
|
---|
| 175 | #ifndef BKS_MERLINSTYLE
|
---|
[551] | 176 | #define BKS_MERLINSTYLE 0x0800
|
---|
[2] | 177 | #endif
|
---|
[697] | 178 |
|
---|
| 179 | // PMBITMAP_INCLUDED - IBM Toolkit
|
---|
| 180 | // INCL_GPIBITMAPS - OpenWatcom Toolkit
|
---|
| 181 | #if !defined(PMBITMAP_INCLUDED) && !defined(INCL_GPIBITMAPS)
|
---|
[551] | 182 | typedef struct _RGB2 /* rgb2 */
|
---|
| 183 | {
|
---|
| 184 | BYTE bBlue; /* Blue component of the color definition */
|
---|
| 185 | BYTE bGreen; /* Green component of the color definition */
|
---|
| 186 | BYTE bRed; /* Red component of the color definition */
|
---|
| 187 | BYTE fcOptions; /* Reserved, must be zero */
|
---|
| 188 | }
|
---|
| 189 | RGB2;
|
---|
| 190 | typedef RGB2 *PRGB2;
|
---|
[2] | 191 | #endif
|
---|
| 192 |
|
---|
[311] | 193 | #define LINES_PER_ARCSIG 21 // Lines in each archiver.bb2 definition
|
---|
[2] | 194 | #define CON_COLS 6
|
---|
[672] | 195 | #define INSTDATA(h) WinQueryWindowPtr((h),QWL_USER)
|
---|
[551] | 196 | #define DIR_SPLITBAR_OFFSET 18 * 12 /* Pixel offset of details splitbar */
|
---|
| 197 | #define CONTAINER_COLUMNS 13 /* Number of columns in details view */
|
---|
[2] | 198 | #define RGBFROMPARTS(r,g,b) (((r) * 65536) + ((g) * 256) + (b))
|
---|
[751] | 199 |
|
---|
| 200 | #define EXTRA_RECORD_BYTES (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
|
---|
[2] | 201 | #define EXTRA_ARCRECORD_BYTES (sizeof(ARCITEM) - sizeof(MINIRECORDCORE))
|
---|
[751] | 202 |
|
---|
[2] | 203 | #define ALLATTRS (FILE_NORMAL | FILE_DIRECTORY | FILE_ARCHIVED |\
|
---|
[636] | 204 | FILE_HIDDEN | FILE_READONLY | FILE_SYSTEM)
|
---|
[1082] | 205 | //#define LISTTEMPROOT "$FM2LI$T"
|
---|
[2] | 206 |
|
---|
[917] | 207 | #include "fm3dll2.h"
|
---|
[2] | 208 |
|
---|
| 209 | #define UM_PAINT (WM_USER)
|
---|
| 210 | #define UM_SETUP (WM_USER + 1)
|
---|
| 211 | #define UM_RESCAN (WM_USER + 2)
|
---|
| 212 | #define UM_INITIALSIZE (WM_USER + 3)
|
---|
| 213 | #define UM_CONTROL (WM_USER + 4)
|
---|
| 214 | #define UM_COMMAND (WM_USER + 5)
|
---|
| 215 | #define UM_SIZE (WM_USER + 6)
|
---|
| 216 | #define UM_FOCUSME (WM_USER + 7)
|
---|
| 217 | #define UM_FIXEDITNAME (WM_USER + 8)
|
---|
| 218 | #define UM_UPDATERECORD (WM_USER + 9)
|
---|
| 219 | #define UM_SETDIR (WM_USER + 10)
|
---|
| 220 | #define UM_CONTAINER_FILLED (WM_USER + 11)
|
---|
| 221 | #define UM_STRETCH (WM_USER + 12)
|
---|
| 222 | #define UM_LOADFILE (WM_USER + 13)
|
---|
| 223 | #define UM_MOUSEMOVE (WM_USER + 14)
|
---|
| 224 | #define UM_ENTER (WM_USER + 15)
|
---|
| 225 | #define UM_CLOSE (WM_USER + 16)
|
---|
| 226 | #define UM_ACTION (WM_USER + 17)
|
---|
| 227 | #define UM_MASSACTION (WM_USER + 18)
|
---|
| 228 | #define UM_UPDATERECORDLIST (WM_USER + 19)
|
---|
| 229 | #define UM_FILESMENU (WM_USER + 20)
|
---|
| 230 | #define UM_SELECT (WM_USER + 21)
|
---|
| 231 | #define UM_VIEWSMENU (WM_USER + 22)
|
---|
| 232 | #define UM_CONTAINERHWND (WM_USER + 23)
|
---|
| 233 | #define UM_OPENWINDOWFORME (WM_USER + 24)
|
---|
| 234 | #define UM_FOLDUP (WM_USER + 25)
|
---|
| 235 | #define UM_INITMENU (WM_USER + 26)
|
---|
| 236 | #define UM_COMPARE (WM_USER + 27)
|
---|
| 237 | #define UM_EXPAND (WM_USER + 28)
|
---|
| 238 | #define UM_REPLACEFOCUS (WM_USER + 29)
|
---|
| 239 | #define UM_UNDO (WM_USER + 30)
|
---|
| 240 | #define UM_RENDER (WM_USER + 31)
|
---|
| 241 | #define UM_BUTTON2DOWN (WM_USER + 32)
|
---|
| 242 | #define UM_BUTTON2UP (WM_USER + 33)
|
---|
| 243 | #define UM_COLLECTFROMFILE (WM_USER + 34)
|
---|
| 244 | #define UM_TIMER (WM_USER + 35)
|
---|
| 245 | #define UM_HELPON (WM_USER + 36)
|
---|
| 246 | #define UM_SETUP2 (WM_USER + 37)
|
---|
| 247 | #define UM_SETUP3 (WM_USER + 38)
|
---|
| 248 | #define UM_CONTEXTMENU (WM_USER + 39)
|
---|
| 249 | #define UM_FILLUSERLIST (WM_USER + 40)
|
---|
| 250 | #define UM_CONTAINERDIR (WM_USER + 41)
|
---|
| 251 | #define UM_SETUP4 (WM_USER + 42)
|
---|
| 252 | #define UM_FILLSETUPLIST (WM_USER + 43)
|
---|
| 253 | #define UM_ARRANGEICONS (WM_USER + 44)
|
---|
| 254 | #define UM_SETUP5 (WM_USER + 45)
|
---|
| 255 | #define UM_NOTIFY (WM_USER + 46)
|
---|
| 256 | #define UM_INSERTRECORD (WM_USER + 47)
|
---|
| 257 | #define UM_ADDTOMENU (WM_USER + 48)
|
---|
| 258 | #define UM_COLLECT (WM_USER + 49)
|
---|
| 259 | #define UM_RESTOREDC (WM_USER + 50)
|
---|
| 260 | #define UM_MINIMIZE (WM_USER + 51)
|
---|
| 261 | #define UM_MAXIMIZE (WM_USER + 52)
|
---|
| 262 | #define UM_BUTTON1MOTIONSTART (WM_USER + 53)
|
---|
| 263 | #define UM_SETUP6 (WM_USER + 54)
|
---|
| 264 | #define UM_FILLBUTTONLIST (WM_USER + 55)
|
---|
| 265 | #define UM_SETUSERLISTNAME (WM_USER + 56)
|
---|
| 266 | #define UM_FILTER (WM_USER + 57)
|
---|
| 267 | #define UM_SORTRECORD (WM_USER + 58)
|
---|
| 268 | #define UM_SIZE2 (WM_USER + 59)
|
---|
| 269 | #define UM_RESTORE (WM_USER + 60)
|
---|
| 270 | #define UM_TOPDIR (WM_USER + 61)
|
---|
| 271 | #define UM_SHOWME (WM_USER + 62)
|
---|
| 272 | #define UM_RESCAN2 (WM_USER + 63)
|
---|
[246] | 273 | #define UM_BUILDDRIVEBAR (WM_USER + 64)
|
---|
[2] | 274 | #define UM_THREADUSE (WM_USER + 65)
|
---|
| 275 | #define UM_DRIVECMD (WM_USER + 66)
|
---|
| 276 | #define UM_ADVISEFOCUS (WM_USER + 67)
|
---|
| 277 | #define UM_FIXCNRMLE (WM_USER + 68)
|
---|
| 278 | #define UM_FLESH (WM_USER + 69)
|
---|
| 279 | #define UM_FILLCMDLIST (WM_USER + 70)
|
---|
| 280 | #define UM_CLICKED (WM_USER + 71)
|
---|
| 281 | #define UM_CLICKED3 (WM_USER + 72)
|
---|
[320] | 282 | #define UM_HIDENOTSELECTED (WM_USER + 73)
|
---|
[917] | 283 | #define UM_FIRSTTIME (WM_USER + 74)
|
---|
[2] | 284 |
|
---|
[551] | 285 | typedef struct
|
---|
| 286 | {
|
---|
[2] | 287 | USHORT size;
|
---|
| 288 | USHORT dummy;
|
---|
[551] | 289 | CHAR szCurrentPath1[CCHMAXPATH];
|
---|
| 290 | CHAR szCurrentPath2[CCHMAXPATH];
|
---|
| 291 | }
|
---|
| 292 | WALK2;
|
---|
[2] | 293 |
|
---|
[551] | 294 | typedef struct LINKDIRS
|
---|
| 295 | {
|
---|
| 296 | CHAR *path;
|
---|
[2] | 297 | struct LINKDIRS *next;
|
---|
[551] | 298 | }
|
---|
| 299 | LINKDIRS;
|
---|
[2] | 300 |
|
---|
[551] | 301 | typedef struct
|
---|
| 302 | {
|
---|
| 303 | USHORT size;
|
---|
| 304 | USHORT numcolors;
|
---|
| 305 | USHORT flags;
|
---|
| 306 | USHORT currentcolor;
|
---|
| 307 | ULONG prompt;
|
---|
| 308 | long *colors;
|
---|
| 309 | ULONG descriptions;
|
---|
| 310 | long *origs;
|
---|
| 311 | }
|
---|
| 312 | COLORS;
|
---|
[2] | 313 |
|
---|
[551] | 314 | typedef struct
|
---|
| 315 | {
|
---|
| 316 | CHAR *title; /* title of dialog */
|
---|
| 317 | CHAR *prompt; /* prompt to user */
|
---|
| 318 | CHAR *ret; /* buffer out, default in */
|
---|
| 319 | CHAR *help; /* help text */
|
---|
| 320 | INT inputlen; /* max len of ret */
|
---|
| 321 | }
|
---|
| 322 | STRINGINPARMS;
|
---|
[2] | 323 |
|
---|
[551] | 324 | typedef struct
|
---|
| 325 | {
|
---|
[2] | 326 | CHAR *source;
|
---|
| 327 | CHAR target[CCHMAXPATH];
|
---|
| 328 | BOOL rename;
|
---|
| 329 | BOOL skip;
|
---|
| 330 | BOOL dontask;
|
---|
| 331 | BOOL overold;
|
---|
| 332 | BOOL overnew;
|
---|
| 333 | BOOL overwrite;
|
---|
[551] | 334 | }
|
---|
| 335 | MOVEIT;
|
---|
[2] | 336 |
|
---|
[551] | 337 | typedef struct HOLDFEA
|
---|
| 338 | {
|
---|
| 339 | PFEA2 pfea;
|
---|
| 340 | CHAR *name;
|
---|
| 341 | CHAR *value;
|
---|
| 342 | BYTE fEA;
|
---|
| 343 | BYTE cbName;
|
---|
| 344 | USHORT cbValue;
|
---|
| 345 | struct HOLDFEA *next;
|
---|
| 346 | }
|
---|
| 347 | HOLDFEA;
|
---|
[2] | 348 |
|
---|
[551] | 349 | typedef struct
|
---|
| 350 | {
|
---|
| 351 | USHORT size;
|
---|
| 352 | USHORT dummy;
|
---|
| 353 | CHAR directory[CCHMAXPATH];
|
---|
| 354 | HWND hwndParent;
|
---|
| 355 | HWND hwndFrame;
|
---|
| 356 | HWND hwndClient;
|
---|
| 357 | HWND hwndCnr;
|
---|
[2] | 358 | LISTINFO *li;
|
---|
[551] | 359 | }
|
---|
| 360 | WORKER;
|
---|
[2] | 361 |
|
---|
[551] | 362 | typedef struct
|
---|
| 363 | {
|
---|
[2] | 364 | USHORT size;
|
---|
[1029] | 365 | ULONG flags;
|
---|
| 366 | ULONG cmd;
|
---|
[2] | 367 | USHORT dummy;
|
---|
[551] | 368 | CHAR *prompt;
|
---|
[2] | 369 | CHAR **list;
|
---|
[551] | 370 | }
|
---|
| 371 | CHECKLIST;
|
---|
[2] | 372 |
|
---|
[551] | 373 | typedef struct
|
---|
| 374 | {
|
---|
[2] | 375 | ULONG flags;
|
---|
| 376 | CHAR *commandline;
|
---|
[551] | 377 | CHAR path[CCHMAXPATH];
|
---|
| 378 | CHAR environment[1001];
|
---|
| 379 | CHAR tempprompt[128];
|
---|
| 380 | CHAR title[80];
|
---|
| 381 | BOOL dropped;
|
---|
| 382 | }
|
---|
| 383 | EXECARGS;
|
---|
[2] | 384 |
|
---|
| 385 | #pragma pack(1)
|
---|
| 386 |
|
---|
[769] | 387 | // Compare directory flags
|
---|
| 388 | #define CNRITEM_SMALLER 0x00010000 // file exists in both containers and this one is smaller
|
---|
[2] | 389 | #define CNRITEM_LARGER 0x00020000
|
---|
| 390 | #define CNRITEM_NEWER 0x00040000
|
---|
| 391 | #define CNRITEM_OLDER 0x00080000
|
---|
[769] | 392 | #define CNRITEM_EXISTS 0x00100000 // file exists in both containers
|
---|
[2] | 393 |
|
---|
| 394 | #define RECFLAGS_ENV 0x00000001
|
---|
| 395 | #define RECFLAGS_NODRAG 0x00000002
|
---|
| 396 | #define RECFLAGS_NODROP 0x00000004
|
---|
| 397 | #define RECFLAGS_UNDERENV 0x00000008
|
---|
| 398 |
|
---|
| 399 | #define ARCFLAGS_REALDIR 0x00000001
|
---|
| 400 | #define ARCFLAGS_PSEUDODIR 0x00000002
|
---|
| 401 |
|
---|
[551] | 402 | typedef struct _ARCITEM
|
---|
| 403 | { // ARCHIVE CONTAINER RECORD STRUCTURE
|
---|
| 404 | MINIRECORDCORE rc; // Base information
|
---|
| 405 | HWND hwndCnr; /* Container holding this record */
|
---|
[751] | 406 | PSZ pszFileName; // Points to full path name or NullStr
|
---|
[739] | 407 | PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING
|
---|
[551] | 408 | CHAR szDate[40]; // File's assembled date
|
---|
| 409 | PSZ pszDate; // Pointer to date
|
---|
| 410 | CDATE date; // if we know date format
|
---|
| 411 | CTIME time; // if we know time format
|
---|
[841] | 412 | ULONGLONG cbFile; // File's original size
|
---|
| 413 | ULONGLONG cbComp; // File's compressed size
|
---|
[551] | 414 | ULONG flags;
|
---|
| 415 | }
|
---|
| 416 | ARCITEM, *PARCITEM;
|
---|
[2] | 417 |
|
---|
| 418 | #pragma pack()
|
---|
| 419 |
|
---|
[551] | 420 | typedef struct
|
---|
| 421 | {
|
---|
| 422 | USHORT size;
|
---|
[2] | 423 | ARC_TYPE *info;
|
---|
[551] | 424 | CHAR *arcname;
|
---|
| 425 | CHAR masks[257];
|
---|
| 426 | CHAR command[257];
|
---|
| 427 | CHAR extractdir[CCHMAXPATH];
|
---|
| 428 | INT ret;
|
---|
| 429 | }
|
---|
| 430 | EXTRDATA;
|
---|
[2] | 431 |
|
---|
[551] | 432 | #define COPY 0
|
---|
| 433 | #define MOVE 1
|
---|
| 434 | #define WPSCOPY 2
|
---|
| 435 | #define WPSMOVE 4
|
---|
| 436 |
|
---|
[2] | 437 | /* systemf.c */
|
---|
[1189] | 438 | // #if defined(__IBMC__)
|
---|
| 439 | // /* fsopen.c */
|
---|
| 440 | // FILE *_fsopen(CHAR * filename, CHAR * mode, INT sharemode, ...);
|
---|
| 441 | // #endif
|
---|
[1164] | 442 |
|
---|
[337] | 443 | //=====================================================================
|
---|
| 444 |
|
---|
[2] | 445 | #ifdef DEFINE_GLOBALS
|
---|
[551] | 446 | #define DATADEF
|
---|
[2] | 447 | #else
|
---|
[551] | 448 | #define DATADEF extern
|
---|
[2] | 449 | #endif
|
---|
| 450 |
|
---|
| 451 | DATADEF ARC_TYPE *arcsighead;
|
---|
[551] | 452 | DATADEF BOOL arcsigsloaded;
|
---|
| 453 | DATADEF BOOL arcsigsmodified;
|
---|
| 454 | DATADEF UINT arcsigs_header_lines; // Header comments line count in archiver.bb2
|
---|
| 455 | DATADEF UINT arcsigs_trailer_line_num; // Trailer comments start line number (1..n)
|
---|
[311] | 456 |
|
---|
[551] | 457 | DATADEF USHORT nodes, shiftstate;
|
---|
| 458 | DATADEF HEV CompactSem;
|
---|
| 459 | DATADEF HWND hwndMain, hwndTree, hwndStatus, hwndStatus2, hwndTrash,
|
---|
[917] | 460 | hwndButtonlist, hwndDrivelist, hwndStatelist, hwndUserlist,
|
---|
| 461 | hwndAutoview, hwndAttr, hwndDate, hwndName, hwndBack,
|
---|
| 462 | hwndLED, hwndLEDHdr, hwndAutoMLE, hwndCmdlist;
|
---|
[551] | 463 | DATADEF HBITMAP hbmLEDon, hbmLEDoff;
|
---|
[1082] | 464 | DATADEF CHAR ArcTempRoot[CCHMAXPATH], ThousandsSeparator[2], *pTmpDir, *pFM2SaveDirectory;
|
---|
[551] | 465 | DATADEF HPOINTER hptrArrow, hptrBusy, hptrLast, hptrDir, hptrFile, hptrRemote,
|
---|
[552] | 466 | hptrFloppy, hptrDrive, hptrRemovable, hptrCDROM,hptrVirtual,hptrRamdisk,
|
---|
[551] | 467 | hptrFinger, hptrApp, hptrDunno, hptrSystem, hptrHidden,
|
---|
| 468 | hptrReadonly, hptrNS, hptrZipstrm, hptrArc, hptrArt, hptrEW,
|
---|
| 469 | hptrCommon, hptrEnv;
|
---|
| 470 | DATADEF PFNWP PFNWPCnr, PFNWPFrame, PFNWPButton, PFNWPStatic, PFNWPMLE;
|
---|
| 471 | DATADEF BOOL fLoadSubject, fLoadLongnames, fForceUpper, fForceLower,
|
---|
| 472 | fSyncUpdates, fAutoTile, fDontMoveMouse, loadedudirs,
|
---|
| 473 | fUnHilite, fWorkPlace, fConfirmDelete, fToolbar,
|
---|
| 474 | fToolsChanged, MenuInvisible, fFreeTree, fFollowTree,
|
---|
| 475 | fNoIconsFiles, fNoIconsDirs, fVerify, fDCOpens,
|
---|
| 476 | fLinkSetsIcon, fSaveState, fTextTools, fCopyDefault,
|
---|
[828] | 477 | fToolTitles, fLogFile, fRealIdle, fNoSaveState, fUseQSysState,
|
---|
[551] | 478 | fSplitStatus, fArcStuffVisible, fUseMCI, fAmAV2,
|
---|
| 479 | fNoTreeGap, fDummy, fVTreeOpensWPS, fUseQProcStat,
|
---|
| 480 | fStartMinimized, fStartMaximized, fRemoteBug, fReminimize,
|
---|
[787] | 481 | fDragndropDlg, fMinOnOpen, fUserComboBox,
|
---|
[551] | 482 | fQuickArcFind, fNoRemovableScan, fAutoView, fDataMin,
|
---|
| 483 | fDataToFore, fDataShowDrives, fDataInclRemote,
|
---|
| 484 | fExternalArcboxes, fExternalViewer, fExternalCollector,
|
---|
| 485 | fExternalINIs, fDefaultDeletePerm, fIniExisted, fUseNewViewer,
|
---|
| 486 | fTileBackwards, fFolderAfterExtract, fUserListSwitches,
|
---|
| 487 | fGuessType, fAutoAddDirs, fUdirsChanged, fSelectedAlways,
|
---|
| 488 | fToolbarHelp, fComments, fMoreButtons, fNoSearch, fOtherHelp,
|
---|
| 489 | fKeepCmdLine, fAmClosing, fSeparateParms, fTopDir,
|
---|
| 490 | fLookInDir, fSwitchTree, fSwitchTreeOnFocus, fDrivebar,
|
---|
| 491 | fSwitchTreeExpand, fCollapseFirst, fFilesInTree, fNoDead,
|
---|
| 492 | fThreadNotes, fOkayMinimize, fRunning, fDullMin, fBlueLED,
|
---|
[1065] | 493 | fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu,
|
---|
[551] | 494 | fCustomFileDlg, fSaveMiniCmds, fSaveBigCmds, fNoTileUpdate,
|
---|
| 495 | fFM2Deletes, fAutoAddAllDirs, fConfirmTarget, fChangeTarget,
|
---|
[796] | 496 | fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM,
|
---|
[1076] | 497 | fNoLargeFileSupport, fNoMailtoMailRun,
|
---|
[896] | 498 | fHttpRunWPSDefault, fFtpRunWPSDefault, fLibPathStrictMailRun,
|
---|
[1043] | 499 | fLibPathStrictHttpRun, fLibPathStrictFtpRun, fCancelAction, fTrashCan;
|
---|
[1065] | 500 | DATADEF DETAILS_SETTINGS dsDirCnrDefault;
|
---|
[551] | 501 | DATADEF PID mypid;
|
---|
| 502 | DATADEF INT driveflags[26], driveserial[26];
|
---|
[672] | 503 | DATADEF ULONG NoBrokenNotify, fwsAnimate, OS2ver[2], DriveLines;
|
---|
[551] | 504 | DATADEF HINI fmprof;
|
---|
| 505 | DATADEF HELPINIT hini;
|
---|
| 506 | DATADEF HWND hwndHelp, LastDir, AboutBox, DirMenu, FileMenu, TreeMenu,
|
---|
| 507 | ArcMenu, DirCnrMenu, TreeCnrMenu, ArcCnrMenu,
|
---|
| 508 | CollectorCnrMenu, CollectorFileMenu, CollectorDirMenu,
|
---|
| 509 | Collector, MainPopupMenu, DataHwnd, AutoMenu, hwndBubble,
|
---|
[875] | 510 | hwndToolback, MainObjectHwnd, hwndMainMenu;
|
---|
[917] | 511 |
|
---|
[2] | 512 | #ifdef DEFINE_GLOBALS
|
---|
[551] | 513 | #pragma data_seg(GLOBAL2)
|
---|
[2] | 514 | #endif
|
---|
[907] | 515 |
|
---|
| 516 | DATADEF CHAR *FM3Str, *FM2Str, *NullStr, *Default, *Settings,
|
---|
[551] | 517 | *DRM_OS2FILE, *DRM_FM2ARCMEMBER, *DRF_FM2ARCHIVE,
|
---|
| 518 | *DRMDRFLIST, *DRMDRFOS2FILE, *DRMDRFFM2ARC,
|
---|
| 519 | *DRM_FM2INIRECORD, *DRF_FM2INI, *SUBJECT, *LONGNAME,
|
---|
[555] | 520 | *HPFS, *JFS, *CDFS, *FAT32, *HPFS386, *NDFS32, *CBSIFS, *ISOFS, *RAMFS, *NTFS,
|
---|
[552] | 521 | *WPProgram, *FM3Folder, *FM3Tools;
|
---|
[551] | 522 | DATADEF RGB2 RGBGREY, RGBBLACK;
|
---|
[985] | 523 | DATADEF CHAR archiverbb2[CCHMAXPATH], StopPrinting, profile[CCHMAXPATH], extractpath[CCHMAXPATH],
|
---|
| 524 | lastextractpath[CCHMAXPATH];
|
---|
[551] | 525 | DATADEF CHAR appname[12], realappname[12];
|
---|
[1122] | 526 | DATADEF CHAR lasttoolbar[CCHMAXPATH], HomePath[CCHMAXPATH],
|
---|
[985] | 527 | SwapperDat[CCHMAXPATH], printer[CCHMAXPATH], szDefArc[CCHMAXPATH];
|
---|
[551] | 528 | DATADEF HMODULE FM3DllHandle, FM3ModHandle;
|
---|
| 529 | DATADEF CHAR *quicktool[50];
|
---|
| 530 | DATADEF BOOL qtloaded;
|
---|
| 531 | DATADEF INT sortFlags, TreesortFlags, CollectorsortFlags;
|
---|
| 532 | DATADEF INT butxsize, butysize;
|
---|
| 533 | DATADEF FILE *LogFileHandle;
|
---|
[789] | 534 |
|
---|
| 535 | #define FILESTOGET_MIN 256
|
---|
| 536 | #define FILESTOGET_MAX 4096
|
---|
| 537 |
|
---|
[1065] | 538 | DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL;
|
---|
[1117] | 539 | DATADEF ULONGLONG ullTmpSpaceNeeded, ullDATFileSpaceNeeded;
|
---|
[551] | 540 | DATADEF long prnwidth, prnlength, prntmargin, prnbmargin, prnlmargin,
|
---|
| 541 | prnrmargin, prnspacing, prntabspaces;
|
---|
| 542 | DATADEF BOOL prnpagenums, prnformat, prnformfeedbefore, prnformfeedafter,
|
---|
| 543 | prnalt;
|
---|
| 544 | DATADEF LINKDIRS *udirhead, *ldirhead;
|
---|
| 545 | DATADEF LINKCMDS *cmdhead, *cmdtail;
|
---|
| 546 | DATADEF BOOL cmdloaded;
|
---|
[593] | 547 | DATADEF CHAR *WC_OBJECTWINDOW, *WC_BUBBLE, *WC_TOOLBUTTONS, *WC_DRIVEBUTTONS, *WC_DIRCONTAINER,
|
---|
| 548 | *WC_DIRSTATUS, *WC_TREECONTAINER, *WC_TREEOPENBUTTON, *WC_TREESTATUS, *WC_MAINWND,
|
---|
| 549 | *WC_MAINWND2, *WC_AUTOVIEW, *WC_LED, *WC_COLLECTOR, *WC_COLSTATUS, *WC_STATUS, *WC_TOOLBACK,
|
---|
| 550 | *WC_DRIVEBACK, *WC_ARCCONTAINER, *WC_ARCSTATUS, *WC_MLEEDITOR, *WC_INIEDITOR, *WC_SEEALL,
|
---|
| 551 | *WC_NEWVIEW, *WC_SEESTATUS, *WC_VIEWSTATUS, *WC_ERRORWND, *WC_MINITIME, *WC_DATABAR;
|
---|
[551] | 552 |
|
---|
[2] | 553 | #ifdef DEFINE_GLOBALS
|
---|
[551] | 554 | #pragma data_seg(GLOBAL3)
|
---|
[2] | 555 | #endif
|
---|
[917] | 556 |
|
---|
| 557 | DATADEF BOOL fWantFirstTimeInit;
|
---|
[551] | 558 | DATADEF LONG standardcolors[16];
|
---|
[2] | 559 |
|
---|
| 560 | #ifdef INCL_MMIOOS2
|
---|
| 561 | #pragma pack(4)
|
---|
| 562 | /* definitions for MMPM/2 imports */
|
---|
[551] | 563 | typedef DWORD(APIENTRY MMIOIDENTIFYFILE) (PSZ, PMMIOINFO, PMMFORMATINFO,
|
---|
| 564 | PFOURCC, DWORD, DWORD);
|
---|
[2] | 565 | typedef MMIOIDENTIFYFILE *PMMIOIDENTIFYFILE;
|
---|
[570] | 566 | typedef DWORD(APIENTRY MMIOOPEN)( PSZ, PMMIOINFO, DWORD);
|
---|
| 567 | typedef MMIOOPEN *PMMIOOPEN;
|
---|
| 568 | typedef WORD (APIENTRY MMIOGETINFO)( HMMIO, PMMIOINFO, WORD);
|
---|
| 569 | typedef MMIOGETINFO *PMMIOGETINFO;
|
---|
| 570 | typedef WORD (APIENTRY MMIOCLOSE)( HMMIO, WORD);
|
---|
| 571 | typedef MMIOCLOSE *PMMIOCLOSE;
|
---|
[551] | 572 |
|
---|
[2] | 573 | #pragma pack()
|
---|
| 574 | #endif
|
---|
| 575 |
|
---|
| 576 | #ifdef DEFINE_GLOBALS
|
---|
[551] | 577 | #pragma data_seg(GLOBAL4)
|
---|
[2] | 578 | #endif
|
---|
[917] | 579 |
|
---|
[551] | 580 | DATADEF HSWITCH switches[499];
|
---|
| 581 | DATADEF ULONG numswitches;
|
---|
[2] | 582 |
|
---|
| 583 | #define priority_idle() DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L)
|
---|
| 584 | #define priority_normal() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L)
|
---|
| 585 | #define priority_tweaked() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)
|
---|
| 586 | #define priority_bumped() DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L)
|
---|
| 587 | #define priority_critical() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,2L,0L)
|
---|
| 588 | #define priority_max() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,31L,0L)
|
---|
| 589 | #define SysVal(value) WinQuerySysValue(HWND_DESKTOP, (value))
|
---|
[902] | 590 |
|
---|
| 591 | #endif // FM3DLL_H
|
---|