From 0ba7dc7f505e3c917d507a639913786dd33a9ea0 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Mon, 17 Aug 2026 12:17:18 +0900 Subject: [PATCH] build, data: the Greek capitals by name; one way to run python3; bench.sh checks its own binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Δ Γ Λ Ω Φ Ψ Σ Θ answered only to De, Ga, La, Om, Ph, Ps, Si, Th, while their small letters answered to delta, gamma and the rest; they answer to the names too now. mkemoji and cldr2emoji write UTF-8 whatever the locale, as the other generators already did; verify-map calls python3 the one way; the tests' include path drops a directory nothing includes through; and bench.sh says which binary is missing instead of blaming the daemon ten seconds later. --- Makefile | 12 ++++++------ bench.sh | 5 +++++ map/cldr2emoji | 2 ++ map/emoji.dict | 16 ++++++++-------- map/mkemoji | 2 ++ map/symbol.src | 16 ++++++++-------- tests/Makefile | 2 +- 7 files changed, 32 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 1ba96a2..9282d43 100644 --- a/Makefile +++ b/Makefile @@ -89,12 +89,12 @@ test: check verify-map: test "$$(cut -f1 map/hira.map)" = "$$(cut -f1 map/kata.map)" python3 map/mktelex.py | cmp - map/telex.map - python3 -B map/mkemoji | cmp - map/emoji.dict - python3 -B map/mkhanja | cmp - map/hanja.dict - python3 -B map/verifymap.py map/*.map map/*.dict - python3 -B tests/mkemoji_test.py - python3 -B tests/mkhanja_test.py - python3 -B tests/skk2ktrans_test.py + python3 map/mkemoji | cmp - map/emoji.dict + python3 map/mkhanja | cmp - map/hanja.dict + python3 map/verifymap.py map/*.map map/*.dict + python3 tests/mkemoji_test.py + python3 tests/mkhanja_test.py + python3 tests/skk2ktrans_test.py .PHONY: all check check-live check-stress test verify-map clean gtk bench \ docker docker-image docker-build docker-check docker-check-live \ diff --git a/bench.sh b/bench.sh index 2bc02df..a5768ab 100755 --- a/bench.sh +++ b/bench.sh @@ -9,6 +9,11 @@ if test "$#" -ne 0; then exit 1 fi +if ! test -x ./bench/bench; then + echo "bench.sh: ./bench/bench is not executable; run make bench first" >&2 + exit 1 +fi + strans_pid= perf_pid= diff --git a/map/cldr2emoji b/map/cldr2emoji index 02fa3dc..cb26ffd 100755 --- a/map/cldr2emoji +++ b/map/cldr2emoji @@ -28,6 +28,8 @@ def annotations(path): def main(): + sys.stdout.reconfigure(encoding="utf-8") + sys.stderr.reconfigure(encoding="utf-8") if len(sys.argv) < 3: print(f"usage: {sys.argv[0]} emoji-test.txt annotations.json...", file=sys.stderr) diff --git a/map/emoji.dict b/map/emoji.dict index 9a946dd..4072797 100644 --- a/map/emoji.dict +++ b/map/emoji.dict @@ -52,7 +52,7 @@ beta β chi χ deg ° 🪯 degree ° -delta δ +delta δ Δ de Δ 🪅 dn ↓ down ↓ 🫳 👇 👎 🐨 📩 📉 ⬇️ ⤵️ 🔽 ⏬ 🔻 @@ -60,7 +60,7 @@ _e ₑ eps ε eta η fuck 凸 -gamma γ +gamma γ Γ ga Γ ^i ⁱ ii ∫ @@ -69,34 +69,34 @@ inf ∞ infinity ∞ ♾️ iota ι kappa κ -lambda λ +lambda λ Λ la Λ mul × times × mu μ ^n ⁿ nu ν -omega ω +omega ω Ω om Ω 🕉️ oo ● circle ● 🛞 ⏺️ ⭕ Ⓜ️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ _o ₒ -phi φ +phi φ Φ ph Φ pi π Π 👲 pp ∏ prod ∏ -psi ψ +psi ψ Ψ ps Ψ rho ρ -sigma σ +sigma σ Σ si Σ sq √ sqrt √ ss ∑ sum ∑ tau τ -theta θ +theta θ Θ th Θ up ↑ 🤮 🫳 👆 ☝️ 👍 🤲 🧗 🧗‍♂️ 🧗‍♀️ 🍳 🧣 🧥 📄 📈 ⬆️ ⤴️ 🔝 🔼 ⏫ 🆙 🔺 ups υ diff --git a/map/mkemoji b/map/mkemoji index afa81d8..71873e7 100755 --- a/map/mkemoji +++ b/map/mkemoji @@ -69,6 +69,8 @@ def build(entries): def main(): + sys.stdout.reconfigure(encoding="utf-8") + sys.stderr.reconfigure(encoding="utf-8") paths = [Path(arg) for arg in sys.argv[1:]] or SOURCES try: entries = [entry for path in paths for entry in read(path)] diff --git a/map/symbol.src b/map/symbol.src index de9dfb8..841cf29 100644 --- a/map/symbol.src +++ b/map/symbol.src @@ -55,44 +55,44 @@ χ chi ° deg degree δ delta -Δ De +Δ De Delta ↓ dn down ₑ _e ε eps η eta 凸 fuck γ gamma -Γ Ga +Γ Ga Gamma ⁱ ^i ∫ II integral ∞ inf infinity ι iota κ kappa λ lambda -Λ La +Λ La Lambda × mul times μ mu ⁿ ^n ν nu ω omega -Ω Om +Ω Om Omega ● oo circle ₒ _o φ phi -Φ Ph +Φ Ph Phi π pi Π Pi ∏ PP prod ψ psi -Ψ Ps +Ψ Ps Psi ρ rho σ sigma -Σ Si +Σ Si Sigma √ sq sqrt ∑ SS sum τ tau θ theta -Θ Th +Θ Th Theta ↑ up υ ups ✓ vv check diff --git a/tests/Makefile b/tests/Makefile index ca2add4..06af136 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,7 +3,7 @@ LD = 9l HOSTCC = cc PKG_CONFIG ?= pkg-config CFLAGS ?= -O2 -g -UNIT_CPPFLAGS = -I.. -I../cutest +UNIT_CPPFLAGS = -I.. UNIT_CFLAGS = -std=c99 -Wall -Wextra HOST_CFLAGS = -std=c99 -Wall -Wextra TEXT_CFLAGS = $(shell $(PKG_CONFIG) --cflags pangocairo cairo fontconfig)