Changeset 1218


Ignore:
Timestamp:
Sep 14, 2008, 1:07:01 AM (17 years ago)
Author:
John Small
Message:

Ticket 187: Reorganized to contian "global" #define's (primarily)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/fm3dll.h

    r1208 r1218  
    8585  16 JUL 08 GKY Use TMP directory for temp files
    8686  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 moved to other include files.
     87  xx Sep 08 JBS Ticket 187 (Refactor fm2dll.h): All function declarations and data
     88                definitions/declarations moved to other include files.
    8889
    8990***********************************************************************/
     
    9495
    9596#include <stdio.h>                      // FILE
    96 #include <time.h>                       // time_t
     97// #include <time.h>                    // time_t
    9798
    9899#if !defined(OS2_INCLUDED)
     
    130131#endif
    131132
    132 #include "dircnrs.h"    // 05 Jan 08 SHL fixme to be gone when DIRCNRDATA refs gone
    133 #include "makelist.h"   // 05 Jan 08 SHL fixme to be gone when LISTINFO refs gone
    134 #include "command.h"    // 01 Mar 08 GKY fixme to be gone when LINKCMDS refs gone
    135 
    136 #ifdef DEFINE_GLOBALS
    137 #pragma data_seg(GLOBAL1)
    138 #endif
    139 
    140 #define PP_MAX    PP_MENUDISABLEBGNDCOLORINDEX
    141 #define PP_MAXBUF 384
    142 
    143 #ifndef MM_PORTHOLEINIT
    144 #define MM_PORTHOLEINIT   0x01fb
    145 #endif
    146 #ifndef MS_POPUP
    147 #define MS_POPUP          0x00000010L
    148 #endif
    149 #ifndef CCS_MINIICONS
    150 #define CCS_MINIICONS     0x0800
    151 #endif
    152 #ifndef CRA_SOURCE
    153 #define CRA_SOURCE        0x00004000
    154 #endif
    155 #ifndef CV_EXACTMATCH
    156 #define CV_EXACTMATCH     0x10000000
    157 #endif
    158 #ifndef CBN_SETFOCUS
    159 #define CBN_SETFOCUS      20
    160 #endif
    161 #ifndef CBN_KILLFOCUS
    162 #define CBN_KILLFOCUS     21
    163 #endif
    164 #ifndef CN_VERIFYEDIT
    165 #define CN_VERIFYEDIT     134
    166 #endif
    167 #ifndef CN_PICKUP
    168 #define CN_PICKUP         135
    169 #endif
    170 #ifndef CN_DROPNOTIFY
    171 #define CN_DROPNOTIFY     136
    172 #endif
    173 #ifndef CN_GRIDRESIZED
    174 #define CN_GRIDRESIZED    137
    175 #endif
    176 #ifndef BKS_MERLINSTYLE
    177 #define BKS_MERLINSTYLE   0x0800
    178 #endif
    179 
    180 // PMBITMAP_INCLUDED - IBM Toolkit
    181 // INCL_GPIBITMAPS - OpenWatcom Toolkit
    182 #if !defined(PMBITMAP_INCLUDED) && !defined(INCL_GPIBITMAPS)
    183 typedef struct _RGB2            /* rgb2 */
    184 {
    185   BYTE bBlue;                   /* Blue component of the color definition */
    186   BYTE bGreen;                  /* Green component of the color definition */
    187   BYTE bRed;                    /* Red component of the color definition  */
    188   BYTE fcOptions;               /* Reserved, must be zero                 */
    189 }
    190 RGB2;
    191 typedef RGB2 *PRGB2;
    192 #endif
    193 
    194 #define LINES_PER_ARCSIG        21      // Lines in each archiver.bb2 definition
    195 #define CON_COLS                6
    196 #define INSTDATA(h)             WinQueryWindowPtr((h),QWL_USER)
    197133#define DIR_SPLITBAR_OFFSET     18 * 12 /* Pixel offset of details splitbar */
    198 #define CONTAINER_COLUMNS       13      /* Number of columns in details view */
    199 #define RGBFROMPARTS(r,g,b)     (((r) * 65536) + ((g) * 256) + (b))
    200 
    201 #define EXTRA_RECORD_BYTES      (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
    202 #define EXTRA_ARCRECORD_BYTES   (sizeof(ARCITEM) - sizeof(MINIRECORDCORE))
    203134
    204135#define ALLATTRS                (FILE_NORMAL | FILE_DIRECTORY | FILE_ARCHIVED |\
     
    206137//#define LISTTEMPROOT            "$FM2LI$T"
    207138
    208 #include "fm3dll2.h"
     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
    209157
    210 #define UM_PAINT            (WM_USER)
    211 #define UM_SETUP            (WM_USER + 1)
    212 #define UM_RESCAN           (WM_USER + 2)
    213 #define UM_INITIALSIZE      (WM_USER + 3)
    214 #define UM_CONTROL          (WM_USER + 4)
    215 #define UM_COMMAND          (WM_USER + 5)
    216 #define UM_SIZE             (WM_USER + 6)
    217 #define UM_FOCUSME          (WM_USER + 7)
    218 #define UM_FIXEDITNAME      (WM_USER + 8)
    219 #define UM_UPDATERECORD     (WM_USER + 9)
    220 #define UM_SETDIR           (WM_USER + 10)
    221 #define UM_CONTAINER_FILLED (WM_USER + 11)
    222 #define UM_STRETCH          (WM_USER + 12)
    223 #define UM_LOADFILE         (WM_USER + 13)
    224 #define UM_MOUSEMOVE        (WM_USER + 14)
    225 #define UM_ENTER            (WM_USER + 15)
    226 #define UM_CLOSE            (WM_USER + 16)
    227 #define UM_ACTION           (WM_USER + 17)
    228 #define UM_MASSACTION       (WM_USER + 18)
    229 #define UM_UPDATERECORDLIST (WM_USER + 19)
    230 #define UM_FILESMENU        (WM_USER + 20)
    231 #define UM_SELECT           (WM_USER + 21)
    232 #define UM_VIEWSMENU        (WM_USER + 22)
    233 #define UM_CONTAINERHWND    (WM_USER + 23)
    234 #define UM_OPENWINDOWFORME  (WM_USER + 24)
    235 #define UM_FOLDUP           (WM_USER + 25)
    236 #define UM_INITMENU         (WM_USER + 26)
    237 #define UM_COMPARE          (WM_USER + 27)
    238 #define UM_EXPAND           (WM_USER + 28)
    239 #define UM_REPLACEFOCUS     (WM_USER + 29)
    240 #define UM_UNDO             (WM_USER + 30)
    241 #define UM_RENDER           (WM_USER + 31)
    242 #define UM_BUTTON2DOWN      (WM_USER + 32)
    243 #define UM_BUTTON2UP        (WM_USER + 33)
    244 #define UM_COLLECTFROMFILE  (WM_USER + 34)
    245 #define UM_TIMER            (WM_USER + 35)
    246 #define UM_HELPON           (WM_USER + 36)
    247 #define UM_SETUP2           (WM_USER + 37)
    248 #define UM_SETUP3           (WM_USER + 38)
    249 #define UM_CONTEXTMENU      (WM_USER + 39)
    250 #define UM_FILLUSERLIST     (WM_USER + 40)
    251 #define UM_CONTAINERDIR     (WM_USER + 41)
    252 #define UM_SETUP4           (WM_USER + 42)
    253 #define UM_FILLSETUPLIST    (WM_USER + 43)
    254 #define UM_ARRANGEICONS     (WM_USER + 44)
    255 #define UM_SETUP5           (WM_USER + 45)
    256 #define UM_NOTIFY           (WM_USER + 46)
    257 #define UM_INSERTRECORD     (WM_USER + 47)
    258 #define UM_ADDTOMENU        (WM_USER + 48)
    259 #define UM_COLLECT          (WM_USER + 49)
    260 #define UM_RESTOREDC        (WM_USER + 50)
    261 #define UM_MINIMIZE         (WM_USER + 51)
    262 #define UM_MAXIMIZE         (WM_USER + 52)
    263 #define UM_BUTTON1MOTIONSTART (WM_USER + 53)
    264 #define UM_SETUP6           (WM_USER + 54)
    265 #define UM_FILLBUTTONLIST   (WM_USER + 55)
    266 #define UM_SETUSERLISTNAME  (WM_USER + 56)
    267 #define UM_FILTER           (WM_USER + 57)
    268 #define UM_SORTRECORD       (WM_USER + 58)
    269 #define UM_SIZE2            (WM_USER + 59)
    270 #define UM_RESTORE          (WM_USER + 60)
    271 #define UM_TOPDIR           (WM_USER + 61)
    272 #define UM_SHOWME           (WM_USER + 62)
    273 #define UM_RESCAN2          (WM_USER + 63)
    274 #define UM_BUILDDRIVEBAR    (WM_USER + 64)
    275 #define UM_THREADUSE        (WM_USER + 65)
    276 #define UM_DRIVECMD         (WM_USER + 66)
    277 #define UM_ADVISEFOCUS      (WM_USER + 67)
    278 #define UM_FIXCNRMLE        (WM_USER + 68)
    279 #define UM_FLESH            (WM_USER + 69)
    280 #define UM_FILLCMDLIST      (WM_USER + 70)
    281 #define UM_CLICKED          (WM_USER + 71)
    282 #define UM_CLICKED3         (WM_USER + 72)
    283 #define UM_HIDENOTSELECTED  (WM_USER + 73)
    284 #define UM_FIRSTTIME        (WM_USER + 74)
     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
    285172
    286 typedef struct
    287 {
    288   USHORT size;
    289   USHORT dummy;
    290   CHAR szCurrentPath1[CCHMAXPATH];
    291   CHAR szCurrentPath2[CCHMAXPATH];
    292 }
    293 WALK2;
    294 
    295 typedef struct LINKDIRS
    296 {
    297   CHAR *path;
    298   struct LINKDIRS *next;
    299 }
    300 LINKDIRS;
    301 
    302 typedef struct
    303 {
    304   USHORT size;
    305   USHORT numcolors;
    306   USHORT flags;
    307   USHORT currentcolor;
    308   ULONG prompt;
    309   long *colors;
    310   ULONG descriptions;
    311   long *origs;
    312 }
    313 COLORS;
    314 
    315 typedef struct
    316 {
    317   CHAR *title;                  /* title of dialog */
    318   CHAR *prompt;                 /* prompt to user */
    319   CHAR *ret;                    /* buffer out, default in */
    320   CHAR *help;                   /* help text */
    321   INT inputlen;                 /* max len of ret */
    322 }
    323 STRINGINPARMS;
    324 
    325 typedef struct
    326 {
    327   CHAR *source;
    328   CHAR target[CCHMAXPATH];
    329   BOOL rename;
    330   BOOL skip;
    331   BOOL dontask;
    332   BOOL overold;
    333   BOOL overnew;
    334   BOOL overwrite;
    335 }
    336 MOVEIT;
    337 
    338 typedef struct HOLDFEA
    339 {
    340   PFEA2 pfea;
    341   CHAR *name;
    342   CHAR *value;
    343   BYTE fEA;
    344   BYTE cbName;
    345   USHORT cbValue;
    346   struct HOLDFEA *next;
    347 }
    348 HOLDFEA;
    349 
    350 typedef struct
    351 {
    352   USHORT size;
    353   USHORT dummy;
    354   CHAR directory[CCHMAXPATH];
    355   HWND hwndParent;
    356   HWND hwndFrame;
    357   HWND hwndClient;
    358   HWND hwndCnr;
    359   LISTINFO *li;
    360 }
    361 WORKER;
    362 
    363 typedef struct
    364 {
    365   USHORT size;
    366   ULONG flags;
    367   ULONG cmd;
    368   USHORT dummy;
    369   CHAR *prompt;
    370   CHAR **list;
    371 }
    372 CHECKLIST;
    373 
    374 typedef struct
    375 {
    376   ULONG flags;
    377   CHAR *commandline;
    378   CHAR path[CCHMAXPATH];
    379   CHAR environment[1001];
    380   CHAR tempprompt[128];
    381   CHAR title[80];
    382   BOOL dropped;
    383 }
    384 EXECARGS;
    385 
    386 #pragma pack(1)
    387 
    388 // Compare directory flags
    389 #define CNRITEM_SMALLER   0x00010000    // file exists in both containers and this one is smaller
    390 #define CNRITEM_LARGER    0x00020000
    391 #define CNRITEM_NEWER     0x00040000
    392 #define CNRITEM_OLDER     0x00080000
    393 #define CNRITEM_EXISTS    0x00100000    // file exists in both containers
    394173
    395174#define RECFLAGS_ENV      0x00000001
     
    398177#define RECFLAGS_UNDERENV 0x00000008
    399178
    400 #define ARCFLAGS_REALDIR    0x00000001
    401 #define ARCFLAGS_PSEUDODIR  0x00000002
    402 
    403 typedef struct _ARCITEM
    404 {                               // ARCHIVE CONTAINER RECORD STRUCTURE
    405   MINIRECORDCORE rc;            // Base information
    406   HWND hwndCnr;                 /* Container holding this record */
    407   PSZ pszFileName;              // Points to full path name or NullStr
    408   PSZ pszDisplayName;           // Points to displayable part of path name  - used by CFA_STRING
    409   CHAR szDate[40];              // File's assembled date
    410   PSZ pszDate;                  // Pointer to date
    411   CDATE date;                   // if we know date format
    412   CTIME time;                   // if we know time format
    413   ULONGLONG cbFile;             // File's original size
    414   ULONGLONG cbComp;             // File's compressed size
    415   ULONG flags;
    416 }
    417 ARCITEM, *PARCITEM;
    418 
    419 #pragma pack()
    420 
    421 typedef struct
    422 {
    423   USHORT size;
    424   ARC_TYPE *info;
    425   CHAR *arcname;
    426   CHAR masks[257];
    427   CHAR command[257];
    428   CHAR extractdir[CCHMAXPATH];
    429   INT ret;
    430 }
    431 EXTRDATA;
    432 
    433179#define COPY 0
    434180#define MOVE 1
     
    436182#define WPSMOVE 4
    437183
    438 /* systemf.c */
    439 // #if defined(__IBMC__)
    440 // /* fsopen.c */
    441 // FILE *_fsopen(CHAR * filename, CHAR * mode, INT sharemode, ...);
    442 // #endif
    443 
    444 //=====================================================================
    445 
    446 
    447184#define FILESTOGET_MIN  256
    448185#define FILESTOGET_MAX  4096
    449186
     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
    450193
    451 #ifdef INCL_MMIOOS2
    452 #pragma pack(4)
    453 /* definitions for MMPM/2 imports */
    454 typedef DWORD(APIENTRY MMIOIDENTIFYFILE) (PSZ, PMMIOINFO, PMMFORMATINFO,
    455                                           PFOURCC, DWORD, DWORD);
    456 typedef MMIOIDENTIFYFILE *PMMIOIDENTIFYFILE;
    457 typedef DWORD(APIENTRY MMIOOPEN)( PSZ, PMMIOINFO, DWORD);
    458 typedef MMIOOPEN *PMMIOOPEN;
    459 typedef WORD (APIENTRY MMIOGETINFO)( HMMIO, PMMIOINFO, WORD);
    460 typedef MMIOGETINFO *PMMIOGETINFO;
    461 typedef WORD (APIENTRY MMIOCLOSE)( HMMIO, WORD);
    462 typedef MMIOCLOSE *PMMIOCLOSE;
    463 
    464 #pragma pack()
    465 #endif
     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))
    466197
    467198
    468 #define priority_idle()     DosSetPriority(PRTYS_THREAD,PRTYC_IDLETIME,30L,0L)
    469 #define priority_normal()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,0L,0L)
    470 #define priority_tweaked()  DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,1L,0L)
    471 #define priority_bumped()   DosSetPriority(PRTYS_THREAD,PRTYC_REGULAR,3L,0L)
    472 #define priority_critical() DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,2L,0L)
    473 #define priority_max()      DosSetPriority(PRTYS_THREAD,PRTYC_FOREGROUNDSERVER,31L,0L)
    474 #define SysVal(value)       WinQuerySysValue(HWND_DESKTOP, (value))
    475 
    476199#endif // FM3DLL_H
Note: See TracChangeset for help on using the changeset viewer.