The
putpwent
routine
is the inverse of the
getpwent(S-osr5)
routine.
Given a pointer to a
passwd
structure created by
getpwent
(or two other routines
that appear on the same man page -
getpwuid(S-osr5)
or
getpwnam(S-osr5)),
putpwent
writes a line
which matches the format of
/etc/passwd
onto the stream
f.
Return value
Upon successful completion,
the
putpwent
routine
returns a value of zero.
If an error was detected during its operation,
it will return a non-zero value.