Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2001 18:39:43 +0000
From:      Ben Smithurst <ben@FreeBSD.org>
To:        Chris Faulhaber <jedgar@fxp.org>
Cc:        Brian Somers <brian@Awfulhak.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/apply apply.c
Message-ID:  <20010105183943.L85794@strontium.scientia.demon.co.uk>
In-Reply-To: <20010105120633.B66833@peitho.fxp.org>
References:  <jedgar@fxp.org> <200101050206.f0526rB87964@hak.lan.Awfulhak.org> <20010105162917.K85794@strontium.scientia.demon.co.uk> <20010105120633.B66833@peitho.fxp.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris Faulhaber wrote:

> On Fri, Jan 05, 2001 at 04:29:17PM +0000, Ben Smithurst wrote:
>> Would this change make you feel better?
>> 
>> change this:
>> 
>>      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.
>> 
>> to this:
>> 
>>      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'), and return the number of characters written to the
>>      buffer, excluding the terminating `\0'.  This value may be less than the
>>      number of characters which would have been written, had the buffer been
>>      large enough; 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.
>> 
> 
> This change makes sense.

Well no, it doesn't actually, I'm not sure what I was on when I wrote
it.

"This value may be less than the number of characters which would have
been written"

That's such rubbish I can't believe I wrote it.  I'll try again when
I've woken up properly, perhaps. :-/

-- 
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?20010105183943.L85794>