home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1994 Brad Eacker,
- * (Music, Intuition, Software, and Computers)
- * All Rights Reserved
- */
-
- /* link lists */
- #define LE_BASIC 0
- #define LE_STRING 1
- #define LE_REFS 2
- #define CE_DECL 3
- #define CE_NAME 4
- #define EXP_ELEM 5
- #define TBL_CONSTRAINT 6
- #define COL_CONSTRAINT 7
- #define NM_DEF 8
-
- struct list_elem {
- struct list_elem *l_next;
- short l_info_type;
- short l_flags;
- char *l_info;
- };
- typedef struct list_elem list_elem_t;
-
- /*
- * column types
- */
-
- #define CT_CHAR 1 /* character type */
-
- struct col_elem_decl {
- list_elem_t *col_name; /* overlaps l_info */
- list_elem_t *col_extras;
- int col_type;
- int col_len;
- int col_decl;
- };
- typedef struct col_elem_decl col_elem_decl_t;
-
- /* Expression types */
-
- #define P_EQUALS 0
- #define P_AND 1
- #define P_OR 2
- #define P_NOT 3
- #define P_NULL 4
- #define P_NOT_NULL 5
- #define P_LIKE 6
- #define P_NOT_LIKE 7
- #define P_LESS 8
- #define P_GREATER 9
- #define P_LESS_EQ 10
- #define P_GREATER_EQ 11
- #define P_NOT_EQ 12
-
- #define BINARY 16
- #define B_ADD (BINARY | 1)
- #define B_MINUS (BINARY | 2)
- #define B_MULT (BINARY | 3)
- #define B_DIV (BINARY | 4)
-
- /* Column constraints */
- #define CC_NOT_NULL 0
- #define CC_UNIQUE 1
- #define CC_PRIMARY 2
- #define CC_REFS 3
- #define CC_CHECK 4
-
- /* Table constraints */
- #define TC_UNIQUE 0
- #define TC_PRIMARY 1
- #define TC_CHECK 2
- #define TC_FOREIGN 3
- #define TC_FOR_REFS 4
-
- extern int debug_output;
- extern int verbose;
-
- extern char *get_list_name();
-