libndb: retire deprecated csgetval(), ndbgetval() and ndblookval() functions
This commit is contained in:
parent
6a23ef917b
commit
34f19570b9
5 changed files with 3 additions and 86 deletions
|
@ -124,7 +124,6 @@ struct Ndbs
|
|||
|
||||
#define NDB_IPlen 16
|
||||
|
||||
Ndbtuple* csgetval(char*, char*, char*, char*, char*);
|
||||
char* csgetvalue(char*, char*, char*, char*, Ndbtuple**);
|
||||
Ndbtuple* csipinfo(char*, char*, char*, char**, int);
|
||||
Ndbtuple* dnsquery(char*, char*, char*);
|
||||
|
@ -136,12 +135,10 @@ Ndbtuple* ndbconcatenate(Ndbtuple*, Ndbtuple*);
|
|||
Ndbtuple* ndbdiscard(Ndbtuple*, Ndbtuple*);
|
||||
void ndbfree(Ndbtuple*);
|
||||
Ndbtuple* ndbgetipaddr(Ndb*, char*);
|
||||
Ndbtuple* ndbgetval(Ndb*, Ndbs*, char*, char*, char*, char*);
|
||||
char* ndbgetvalue(Ndb*, Ndbs*, char*, char*, char*, Ndbtuple**);
|
||||
Ndbtuple* ndbfindattr(Ndbtuple*, Ndbtuple*, char*);
|
||||
ulong ndbhash(char*, int);
|
||||
Ndbtuple* ndbipinfo(Ndb*, char*, char*, char**, int);
|
||||
Ndbtuple* ndblookval(Ndbtuple*, Ndbtuple*, char*, char*);
|
||||
Ndbtuple* ndbnew(char*, char*);
|
||||
Ndb* ndbopen(char*);
|
||||
Ndbtuple* ndbparse(Ndb*);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.TH NDB 2
|
||||
.SH NAME
|
||||
ndbopen, ndbcat, ndbchanged, ndbclose, ndbreopen, ndbsearch, ndbsnext, ndbgetvalue, ndbfree, ipattr, ndbgetipaddr, ndbipinfo, csipinfo, ndbhash, ndbparse, csgetvalue, ndbfindattr, dnsquery, ndbdiscard, ndbconcatenate, ndbreorder, ndbsubstitute, ndbgetval, csgetval, ndblookval \- network database
|
||||
ndbopen, ndbcat, ndbchanged, ndbclose, ndbreopen, ndbsearch, ndbsnext, ndbgetvalue, ndbfree, ipattr, ndbgetipaddr, ndbipinfo, csipinfo, ndbhash, ndbparse, csgetvalue, ndbfindattr, dnsquery, ndbdiscard, ndbconcatenate, ndbreorder, ndbsubstitute \- network database
|
||||
.SH SYNOPSIS
|
||||
.B #include <u.h>
|
||||
.br
|
||||
|
@ -300,9 +300,9 @@ and
|
|||
is to
|
||||
.I ndbipinfo
|
||||
as
|
||||
.I csgetval
|
||||
.I csgetvalue
|
||||
is to
|
||||
.IR ndbgetval .
|
||||
.IR ndbgetvalue .
|
||||
.PP
|
||||
The next three routines are used by programs that create the
|
||||
hash tables and database files.
|
||||
|
@ -493,28 +493,3 @@ to
|
|||
.SH SEE ALSO
|
||||
.IR ndb (6),
|
||||
.IR ndb (8)
|
||||
.SH DIAGNOSTICS
|
||||
.IR Ndbgetvalue ,
|
||||
.IR csgetvalue ,
|
||||
and
|
||||
.I ndblookvalue
|
||||
set
|
||||
.I errstr
|
||||
to
|
||||
.L "buffer too short"
|
||||
if the buffer provided isn't long enough for the
|
||||
returned value.
|
||||
.SH BUGS
|
||||
.IR Ndbgetval ,
|
||||
.IR csgetval ,
|
||||
and
|
||||
.I ndblookval
|
||||
are deprecated versions of
|
||||
.IR ndbgetvalue ,
|
||||
.IR csgetvalue ,
|
||||
and
|
||||
.IR ndblookvalue .
|
||||
They expect a fixed 64 byte long result
|
||||
buffer and existed when the values of a
|
||||
.I Ndbtuple
|
||||
structure were fixed length.
|
||||
|
|
|
@ -85,24 +85,3 @@ csgetvalue(char *netroot, char *attr, char *val, char *rattr, Ndbtuple **pp)
|
|||
|
||||
return rv;
|
||||
}
|
||||
|
||||
Ndbtuple*
|
||||
csgetval(char *netroot, char *attr, char *val, char *rattr, char *buf)
|
||||
{
|
||||
Ndbtuple *t;
|
||||
char *p;
|
||||
|
||||
p = csgetvalue(netroot, attr, val, rattr, &t);
|
||||
if(p == nil){
|
||||
if(buf != nil)
|
||||
*buf = 0;
|
||||
} else {
|
||||
if(buf != nil){
|
||||
strncpy(buf, p, Ndbvlen-1);
|
||||
buf[Ndbvlen-1] = 0;
|
||||
}
|
||||
free(p);
|
||||
}
|
||||
ndbsetmalloctag(t, getcallerpc(&netroot));
|
||||
return t;
|
||||
}
|
||||
|
|
|
@ -53,24 +53,3 @@ ndbgetvalue(Ndb *db, Ndbs *s, char *attr, char *val, char *rattr, Ndbtuple **pp)
|
|||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
Ndbtuple*
|
||||
ndbgetval(Ndb *db, Ndbs *s, char *attr, char *val, char *rattr, char *buf)
|
||||
{
|
||||
Ndbtuple *t;
|
||||
char *p;
|
||||
|
||||
p = ndbgetvalue(db, s, attr, val, rattr, &t);
|
||||
if(p == nil){
|
||||
if(buf != nil)
|
||||
*buf = 0;
|
||||
} else {
|
||||
if(buf != nil){
|
||||
strncpy(buf, p, Ndbvlen-1);
|
||||
buf[Ndbvlen-1] = 0;
|
||||
}
|
||||
free(p);
|
||||
}
|
||||
ndbsetmalloctag(t, getcallerpc(&db));
|
||||
return t;
|
||||
}
|
||||
|
|
|
@ -29,16 +29,3 @@ ndbfindattr(Ndbtuple *entry, Ndbtuple *line, char *attr)
|
|||
|
||||
return nil;
|
||||
}
|
||||
|
||||
Ndbtuple*
|
||||
ndblookval(Ndbtuple *entry, Ndbtuple *line, char *attr, char *to)
|
||||
{
|
||||
Ndbtuple *t;
|
||||
|
||||
t = ndbfindattr(entry, line, attr);
|
||||
if(t != nil){
|
||||
strncpy(to, t->val, Ndbvlen-1);
|
||||
to[Ndbvlen-1] = 0;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue