| [907] | 1 |  | 
|---|
|  | 2 | /*********************************************************************** | 
|---|
|  | 3 |  | 
|---|
| [1194] | 4 | $Id: avl.h 1220 2008-09-13 23:09:45Z jbs $ | 
|---|
| [907] | 5 |  | 
|---|
|  | 6 | avl common definitions | 
|---|
|  | 7 |  | 
|---|
|  | 8 | Copyright (c) 1993-98 M. Kimes | 
|---|
|  | 9 | Copyright (c) 2001, 2008 Steven H. Levine | 
|---|
|  | 10 |  | 
|---|
|  | 11 | 05 Jan 08 SHL Move avl.c definitions here | 
|---|
|  | 12 |  | 
|---|
|  | 13 | ***********************************************************************/ | 
|---|
|  | 14 |  | 
|---|
|  | 15 | #if !defined(AVL_H) | 
|---|
|  | 16 |  | 
|---|
|  | 17 | #define AVL_H | 
|---|
|  | 18 |  | 
|---|
|  | 19 | // #include <stdio.h>                   // FILE | 
|---|
|  | 20 | // #include <time.h>                    // time_t | 
|---|
|  | 21 |  | 
|---|
|  | 22 | #if !defined(OS2_INCLUDED) | 
|---|
|  | 23 | #define INCL_WINSTDCNR                  // CDATE | 
|---|
|  | 24 | #include <os2.h> | 
|---|
|  | 25 | #else | 
|---|
|  | 26 | #if !defined(INCL_WINSTDCNR) | 
|---|
|  | 27 | #error INCL_WINSTDCNR required | 
|---|
|  | 28 | #endif | 
|---|
|  | 29 | #endif | 
|---|
|  | 30 |  | 
|---|
|  | 31 | #if defined(__IBMC__) | 
|---|
|  | 32 | #if __IBMC__ != 430 | 
|---|
|  | 33 | #error VAC365 required for long long support | 
|---|
|  | 34 | #endif | 
|---|
|  | 35 | #if !defined(_LONG_LONG) | 
|---|
|  | 36 | #error Long long support not enabled | 
|---|
|  | 37 | #endif | 
|---|
|  | 38 | #endif | 
|---|
|  | 39 |  | 
|---|
|  | 40 | typedef struct __arc_type__ | 
|---|
|  | 41 | { | 
|---|
|  | 42 | CHAR *id;                     // User id | 
|---|
|  | 43 | CHAR *ext;                    // Extension (without leading dot) | 
|---|
|  | 44 | LONG file_offset;             // Offset to signature (0..n) | 
|---|
|  | 45 | CHAR *list;                   // List command | 
|---|
|  | 46 | CHAR *extract;                // Extract command | 
|---|
|  | 47 | CHAR *exwdirs;                // Extract with directories command | 
|---|
|  | 48 | CHAR *test;                   // Test command | 
|---|
|  | 49 | CHAR *create;                 // Create without directories | 
|---|
|  | 50 | CHAR *move;                   // Move into archive without directories | 
|---|
|  | 51 | CHAR *createrecurse;          // Create with recurse and directories | 
|---|
|  | 52 | CHAR *createwdirs;            // Create with directories | 
|---|
|  | 53 | CHAR *movewdirs;              // Move into archive with directories | 
|---|
|  | 54 | CHAR *delete;                 // Delete from archive | 
|---|
|  | 55 | CHAR *signature;              // Archiver signature | 
|---|
|  | 56 | CHAR *startlist;              // Listing start marker (blank means no start marker) | 
|---|
|  | 57 | CHAR *endlist;                // Listing end marker (blank means next blank line or EOF) | 
|---|
|  | 58 | INT siglen;                   // Signature length in bytes | 
|---|
|  | 59 | INT osizepos;                 // Original file size position (0..n) or -1 | 
|---|
|  | 60 | INT nsizepos;                 // Compressed file size position or -1 | 
|---|
|  | 61 | INT fdpos;                    // File date position or -1 | 
|---|
|  | 62 | INT fdflds;                   // File date element count (typically 3) or -1 | 
|---|
|  | 63 | INT fnpos;                    // File name position or -1 if last | 
|---|
|  | 64 | INT datetype;                 // Date field format | 
|---|
|  | 65 | UINT comment_line_num;        // Comment start in old sig file (1..n), 0 if none | 
|---|
|  | 66 | UINT defn_line_num;           // Definition start in old sig file (1..n), 0 if none | 
|---|
|  | 67 | BOOL nameislast;              // Name is last item on line | 
|---|
|  | 68 | BOOL nameisnext;              // File name is on next line | 
|---|
|  | 69 | BOOL nameisfirst;             // File name is first item on line | 
|---|
|  | 70 | struct __arc_type__ *next; | 
|---|
|  | 71 | struct __arc_type__ *prev; | 
|---|
|  | 72 | } | 
|---|
|  | 73 | ARC_TYPE; | 
|---|
|  | 74 |  | 
|---|
|  | 75 | typedef struct | 
|---|
|  | 76 | { | 
|---|
|  | 77 | ARC_TYPE *info; | 
|---|
|  | 78 | CHAR listname[CCHMAXPATH]; | 
|---|
|  | 79 | CHAR arcname[CCHMAXPATH]; | 
|---|
|  | 80 | CHAR *errmsg; | 
|---|
|  | 81 | } | 
|---|
|  | 82 | ARCDUMP; | 
|---|
|  | 83 |  | 
|---|
| [1220] | 84 | #define LINES_PER_ARCSIG        21      // Lines in each archiver.bb2 definition | 
|---|
|  | 85 |  | 
|---|
| [907] | 86 | ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig); | 
|---|
|  | 87 | ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig); | 
|---|
|  | 88 | INT load_archivers(VOID); | 
|---|
|  | 89 | BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime); | 
|---|
| [1181] | 90 | MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
| [1029] | 91 | VOID free_arc_type(ARC_TYPE * pat); | 
|---|
|  | 92 | VOID free_archivers(VOID); | 
|---|
| [907] | 93 |  | 
|---|
| [1204] | 94 | // Data declarations | 
|---|
|  | 95 | extern ARC_TYPE *arcsighead; | 
|---|
|  | 96 | extern UINT arcsigs_header_lines; | 
|---|
|  | 97 | extern UINT arcsigs_trailer_line_num; | 
|---|
|  | 98 | extern BOOL arcsigsloaded; | 
|---|
|  | 99 | extern BOOL arcsigsmodified; | 
|---|
| [907] | 100 |  | 
|---|
|  | 101 |  | 
|---|
|  | 102 | #endif // AVL_H | 
|---|