dbStaticLib.h
Defines
-
dbCalloc(nobj, size)
-
dbMalloc(size)
-
S_dbLib_recordTypeNotFound
-
S_dbLib_recExists
-
S_dbLib_recNotFound
-
S_dbLib_flddesNotFound
-
S_dbLib_fieldNotFound
-
S_dbLib_badField
-
S_dbLib_badLink
-
S_dbLib_nameLength
-
S_dbLib_noRecSup
-
S_dbLib_strLen
-
S_dbLib_noSizeOffset
-
S_dbLib_outMem
-
S_dbLib_infoNotFound
Typedefs
-
typedef dbBase DBBASE
Functions
-
long dbReadDatabase(DBBASE **ppdbbase, const char *filename, const char *path, const char *substitutions)
Open .dbd or .db file and read definitions.
- Parameters:
ppdbbase – The database. Typically the “pdbbase” global
filename – Filename to read/search. May be absolute, or relative.
path – If !NULL, search path when filename is relative, of for ‘include’ statements. Split by ‘:’ or ‘;’ (cf. OSI_PATH_LIST_SEPARATOR)
substitutions – If !NULL, macro definitions like “NAME=VAL,OTHER=SOME”
- Returns:
0 on success
-
long dbReadDatabaseFP(DBBASE **ppdbbase, FILE *fp, const char *path, const char *substitutions)
Read definitions from already opened .dbd or .db file.
Note
This function will always close the provided ‘fp’.
- Parameters:
ppdbbase – The database. Typically the “&pdbbase” global
fp – FILE* from which to read definitions. Will always be fclose()’d
path – If !NULL, search path when filename is relative, of for ‘include’ statements. Split by ‘:’ or ‘;’ (cf. OSI_PATH_LIST_SEPARATOR)
substitutions – If !NULL, macro definitions like “NAME=VAL,OTHER=SOME”
- Returns:
0 on success
-
const char *dbGetFieldTypeString(int dbfType)
-
int dbFindFieldType(const char *type)
-
drvSup *dbFindDriver(dbBase *pdbbase, const char *name)
-
linkSup *dbFindLinkSup(dbBase *pdbbase, const char *name)
-
void dbCatString(char **string, int *stringLength, char *pnew, char *separator)
-
struct DBENTRY