diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-04-23 21:44:22 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-04-23 21:44:22 +0000 |
commit | f777e3a5ac5d2fda9047dc2b7939d3f60bdef609 (patch) | |
tree | a4a669023388c6d657033d6242adf5d306173195 /newlib/libc/stdio/vfprintf.c | |
parent | 27c7566ca4f436cc6184fdaf568dd84ca9c501f1 (diff) | |
download | cygnal-f777e3a5ac5d2fda9047dc2b7939d3f60bdef609.tar.gz cygnal-f777e3a5ac5d2fda9047dc2b7939d3f60bdef609.tar.bz2 cygnal-f777e3a5ac5d2fda9047dc2b7939d3f60bdef609.zip |
2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* configure.in: Define _MB_CAPABLE if mb supported.
* configure: Regenerated.
* configure.host: Remove manual setting of MB_CAPABLE compiler
flag.
* newlib.hin: Add _MB_CAPABLE flag.
* libc/ctype/iswalpha.c, libc/ctype/iswblank.c: Include <newlib.h>
and check for _MB_CAPABLE flag instead of MB_CAPABLE.
* libc/ctype/iswcntrl.c, libc/ctype/iswprint.c: Ditto.
* libc/ctype/iswpunct.c, libc/ctype/iswspace.c: Ditto.
* libc/ctype/jp2uc.c: Ditto.
* libc/ctype/towlower.c, libc/ctype/towupper.c: Ditto.
* libc/locale/locale.c: Ditto
* libc/machine/powerpc/vfscanf.c: Ditto
* libc/stdio/vfprintf.c, libc/stdio/vfscanf.c: Ditto
* libc/stdlib/mblen.c: Ditto
* libc/stdlib/mblen_r.c, libc/stdlib/mbrlen.c: Ditto
* libc/stdlib/mbrtowc.c, libc/stdlib/mbsrtowcs.c: Ditto
* libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c: Ditto
* libc/stdlib/mbtowc_r.c, libc/stdlib/wcrtomb.c: Ditto
* libc/stdlib/wcsrtombs.c, libc/stdlib/wcstombs.c: Ditto
* libc/stdlib/wctomb.c, libc/sys/linux/intl/dcigettext.c: Ditto
* libc/sys/linux/intl/explodename.c: Ditto
* libc/sys/linux/intl/finddomain.c: Ditto
* libc/sys/linux/intl/l10nflist.c: Ditto
* libc/sys/linux/intl/loadmsgcat.c: Ditto
* libc/sys/linux/intl/localealias.c: Ditto
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index b61c78d2c..ab40b2f6c 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -180,6 +180,7 @@ static char *rcsid = "$Id$"; #endif #include <_ansi.h> +#include <newlib.h> #include <reent.h> #include <stdio.h> #include <stdlib.h> @@ -440,7 +441,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), struct __siov iov[NIOV];/* ... and individual io vectors */ char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ char ox[2]; /* space for 0x hex-prefix */ -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE wchar_t wc; mbstate_t state; /* mbtowc calls from library must not change state */ #endif @@ -457,7 +458,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), static _CONST char zeroes[PADSIZE] = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}; -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE memset (&state, '\0', sizeof (state)); #endif /* @@ -560,7 +561,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), */ for (;;) { cp = fmt; -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE while ((n = _mbtowc_r (data, &wc, fmt, MB_CUR_MAX, &state)) > 0) { if (wc == '%') break; @@ -574,7 +575,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), PRINT (cp, m); ret += m; } -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE if (n <= 0) goto done; #else @@ -1491,7 +1492,7 @@ _DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), int pos, last_arg; int max_pos_arg = n; enum types { INT, LONG_INT, SHORT_INT, QUAD_INT, CHAR, CHAR_PTR, DOUBLE, LONG_DOUBLE, WIDE_CHAR }; -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE wchar_t wc; mbstate_t wc_state; int nbytes; @@ -1501,7 +1502,7 @@ _DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), if (*last_fmt != NULL) fmt = *last_fmt; -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE memset (&wc_state, '\0', sizeof (wc_state)); #endif @@ -1509,7 +1510,7 @@ _DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), read the desired parameter from the vararg list. */ while (*fmt && n >= numargs) { -#ifdef MB_CAPABLE +#ifdef _MB_CAPABLE while ((nbytes = _mbtowc_r (data, &wc, fmt, MB_CUR_MAX, &wc_state)) > 0) { fmt += nbytes; |