summaryrefslogtreecommitdiff
path: root/Dragon/src/sdbm.h
blob: 4c9065312ef38d4f9abce6d131ea84cb4b53ed1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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();