diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-10 14:21:11 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-10 14:21:11 +0000 |
commit | bb118b7356439a930be13962ced5f36aab9f74bf (patch) | |
tree | 5a9fad8dd6dc7f236bfc8e6b22c04cad0b837928 /gc/cord | |
parent | delete old ftp site (diff) | |
download | w3m-bb118b7356439a930be13962ced5f36aab9f74bf.tar.gz w3m-bb118b7356439a930be13962ced5f36aab9f74bf.zip |
import gc6.1alpha5
Diffstat (limited to 'gc/cord')
-rw-r--r-- | gc/cord/cordprnt.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gc/cord/cordprnt.c b/gc/cord/cordprnt.c index 8d57f04..6ecc00e 100644 --- a/gc/cord/cordprnt.c +++ b/gc/cord/cordprnt.c @@ -233,7 +233,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args) if (width == NONE && prec == NONE) { register char c; - c = va_arg(args, int); + c = (char)va_arg(args, int); CORD_ec_append(result, c); goto done; } @@ -255,12 +255,18 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args) /* Use standard sprintf to perform conversion */ { register char * buf; - va_list vsprintf_args = args; - /* The above does not appear to be sanctioned */ - /* by the ANSI C standard. */ + va_list vsprintf_args; int max_size = 0; int res; - +# ifdef __va_copy + __va_copy(vsprintf_args, args); +# else +# if defined(__GNUC__) /* and probably in other cases */ + va_copy(vsprintf_args, args); +# else + vsprintf_args = args; +# endif +# endif if (width == VARIABLE) width = va_arg(args, int); if (prec == VARIABLE) prec = va_arg(args, int); if (width != NONE) max_size = width; |