DBASE.H C-5

NAME

dbase.h - include file for database catalog

SYNOPSIS

#include <cbase/dbase.h>

DESCRIPTION

This include file contains symbolic definitions for the structures and file names that are used by the database catalog routines. The database catalog for the computer is contained in the directory cbasedir \dbase. The cbasedir is usually the directory \cbase\lib.

CONTENTS

/*

* @(#)dbase.h 5.2

*

* C/BASE Data Base Definitions.

*

* This file contains definitions of all special files

* used for defining data bases.

*/

#define DBDIR "dbase" /* name of data base directory */

#define DBCHAR '~' /* Dbname separator character */

#define DBASE "cbase~dbase" /* logical name for data bases */

#define LFILE "cbase~lfile" /* logical name for logical files */

#define DBNAMZ 32 /* Length of data base names */

#define DBFILZ 32 /* Length of logical file names */

#define DBLOGZ 70 /* Max len of log file name */

#define DBHOMZ 45 /* Max len of data base home directory */

#define DBDSCZ 64 /* Max len of data base description */

#define DBPATH 70 /* Max len of system file name */

#define NSMCHZ 16 /* Max len of machine name */

#define NSNETZ 16 /* Max len of network name */

#define NSDOSZ 128 /* Max len of DOS directory name */

typedef struct {

char db_name[DBNAMZ]; /* Name of data base */

char db_desc[DBDSCZ]; /* Description */

char db_home[DBHOMZ]; /* Home directory of data base */

char db_log[DBLOGZ]; /* Name of log file */

} DB;

typedef struct {

char lf_dbname[DBNAMZ]; /* Name of data base */

char lf_lname[DBFILZ]; /* Logical name of data file */

char lf_desc[DBDSCZ]; /* Description */

char lf_sname[DBPATH]; /* System file name of data file */

char lf_real; /* Is file real? (boolean flag) */

char lf_log; /* Is file logged? (boolean flag) */

} LF;

typedef struct {

char ns_machine[NSMCHZ]; /* Machine containing network name */

char ns_netname[NSNETZ]; /* Network name */

char ns_dosname[NSDOSZ]; /* DOS directory name on machine */

} NS;

int dbopen();

DB *dbfind(), *dbfindn();

LF *dlfind(), *dlfindn();

char *dbpath(), *dpath();

int dbparse();