aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-09-21 22:08:11 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-09-21 22:08:11 +0300
commitbc5591ac396525b1cf2a2e43f4396b4b854edd9b (patch)
treef95a3980f527d1901a6051bff2ab7e5031ce53f4
parenta203ea7b6796d2a48c82827ab5ead9589baa6bd8 (diff)
downloadegawk-bc5591ac396525b1cf2a2e43f4396b4b854edd9b.tar.gz
egawk-bc5591ac396525b1cf2a2e43f4396b4b854edd9b.tar.bz2
egawk-bc5591ac396525b1cf2a2e43f4396b4b854edd9b.zip
Additional mbs fixes.
-rw-r--r--ChangeLog1
-rw-r--r--dfa.c6
-rw-r--r--mbsupport.h2
3 files changed, 4 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e92c00e1..425f706c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
that remove many ifdefs, moving many conditions for multibyte
support into regular C code and relying GCC's dead code optimization
to elimnate code that won't be needed.
+ * dfa.c: Further edits now that MBS_SUPPORT is always defined.
2011-09-16 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/dfa.c b/dfa.c
index 29febf57..9a2e01eb 100644
--- a/dfa.c
+++ b/dfa.c
@@ -53,8 +53,8 @@
#include "gettext.h"
#define _(str) gettext (str)
-#include "mbsupport.h" /* defines MBS_SUPPORT if appropriate */
-#ifdef MBS_SUPPORT
+#include "mbsupport.h" /* defines MBS_SUPPORT to 1 or 0, as appropriate */
+#if MBS_SUPPORT
/* We can handle multibyte strings. */
#include <wchar.h>
#include <wctype.h>
@@ -640,7 +640,7 @@ using_utf8 (void)
static int utf8 = -1;
if (utf8 == -1)
{
-#if defined HAVE_LANGINFO_CODESET && defined MBS_SUPPORT
+#if defined HAVE_LANGINFO_CODESET && MBS_SUPPORT
utf8 = (STREQ (nl_langinfo (CODESET), "UTF-8"));
#else
utf8 = 0;
diff --git a/mbsupport.h b/mbsupport.h
index 4b71019d..4c9e9bfb 100644
--- a/mbsupport.h
+++ b/mbsupport.h
@@ -57,8 +57,6 @@
#else
# define MBS_SUPPORT 0
#endif
-# undef MBS_SUPPORT
-# define MBS_SUPPORT 0
#if ! MBS_SUPPORT
# undef MB_CUR_MAX