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