Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3B07A1CE.9A453342@phekda.freeserve.co.uk> Date: Sun, 20 May 2001 11:51:58 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.17 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: snprintf? References: <3AF7358B DOT 19349 DOT 38937B AT localhost> <3AF7F5C9 DOT 2579 DOT B706AF AT localhost> <7704-Fri11May2001131837+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > After reading the discussions we had, there are a couple of minor > issues that I'd like to see resolved: > > - test the case of n = 1 in the test program; This is already handled in the patch snprintf-20001119.diff, which I included in a mail called "snprintf() diff, take 4?", sent on 2000-11-19: /* Try writing to a 1 byte buffer */ snprintf(holder, sizeof(holder), "%s", BIG); i = snprintf(holder, 1, "%s", BIG); if ((i < 0) || (*holder != '\0')) { fprintf (stderr, "FAILED termination only\n"); exit (1); } > - test the case of errors in format conversions (anything that > causes _doprnt return -1). I've looked at the _doprnt() code and I am unsure how to force a format conversion error. Any suggestions? I just added a couple of tests for padding & precision specifiers and that's turned up a couple of problems that I haven't investigated yet. > Other than that, I think the last version posted can go in. Great! Thanks, bye, Rich =] -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/