delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/18/14:22:53

Date: Sat, 18 Nov 2000 14:21:56 -0500
Message-Id: <200011181921.OAA04628@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: eliz AT is DOT elta DOT co DOT il
CC: djgpp-workers AT delorie DOT com
In-reply-to: <2593-Sat18Nov2000212249+0200-eliz@is.elta.co.il>
Subject: Re: snprintf() diff
References: <200011132023 DOT PAA04930 AT qnx DOT com> <3A1328A7 DOT C9866232 AT bigfoot DOT com> <200011160105 DOT UAA01282 AT envy DOT delorie DOT com> <3A15C4B1 DOT 383439DB AT bigfoot DOT com> <200011180030 DOT TAA26797 AT envy DOT delorie DOT com> <9743-Sat18Nov2000101225+0200-eliz AT is DOT elta DOT co DOT il> <200011181820 DOT NAA03922 AT envy DOT delorie DOT com> <2593-Sat18Nov2000212249+0200-eliz AT is DOT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> But that would conflict with how snprintf should work: it should NOT
> fail if it runs out of space.  Instead, it needs to stop writing into
> the (full) buffer, but should still count characters _produced by
> doprnt, because it needs to return the number of characters that
> _would_ have been written had the buffer been large enough.  The
> easiest way to do that is to hide the fact that the buffer overflowed
> from _doprnt, and let it keep going.

Hmmm... OK.  I still think flsbuf should handle the exception case,
not the putc macro.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019