-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDBA.H
More file actions
60 lines (50 loc) · 1.38 KB
/
Copy pathDBA.H
File metadata and controls
60 lines (50 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* https://www.oocities.org/geoff_wass/dBASE/GaryWhite/dBASE/FAQ/qformt.htm */
struct TbHDR {
char flags;
char datemark[3];
uint32_t num_rec;
uint16_t hdr_siz;
uint16_t rec_siz;
uint16_t reserved1;
char tx_pend; /* reserved before dBASE IV 2.0 */
char crypt; /* reserved before dBASE IV 2.0 */
uint32_t reserved2[3]; /* reserved for multi-user env */
/* reserved before dBASE IV 2.0 */
char mdx_flag;
char drv_id;
uint16_t reserved3;
/* end for dBASE III PLUS */
/*char drv_name[32];
uint32_t reserved4;*/
};
struct TbCOLDEF {
char name[11];
char type;
uint32_t dataaddr;
uint8_t len;
char dec_cnt;
uint16_t reserved1; /* Reserved for dBASE III PLUS on a LAN. */
char workarea;
char reserved2[2]; /* Reserved for dBASE III PLUS on a LAN. */
char set_fiel;
char reserved3[8];
};
#ifdef __GNUC__
_Static_assert(sizeof(struct TbHDR) == 32, "Unexpected size of struct TbHDR");
_Static_assert(sizeof(struct TbCOLDEF) == 32, "Unexpected size of struct TbCOLDEF");
#endif
/* maximum column length (no source, our limit) */
#define COL_LEN 255
/* maximum record length (arbitrary limit because allocated statically for now) */
#define REC_LEN 255
/* maximum column count */
#define MAX_COLS 8
/* table handle */
struct TbH {
struct TbHDR hdr;
struct TbCOLDEF cols[MAX_COLS];
int handle;
int ncols;
int col_ofs[MAX_COLS];
};
#define TO_IDUMP 1 /* Info Dump on table open */