source: trunk/dll/avl.h@ 1321

Last change on this file since 1321 was 1321, checked in by Steven Levine, 17 years ago

Rework casts variable types for OpenWatcom 1.8 compatibility
Add more FORTIFY support

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1
2/***********************************************************************
3
4 $Id: avl.h 1321 2008-12-07 01:48:06Z stevenhl $
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
40typedef 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}
73ARC_TYPE;
74
75typedef struct
76{
77 ARC_TYPE *info;
78 CHAR listname[CCHMAXPATH];
79 CHAR arcname[CCHMAXPATH];
80 CHAR *errmsg;
81}
82ARCDUMP;
83
84#define LINES_PER_ARCSIG 21 // Lines in each archiver.bb2 definition
85
86ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig);
87ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig);
88INT load_archivers(VOID);
89BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime);
90MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
91VOID free_arc_type(ARC_TYPE * pat);
92# ifdef FORTIFY
93VOID free_archivers(VOID);
94#endif
95
96// Data declarations
97extern ARC_TYPE *arcsighead;
98extern UINT arcsigs_header_lines;
99extern UINT arcsigs_trailer_line_num;
100extern BOOL arcsigsloaded;
101extern BOOL arcsigsmodified;
102
103
104#endif // AVL_H
Note: See TracBrowser for help on using the repository browser.