From 599ad608ee3297bc1e2bb11656a97335e303877a Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Wed, 3 Jul 2002 17:24:17 +0000 Subject: Enable WCHAR support for C/POSIX stub locales. Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support. --- libc/stdio/old_vfprintf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libc/stdio/old_vfprintf.c') diff --git a/libc/stdio/old_vfprintf.c b/libc/stdio/old_vfprintf.c index 036c97c94..945f59a48 100644 --- a/libc/stdio/old_vfprintf.c +++ b/libc/stdio/old_vfprintf.c @@ -143,7 +143,9 @@ /* #define __isdigit(c) (((unsigned int)(c - '0')) < 10) */ +#if defined(__UCLIBC_HAS_FLOATS__) extern size_t _dtostr(FILE * fp, long double x, struct printf_info *info); +#endif enum { @@ -179,7 +181,7 @@ int vfprintf(FILE * __restrict op, register const char * __restrict fmt, va_list ap) { int i, cnt, lval, len; - char *p; + register char *p; const char *fmt0; int preci, width; #define upcase i @@ -325,7 +327,7 @@ int vfprintf(FILE * __restrict op, register const char * __restrict fmt, p = _uintmaxtostr((tmp + sizeof(tmp) - 1), ((lval>1) /* TODO -- longlong/long/int/short/char */ ? va_arg(ap, uintmax_t) - : (uintmax_t) ((long long) /* sign-extend! */ + : (uintmax_t) ((intmax_t) /* sign-extend! */ va_arg(ap, long))), -radix, upcase); -- cgit v1.2.3