| 1 |  | 
|---|
| 2 | /*********************************************************************** | 
|---|
| 3 |  | 
|---|
| 4 | $Id: avl.h 1403 2009-03-14 17:43:33Z gyoung $ | 
|---|
| 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 | typedef struct __arc_type__ | 
|---|
| 32 | { | 
|---|
| 33 | CHAR *id;                     // User id | 
|---|
| 34 | CHAR *ext;                    // Extension (without leading dot) | 
|---|
| 35 | LONG file_offset;             // Offset to signature (0..n) | 
|---|
| 36 | CHAR *list;                   // List command | 
|---|
| 37 | CHAR *extract;                // Extract command | 
|---|
| 38 | CHAR *exwdirs;                // Extract with directories command | 
|---|
| 39 | CHAR *test;                   // Test command | 
|---|
| 40 | CHAR *create;                 // Create without directories | 
|---|
| 41 | CHAR *move;                   // Move into archive without directories | 
|---|
| 42 | CHAR *createrecurse;          // Create with recurse and directories | 
|---|
| 43 | CHAR *createwdirs;            // Create with directories | 
|---|
| 44 | CHAR *movewdirs;              // Move into archive with directories | 
|---|
| 45 | CHAR *delete;                 // Delete from archive | 
|---|
| 46 | CHAR *signature;              // Archiver signature | 
|---|
| 47 | CHAR *startlist;              // Listing start marker (blank means no start marker) | 
|---|
| 48 | CHAR *endlist;                // Listing end marker (blank means next blank line or EOF) | 
|---|
| 49 | INT siglen;                   // Signature length in bytes | 
|---|
| 50 | INT osizepos;                 // Original file size position (0..n) or -1 | 
|---|
| 51 | INT nsizepos;                 // Compressed file size position or -1 | 
|---|
| 52 | INT fdpos;                    // File date position or -1 | 
|---|
| 53 | INT fdflds;                   // File date element count (typically 3) or -1 | 
|---|
| 54 | INT fnpos;                    // File name position or -1 if last | 
|---|
| 55 | INT datetype;                 // Date field format | 
|---|
| 56 | UINT comment_line_num;        // Comment start in old sig file (1..n), 0 if none | 
|---|
| 57 | UINT defn_line_num;           // Definition start in old sig file (1..n), 0 if none | 
|---|
| 58 | BOOL nameislast;              // Name is last item on line | 
|---|
| 59 | BOOL nameisnext;              // File name is on next line | 
|---|
| 60 | BOOL nameisfirst;             // File name is first item on line | 
|---|
| 61 | struct __arc_type__ *next; | 
|---|
| 62 | struct __arc_type__ *prev; | 
|---|
| 63 | } | 
|---|
| 64 | ARC_TYPE; | 
|---|
| 65 |  | 
|---|
| 66 | typedef struct | 
|---|
| 67 | { | 
|---|
| 68 | ARC_TYPE *info; | 
|---|
| 69 | CHAR listname[CCHMAXPATH]; | 
|---|
| 70 | CHAR arcname[CCHMAXPATH]; | 
|---|
| 71 | CHAR *errmsg; | 
|---|
| 72 | } | 
|---|
| 73 | ARCDUMP; | 
|---|
| 74 |  | 
|---|
| 75 | #define LINES_PER_ARCSIG        21      // Lines in each archiver.bb2 definition | 
|---|
| 76 |  | 
|---|
| 77 | ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig); | 
|---|
| 78 | ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig); | 
|---|
| 79 | INT load_archivers(VOID); | 
|---|
| 80 | BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime); | 
|---|
| 81 | MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
| 82 | VOID free_arc_type(ARC_TYPE * pat); | 
|---|
| 83 | # ifdef FORTIFY | 
|---|
| 84 | VOID free_archivers(VOID); | 
|---|
| 85 | #endif | 
|---|
| 86 |  | 
|---|
| 87 | // Data declarations | 
|---|
| 88 | extern ARC_TYPE *arcsighead; | 
|---|
| 89 | extern UINT arcsigs_header_lines; | 
|---|
| 90 | extern UINT arcsigs_trailer_line_num; | 
|---|
| 91 | extern BOOL arcsigsloaded; | 
|---|
| 92 | extern BOOL arcsigsmodified; | 
|---|
| 93 |  | 
|---|
| 94 |  | 
|---|
| 95 | #endif // AVL_H | 
|---|