pax_global_header00006660000000000000000000000064123305622410014510gustar00rootroot0000000000000052 comment=1165ae492a4982e3bb357d361eac46be6c57df57 jj1bdx-dbskkd-cdb-1165ae4/000077500000000000000000000000001233056224100152105ustar00rootroot00000000000000jj1bdx-dbskkd-cdb-1165ae4/.travis.yml000066400000000000000000000003361233056224100173230ustar00rootroot00000000000000language: c notifications: email: false before_install: sudo apt-get install libcdb-dev script: make CC=${CC} COMPAT="-Wall -O2 -g -I/usr/include" CDBLIB="/usr/lib/libcdb.a" install: true compiler: - clang - gcc jj1bdx-dbskkd-cdb-1165ae4/CHANGES000066400000000000000000000047741233056224100162170ustar00rootroot0000000000000020131226 Document changes only, no code change READMEJP revised and now READMEJP.md README deleted (read README.md instead) 20090206 version: 2.00. READMEJP encoding changed to euc-jp skk-server-protocol.txt revised README added as a brief English document 20090131 skk-server-protocol.txt added READMEJP revised and simplified 20090129 Made CHANGES in reverse-chlonogical order 20090127 makeskkcdb.sh now uses tinycdb's cdb instead of djb's cdbmake 20090126 Removed ambiguity from LICENSE Attached LICENSE content in dbskkd-cdb.c 20090125 inetd does not handle stderr well, so explicit error messages before crashing are all commented out (the fast-fail principle applied) setting VERBOSE_MSG as a compile flag will reenable the messages (still useful when used with ucspi-tcp) More comments on the code inserted DUMMYHOSTNAME made shorter NOTE: dictionary name is changed to JISYO_FILE (previously JISHO -> now *JISYO*) to match the SKK-JISYO.* filenames 20090125-2 dbskkd-cdb.c performs macro replacement diesys(string) -> exit(1) 20090124 dropped supporting server request '3' with actual hostname or IP address (the current syntax will be broken anyway if IPv6 should be supported) since NO CLIENT uses this information for authentication or anything meaningful except for showing the information to the user when optionally requested, so the answer to the request is replaced by a fixed string defined in the DUMMYHOSTNAME macro 20090118 version: 1.99-expr. strictly EXPERIMENTAL, NOT a release removed cdb-0.75 dependencies now tinycdb-0.76 required removed chroot, setuid, setgid calls from the program (more like 1.01) Japanese docs changed to reflect the status 20090114 patches from Tatsuya Kinoshita (Debian package maintainer) * awk-locale.patch: Set LC_ALL to C for awk in skktocdbm.sh. * datasize.patch: Increase DATASIZE from 2048 to 4096 so that the longest line of SKK-JISYO.L can be used. also Tatsuya pointed out the uint32 problem (which has been fixed) of variable datalen 20090113 BSD make dependencies resolved as pointed out in the following tweet: http://twitter.com/konosuke/status/1094925767 cleanupcdb.sh added gcc-4.2.1 signedness warning cleared by quitting using unsigned chars 20000325 Japanese README complete version: dbskkd-cdb-1.70dev. 20000312 Changes from 1.01 to 1.70dev: * chroot()s to the SERVER_DIR * search() included into the main()'s command loop * reports pid to stderr * now uses cdb-0.75 source files instead of cdb-0.55's jj1bdx-dbskkd-cdb-1165ae4/LICENSE000066400000000000000000000032051233056224100162150ustar00rootroot00000000000000License statement for dbskkd-cdb Copyright (c) 1998-2013 by Kenji Rikitake. All rights reserved. This software is distributed under the terms of either Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/ or the Simplified BSD license, shown as follows: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. For more information on the dbskkd-cdb project, please refer to https://github.com/jj1bdx/dbskkd-cdb/ [End of License statement for dbskkd-cdb] jj1bdx-dbskkd-cdb-1165ae4/Makefile000066400000000000000000000010311233056224100166430ustar00rootroot00000000000000# dbskkd-cdb Makefile CC = cc -Wall -O2 -g -I/usr/local/include COMPAT = CDBLIB = /usr/local/lib/libcdb.a INSTALLDIR = /usr/local/libexec .c.o: $(CC) $(COMPAT) $(PRIVATE) -c $*.c all: dbskkd-cdb clean: /bin/rm -f dbskkd-cdb *.o dbskkd-cdb: dbskkd-cdb.o $(CC) $(COMPAT) $(PRIVATE) -o dbskkd-cdb \ dbskkd-cdb.o ${CDBLIB} dbskkd-cdb.o: dbskkd-cdb.c $(CC) $(COMPAT) $(PRIVATE) -c dbskkd-cdb.c error.o: error.c error.h install: dbskkd-cdb cp dbskkd-cdb $(INSTALLDIR); chmod 755 $(INSTALLDIR)/dbskkd-cdb # end of makefile jj1bdx-dbskkd-cdb-1165ae4/README.md000066400000000000000000000047561233056224100165030ustar00rootroot00000000000000# dbskkd-cdb readme/installation note in English for version dbskkd-cdb-2.00 by Kenji Rikitake last updated 1-MAY-2014 ## Travis CI build status for the master branch [![Build Status](https://travis-ci.org/jj1bdx/dbskkd-cdb.svg?branch=master)](https://travis-ci.org/jj1bdx/dbskkd-cdb) ## Summary dbskkd-cdb is a dictionary server for SKK Japanese Input Method system. For building the executable file, [TinyCDB](http://www.corpit.ru/mjt/tinycdb.html) is required. See `skk-server-protocol.txt` for the details. ## Test environment * FreeBSD/amd64 10.0-STABLE * On [Travis CI](https://travis-ci.org/jj1bdx/dbskkd-cdb): Ubuntu 12.04 LTS Precise ## Installation procedure 1. makeskkcdb.sh converts a plaintext SKK dictionary to the CDB format. The default source file name is `/usr/local/share/skk/SKK-JISYO.L` and the converted cdb file will be placed in the current directory as `SKK-JISYO.L.cdb`. This `.cdb` file should be placed with the filename specified in `JISYO_FILE` macro in `dbskkd-cdb.c`. 2. do `make` to compile. This require `cdb.h` and `libcdb.a` of TinyCDB. For the Make prodecure on Linux, consult `.travis.yml`. 3. do `make install` to copy the compile executable image to the executable image directory. The default directory is `/usr/local/libexec`. ## User privilege on installation Assign a dedicated non-privileged user for this program and invoke with the uid. DO NOT invoke with the root or superuser privilege. An example of `inetd.conf` is available at `example-inetd.txt`. An example of daemontools run file is available `at example-daemontools.txt`. ## Note on collecting user information dbskkd-cdb does *not* collect any usage statistics or information. ## Bug reports and comments The source code repository and issue tracker is available in Github at . Inquiries and comments are welcome by the forms of GitHub Pull Requests and issues in Japanese and English. If you do not want to use GitHub, contact Kenji Rikitake by email for your proposals. ## Acknowledgment Daniel J. Bernstein for his cdb, Michael Tokarev for his TinyCDB. SKK developers and contributors including: Makahito Sato, Mikio Nakajima, Yukiyoshi Kameyama, Masaaki Sato, Takashi Sakamoto, Fumitoshi Ukai, Toshinori Maeno, Yasuhiro Honda, Hayao Nakahara, Takahiro Kikuchi, Hideo Matsumoto, Hidetaka Koie, Takao Kawamura, Hideto Kihara, Rikishi Inakazu, Makoto Matsushita, Atsushi Yamagata, Tatsuya Kinoshita, Ryosuke Nakai. jj1bdx-dbskkd-cdb-1165ae4/READMEJP.md000066400000000000000000000150001233056224100167150ustar00rootroot00000000000000# dbskkd-cdb Release Notes in Japanese for version dbskkd-cdb-2.00 by Kenji Rikitake last updated 26-DEC-2013 ## dbskkd-cdb の概要 dbskkd-cdb は, skkserv と同様の機能を提供する SKK 用の共通辞書サーバーである.辞書は D. J. Bernstein の cdb を使ってデータベース化し,検索を高速化している.本サーバーは同種のツール pskkserv を基にしている. cdb 本プログラムは cdb 互換ライブラリである TinyCDB へのリンクを前提としている.ビルドには TinyCDB のヘッダ cdb.h とライブラリ libcdb.a が必要である.(cdbの同種のライブラリも使用可能であるが,テストしていない.) TinyCDB ## dbskkd-cdb の動作環境 dbskkd-cdb は,現時点では FreeBSD 10.0-PRERELEASE (svn r259846) にて基本的動作を確認している. FreeBSD の port および debian の package については動作を確認している. 他の OS でも大きな変更なしに動作すると思われる.ただし動作の確認は動作の保証を意味しない.また動作条件の細かな変化による誤動作については一切保証しない. dbskkd-cdb-1.01 および 1.71dev の cdb ファイルはそのまま動作する. ## インストール前の注意 1. 添付の makeskkcdb.sh を実行する.このスクリプトでは辞書ファイルは skktocdbm.sh の標準入力に与える. ファイル名の既定値は /usr/local/share/skk/SKK-JISYO.L である.実行するとカレントディレクトリに SKK-JISYO.L.cdb が作られる.この辞書ファイルはインストールの際 dbskkd-cdb.c 中の JISYO\_FILE で指定するディレクトリに置く.JISYO\_FILE の既定値は /usr/local/share/skk/SKK-JISYO.L.cdb である. 注意: 1.x ではこのマクロは `JISHO_FILE` と定義していたが,辞書ファイルとの名前の整合性を取るためにこのようにした. 2. 実行ファイル dbskkd-cdb をコンパイルするため make する. この際 TinyCDB 中の cdb.h が必要となる. また TinyCDB 中の libcdb.a をリンクする. 3. make install で dbskkd-cdb を実行ディレクトリにコピーする.既定値では /usr/local/libexec へコピーする. ## インストールの際の注意 このプログラム専用の非特権ユーザを設定し,そのユーザの権限で起動するようにすること. ★ root 権限で起動してはならない. ★ example-inetd.txt に inetd.conf への追加内容例,example-daemontools.txt に daemontools を使った場合の run ファイルへの記述例を示している. ## 注意・限界・改良の余地 dbskkd-cdb は一旦起動されると終了するまではcdb辞書ファイルをオープンしたままになっている. cdb ではオープンされたファイルの中身は変わらないことを仮定しているため, dbskkd-cdb を起動した状態で cdb 辞書ファイルの内容を変更してはならない. cdb 辞書ファイルを作り直す場合は, dbskkd-cdb を起動していないことを確認する必要がある. 個人的には SERVER\_NOT\_FOUND の時の挙動は無駄だと思うが,慣習として対応している.プロトコルの詳細については skk-server-protocol.txt に記している. dbskkd-cdb では,接続してきたクライアントの利用履歴を取ることはない. ## 配布条件 Creative Commons Attribution 3.0 Unported License あるいは Simplified BSD License に準拠します. 詳しい条件については ファイル LICENSE の内容を参照してください. ## バグレポート,意見交換など 本プログラムに関する意見交換は情報共有のためGitHub 上のレポジトリ のissueとして報告していただくようお願いします.日本語あるいは英語でお願いします. ## 謝辞 cdb の開発者 Daniel J. Bernstein および TinyCDB の開発者 Michael Tokarev の両氏に最大限の感謝と賛辞を贈ります. また,本プログラムの開発にあたって,以下の方々,ここに列挙していない contributor の皆様,ならびに SKK の利用を通じて改良点などをご教示くださった皆様に感謝致します. (敬称略) 佐藤 雅彦,中島 幹夫,亀山 幸義,佐藤 正章,阪本 崇,鵜飼 文敏,前野 年紀,本田 康弘,中原 早生,菊地 高広,まつもとひでお,鯉江 英隆,川村 尚生,木原 英人,稲員 力士,松下 誠,山縣 敦,木下 達也,中居 良介 ## 1.71dev からの修正箇所のメモ (see CHANGES for details) * 木下達也さん (Debian maintainer) からのパッチを適用 * 以下の Twitter @konosuke 氏からの指摘により, BSD make 依存の部分を GNU make でも通るようにした * gcc-4.2.1 (FreeBSD 7.1-RELEASE stock cc) の signedness の問題をとりあえず形式的に修正(意味的にも問題はないと思うが,要確認) * chroot, setuid, setgid をやめた. * TinyCDB にリンクするように変更.FreeBSD でも主な Linux distro でも tinycdb-0.76 の cdb.h は別途入手可.(FreeBSD databases/tinycdb, Debian libcdb-dev package) * hostname/IP アドレスを返すクライアントからの要求 ('3') は,変換の用途にはまったく使われていないことを確認(情報表示用の用途のみ).よってこの要求に対する返答は固定文字列で返すようにした.これで TCPLOCALHOST/TCPLOCALIP を getenv() しなくて済む. * inetd は stderr も stdout 同様に扱ってしまうため,stderr でメッセージを返す意味がない.syslog でわざわざメッセージを出すほどの理由もないので,stderr へ出力するコードはすべて VERBOSE\_MSG というコンパイル時フラグを有効にした時のみ組み込まれるようにした. * 名前の整合性を取るために JISHO\_FILE -> JISYO\_FILE としている. * makeskkcdb.sh で tinycdb の cdb を使うようにした. * READMEJP の encoding を UTF-8 に変更し,markdownフォーマットに変更した上で READMEJP.md と改名. * skk-server-protocol.txt を追加. * README を削除し, README.md を代わりとする. [End of memorandum] jj1bdx-dbskkd-cdb-1165ae4/dbskkd-cdb.c000066400000000000000000000151571233056224100173550ustar00rootroot00000000000000/* * dbskkd-cdb.c * SKK dictionary Server * with Daniel J. Bernstein's cdb database * * Copyright (c) 1998-2013 by Kenji Rikitake. All rights reserved. * See LICENSE of the distribution kit for the redistribution conditions. * The copy of the LICENSE file is attached at the end of this code. */ #include #include #include #include #include #include #include #include /* tinycdb required */ #include "cdb.h" /* * dbskkd dictionary file * default value: FreeBSD port japanese/ddskk * note: the macro was JISHO_FILE in 1.x * spelling changed from JISHO to JISYO */ #ifndef JISYO_FILE #define JISYO_FILE "/usr/local/share/skk/SKK-JISYO.L.cdb" #endif /* JISYO_FILE */ #define BUFSIZE (1024) /* max size of a request */ #define DATASIZE (4096) /* max size of a result */ #define CLIENT_END '0' #define CLIENT_REQUEST '1' #define CLIENT_VERSION '2' #define CLIENT_HOST '3' #define SERVER_FOUND '1' #define SERVER_NOT_FOUND '4' #define STDIN (fileno(stdin)) #define STDOUT (fileno(stdout)) /* these strings must be terminated with space */ #define VERSION "dbskkd-cdb-2.00 " #define DUMMYHOSTNAME "novalue: " /* * define VERBOSE_MSG * if explicit error messages are needed */ /* #undef VERBOSE_MSG */ /* * diesys() is replaced by exit(1) * when VERBOSE_MSG is not defined */ #ifdef VERBOSE_MSG /* * diesys() originally from DJB's cdb-0.55 * modified by Kenji Rikitake */ void diesys(char *why) { fprintf(stderr, "dbskkd-cdb: pid %d ", getpid()); perror(why); exit(1); } #else /* !VERBOSE_MSG */ #define diesys(dummy_string) exit(1) #endif /* VERBOSE_MSG */ /* main program */ int main(int argc, char *argv[]) { char combuf[BUFSIZE], data[DATASIZE]; char *pbuf, *key, *p; struct cdb diccdb; int dicfd, ex, length; unsigned int keylen, datalen; /* open dictionary cdb file */ if ((dicfd = open(JISYO_FILE, O_RDONLY, S_IRUSR)) < 0) { diesys("cannot open() the dictionary file " JISYO_FILE); /* NOTREACHED */ } cdb_init(&diccdb, dicfd); /* command loop */ /* set ex to non-zero for exiting */ ex = 0; while (!ex) { length = read(STDIN, &combuf[0], BUFSIZE - 1); if (length < 0) diesys("read error from stdin"); else if (length == 0) { #ifdef VERBOSE_MSG fprintf(stderr, "dbskkd-cdb: pid %d end of file detected\n", getpid()); #endif /* VERBOSE_MSG */ ex = 1; break; } /* parse request code */ switch (combuf[0]) { case CLIENT_END: #ifdef VERBOSE_MSG fprintf(stderr, "dbskkd-cdb: pid %d end of conversion requested\n", getpid()); #endif /* VERBOSE_MSG */ ex = 1; break; case CLIENT_VERSION: if (write(STDOUT, VERSION, sizeof(VERSION) - 1) < 0) diesys("write error (version string)"); break; case CLIENT_HOST: if (write(STDOUT, DUMMYHOSTNAME, sizeof(DUMMYHOSTNAME) - 1) < 0) diesys("write error (dummyhostname string)"); break; case CLIENT_REQUEST: /* get size of key */ key = &combuf[1]; for (pbuf = &combuf[1]; *pbuf != ' ' && pbuf != &combuf[length - 1]; pbuf++) {} keylen = pbuf - &combuf[1]; if (keylen <= 0) diesys("invalid keysize"); /* lookup the cdb database */ switch (cdb_find(&diccdb, key, keylen)) { case -1: /* error */ diesys("fatal error on cdb_find()"); case 1: /* found */ if ((datalen = cdb_datalen(&diccdb)) >= DATASIZE - 2) diesys("searched entry too long"); /* generate the answer string */ p = data; *p++ = SERVER_FOUND; if (cdb_read(&diccdb, p, datalen, cdb_datapos(&diccdb)) < 0) diesys("read error (seeked dictionary data)"); p += datalen; *p = '\n'; /* sending found code and the result data string with LF */ if (write(STDOUT, data, datalen + 2) < 0) diesys("write error (converted data)"); break; case 0: /* NOT found */ /* generate the answer string */ combuf[0] = SERVER_NOT_FOUND; *pbuf = '\n'; /* sending error code and the key string with LF */ /* this action is required by skkinput */ if (write(STDOUT, combuf, keylen + 2) < 0) diesys("write error (NOT_FOUND message)"); break; default: /* unknown cdb return value */ diesys("unknown return value from cdb_seek()"); } break; /* end CLIENT_REQUEST switch statement*/ /* unknown request code */ default: #ifdef VERBOSE_MSG fprintf(stderr, "dbskkd-cdb: pid %d unknown client request code = %d\n", getpid(), combuf[0]); #endif /* VERBOSE_MSG */ exit(1); } /* end request code parsing */ } /* close dictionary db file */ cdb_free(&diccdb); if (close(dicfd) != 0) diesys("cannot close() the dictionary file"); exit(0); } /* end of program */ /* * License statement for dbskkd-cdb * * Copyright (c) 1998-2013 by Kenji Rikitake. All rights reserved. * * This software is distributed under the terms of either * * Creative Commons Attribution 3.0 Unported License * http://creativecommons.org/licenses/by/3.0/ * * or * * the Simplified BSD license, shown as follows: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * For more information on the dbskkd-cdb project, please refer to * https://github.com/jj1bdx/dbskkd-cdb/ * * [End of License statement for dbskkd-cdb] */ jj1bdx-dbskkd-cdb-1165ae4/example-daemontools.txt000066400000000000000000000005121233056224100217240ustar00rootroot00000000000000#!/bin/sh exec 2>&1 exec setuidgid dbskkd softlimit -d100000 -s100000 \ tcpserver -x ./tcprules.cdb \ -vDRH -l localhost 127.0.0.1 skkserv \ /usr/local/libexec/dbskkd-cdb # # this is an example run file # for daemontools service directory. # note that dbskkd-cdb must be invoked # with a non-privileged dedicated user account. # jj1bdx-dbskkd-cdb-1165ae4/example-inetd.txt000066400000000000000000000004551233056224100205110ustar00rootroot00000000000000# inetd entries for dbskkd-cdb # NOTE: set unprivileged and dedicated uid for execution # Define *both* IPv4 and IPv6 entries for dual-stack support. skkserv stream tcp nowait dbskkd /usr/local/libexec/dbskkd-cdb dbskkd-cdb skkserv stream tcp6 nowait dbskkd /usr/local/libexec/dbskkd-cdb dbskkd-cdb # jj1bdx-dbskkd-cdb-1165ae4/makeskkcdb.sh000077500000000000000000000001351233056224100176450ustar00rootroot00000000000000#!/bin/sh ./skktocdbm.sh < /usr/local/share/skk/SKK-JISYO.L | \ cdb -c -t - SKK-JISYO.L.cdb jj1bdx-dbskkd-cdb-1165ae4/skk-server-protocol.txt000066400000000000000000000031511233056224100217040ustar00rootroot00000000000000SKK server-client protocol for dbskkd-cdb (unofficial) by Kenji Rikitake last update 6-FEB-2009 Note: this document is for dbskkd-cdb only this document does not describe sub-protocols for the server completion which is unsupported on dbskkd-cdb Notation: '0' is ASCII 0x30 LF is ASCII 0x0a space is ASCII 0x20 "abc" is ASCII/EUC-JP string Size limit: maximum request size: 1024 bytes maximum result size: 4096 bytes CLIENT_END: request to server: '0' + space + LF CLIENT_REQUEST: request to server: '1' + dictionary_key + space + LF answer if found: '1' + ('/' + candidate) * number_of_candidates + '/' + LF answer if not found: '4' + dictionary_key + space + LF note: dictionary_key and candidates are all variable-length strings character code of dictionary_key and candidate are in EUC-JP CLIENT_VERSION: request to server: '2' + space + LF answer: string including server version + space e.g. "dbskkd-cdb-2.00 " note: no known client parses this string on dbskkd-cdb: returns version string CLIENT_HOST: request to server: '3' + space + LF answer: string including host information + space e.g. "localhost:127.0.0.1: " note: no known client parses this string on dbskkd-cdb: returns dummy string "novalue: " Shutting down: The server disconnects the link and shuts down when received an unknown request on dbskkd-cdb: an internal error will cause shutdown (exit(1)) [end of document] jj1bdx-dbskkd-cdb-1165ae4/skktocdbm.sh000077500000000000000000000005711233056224100175330ustar00rootroot00000000000000#!/bin/sh # Converting SKK Dictionary to cdbmake-acceptable form # Originally by D. J. Bernstein's 12tocdbm.sh # modified by Kenji Rikitake # bugfix of truncated strings by Hideto Kihara # bugfix of locale by Tatsuya Kinoshita LC_ALL=C awk ' /^[^;]/ { s = substr($0, index($0, " ") + 1) print "+" length($1) "," length(s) ":" $1 "->" s } END { print "" } '