1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 1996,2008 Oracle. All rights reserved. 5 * 6 * $Id: db_codegen.h,v 1.5 2008/01/08 20:58:12 bostic Exp $ 7 */ 8#include "db_config.h" 9 10#include "db_int.h" 11 12typedef struct __db_obj { 13 char *name; /* Database name */ 14 char *dbtype; /* Database type */ 15 16 u_int32_t extentsize; /* Queue: extent size */ 17 u_int32_t pagesize; /* Pagesize */ 18 u_int32_t re_len; /* Queue/Recno: record length */ 19 20 char *key_type; /* Key type */ 21 int custom; /* Custom key comparison. */ 22 23 char *primary; /* Secondary: primary's name */ 24 u_int32_t secondary_len; /* secondary: length */ 25 u_int32_t secondary_off; /* secondary: 0-based byte offset */ 26 27 int dupsort; /* Sorted duplicates */ 28 int recnum; /* Btree: record numbers */ 29 int transaction; /* Database is transactional */ 30 31 TAILQ_ENTRY(__db_obj) q; /* List of databases */ 32} DB_OBJ; 33 34typedef struct __env_obj { 35 char *prefix; /* Name prefix */ 36 char *home; /* Environment home */ 37 38 u_int32_t gbytes; /* GB, B of cache */ 39 u_int32_t bytes; 40 u_int32_t ncache; /* Number of caches */ 41 42 int private; /* Private environment */ 43 int standalone; /* Standalone database */ 44 int transaction; /* Database is transactional */ 45 46 TAILQ_ENTRY(__env_obj) q; /* List of environments, databases */ 47 TAILQ_HEAD(__head_db, __db_obj) dbq; 48} ENV_OBJ; 49 50TAILQ_HEAD(__head_env, __env_obj); /* List of environments */ 51extern struct __head_env env_tree; 52 53extern const char *progname; /* Program name */ 54 55int api_c __P((char *)); 56#ifdef DEBUG 57int parse_dump __P((void)); 58#endif 59int parse_input __P((FILE *)); 60