blob: 4505d13bda5ce55c85fc25dc9c7ba6258e0e477b (
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
|
/* a hash file */
struct Ndbhf
{
Ndbhf *next;
int fd;
ulong dbmtime; /* mtime of data base */
int hlen; /* length (in entries) of hash table */
char attr[Ndbalen]; /* attribute hashed */
uchar buf[256]; /* hash file buffer */
long off; /* offset of first byte of buffer */
int len; /* length of valid data in buffer */
};
char* _ndbparsetuple(char*, Ndbtuple**);
Ndbtuple* _ndbparseline(char*);
#define ISWHITE(x) ((x) == ' ' || (x) == '\t' || (x) == '\r')
#define EATWHITE(x) while(ISWHITE(*(x)))(x)++
extern Ndbtuple *_ndbtfree;
/* caches */
void _ndbcacheflush(Ndb *db);
int _ndbcachesearch(Ndb *db, Ndbs *s, char *attr, char *val, Ndbtuple **t);
Ndbtuple* _ndbcacheadd(Ndb *db, Ndbs *s, char *attr, char *val, Ndbtuple *t);
|