| 1 |  | 
|---|
| 2 | /*********************************************************************** | 
|---|
| 3 |  | 
|---|
| 4 | $Id: fm3dll.h 1325 2008-12-09 00:01:05Z gyoung $ | 
|---|
| 5 |  | 
|---|
| 6 | Common definitions | 
|---|
| 7 |  | 
|---|
| 8 | Copyright (c) 1993-98 M. Kimes | 
|---|
| 9 | Copyright (c) 2001, 2008 Steven H. Levine | 
|---|
| 10 |  | 
|---|
| 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 | 
|---|
| 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 | 
|---|
| 22 | 28 May 05 SHL Drop local functions | 
|---|
| 23 | 06 Jun 05 SHL Use QWL_USER | 
|---|
| 24 | 11 Aug 05 SHL Renames | 
|---|
| 25 | 29 May 06 SHL Rework EditArchiverDefinition | 
|---|
| 26 | 16 Jun 06 SHL ARC_TYPE: support non-string signatures | 
|---|
| 27 | 26 Jun 06 SHL ARC_TYPE: support preserving comments | 
|---|
| 28 | 28 Jun 06 SHL DIRCNRDATA: drop unused | 
|---|
| 29 | 05 Jul 06 SHL Support Hide not selected | 
|---|
| 30 | 13 Jul 06 SHL Add Runtime_Error | 
|---|
| 31 | 22 Jul 06 SHL Add memory.c functions | 
|---|
| 32 | 26 Jul 06 SHL Add strips.c functions | 
|---|
| 33 | 26 Jul 06 SHL Add more error.c functions | 
|---|
| 34 | 29 Jul 06 SHL Add xfgets, xfgets_bstripcr | 
|---|
| 35 | 22 Oct 06 GKY Add NDFS32 support | 
|---|
| 36 | 03 Nov 06 SHL Renames | 
|---|
| 37 | 17 Jan 07 SHL Resize extractdir | 
|---|
| 38 | 17 Feb 07 GKY Add more file system types | 
|---|
| 39 | 17 Feb 07 GKY Add SelectDriveIcon to streamline update.c | 
|---|
| 40 | 18 Mar 07 GKY Add MM import typedefines for fix for files misindentified as multimedia | 
|---|
| 41 | 30 Mar 07 GKY Defined golbals for removing GetPString for window class names | 
|---|
| 42 | 06 Apr 07 GKY Work around PM DragInfo and DrgFreeDISH limits NumItemsToUnhilite & DeleteDragitemStrHandles | 
|---|
| 43 | 06 Apr 07 GKY Add some error checking in drag/drop | 
|---|
| 44 | 19 Apr 07 SHL Rework DeleteDragitemStrHandles to be FreeDragInfoData | 
|---|
| 45 | 19 Apr 07 SHL Add DbgMsg.  Sync with AcceptOneDrop GetOneDrop mods. | 
|---|
| 46 | 21 Apr 07 GKY Find FM2Utils by path or utils directory eliminate fAddUtils global | 
|---|
| 47 | 23 Apr 07 SHL Add Win_Error_NoMsgBox | 
|---|
| 48 | 12 May 07 SHL Add ulItemsToUnHilite to DIRCNRDATA, pass to Unhilite as arg | 
|---|
| 49 | 05 Jun 07 SHL Update for OpenWatcom | 
|---|
| 50 | 10 Jun 07 GKY Add CheckPmDrgLimit including IsFm2Window as part of work around PM drag limit | 
|---|
| 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 | 
|---|
| 53 | 22 Jul 07 GKY Update CNRITEM to optimize RAM usage | 
|---|
| 54 | 23 Jul 07 SHL More CNRITEM updates (ticket#24) | 
|---|
| 55 | 01 Aug 07 SHL More CNRITEM and ARCITEM updates (ticket#24) | 
|---|
| 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 | 
|---|
| 60 | 19 Aug 07 SHL Move FILESTOGET_MIN/MAX here | 
|---|
| 61 | 19 Aug 07 SHL Update SaveDirCnrState return | 
|---|
| 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 | 
|---|
| 64 | 04 Nov 07 GKY Add pszFmtFileSize to CNRITEM to display large file sizes | 
|---|
| 65 | 10 Nov 07 GKY Add ThousandSeparator variable for file sizes NLS tseparator. | 
|---|
| 66 | 22 Nov 07 GKY Use CopyPresParams in CheckMenu to fix presparam inconsistencies in menus | 
|---|
| 67 | 17 Dec 07 GKY Add variables for using WPURLDEFAULTSETTINGS as the fall back for ftphttprun | 
|---|
| 68 | 29 Dec 07 GKY Add remove_first_occurence_of_character | 
|---|
| 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 | 
|---|
| 71 | 04 Jan 08 SHL Allow standalone usage | 
|---|
| 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 | 
|---|
| 77 | 10 Jan 08 SHL Add UM_FIRSTTIME | 
|---|
| 78 | 12 Jan 08 SHL Localize SpecialSelect to comp.c | 
|---|
| 79 | 14 Feb 08 SHL Refactor CfgDlgProc to notebook.h | 
|---|
| 80 | 29 Feb 08 GKY Refactor global command line variables to notebook.h | 
|---|
| 81 | 22 Jun 08 GKY Changed some variable types to fix compiler warnings | 
|---|
| 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. | 
|---|
| 85 | 16 JUL 08 GKY Use TMP directory for temp files | 
|---|
| 86 | 19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use MakeTempName; Remove LISTTEMPROOT | 
|---|
| 87 | xx Sep 08 JBS Ticket 187 (Refactor fm2dll.h): All function declarations and data | 
|---|
| 88 | definitions/declarations moved to other include files. | 
|---|
| 89 |  | 
|---|
| 90 | ***********************************************************************/ | 
|---|
| 91 |  | 
|---|
| 92 | #if !defined(FM3DLL_H) | 
|---|
| 93 |  | 
|---|
| 94 | #define FM3DLL_H | 
|---|
| 95 |  | 
|---|
| 96 | #include <stdio.h>                      // FILE | 
|---|
| 97 | // #include <time.h>                    // time_t | 
|---|
| 98 |  | 
|---|
| 99 | #if !defined(OS2_INCLUDED) | 
|---|
| 100 | #define INCL_WINSTDDRAG | 
|---|
| 101 | #define INCL_WINSTDCNR | 
|---|
| 102 | #define INCL_WINPROGRAMLIST | 
|---|
| 103 | #define INCL_WINHELP | 
|---|
| 104 | #define INCL_LONGLONG                   // 05 Jan 08 SHL fixme to be gone eventually | 
|---|
| 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 | 
|---|
| 119 | #if !defined(INCL_LONGLONG) | 
|---|
| 120 | #error INCL_LONGLONG required | 
|---|
| 121 | #endif | 
|---|
| 122 | #endif // OS2_INCLUDED | 
|---|
| 123 |  | 
|---|
| 124 | #if defined(__IBMC__) | 
|---|
| 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 | 
|---|
| 131 | #endif | 
|---|
| 132 |  | 
|---|
| 133 | #define DIR_SPLITBAR_OFFSET     18 * 12 /* Pixel offset of details splitbar */ | 
|---|
| 134 |  | 
|---|
| 135 | #define ALLATTRS                (FILE_NORMAL | FILE_DIRECTORY | FILE_ARCHIVED |\ | 
|---|
| 136 | FILE_HIDDEN | FILE_READONLY | FILE_SYSTEM) | 
|---|
| 137 | //#define LISTTEMPROOT            "$FM2LI$T" | 
|---|
| 138 |  | 
|---|
| 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 | 
|---|
| 157 |  | 
|---|
| 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 | 
|---|
| 172 |  | 
|---|
| 173 |  | 
|---|
| 174 | #define RECFLAGS_ENV      0x00000001 | 
|---|
| 175 | #define RECFLAGS_NODRAG   0x00000002 | 
|---|
| 176 | #define RECFLAGS_NODROP   0x00000004 | 
|---|
| 177 | #define RECFLAGS_UNDERENV 0x00000008 | 
|---|
| 178 |  | 
|---|
| 179 | #define COPY 0 | 
|---|
| 180 | #define MOVE 1 | 
|---|
| 181 | #define WPSCOPY 2 | 
|---|
| 182 | #define WPSMOVE 4 | 
|---|
| 183 |  | 
|---|
| 184 | #define FILESTOGET_MIN  256 | 
|---|
| 185 | #define FILESTOGET_MAX  4096 | 
|---|
| 186 |  | 
|---|
| 187 | #define priority_idle()     DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L) | 
|---|
| 188 | #define priority_normal()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L) | 
|---|
| 189 | // #define priority_tweaked()  DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)                 // Unused, 13 Sep 08 JBS | 
|---|
| 190 | #define priority_bumped()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L) | 
|---|
| 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 | 
|---|
| 196 | #define SysVal(value)       WinQuerySysValue(HWND_DESKTOP, (value)) | 
|---|
| 197 |  | 
|---|
| 198 |  | 
|---|
| 199 | #endif // FM3DLL_H | 
|---|