/* @(#)getpwent.c 4.6 (Berkeley) 85/01/21 */
static char EMPTY
[] = "";
static char line
[BUFSIZ
+1];
static struct passwd passwd
;
* The following are shared with getpwnamuid.c
char *_pw_file
= "/etc/passwd";
pwf
= fopen(_pw_file
, "r");
if (_pw_db
!= (DBM
*)0) {
while (*p
&& *p
!= ':' && *p
!= '\n')
if ((pwf
= fopen( _pw_file
, "r" )) == NULL
)
p
= fgets(line
, BUFSIZ
, pwf
);
passwd
.pw_comment
= EMPTY
;