summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-07-17 14:33:34 +0200
committerChristian Hesse <mail@eworm.de>2015-08-19 22:42:34 +0200
commitd8e23bb0847d766d7f3fdf8bdd11f7d70829fad8 (patch)
tree76e41872d9bf93f03cc45549021c6988538f5f67 /CRT.c
parent9e67b6585ec42d16fd73a4f2df372f54f1188a32 (diff)
remove UTF-8 code when compiling with --disable-unicode
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/CRT.c b/CRT.c
index b44a86b6..3c0829a1 100644
--- a/CRT.c
+++ b/CRT.c
@@ -133,6 +133,8 @@ const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
"-", // TREE_STR_SHUT
};
+#ifdef HAVE_LIBNCURSESW
+
const char *CRT_treeStrUtf8[TREE_STR_COUNT] = {
"\xe2\x94\x80", // TREE_STR_HORZ ─
"\xe2\x94\x82", // TREE_STR_VERT │
@@ -143,14 +145,16 @@ const char *CRT_treeStrUtf8[TREE_STR_COUNT] = {
"\xe2\x94\x80", // TREE_STR_SHUT ─
};
+bool CRT_utf8 = false;
+
+#endif
+
const char **CRT_treeStr = CRT_treeStrAscii;
static bool CRT_hasColors;
int CRT_delay = 0;
-bool CRT_utf8 = false;
-
int* CRT_colors;
int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
@@ -596,7 +600,11 @@ void CRT_init(int delay, int colorScheme) {
CRT_utf8 = false;
#endif
- CRT_treeStr = CRT_utf8 ? CRT_treeStrUtf8 : CRT_treeStrAscii;
+ CRT_treeStr =
+#ifdef HAVE_LIBNCURSESW
+ CRT_utf8 ? CRT_treeStrUtf8 :
+#endif
+ CRT_treeStrAscii;
mousemask(BUTTON1_CLICKED, NULL);
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy