From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- Dragon/src/sdbm.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Dragon/src/sdbm.h (limited to 'Dragon/src/sdbm.h') diff --git a/Dragon/src/sdbm.h b/Dragon/src/sdbm.h new file mode 100644 index 0000000..4c90653 --- /dev/null +++ b/Dragon/src/sdbm.h @@ -0,0 +1,80 @@ +/* + * + * $Id: sdbm.h,v 1.5 1995/12/12 22:21:27 laughton Exp laughton $ + * + *--------------------------------------------------------------------------- + * + * Peter J. Laughton + * AECL + * Chalk River Laboratories + * Chalk River, Ontario + * CANADA K0J 1J0 + * + * Phone: (613) 584-8811, extension 4267 + * FAX: (613) 584-1108 + * + * Internet: laughtonp@crl.aecl.ca + * + *--------------------------------------------------------------------------- + * + * Revision history (as of 1995 October 25): + * + * $Log: sdbm.h,v $ + * Revision 1.6 96/06/28 13:10:19 13:10:19 laughton + * support for NDAS file conversion started. + * + * Revision 1.5 1995/12/12 22:21:27 laughton + * more GDBM updates + * + * Revision 1.4 1995/12/12 19:59:38 laughton + * updated the GDBM routines + * + * Revision 1.3 1995/12/04 14:46:47 laughton + * continuing development + * + * Revision 1.2 1995/11/30 20:48:03 laughton + * merged with main trunk + * + * Revision 1.1.1.2 1995/11/30 20:31:40 laughton + * continuing development + * + * Revision 1.1.1.1 1995/11/07 16:41:01 laughton + * side-branch for experiment + * + * Revision 1.1 1995/11/07 16:32:06 laughton + * Initial revision + * + */ + +#define FAIL (-1) +#define FileFull 1 +#define InvalidKey 2 +#define OpenFailure 3 +#define BadFile 4 +#define MemoryAllocFailure 5 +#define FixedLimitExceeded 6 + +typedef struct { + char *dptr; + int dsize; +} datum; + +extern void closeSDBWrite(); + +extern void closeSDBRead(); + +extern int writeRecord(char *recordName, + void *data, int nbytes, int dataType); + +extern int initRead(char *flist); + +extern int countRecs(int *nRecs, int dbFile); + +extern int initWrite(); + +extern datum readRecord(char *recordName); + +extern datum readIndexedRecord(int keyIndex, int dbFileIndex, + char *recordKey, int *dataType); + +extern void emitTitles(); -- cgit v1.2.3