This commit is contained in:
Oliver Lehmann 1989-04-03 17:48:31 +00:00
parent 29b027d4f4
commit 00eeb591b4
2 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# define IDSIZE 6 /* size of file id */
/* available buffer space */
# define BATCHSIZE (PGSIZE - IDSIZE)
struct batchbuf
{
char file_id[IDSIZE]; /* unique file name identifier */
char bbuf[BATCHSIZE]; /* buffer for batch storage */
};
struct si_doms
{
int rel_off; /* offset in primary tuple */
int tupo_off; /* offset in saved tuple-old */
int dom_size; /* width of the domain */
/* if zero then domain not used */
};
struct batchhd
{
char db_name[MAXNAME + 1]; /* data base name */
char rel_name[MAXNAME + 1]; /* relation name */
char userid[2]; /* DBS user code */
long num_updts; /* actual number of tuples to be updated */
short mode_up; /* type of update */
short tido_size; /* width of old_tuple_id field */
short tupo_size; /* width of old tuple */
short tupn_size; /* width of new tuple */
short tidn_size; /* width of new_tuple_id field */
short si_dcount; /* number of sec. index domains affected */
struct si_doms si[MAXDOM + 1]; /* entry for each domain with sec. index */
};
extern int Batch_fp; /* file descriptor for batch file */
extern int Batch_cnt; /* no of bytes taken from the current buffer */
extern int Batch_dirty; /* used during update to mark a dirty page */
extern int Batch_lread; /* number of bytes last read in readbatch() */
extern int Batch_recovery; /* TRUE is this is recovery, else FALSE */
extern struct batchbuf Batchbuf;
extern struct batchhd Batchhd;
extern char *Fileset; /* unique id of batch maker */

View File

@ -0,0 +1,77 @@
/* SCANNER.H */
/* contains the global structures and variable declarations needed */
/* by the lexical analyzer. This includes Manifest Constants and */
/* certain vars for internal communication purposes. Therefore, */
/* extreme care should be exercised when modifying this file. */
/* MANIFEST CONSTANTS */
# define SBUFSIZ 2000 /* max size of symbol table for */
# define MAXSTRING 255 /* max length of strings */
# define GOVAL -1 /* semantic value for cmd names */
/* CHARACTER TYPES */
# define ALPHA 1
# define NUMBR 2
# define OPATR 3
# define PUNCT 4
# define CNTRL 5
/* Modes for input from EQL front end */
# define CVAR_I2 '\1' /* 2 byte integer */
# define CVAR_F8 '\4' /* 8 byte floating number */
# define CVAR_S '\3' /* string with null byte */
# define CVAR_I4 '\6' /* 4 byte integer */
/* error number definitions */
# define SYMERR 2500 /* syntactic error */
# define STRTERM 2700 /* non term string */
# define STRLONG 2701 /* string too long */
# define BADOP 2702 /* can't find operator in table */
# define NAMELONG 2703 /* name too long */
# define SBUFOFLO 2704 /* over flow symbol table */
# define COMMTERM 2705 /* non term comment */
# define FCONSTERR 2707 /* float constant error */
# define CNTRLCHR 2708 /* control char from EQL */
# define NUMBUFOFLO 2709 /* buffer oflo in number.c */
/* KEYWORD and OPERATOR TABLE */
struct optab /* key word/operator tables */
{
char *term; /* key word/operator body */
short token; /* associated parser token */
short opcode; /* associated parser opcode */
};
/* SPECIAL TOKENS for scanner */
struct special
{
short sconst;
short bgncmnt;
short endcmnt;
short i2const;
short i4const;
# ifndef NO_F4
short f4const;
# endif
short f8const;
short name;
};
/* last token struct */
struct lastok
{
short toktyp;
char *tok;
short tokop;
};
/* declarations */
extern struct special Tokens; /* special tokens table */
extern struct optab Optab[]; /* operator table */
extern struct optab Keyword[]; /* keyword table */
extern struct lastok Lastok;
extern int Lcase; /* UPPER->lower conversion flag */
extern int Pars; /* flag for call getcvar or not */
extern int Keyent; /* # of entries in the Keyword table */