>Myself, I code defensively around this. It's not hard to write >code that can handle either form of return value. If a value as >large as your buffer size or larger is returned, reallocate your >buffer exactly and try again; if -1 is returned, double (or >whatever) the buffer size and try again; otherwise, everything's >fine. Note that standards compliant snprintf can return -1 only for: EILSEQ A wide-character code that does not correspond to a valid character has been detected. Retrying with double the buffer size does not help in that case. Casper
This archive was generated by hypermail 2b30 : Mon Nov 18 2002 - 14:53:14 PST