home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
C
/
CROUTE
/
TABLE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-03-25
|
2KB
|
69 lines
/* table.h */
/*--------------- ANSA SOFTWARE CONFIDENTIAL INFORMATION ------------------ */
/* table definition */
#ifndef TSTRUCTH
typedef char TABLE;
#endif
/* table routine error definitions */
extern int tError;
#define TEUNLINK 1 /* unlink failed - write protected disk */
/* or read-only file? */
#define TETNAME 2 /* table name not parseable */
#define TENOTABLE 3 /* table name doesn't exist */
#define TENOINDEX 4 /* index fields not supported */
#define TEFIELDS 5 /* number fields must be between 1 and 255 */
#define TEFLDNAME 6 /* invalid field name */
#define TEFLDTYPE 7 /* invalid field type */
#define TEMEMORY 8 /* no memory - malloc failure */
#define TELSEEK 9 /* unable to lseek */
#define TECREATE 10 /* unable to create file */
#define TERDREAD 11 /* unable to read relation descriptor */
#define TERDWRITE 12 /* unable to write relation descriptor */
#define TECLOSE 13 /* unable to close table */
#define TESEEK 14 /* unable to tSeek - parameter error */
#define TESKEMPTY 15 /* no tSeek allowed in empty file */
#define TESKBEFORE 16 /* attempt to tSeek before bein of file */
#define TESKAFTER 17 /* attempt to tSeek after end of file */
#define TEREAD 18 /* unable to read */
#define TEWRITE 20 /* unable to write */
#define TETBLPTR 21 /* invalid table pointer */
#define TEPROTECT 22 /* protected table */
/*----------------------- Function Prototypes ------------------------------*/
char *tErrMsg(char *);
char *tFldName(TABLE *,int ,char *);
char *tFldType(TABLE *,unsigned int ,char *);
int tClose(TABLE *);
int tDelete(char *);
int tEmpty(char *);
int tExist(char *);
int tFldGet(TABLE *,int ,char *);
int tFldNum(TABLE *,char *);
int tFldPut(TABLE *,int ,char *);
int tFldValidate(char *,char *);
int tMaxTypeSize(char *);
int tNumFlds(TABLE *);
int tNumGet(TABLE *,int ,double *);
int tNumPut(TABLE *,int ,double );
int tShortGet(TABLE *,int ,int *);
int tShortPut(TABLE *,int ,int );
int tUnLink(char *);
long tAppend(TABLE *);
long tNextRow(TABLE *);
long tNumRows(TABLE *);
long tPrevRow(TABLE *);
long tSeek(TABLE *,long ,int );
long tTell(TABLE *);
TABLE *tCreate(char *,int ,char * *,char * *,int );
TABLE *tOpen(char *);