commit 9be62a69649f12bfe379fa8b0bb0bc7650b857cd
parent c000917cdad717f3c188f81bbb11da905af45499
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 17 May 2025 11:37:06 +0200
build: fix compilation when configured with --disable-utf8
Always include the function using_utf8(), to be able to avoid
the cluttering #ifdef that was removed in the previous commit.
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/chars.c b/src/chars.c
@@ -24,25 +24,25 @@
#include <ctype.h>
#include <string.h>
+static bool use_utf8 = FALSE;
+ /* Whether we've enabled UTF-8 support. */
+
#ifdef ENABLE_UTF8
#include <wchar.h>
#include <wctype.h>
-static bool use_utf8 = FALSE;
- /* Whether we've enabled UTF-8 support. */
-
/* Enable UTF-8 support. */
void utf8_init(void)
{
use_utf8 = TRUE;
}
+#endif
/* Is UTF-8 support enabled? */
bool using_utf8(void)
{
return use_utf8;
}
-#endif /* ENABLE_UTF8 */
#ifdef ENABLE_SPELLER
/* Return TRUE when the given character is some kind of letter. */
diff --git a/src/prototypes.h b/src/prototypes.h
@@ -208,8 +208,8 @@ void to_last_file(void);
/* Most functions in chars.c. */
#ifdef ENABLE_UTF8
void utf8_init(void);
-bool using_utf8(void);
#endif
+bool using_utf8(void);
bool is_alpha_char(const char *c);
bool is_blank_char(const char *c);
bool is_cntrl_char(const char *c);