Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jan 2001 19:26:55 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Will Andrews <will@physics.purdue.edu>
Cc:        Brian Somers <brian@Awfulhak.org>, Chris Faulhaber <jedgar@fxp.org>, Will Andrews <will@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/apply apply.c 
Message-ID:  <200101050226.f052Qt149151@harmony.village.org>
In-Reply-To: Your message of "Thu, 04 Jan 2001 21:12:57 EST." <20010104211257.V86630@argon.firepipe.net> 
References:  <20010104211257.V86630@argon.firepipe.net>  <jedgar@fxp.org> <200101050206.f0526rB87964@hak.lan.Awfulhak.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20010104211257.V86630@argon.firepipe.net> Will Andrews writes:
: > s[n]printf() is poorly documented in this area.
: 
: I agree.

     These functions return the number of characters printed (not including
     the trailing `\0' used to end output to strings).
...
     Snprintf() and vsnprintf() will write at most size-1 of the characters
     printed into the output string (the size'th character then gets the ter-
     minating `\0'); if the return value is greater than or equal to the size
     argument, the string was too short and some of the printed characters
     were discarded.

It seems to fairly clearly imply that it will return the number of
characters that would have been copied to the string, if it was long
enough....  The part after the ';' implies this.  I'm not sure how it
could be clearer.

Warner


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?200101050226.f052Qt149151>