| www.delorie.com/archives/browse.cgi | search |
| Date: | Mon, 14 Jun 1999 10:29:28 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Nate Eldredge <nate AT cartsys DOT com> |
| cc: | djgpp-workers AT delorie DOT com, Alain Magloire <alainm AT rcsm DOT ece DOT mcgill DOT ca> |
| Subject: | Re: {v,}snprintf.c ??? |
| In-Reply-To: | <37643242.C52AE48F@cartsys.com> |
| Message-ID: | <Pine.SUN.3.91.990614102906.21962L-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp-workers AT delorie DOT com |
| X-Mailing-List: | djgpp-workers AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On Sun, 13 Jun 1999, Nate Eldredge wrote: > glibc does as you expected: it returns the number of characters without > touching the buffer. (You can even pass NULL.) That's what C9X seems to imply, including the NULL pointer. Thanks for checking. > I think the cast to signed int is bogus too. If we don't need to compare it with 1, the cast can go away as well. Since the prototype uses size_t, it is clear the function expects an unsigned value, so passing a negative value is looking for trouble anyway.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |