summaryrefslogtreecommitdiff
path: root/libc/stdio/old_vfprintf.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-07-03 17:24:17 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-07-03 17:24:17 +0000
commit599ad608ee3297bc1e2bb11656a97335e303877a (patch)
treec5b59cb5fa2c90f3b0c8b4d9831ae763f2825327 /libc/stdio/old_vfprintf.c
parentab579e469c6787df9bd2252b3de8b1700d5097d8 (diff)
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.
Diffstat (limited to 'libc/stdio/old_vfprintf.c')
-rw-r--r--libc/stdio/old_vfprintf.c6
1 files changed, 4 insertions, 2 deletions
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);