Date: Fri, 5 Jan 2001 20:45:33 +0000 From: Ben Smithurst <ben@FreeBSD.org> To: Brian Somers <brian@Awfulhak.org> Cc: Matt Dillon <dillon@earth.backplane.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/apply apply.c Message-ID: <20010105204533.O85794@strontium.scientia.demon.co.uk> In-Reply-To: <200101052027.f05KRHi48955@hak.lan.Awfulhak.org> References: <ben@FreeBSD.org> <200101052027.f05KRHi48955@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers wrote: >>> 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 :-/ ok, how about I update the paragraph to: These functions return the number of characters printed (not including the trailing `\0' used to end output to strings). However, this is only portable when referring to the snprintf() function; the other functions may have different return conventions on other systems. -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010105204533.O85794>