summaryrefslogtreecommitdiffstats
path: root/libexec/revnetgroup/parse_netgroup.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-12-13 02:40:39 +0000
committerwpaul <wpaul@FreeBSD.org>1996-12-13 02:40:39 +0000
commitb738ab043277ed2967c84b7ba11654b8e0d99f19 (patch)
treee09ec5fe96b67a7888b27300f4d4e0ce43904751 /libexec/revnetgroup/parse_netgroup.c
parent5663e7faf1193426c1a06144854f3ddf60e8b4c0 (diff)
downloadFreeBSD-src-b738ab043277ed2967c84b7ba11654b8e0d99f19.zip
FreeBSD-src-b738ab043277ed2967c84b7ba11654b8e0d99f19.tar.gz
Close PR #2193: support backslash line continuations.
(Also did some minor cleanups.)
Diffstat (limited to 'libexec/revnetgroup/parse_netgroup.c')
-rw-r--r--libexec/revnetgroup/parse_netgroup.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c
index bc048e1..7e7d824 100644
--- a/libexec/revnetgroup/parse_netgroup.c
+++ b/libexec/revnetgroup/parse_netgroup.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "$Id: parse_netgroup.c,v 1.1.1.1 1995/10/26 16:25:29 wpaul Exp $";
+static char sccsid[] = "$Id: parse_netgroup.c,v 1.2 1996/05/12 17:17:44 wpaul Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -52,7 +52,7 @@ static char sccsid[] = "$Id: parse_netgroup.c,v 1.1.1.1 1995/10/26 16:25:29 wpau
#include "hash.h"
#ifndef lint
-static const char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id: parse_netgroup.c,v 1.2 1996/05/12 17:17:44 wpaul Exp $";
#endif
/*
@@ -92,8 +92,6 @@ static struct linelist *read_for_group();
void __setnetgrent(), __endnetgrent();
int __getnetgrent();
extern struct group_entry *gtable[];
-extern char *lookup __P(( struct group_entry *[], char * ));
-#define LINSIZ 1024 /* Length of netgroup file line */
/*
* setnetgrent()
@@ -296,12 +294,12 @@ static struct linelist *
read_for_group(group)
char *group;
{
- register char *pos, *spos, *linep, *olinep;
+ register char *pos, *spos, *linep = NULL, *olinep = NULL;
register int len, olen;
int cont;
struct linelist *lp;
char line[LINSIZ + 1];
- char *key = NULL, *data = NULL;
+ char *data = NULL;
data = lookup (gtable, group);
sprintf(line, "%s %s", group, data);
OpenPOWER on IntegriCloud