From 4ca6860994510e83ae70975c669a5dc37f89919a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Mar 1995 03:41:42 +0000 Subject: #if 0 out code for non-ASCII chars until the locale data format is implemented. --- stdlib/mbtowc.c | 6 +++++- stdlib/wctomb.c | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stdlib/mbtowc.c b/stdlib/mbtowc.c index 62103407c0..fd9449251c 100644 --- a/stdlib/mbtowc.c +++ b/stdlib/mbtowc.c @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include "../locale/localeinfo.h" #include #include #include @@ -33,8 +33,10 @@ long int _mb_shift = 0; int DEFUN(mbtowc, (pwc, s, n), wchar_t *pwc AND CONST char *s AND size_t n) { +#if 0 register CONST mb_char *mb; register wchar_t i; +#endif if (s == NULL) return _mb_shift != 0; @@ -51,6 +53,7 @@ DEFUN(mbtowc, (pwc, s, n), wchar_t *pwc AND CONST char *s AND size_t n) return 1; } +#if 0 if (_ctype_info->mbchar == NULL || _ctype_info->mbchar->mb_chars == NULL) return -1; @@ -79,6 +82,7 @@ DEFUN(mbtowc, (pwc, s, n), wchar_t *pwc AND CONST char *s AND size_t n) return mb->len; } } +#endif return -1; } diff --git a/stdlib/wctomb.c b/stdlib/wctomb.c index 53f1cef3fc..78b55b7af5 100644 --- a/stdlib/wctomb.c +++ b/stdlib/wctomb.c @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include "../locale/localeinfo.h" #include #include #include @@ -32,12 +32,14 @@ extern long int _mb_shift; /* Defined in mbtowc.c. */ int DEFUN(wctomb, (s, wchar), register char *s AND wchar_t wchar) { +#if 0 register CONST mb_char *mb; if (_ctype_info->mbchar == NULL) mb = NULL; else mb = _ctype_info->mbchar->mb_chars; +#endif /* If S is NULL, just say if we're shifted or not. */ if (s == NULL) @@ -63,10 +65,14 @@ DEFUN(wctomb, (s, wchar), register char *s AND wchar_t wchar) return -1; } +#if 1 + return -1; +#else mb += wchar + _mb_shift; if (mb->string == NULL || mb->len == 0) return -1; memcpy((PTR) s, (CONST PTR) mb->string, mb->len + 1); _mb_shift += mb->shift; return mb->len; +#endif } -- cgit 1.4.1