02110-1301, USA. */
#include <config.h>
+
#include "str.h"
-#include "message.h"
+
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
-#include "alloc.h"
-#include "message.h"
+
+#include <libpspp/alloc.h>
+#include <libpspp/message.h>
+
#include "minmax.h"
#include "size_max.h"
\f
st->length += len;
}
-/* Returns ds_end(ST) and THEN increases the length by INCR */
+/* Returns ds_end(ST) and THEN increases the length by INCR. */
char *
ds_append_uninit(struct string *st, size_t incr)
{
- char *end ;
- assert(incr >= 0 );
+ char *end;
- ds_extend(st, ds_length(st) + incr + 1);
+ ds_extend(st, ds_length(st) + incr);
end = ds_end(st);
int avail, needed;
va_list args;
-#ifndef va_copy
-#define va_copy(DST, SRC) (DST) = (SRC)
-#endif
-
va_copy (args, args_);
avail = st->string != NULL ? st->capacity - st->length + 1 : 0;
needed = vsnprintf (st->string + st->length, avail, format, args);