[Jeremy] > Definitely correct on the latter. Sensibly conservative on the > former. The Linux man pages are silent on negative return values > other than -1. My draft copy of C99 sez: The snprintf function returns the number of characters that would have been written had n been sufficiently large, not counting the terminating null character, or a negative value if an encoding error occurred. -1 isn't mentioned at all. What does the final C99 say? Regardless, MS's pre-C99 implementation says: _snprintf returns the number of bytes stored in buffer, not counting the terminating null character. If the number of bytes required to store the data exceeds count, then count bytes of data are stored in buffer and a negative value is returned. So -1 sounds Linux-specific. > Thanks for the fixes. Thank *you* for the opportunity to be thorough <wink>.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4