From: millert Date: Mon, 3 Feb 1997 00:13:04 +0000 (+0000) Subject: back out stringlist changes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=458774d30c068099fba7a3ac8986605a2ed8f48c;p=openbsd back out stringlist changes --- 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 @@ -47,7 +46,6 @@ static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.4 1997/02/02 23:32:15 miller #include #include #include -#include #define _NETGROUP_PRIVATE #include #include @@ -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: