Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Last active January 14, 2022 07:00
Show Gist options
  • Save buzztaiki/56154028bd9dda27ff407e6d89d7b062 to your computer and use it in GitHub Desktop.
Save buzztaiki/56154028bd9dda27ff407e6d89d7b062 to your computer and use it in GitHub Desktop.
libskk hack memo

libskk hack memo

build

autotool とか久しぶり。

$ ./autogen.sh
$ make
$ make check

test

  • make check でテストする
  • assert が失敗すると core 吐いて落ちる。
  • テストが失敗したら tests/test-suite.log を見ると結果が見れる
  • 日本語はUTF-8の octet で出力される。見たいときはそれを printf なり puts なりすれば見れる。
puts %Q^ERROR:common.c:71:check_transitions: assertion failed (preedit == transitions[i].preedit): ("\342\226\274\343\201\255\343\201\212*\343\201\241\343\200\220 \342\226\275n\343\200\221" == "\342\226\274\343\201\255\343\201\212*\343\200\220 \342\226\275n\343\200\221")^
# => ERROR:common.c:71:check_transitions: assertion failed (preedit == transitions[i].preedit): ("▼ねお*ち【 ▽n】" == "▼ねお*【 ▽n】")

skkコマンドの動作確認

以下をやってあげるとインストールせずに tools/skk が使える

  • rules を探せるように LIBSKK_DATA_PATH を指定する
  • 辞書ファイルを明示する

つまり

LIBSKK_DATA_PATH=. tools/skk -f /usr/share/skk/SKK-JISYO.L

あと alias を指定しておくと楽ちん

alias skk='G_MESSAGES_DEBUG=all LIBSKK_DATA_PATH=. tools/skk -f /usr/share/skk/SKK-JISYO.L'

gitignore

  • make gitignore すると .gitignore が生成される。
  • テストで生成されるファイルが ignore に足りないので exclude を数行足しておく。
/tests/*.log
/tests/*.trs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment