home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume14
/
libpw
/
part01
/
putgrent.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-07-15
|
358 b
|
20 lines
/*
* putgrent(fp, ent) - since there is no putgrent I'm making one.
*/
#include <stdio.h>
#include <grp.h>
putgrent(fp, grp)
FILE *fp;
struct group *grp;
{
int i;
fprintf(fp, "%s:*:%d:%s", grp->gr_name, grp->gr_gid, grp->gr_mem[0]);
for (i = 1; grp->gr_mem[i][0] != NULL; i++)
fprintf(fp, ",%s", grp->gr_mem[i]);
fprintf(fp, "\n");
fflush(fp);
}