| [49] | 1 | 
 | 
|---|
 | 2 | /***********************************************************************
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 |   $Id: fm3dll.h 1403 2009-03-14 17:43:33Z gyoung $
 | 
|---|
 | 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
 | 
|---|
| [1218] | 87 |   xx Sep 08 JBS Ticket 187 (Refactor fm2dll.h): All function declarations and data
 | 
|---|
 | 88 |                 definitions/declarations moved to other include files.
 | 
|---|
| [1358] | 89 |   25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
 | 
|---|
 | 90 |   25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session
 | 
|---|
 | 91 |                 to prevent duplicate directory names in tree following a copy before initial scan.
 | 
|---|
| [49] | 92 | 
 | 
|---|
 | 93 | ***********************************************************************/
 | 
|---|
 | 94 | 
 | 
|---|
| [902] | 95 | #if !defined(FM3DLL_H)
 | 
|---|
 | 96 | 
 | 
|---|
 | 97 | #define FM3DLL_H
 | 
|---|
 | 98 | 
 | 
|---|
 | 99 | #include <stdio.h>                      // FILE
 | 
|---|
| [1218] | 100 | // #include <time.h>                    // time_t
 | 
|---|
| [902] | 101 | 
 | 
|---|
 | 102 | #if !defined(OS2_INCLUDED)
 | 
|---|
 | 103 | #define INCL_WINSTDDRAG
 | 
|---|
 | 104 | #define INCL_WINSTDCNR
 | 
|---|
 | 105 | #define INCL_WINPROGRAMLIST
 | 
|---|
 | 106 | #define INCL_WINHELP
 | 
|---|
| [907] | 107 | #define INCL_LONGLONG                   // 05 Jan 08 SHL fixme to be gone eventually
 | 
|---|
| [902] | 108 | #include <os2.h>
 | 
|---|
 | 109 | #else
 | 
|---|
 | 110 | #if !defined(INCL_WINSTDDRAG)
 | 
|---|
 | 111 | #error INCL_WINSTDDRAG required
 | 
|---|
 | 112 | #endif
 | 
|---|
 | 113 | #if !defined(INCL_WINSTDCNR)
 | 
|---|
 | 114 | #error INCL_WINSTDCNR required
 | 
|---|
 | 115 | #endif
 | 
|---|
 | 116 | #if !defined(INCL_WINPROGRAMLIST)
 | 
|---|
 | 117 | #error INCL_WINPROGRAMLIST required
 | 
|---|
 | 118 | #endif
 | 
|---|
 | 119 | #if !defined(INCL_WINHELP)
 | 
|---|
 | 120 | #error INCL_WINHELP required
 | 
|---|
 | 121 | #endif
 | 
|---|
| [907] | 122 | #if !defined(INCL_LONGLONG)
 | 
|---|
 | 123 | #error INCL_LONGLONG required
 | 
|---|
 | 124 | #endif
 | 
|---|
| [902] | 125 | #endif // OS2_INCLUDED
 | 
|---|
 | 126 | 
 | 
|---|
| [551] | 127 | #define DIR_SPLITBAR_OFFSET     18 * 12 /* Pixel offset of details splitbar */
 | 
|---|
| [751] | 128 | 
 | 
|---|
| [2] | 129 | #define ALLATTRS                (FILE_NORMAL | FILE_DIRECTORY | FILE_ARCHIVED |\
 | 
|---|
| [636] | 130 |                                  FILE_HIDDEN | FILE_READONLY | FILE_SYSTEM)
 | 
|---|
| [1082] | 131 | //#define LISTTEMPROOT            "$FM2LI$T"
 | 
|---|
| [2] | 132 | 
 | 
|---|
| [1218] | 133 | #define DRIVE_REMOVABLE     0x00000001
 | 
|---|
 | 134 | #define DRIVE_NOTWRITEABLE  0x00000002
 | 
|---|
 | 135 | #define DRIVE_IGNORE        0x00000004
 | 
|---|
 | 136 | #define DRIVE_CDROM         0x00000008
 | 
|---|
 | 137 | #define DRIVE_NOLONGNAMES   0x00000010
 | 
|---|
 | 138 | #define DRIVE_REMOTE        0x00000020
 | 
|---|
 | 139 | #define DRIVE_BOOT          0x00000040
 | 
|---|
 | 140 | #define DRIVE_INVALID       0x00000080
 | 
|---|
 | 141 | #define DRIVE_NOPRESCAN     0x00000100
 | 
|---|
 | 142 | #define DRIVE_ZIPSTREAM     0x00000200
 | 
|---|
 | 143 | #define DRIVE_NOLOADICONS   0x00000400
 | 
|---|
 | 144 | #define DRIVE_NOLOADSUBJS   0x00000800
 | 
|---|
 | 145 | #define DRIVE_NOLOADLONGS   0x00001000
 | 
|---|
 | 146 | #define DRIVE_SLOW          0x00002000
 | 
|---|
 | 147 | #define DRIVE_INCLUDEFILES  0x00004000
 | 
|---|
 | 148 | #define DRIVE_VIRTUAL       0x00008000
 | 
|---|
 | 149 | #define DRIVE_NOSTATS       0x00010000
 | 
|---|
 | 150 | #define DRIVE_RAMDISK       0x00020000
 | 
|---|
| [1354] | 151 | #define DRIVE_WRITEVERIFYOFF 0x00040000
 | 
|---|
 | 152 | #define DRIVE_RSCANNED      0x00080000
 | 
|---|
| [2] | 153 | 
 | 
|---|
| [1218] | 154 | #define SORT_FIRSTEXTENSION 0x00000001
 | 
|---|
 | 155 | #define SORT_LASTEXTENSION  0x00000002
 | 
|---|
 | 156 | #define SORT_SIZE           0x00000004
 | 
|---|
 | 157 | #define SORT_EASIZE         0x00000008
 | 
|---|
 | 158 | #define SORT_LWDATE         0x00000010
 | 
|---|
 | 159 | #define SORT_LADATE         0x00000020
 | 
|---|
 | 160 | #define SORT_CRDATE         0x00000040
 | 
|---|
 | 161 | #define SORT_DIRSFIRST      0x00000080
 | 
|---|
 | 162 | #define SORT_DIRSLAST       0x00000100
 | 
|---|
 | 163 | #define SORT_FILENAME       0x00000200
 | 
|---|
 | 164 | #define SORT_REVERSE        0x00000400
 | 
|---|
 | 165 | #define SORT_PATHNAME       0x00000800
 | 
|---|
 | 166 | #define SORT_NOSORT         0x00001000
 | 
|---|
 | 167 | #define SORT_SUBJECT        0x00002000
 | 
|---|
| [2] | 168 | 
 | 
|---|
 | 169 | 
 | 
|---|
 | 170 | #define RECFLAGS_ENV      0x00000001
 | 
|---|
 | 171 | #define RECFLAGS_NODRAG   0x00000002
 | 
|---|
 | 172 | #define RECFLAGS_NODROP   0x00000004
 | 
|---|
 | 173 | #define RECFLAGS_UNDERENV 0x00000008
 | 
|---|
 | 174 | 
 | 
|---|
| [551] | 175 | #define COPY 0
 | 
|---|
 | 176 | #define MOVE 1
 | 
|---|
 | 177 | #define WPSCOPY 2
 | 
|---|
 | 178 | #define WPSMOVE 4
 | 
|---|
 | 179 | 
 | 
|---|
| [789] | 180 | #define FILESTOGET_MIN  256
 | 
|---|
 | 181 | #define FILESTOGET_MAX  4096
 | 
|---|
 | 182 | 
 | 
|---|
| [2] | 183 | #define priority_idle()     DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L)
 | 
|---|
 | 184 | #define priority_normal()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L)
 | 
|---|
| [1218] | 185 | // #define priority_tweaked()  DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)                 // Unused, 13 Sep 08 JBS
 | 
|---|
| [2] | 186 | #define priority_bumped()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L)
 | 
|---|
| [1325] | 187 | // #define priority_critical() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,2L,0L)        // Unused, 13 Sep 08 JBS
 | 
|---|
| [1218] | 188 | // #define priority_max()      DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,31L,0L)       // Unused, 13 Sep 08 JBS
 | 
|---|
 | 189 | 
 | 
|---|
 | 190 | #define INSTDATA(h)         WinQueryWindowPtr((h),QWL_USER)
 | 
|---|
 | 191 | // #define RGBFROMPARTS(r,g,b)     (((r) * 65536) + ((g) * 256) + (b))  // Unused, 13 Sep 08 JBS
 | 
|---|
| [2] | 192 | #define SysVal(value)       WinQuerySysValue(HWND_DESKTOP, (value))
 | 
|---|
| [902] | 193 | 
 | 
|---|
| [1218] | 194 | 
 | 
|---|
| [902] | 195 | #endif // FM3DLL_H
 | 
|---|