add setgrfile; bug report 4.3BSD/lib/96
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 6 Nov 1987 06:35:17 +0000 (22:35 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 6 Nov 1987 06:35:17 +0000 (22:35 -0800)
SCCS-vsn: lib/libc/gen/getgrent.c 5.3

usr/src/lib/libc/gen/getgrent.c

index a1bcade..6b9f7a1 100644 (file)
@@ -1,5 +1,5 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getgrent.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)getgrent.c 5.3 (Berkeley) %G%";
 #endif LIBC_SCCS and not lint
 
 #include <stdio.h>
 #endif LIBC_SCCS and not lint
 
 #include <stdio.h>
@@ -7,7 +7,7 @@ static char sccsid[] = "@(#)getgrent.c  5.2 (Berkeley) %G%";
 
 #define        MAXGRP  200
 
 
 #define        MAXGRP  200
 
-static char GROUP[] = "/etc/group";
+static char *GROUP = "/etc/group";
 static FILE *grf = NULL;
 static char line[BUFSIZ+1];
 static struct group group;
 static FILE *grf = NULL;
 static char line[BUFSIZ+1];
 static struct group group;
@@ -63,3 +63,9 @@ getgrent()
        *q = NULL;
        return( &group );
 }
        *q = NULL;
        return( &group );
 }
+
+setgrfile(file)
+       char *file;
+{
+       GROUP = file;
+}