From owner-freebsd-hackers Thu Dec 4 12:50:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA29186 for hackers-outgoing; Thu, 4 Dec 1997 12:50:49 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA29181 for ; Thu, 4 Dec 1997 12:50:44 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id OAA29478; Thu, 4 Dec 1997 14:50:42 -0600 (CST) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id OAA29320; Thu, 4 Dec 1997 14:50:11 -0600 Message-ID: <19971204145010.50143@right.PCS> Date: Thu, 4 Dec 1997 14:50:10 -0600 From: Jonathan Lemon To: Jaye Mathisen Cc: hackers@freebsd.org Subject: Re: Anybody heard of fgetwpent() and putpwent()? References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: ; from Jaye Mathisen on Dec 12, 1997 at 11:56:00AM -0800 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Dec 12, 1997 at 11:56:00AM -0800, Jaye Mathisen wrote: > I don't have these calls on my 2.2.5 box, nor my 3.0 box. I'm trying to > compile some qmail add-on code that uses these functions... PUTPWENT(3C) DYNIX/ptx PUTPWENT(3C) NAME putpwent - write password file entry SYNOPSIS #include int putpwent (p, f) struct passwd *p; FILE *f; DESCRIPTION putpwent is the inverse of getpwent(3C). Given a pointer to a passwd structure created by getpwent (or getpwuid or getpwnam), putpwent writes a line on the stream f, which matches the format of /etc/passwd. SEE ALSO mkpwdbm(1), getpwent(3C) DIAGNOSTICS putpwent returns non-zero if an error was detected during its operation, otherwise zero. WARNINGS The above routine uses , which causes an increase in the size of programs, not otherwise using standard I/O, more than might be expected. I'm not really sure why this is useful, but I suppose that you could do the same thing with a printf() format string. -- Jonathan