Blob


1 /* a hash file */
2 struct Ndbhf
3 {
4 Ndbhf *next;
6 int fd;
7 ulong dbmtime; /* mtime of data base */
8 int hlen; /* length (in entries) of hash table */
9 char attr[Ndbalen]; /* attribute hashed */
11 uchar buf[256]; /* hash file buffer */
12 long off; /* offset of first byte of buffer */
13 int len; /* length of valid data in buffer */
14 };
16 char* _ndbparsetuple(char*, Ndbtuple**);
17 Ndbtuple* _ndbparseline(char*);
19 #define ISWHITE(x) ((x) == ' ' || (x) == '\t' || (x) == '\r')
20 #define EATWHITE(x) while(ISWHITE(*(x)))(x)++
22 extern Ndbtuple *_ndbtfree;
24 /* caches */
25 void _ndbcacheflush(Ndb *db);
26 int _ndbcachesearch(Ndb *db, Ndbs *s, char *attr, char *val, Ndbtuple **t);
27 Ndbtuple* _ndbcacheadd(Ndb *db, Ndbs *s, char *attr, char *val, Ndbtuple *t);