Date: Tue, 5 Dec 2000 07:30:03 -0800 (PST) From: "Jason M. Taylor" <jtaylor@precisioncs.net> To: freebsd-doc@freebsd.org Subject: Re: docs/20117: *printf manpage doesn't document %n Message-ID: <200012051530.eB5FU3285657@freefall.freebsd.org>
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: "Jason M. Taylor" <jtaylor@precisioncs.net> To: <freebsd-gnats-submit@FreeBSD.org>, <xaa@dohd.org> Cc: Subject: Re: docs/20117: *printf manpage doesn't document %n Date: Tue, 5 Dec 2000 10:25:58 -0500 -----BEGIN PGP SIGNED MESSAGE----- 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 - -Jason -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> iQA/AwUBOi0JBnGfX7CR8SmVEQLdhACfSerXAubqxVCEQR+XSrs5amYFEwoAoNiO 4xvs5xthFEgh/PQ+A9Dffkdp =ZcL/ -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012051530.eB5FU3285657>