summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2020-09-01 10:09:00 +0200
committerChristian Hesse <mail@eworm.de>2020-09-01 10:09:00 +0200
commitdb5adbeae09b8b80587294e4de125af109b8ecdc (patch)
treef7f74a71a5770ae092b46db6f576514bb0684ff5 /CRT.c
parentf5b3e8d2a355e71720cbe3893ddf395dce746572 (diff)
add option (-U, --no-unicode) to disable unicode at runtime
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/CRT.c b/CRT.c
index 33ee9623..0d83bf42 100644
--- a/CRT.c
+++ b/CRT.c
@@ -667,7 +667,7 @@ void CRT_restorePrivileges() {
// TODO: pass an instance of Settings instead.
-void CRT_init(int delay, int colorScheme) {
+void CRT_init(int delay, int colorScheme, bool allowUnicode) {
initscr();
noecho();
CRT_delay = delay;
@@ -733,10 +733,12 @@ void CRT_init(int delay, int colorScheme) {
setlocale(LC_CTYPE, "");
#ifdef HAVE_LIBNCURSESW
- if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
+ if (allowUnicode && strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
CRT_utf8 = true;
else
CRT_utf8 = false;
+#else
+ (void) allowUnicode;
#endif
CRT_treeStr =

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