From owner-cvs-all Fri Jan 5 12:28:28 2001 From owner-cvs-all@FreeBSD.ORG Fri Jan 5 12:28:23 2001 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id DFADA37B400; Fri, 5 Jan 2001 12:28:21 -0800 (PST) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.1/8.11.1) with ESMTP id f05KKtv02183; Fri, 5 Jan 2001 20:20:55 GMT (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.1/8.11.1) with ESMTP id f05KRHi48955; Fri, 5 Jan 2001 20:27:17 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200101052027.f05KRHi48955@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Ben Smithurst Cc: Matt Dillon , Chris Faulhaber , Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/usr.bin/apply apply.c In-Reply-To: Message from Ben Smithurst of "Fri, 05 Jan 2001 19:44:29 GMT." <20010105194429.N85794@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Jan 2001 20:27:17 +0000 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Matt Dillon wrote: > > > :I don't agree with that, since the other functions return the number of > > :characters printed as well. > > > > Yes, but not portably. The ANSI standard tried to standardize it but > > the reality is that only snprintf()'s return value is portable. If you > > try to use the return value from other functions as a count, your code > > won't be portable. asprintf() *might* be portable too, but nothing else. > > Oh hell. In that case I'll probably just make the paragraph about > snprintf's return value clearer and not touch anything else. Except that the paragraph that says These functions return the number of characters printed (not including the trailing `\0' used to end output to strings). is wrong :-/ > -- > Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D > -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message