From owner-freebsd-doc Tue Dec 5 7:30: 6 2000 From owner-freebsd-doc@FreeBSD.ORG Tue Dec 5 07:30:04 2000 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9C15A37B400 for ; Tue, 5 Dec 2000 07:30:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eB5FU3285657; Tue, 5 Dec 2000 07:30:03 -0800 (PST) (envelope-from gnats) Date: Tue, 5 Dec 2000 07:30:03 -0800 (PST) Message-Id: <200012051530.eB5FU3285657@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: "Jason M. Taylor" Subject: Re: docs/20117: *printf manpage doesn't document %n Reply-To: "Jason M. Taylor" Sender: gnats@FreeBSD.org Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR docs/20117; it has been noted by GNATS. From: "Jason M. Taylor" To: , 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 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