[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/str.c
From: |
John Darrington |
Subject: |
[Pspp-cvs] Changes to pspp/src/str.c |
Date: |
Mon, 12 Sep 2005 07:33:57 -0400 |
Index: pspp/src/str.c
diff -u pspp/src/str.c:1.15 pspp/src/str.c:1.16
--- pspp/src/str.c:1.15 Sun Jun 12 21:58:10 2005
+++ pspp/src/str.c Mon Sep 12 11:33:55 2005
@@ -453,7 +453,9 @@
been written. */
int avail, needed;
+ va_list a1;
+ va_copy(a1, args);
avail = st->capacity - st->length + 1;
needed = vsnprintf (st->string + st->length, avail, format, args);
@@ -462,17 +464,22 @@
{
ds_extend (st, st->length + needed);
- vsprintf (st->string + st->length, format, args);
+ vsprintf (st->string + st->length, format, a1);
}
else
while (needed == -1)
{
+ va_list a2;
+ va_copy(a2, a1);
+
ds_extend (st, (st->capacity + 1) * 2);
avail = st->capacity - st->length + 1;
- needed = vsnprintf (st->string + st->length, avail, format, args);
+ needed = vsnprintf (st->string + st->length, avail, format, a2);
+ va_end(a2);
}
+ va_end(a1);
st->length += needed;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] Changes to pspp/src/str.c,
John Darrington <=