7 * search for a tuple that has the given 'attr=val' and also 'rattr=x'.
8 * copy 'x' into 'buf' and return the whole tuple.
10 * return 0 if not found.
13 ndbgetvalue(Ndb *db, Ndbs *s, char *attr, char *val, char *rattr, Ndbtuple **pp)
23 t = ndbsearch(db, s, attr, val);
25 /* first look on same line (closer binding) */
28 if(strcmp(rattr, nt->attr) == 0){
40 /* search whole tuple */
41 for(nt = t; nt; nt = nt->entry){
42 if(strcmp(rattr, nt->attr) == 0){
52 t = ndbsnext(s, attr, val);
58 ndbgetval(Ndb *db, Ndbs *s, char *attr, char *val, char *rattr, char *buf)
63 p = ndbgetvalue(db, s, attr, val, rattr, &t);
69 strncpy(buf, p, Ndbvlen-1);
74 ndbsetmalloctag(t, getcallerpc(&db));