Cleanups to correct problems with my merge of Aidan and Patrice's work.
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
+#include <errno.h>
#define DEFAULT_FORMAT_BUFFER 4096
int len = vsnprintf(s.data, size, fmt, ap);
va_end(ap);
while (len < 0 || len >= size) {
- if (len >= size) {
+ if (len < 0 && errno != 0)
+ return s;
+ if (len >= size) {
size = len + 1;
} else {
size *= 2;
/////////////////////////////////////////////////////
u_long hash() const;
+operator char*()
+ { return data; }
operator const char*() const
{ return data; }
operator const char*()