#ifndef BASTARD_DB_H
#define BASTARD_DB_H


struct DB_SEQUENCE {
   int addr_exp;
   int code_effect;
	int int_code;
	int fin_code;
	int xref;
	int comment;
	int func;
	int func_param;
	int func_local;
   int func_effect;
	int f_inline;
	int structure;
	int struct_member;
	int data_type;
	int library;
	int constant;
	int bc_macro;
} seq;

struct DB_DESCRIPTOR {
   int db_id;
   char name[64];
   char filename[256];
   struct DB_DESCRIPTOR *prev;
   struct DB_DESCRIPTOR *next;
} *db_head, *db_current, *db_config, *db_target;


int doTyphoon();
int  dbError();
void dbErrorMsg();
void initSequences();

int LoadDB( char *dbname, char *filename, struct DB_DESCRIPTOR *db );
int SwitchDB( int db );
int UnloadDB( struct DB_DESCRIPTOR *db );
#endif
