home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************
- * DBASE.H - dBASE file I/O routine prototypes & typedefs ... *
- * *
- * 900514 MCMason - written in MSC 5.1 *
- ****************************************************************/
-
- #define TRUE (1==1)
- #define FALSE (!TRUE)
-
- struct _dbfFLD
- {
- char Name[12]; /* Field name */
- char Type; /* Field type */
- int Length; /* Field length */
- int Dec; /* location of decimal point */
- };
- typedef struct _dbfFLD dbfFLD;
-
- struct _dbfFILE
- {
- int Version; /* version of dBASE file (3) */
- char update[3]; /* last date the file was updated */
- long NumRex; /* number of records in the file */
- int HdrLen; /* length of the dBASE Header */
- int RecLen; /* length of each record */
- int NumFlds; /* number of fields in each record */
- long FileSize; /* number of bytes in the file */
- FILE *file; /* File pointer for the dBASE file */
- dbfFLD (*fld)[]; /* pointer to field data array */
- int Modified; /* File modified flag */
- };
- typedef struct _dbfFILE *dbfFILE;
-
- extern dbfFILE dbfOpen(char const *fname);
- extern int dbfClose(dbfFILE dbf);
- extern void dbfDspHdr(dbfFILE hdr, FILE *out);
- extern void dbfDispStru(dbfFILE hdr, FILE *out);
- extern int dbfReadRec(dbfFILE hdr,long Rec,char *b);
- extern void dbfPrintRec(dbfFILE hdr,FILE *out,long Rec,char *b);
- extern void dbfList(dbfFILE d, FILE *out);
- extern int dbfCreate(dbfFILE hdr, char *name);
- extern dbfFILE dbfInputStr(char *name);
- extern int dbfWriteRec(dbfFILE hdr,long Rec,char *b);
- extern long dbfAllocRec(dbfFILE hdr);
-