The
putpwent
routine
is the inverse of the
getpwent(S)
routine.
Given a pointer to a
passwd
structure created by
getpwent
(or two other routines
that appear on the same man page -
getpwuid(S)
or
getpwnam(S)),
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.