Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #28465
| From | Philipp Klaus Krause <pkk@spth.de> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: snprintf return value |
| Date | 2019-01-01 12:59 +0100 |
| Organization | solani.org |
| Message-ID | <q0fkmj$pe1$1@solani.org> (permalink) |
| References | <pulekl$n55$1@dont-email.me> <puleth$npt$1@dont-email.me> <pulfc4$q14$1@dont-email.me> |
Am 10.12.18 um 11:32 schrieb pozz: >> Keep in mind that snprintf can even return negative values as error >> codes. > > Could you provide a test case for a negative return value from snprintf()? > The standard allows negative return values only for encoding errors. So for typical systems (i.e. sizeof(char) < sizeof(int), wchar_t is Unicode code points), a %c with an argument outside the range of char should work. Or a %lc with an argument that is not a Unicode code point. Or a %ls with an argument that is an array containing values that are not valid Unicode code points. Philipp
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
snprintf return value pozz <pozzugno@gmail.com> - 2018-12-10 11:20 +0100
Re: snprintf return value Reinhardt Behm <rbehm@hushmail.com> - 2018-12-10 18:24 +0800
Re: snprintf return value pozz <pozzugno@gmail.com> - 2018-12-10 11:32 +0100
Re: snprintf return value Philipp Klaus Krause <pkk@spth.de> - 2019-01-01 12:59 +0100
Re: snprintf return value David Brown <david.brown@hesbynett.no> - 2018-12-10 13:15 +0100
Re: snprintf return value Clifford Heath <no.spam@please.net> - 2018-12-11 08:49 +1100
Re: snprintf return value Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-12-11 11:41 -0500
Re: snprintf return value Clifford Heath <no.spam@please.net> - 2018-12-12 10:34 +1100
Re: snprintf return value David Brown <david.brown@hesbynett.no> - 2018-12-12 09:09 +0100
Re: snprintf return value Clifford Heath <no.spam@please.net> - 2018-12-12 21:38 +1100
Re: snprintf return value Les Cargill <lcargill99@comcast.com> - 2018-12-30 11:23 -0600
Re: snprintf return value Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2018-12-11 00:47 +0100
Re: snprintf return value Clifford Heath <no.spam@please.net> - 2018-12-11 13:31 +1100
csiph-web