summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-01-27 23:46:48 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-01-27 23:46:48 +0100
commit34f19570b92951e7f55df787d5dc457eb2c9de46 (patch)
treee96468f23a8014d90ab980cd4634d81fa669b0b0
parent6a23ef917bfdb41415dc36be5cd8b8e8e64ddc23 (diff)
libndb: retire deprecated csgetval(), ndbgetval() and ndblookval() functions
-rw-r--r--sys/include/ndb.h3
-rw-r--r--sys/man/2/ndb31
-rw-r--r--sys/src/libndb/csgetval.c21
-rw-r--r--sys/src/libndb/ndbgetval.c21
-rw-r--r--sys/src/libndb/ndblookval.c13
5 files changed, 3 insertions, 86 deletions
diff --git a/sys/include/ndb.h b/sys/include/ndb.h
index 9c57c11fe..7afba885c 100644
--- a/sys/include/ndb.h
+++ b/sys/include/ndb.h
@@ -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*);
diff --git a/sys/man/2/ndb b/sys/man/2/ndb
index 3d9d01f25..5f5e62938 100644
--- a/sys/man/2/ndb
+++ b/sys/man/2/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.
diff --git a/sys/src/libndb/csgetval.c b/sys/src/libndb/csgetval.c
index 6fa4217df..9bd6123c1 100644
--- a/sys/src/libndb/csgetval.c
+++ b/sys/src/libndb/csgetval.c
@@ -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;
-}
diff --git a/sys/src/libndb/ndbgetval.c b/sys/src/libndb/ndbgetval.c
index e5d3bf1b9..749cc1564 100644
--- a/sys/src/libndb/ndbgetval.c
+++ b/sys/src/libndb/ndbgetval.c
@@ -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;
-}
diff --git a/sys/src/libndb/ndblookval.c b/sys/src/libndb/ndblookval.c
index 012bc4b2b..3e43f5465 100644
--- a/sys/src/libndb/ndblookval.c
+++ b/sys/src/libndb/ndblookval.c
@@ -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;
-}