+Sun May 7 14:32:25 2006 Ben Pfaff <blp@gnu.org>
+
+ * va_copy.h: New header.
+
+ * str.c: Use header instead of inlining va_copy() macro
+ implementation.
+
Sun May 7 10:06:29 WST 2006 John Darrington <john@darrington.wattle.id.au>
* array.c array.h: Constness of sort.
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/va_copy.h>
+#include <libpspp/alloc.h>
+#include <libpspp/message.h>
+
#include "minmax.h"
#include "size_max.h"
\f
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);
--- /dev/null
+/* PSPP - computes sample statistics.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ Written by Ben Pfaff <blp@gnu.org>.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#ifndef VA_COPY_H
+#define VA_COPY_H 1
+
+#include <stdarg.h>
+
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(DST, SRC) __va_copy (DST, SRC)
+#else
+#define va_copy(DST, SRC) ((DST) = (SRC))
+#endif
+#endif
+
+#endif /* va_copy.h */