aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-02 16:43:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-02 16:43:13 +0000
commit804642580e98ce01eb7ca90a24a88182daca4a16 (patch)
treee710ace7dd16357c4774e27c9bbbdaaa9c117363
parentmeson: only define FOOT_UNICODE_PRECOMPOSE if combining chars > 0 (diff)
meson: don't generate pre-compose table when -Dunicode-precompose=false
-rw-r--r--meson.build16
-rw-r--r--vt.c2
2 files changed, 12 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index f44f05c2..eca6e0fd 100644
--- a/meson.build
+++ b/meson.build
@@ -95,12 +95,16 @@ foreach prot : [
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
endforeach
-generate_unicode_precompose_sh = files('scripts/generate-unicode-precompose.sh')
-unicode_data = custom_target(
- 'unicode-data',
- input: 'UnicodeData.txt',
- output: 'unicode-compose-table.h',
- command: [generate_unicode_precompose_sh, '@INPUT@', '@OUTPUT@'])
+if get_option('unicode-max-combining-chars') > 0 and get_option('unicode-precompose')
+ generate_unicode_precompose_sh = files('scripts/generate-unicode-precompose.sh')
+ unicode_data = custom_target(
+ 'unicode-data',
+ input: 'UnicodeData.txt',
+ output: 'unicode-compose-table.h',
+ command: [generate_unicode_precompose_sh, '@INPUT@', '@OUTPUT@'])
+else
+ unicode_data = []
+endif
generate_version_sh = files('generate-version.sh')
version = custom_target(
diff --git a/vt.c b/vt.c
index 954896c1..29737ddc 100644
--- a/vt.c
+++ b/vt.c
@@ -527,6 +527,7 @@ action_utf8_4_entry(struct terminal *term, uint8_t c)
term->vt.utf8.data[term->vt.utf8.idx++] = c;
}
+#if FOOT_UNICODE_PRECOMPOSE
static wchar_t
precompose(wchar_t base, wchar_t comb)
{
@@ -554,6 +555,7 @@ precompose(wchar_t base, wchar_t comb)
return (wchar_t)-1;
}
+#endif
static void
action_utf8_print(struct terminal *term, uint8_t c)