summaryrefslogtreecommitdiff
path: root/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-02-03 00:13:05 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-02-03 00:13:05 +0000
commit0cc5491ab93b424906f60d2691c3ebae05a5629e (patch)
tree90097a2dfb22953e891fb08f57a6416eaf4b2289 /usr.sbin/netgroup_mkdb/netgroup_mkdb.c
parent100acb6c6d751288f07fb39b7d481514a9e275fb (diff)
back out stringlist changes
Diffstat (limited to 'usr.sbin/netgroup_mkdb/netgroup_mkdb.c')
-rw-r--r--usr.sbin/netgroup_mkdb/netgroup_mkdb.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
index 870a0a0bf4d..269f714c979 100644
--- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
+++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
@@ -1,5 +1,4 @@
-/* $OpenBSD: netgroup_mkdb.c,v 1.4 1997/02/02 23:32:15 millert Exp $ */
-/* $NetBSD: netgroup_mkdb.c,v 1.6 1997/01/19 03:30:14 lukem Exp $ */
+/* $OpenBSD: netgroup_mkdb.c,v 1.5 1997/02/03 00:13:04 millert Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -32,7 +31,7 @@
* SUCH DAMAGE.
*/
#ifndef lint
-static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.4 1997/02/02 23:32:15 millert Exp $";
+static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.5 1997/02/03 00:13:04 millert Exp $";
#endif
#include <sys/types.h>
@@ -47,7 +46,6 @@ static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.4 1997/02/02 23:32:15 miller
#include <errno.h>
#include <stdio.h>
#include <string.h>
-#include <stringlist.h>
#define _NETGROUP_PRIVATE
#include <netgroup.h>
#include <assert.h>
@@ -74,7 +72,7 @@ struct nentry {
static DB *ng_insert __P((DB *, const char *));
static void ng_reventry __P((DB *, DB *, struct nentry *, char *,
- size_t, StringList *));
+ size_t, struct stringlist *));
static void ng_print __P((struct nentry *, struct string *));
static void ng_rprint __P((DB *, struct string *));
@@ -363,7 +361,7 @@ ng_reventry(db, udb, fe, name, s, ss)
struct nentry *fe;
char *name;
size_t s;
- StringList *ss;
+ struct stringlist *ss;
{
DBT key, data;
struct nentry *e;
@@ -371,11 +369,11 @@ ng_reventry(db, udb, fe, name, s, ss)
char *p;
DB *xdb;
- if (sl_find(ss, name) != NULL) {
+ if (_ng_sl_find(ss, name) != NULL) {
warnx("Cycle in netgroup `%s'", name);
return;
}
- sl_add(ss, name);
+ _ng_sl_add(ss, name);
for (e = fe->n_next; e != NULL; e = e->n_next)
switch (e->n_type) {
@@ -442,7 +440,7 @@ ng_reverse(db, s)
size_t s;
{
int pos;
- StringList *sl;
+ struct stringlist *sl;
DBT key, data;
struct nentry *fe;
DB *udb = dbopen(NULL, O_RDWR | O_CREAT | O_EXCL, 0,
@@ -454,10 +452,10 @@ ng_reverse(db, s)
for (pos = R_FIRST;; pos = R_NEXT)
switch ((db->seq)(db, &key, &data, pos)) {
case 0:
- sl = sl_init();
+ sl = _ng_sl_init();
memcpy(&fe, data.data, sizeof(fe));
ng_reventry(db, udb, fe, (char *) key.data, s, sl);
- sl_free(sl, 0);
+ _ng_sl_free(sl, 0);
break;
case 1: