From owner-cvs-all Fri Jan 5 11: 4:54 2001 From owner-cvs-all@FreeBSD.ORG Fri Jan 5 11:04:49 2001 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 25A8C37B400; Fri, 5 Jan 2001 11:04:49 -0800 (PST) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=root) by scientia.demon.co.uk with esmtp (Exim 3.20 #1) id 14EbvV-0003vC-00; Fri, 05 Jan 2001 18:49:22 +0000 Received: (from ben@localhost) by strontium.scientia.demon.co.uk (8.11.1/8.11.1) id f05InLA78364; Fri, 5 Jan 2001 18:49:21 GMT (envelope-from ben) Date: Fri, 5 Jan 2001 18:49:21 +0000 From: Ben Smithurst To: Chris Faulhaber Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/apply apply.c Message-ID: <20010105184921.M85794@strontium.scientia.demon.co.uk> References: <200101050206.f0526rB87964@hak.lan.Awfulhak.org> <20010105162917.K85794@strontium.scientia.demon.co.uk> <20010105120633.B66833@peitho.fxp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010105120633.B66833@peitho.fxp.org> Sender: ben@scientia.demon.co.uk Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chris Faulhaber wrote: > However, I think that > > These functions return the number of characters printed (not including > the trailing `\0' used to end output to strings). > > should be associated only with the appropriate functions (sprintf(), > vsprintf()) especially since those it does not apply to already mention > their return values. I don't agree with that, since the other functions return the number of characters printed as well. ben@strontium:~/tmp$ cat t.c int main(void) { int n; char *p; n = printf("foo\n"); printf("n=%d\n", n); n = asprintf(&p, "%d %d", 123, 456); printf("p=%s n=%d\n", p, n); /* etc */ return (0); } ben@strontium:~/tmp$ ./a.out foo n=4 p=123 456 n=7 -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message