diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-11-14 21:43:44 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-11-14 21:43:44 +0200 |
commit | cceacad1d367b3019a5648521d4b4c0e201297f5 (patch) | |
tree | d00d122f5abc8231b93a855f62853e3924bbdd08 | |
parent | 7e8f32c84caa4c2a99e4cea09fa25c5ae9722784 (diff) | |
download | egawk-cceacad1d367b3019a5648521d4b4c0e201297f5.tar.gz egawk-cceacad1d367b3019a5648521d4b4c0e201297f5.tar.bz2 egawk-cceacad1d367b3019a5648521d4b4c0e201297f5.zip |
More changes for non-MBS case.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | mbsupport.h | 6 | ||||
-rw-r--r-- | missing_d/ChangeLog | 4 | ||||
-rw-r--r-- | missing_d/wcmisc.c | 14 |
4 files changed, 29 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2011-11-14 Arnold D. Robbins <arnold@skeeve.com> + + * mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin. + +2011-11-12 Eli Zaretskii <eliz@gnu.org> + + * mbsupport.h: Additional glop for dfa.c in Windows environment. + 2011-11-01 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Move glop for ! MBS_SUPPORT to ... diff --git a/mbsupport.h b/mbsupport.h index 1a30785d..57abaa60 100644 --- a/mbsupport.h +++ b/mbsupport.h @@ -40,6 +40,7 @@ #if defined(HAVE_ISWCTYPE) \ && defined(HAVE_LOCALE_H) \ + && defined(HAVE_BTOWC) \ && defined(HAVE_MBRLEN) \ && defined(HAVE_MBRTOWC) \ && defined(HAVE_WCHAR_H) \ @@ -70,10 +71,11 @@ /* All this glop is for dfa.c. Bleah. */ +#define wchar_t char #define wctype_t int -#define wint_t int +#define wint_t int #define mbstate_t int -#define WEOF EOF +#define WEOF EOF #define towupper toupper #define towlower tolower #define btowc(x) (x) diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index 45cc1acc..4a06aa60 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,7 @@ +2011-11-02 Pat Rankin <r.pat.rankin@gmail.com> + + * wcmisc.c: Make code be conditional upon corresponding !HAVE_WCxxx. + 2011-11-01 Arnold D. Robbins <arnold@skeeve.com> * wcmisc.c: New file. diff --git a/missing_d/wcmisc.c b/missing_d/wcmisc.c index e53730ea..d2b7aa08 100644 --- a/missing_d/wcmisc.c +++ b/missing_d/wcmisc.c @@ -16,8 +16,9 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */ +#if !defined(HAVE_WCTYPE) || !defined(HAVE_ISWCTYPE) static const char *classes[] = { - "<dummy>", + "<dummy>", "alnum", "alpha", "blank", @@ -32,12 +33,16 @@ static const char *classes[] = { "xdigit", NULL }; +#endif +#ifndef HAVE_ISWCTYPE static int is_blank (int c) { return (c == ' ' || c == '\t'); } +#endif +#ifndef HAVE_WCTYPE wctype_t wctype(const char *name) { int i; @@ -48,7 +53,9 @@ wctype_t wctype(const char *name) return 0; } +#endif +#ifndef HAVE_ISWCTYPE int iswctype(wint_t wc, wctype_t desc) { int j = sizeof(classes) / sizeof(classes[0]); @@ -72,7 +79,9 @@ int iswctype(wint_t wc, wctype_t desc) default: return 0; } } +#endif +#ifndef HAVE_WCSCOLL int wcscoll(const wchar_t *ws1, const wchar_t *ws2) { size_t i; @@ -86,3 +95,6 @@ int wcscoll(const wchar_t *ws1, const wchar_t *ws2) return (ws1[i] - ws2[i]); } +#endif + +/*wcmisc.c*/ |