Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2000 07:40:04 -0800 (PST)
From:      Mark Huizer <>
Subject:   Re: docs/20117: *printf manpage doesn't document %n
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
The following reply was made to PR docs/20117; it has been noted by GNATS.

From: Mark Huizer <>
To: "Jason M. Taylor" <>
Subject: Re: docs/20117: *printf manpage doesn't document %n
Date: Tue, 5 Dec 2000 16:30:08 +0100

 The wise Jason M. Taylor produced the following lines:
 > Hash: SHA1
 > After some looking, I found this documentation from the GNU libc
 > manual. Would this be acceptable?
 > 	The `%n' conversion is unlike any of the other output conversions.
 >     It uses an argument which must be a pointer to an `int', but
 > instead of
 >     printing anything it stores the number of characters printed so
 > far by
 >     this call at that location.  The `h' and `l' type modifiers are
 >     permitted to specify that the argument is of type `short int *'
 > or
 >     `long int *' instead of `int *', but no flags, field width, or
 >     precision are permitted.
 >        For example,
 > int nchar;
 > printf ("%d %s%n\n", 3, "bears", &nchar);
 >     prints:
 > 3 bears
 >     and sets `nchar' to `7', because `3 bears' is seven characters
 Fine with me, as long as something is in the man pages :-)

To Unsubscribe: send mail to
with "unsubscribe freebsd-doc" in the body of the message

Want to link to this message? Use this URL: <>