debian/0000755000000000000000000000000012235044045007165 5ustar debian/README.Debian0000644000000000000000000000077211776205573011252 0ustar skksearch for Debian -------------------- By default, this Debian package uses the SKK dictionary cdb file `/usr/share/skk/SKK-JISYO.cdb' that is provided by the skkdic-cdb package. To use other dictionary files, such as the skkdic-extra package, please edit the configuration file `/etc/skksearch.conf'. Although the original package requires Berkeley DB 2.x, this Debian package requires Berkeley DB 4.3 or later to recompile. -- Tatsuya Kinoshita , Sun, 17 Apr 2011 23:54:43 +0900 debian/source/0000755000000000000000000000000011776205573010503 5ustar debian/source/format0000644000000000000000000000001411776205573011711 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000177711776205605011146 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: skksearch Source: http://www.sato.kuis.kyoto-u.ac.jp/~sakurada/hack/skk/skksearch-0.0.tar.gz Comment: The upstream site no longer exists. Files: * Copyright: 1999, Hideki Sakurada License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of the GNU General Public License, version 2, can be found in `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: 2006-2012, Tatsuya Kinoshita 2006-2007, Noritada Kobayashi 2005-2006, Kenshi Muto 2005, Matej Vela 2000-2003, Takao KAWAMURA License: The Debian packaging is distributed under the same conditions as the upstream. debian/postrm0000644000000000000000000000045311776205573010454 0ustar #!/bin/sh set -e if [ "$1" = "remove" ]; then if which update-inetd >/dev/null 2>&1; then update-inetd --multi --disable skkserv || true fi fi if [ "$1" = "purge" ]; then if which update-inetd >/dev/null 2>&1; then update-inetd --multi --remove skkserv || true fi fi #DEBHELPER# debian/changelog0000644000000000000000000001757212235044045011053 0ustar skksearch (0.0-21build1) trusty; urgency=low * No change rebuild against db 5.3. -- Dmitrijs Ledkovs Sat, 02 Nov 2013 00:32:37 +0000 skksearch (0.0-21) unstable; urgency=low * debian/rules: Revive the -Wall option for CFLAGS * debian/control: Fix Vcs-Browser * debian/patches/*: Revert the previous changes -- Tatsuya Kinoshita Sat, 01 Sep 2012 20:53:26 +0900 skksearch (0.0-20) unstable; urgency=low * Use dpkg-buildflags to support hardening flags * debian/patches/*: Add DEP-3 header fields, and renumbered * Update copyright-format version to 1.0 * Update Vcs-* to anonscm.debian.org * Update Standards-Version to 3.9.3 -- Tatsuya Kinoshita Sun, 08 Jul 2012 13:28:30 +0900 skksearch (0.0-19) unstable; urgency=low [ Tatsuya Kinoshita ] * debian/control: - Update Vcs-* fields. - Update debhelper version to 6. [ Noritada Kobayashi ] * debian/compat: Bump to 6. * debian/control: Add new Vcs-Git and Vcs-Browser fields. * debian/skksearch.8: Make formatting improvements and corrections. -- Tatsuya Kinoshita Tue, 10 May 2011 21:42:39 +0900 skksearch (0.0-18) unstable; urgency=low * Migration for libdb5.1. (closes: #621434) * debian/control: - Remove quilt from Build-Depends. - Update Standards-Version to 3.9.2. * debian/rules: Don't include patchsys-quilt.mk. * debian/skksearch.8: Typo fix. * debian/README.Debian: Doc fix for Berkeley DB 5.x. * debian/README.source: Removed. * debian/copyright: Switch to the DEP-5 format. * Switch to the dpkg-source 3.0 (quilt) format. -- Tatsuya Kinoshita Mon, 18 Apr 2011 00:03:10 +0900 skksearch (0.0-17) unstable; urgency=low * debian/control: - Remove "Noritada Kobayashi" from Maintainer. (closes: #554079) - Move "Tatsuya Kinoshita" from Uploaders to Maintainer. - Update Standards-Version to 3.8.4. * debian/README.source: New file, mention that this package uses quilt to manage debian/patches. * debian/postinst: Use --remove and --add to completely replace an entry for update-inetd. * debian/postrm: When "remove", use --disable instead of --remove for update-inetd. * debian/copyright: Updated. -- Tatsuya Kinoshita Sun, 14 Feb 2010 22:48:51 +0900 skksearch (0.0-16) unstable; urgency=low * debian/control: - Don't use alternatives in `Enhances:'. (closes: #526509, #534010) - libdb-dev transition. (thanks to Stephan Hermann) - Add `${misc:Depends}' to `Depends:'. - Update Standards-Version to 3.8.2. * debian/copyright: Updated. -- Tatsuya Kinoshita Fri, 03 Jul 2009 22:32:32 +0900 skksearch (0.0-15) unstable; urgency=low * Bump the required Berkeley DB library version to 4.6, with no code change. (closes: 442669) * debian/copyright: Bump copyright year to 2007. -- Noritada Kobayashi Tue, 18 Sep 2007 01:10:46 +0900 skksearch (0.0-14) unstable; urgency=low * Switch the patch management system from dpatch to quilt. * debian/patches/clean-build-errors-and-warnings.diff: A new patch to clean build errors and warnings from gcc (currently gcc 4.1.1). * debian/skksearch.install: A new file to clean up the installation of debhelper-independently installed files. * debian/skksearch.conf: Add an entry for SKK-JISYO.JIS2004, a new dictionary provided by the skkdic-extra package since its version 20070411-1. -- Noritada Kobayashi Mon, 23 Apr 2007 23:31:41 +0900 skksearch (0.0-13) unstable; urgency=low * New maintainer, sponsored by Tatsuya Kinoshita . * debian/rules: Simplify rules by using CDBS. * debian/control: - (Build-Depends): Add cdbs. - (Depends): Depend on `openbsd-inetd | inet-superserver' instead of `netbase'. [tats] - (Depends): Depend on `skkdic-cdb | skkdic | skkdic-extra'. (`skkdic-extra' is moved from `Suggests'.) [tats] - (Description): Do not mention required versions of Berkeley DB. * debian/README.Debian: Mention a difference in required versions of Berkeley DB between the Debianized version and the original version of the program. -- Noritada Kobayashi Sat, 9 Dec 2006 21:25:00 +0900 skksearch (0.0-12) unstable; urgency=low * debian/skksearch.conf: Add entry for SKK-JISYO.china_taiwan. * debian/copyright: Mention Debian packaging conditions. -- Tatsuya Kinoshita Fri, 27 Oct 2006 21:26:57 +0900 skksearch (0.0-11) unstable; urgency=low * debian/control (Build-Depends): Don't depend on tinycdb (<< 0.75). * debian/patches/tinycdb-seek.dpatch: Removed. -- Tatsuya Kinoshita Thu, 28 Sep 2006 20:15:12 +0900 skksearch (0.0-10) unstable; urgency=low * debian/control (Build-Depends): Conform to new tinycdb. Depend on `libcdb-dev | tinycdb (<< 0.75)'. * debian/postrm: Use `which' instead of `command -v'. * debian/postrm: Remove a modified entry of `skkserv' when "purge". * debian/postinst: Check whether update-inetd is installed. -- Tatsuya Kinoshita Sun, 17 Sep 2006 19:31:19 +0900 skksearch (0.0-9) unstable; urgency=low * debian/patches/tinycdb-seek.dpatch: Fix that cdb_seek() fails if dlen is zero. (Workaround for cdb_seek() bug in tinycdb, Debian bug#383417) * debian/copyright: Mention that the upstream site no longer exists. * debian/control (Description): Revised. * debian/README.Debian: Revised. -- Tatsuya Kinoshita Sun, 3 Sep 2006 23:14:11 +0900 skksearch (0.0-8) unstable; urgency=low * debian/skksearch.conf: Add entry for SKK-JISYO.itaiji.JIS3_4. * debian/control: Remove `dbskkd-cdb' from `Conflicts' and `Replaces', because `skkserv' is enough. * debian/control (Description): Revised. -- Tatsuya Kinoshita Tue, 22 Aug 2006 01:16:43 +0900 skksearch (0.0-7) unstable; urgency=low * New maintainer, with previous maintainer's consent. * debian/control: Add `Enhances: ddskk | skk'. * debian/control (Standards-Version): 3.6.2 -> 3.7.2. * debian/control: Depend on debhelper version 5. * debian/compat: 4 -> 5. * debian/skksearch.conf: Add entry for SKK-JISYO. * debian/README.Debian: Mention the default value of the dictionary file. * debian/copyright: Updated. -- Tatsuya Kinoshita Mon, 14 Aug 2006 06:33:34 +0900 skksearch (0.0-6) unstable; urgency=medium * Increase DIC_BUFSIZE to support long entries. (closes: #376855) -- Kenshi Muto Thu, 6 Jul 2006 00:08:49 +0900 skksearch (0.0-5) unstable; urgency=low * Add dictionary entries for skkdic-extra to /etc/skksearch.conf. -- Kenshi Muto Wed, 16 Nov 2005 21:06:30 +0900 skksearch (0.0-4) unstable; urgency=low * New maintainer. (closes: #338535) -- Kenshi Muto Wed, 16 Nov 2005 10:14:30 +0000 skksearch (0.0-3) unstable; urgency=low * QA upload. * Package is orphaned (see #338535); set maintainer to Debian QA Group. * Switch from freecdb to tinycdb. Thanks to Charles Fry for the preliminary patch. Closes: #325272. * Port to Berkeley DB 4.3. Closes: #248521. * Switch to debhelper 4. * Convert ad-hoc patch system to dpatch. * Add a dependency on netbase for update-inetd. * debian/changelog: Remove obsolete Emacs local variables. * debian/postinst, debian/postrm: Remove boilerplate. * debian/rules: Add support for DEB_BUILD_OPTIONS=noopt. * Conforms to Standards version 3.6.2. -- Matej Vela Sat, 12 Nov 2005 20:02:27 +0100 skksearch (0.0-2) unstable; urgency=low * Applied a patch from deton@m1.interq.or.jp (KIHARA Hideto). (Closes:Bug#209217) -- Takao KAWAMURA Thu, 11 Sep 2003 10:28:46 +0900 skksearch (0.0-1) unstable; urgency=low * Initial Release. -- Takao KAWAMURA Thu, 23 Nov 2000 22:54:40 +0900 debian/postinst0000644000000000000000000000043711776205573011015 0ustar #!/bin/sh set -e if [ "$1" = configure ]; then if which update-inetd >/dev/null 2>&1; then update-inetd --multi --remove skkserv || true update-inetd --add 'skkserv\t\tstream\ttcp\tnowait\tnobody\t/usr/sbin/tcpd\t/usr/sbin/skksearch -c /etc/skksearch.conf' fi fi #DEBHELPER# debian/skksearch.80000644000000000000000000000446011776205573011256 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH SKKSEARCH 8 "September 23, 2000" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME skksearch \- yet another SKK Dictionary server .SH SYNOPSIS .B skksearch .RI "[-l " digit "] [-f " logfile "] [-s][-c " config "] " type : file " ..." .SH DESCRIPTION This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBskksearch\fP is a dictionary server for the SKK Japanese input method system. \fBskksearch\fP is normally invoked by the Internet server (see \fBinetd\fP(8)) for requests to connect to the \fBskkserv\fP port as indicated by the /etc/services file (see \fBservices\fP(5)). .SH OPTIONS \fBskksearch\fP program accepts the following options: .TP .BI \-l " digit" specify loglevel -1 to 7. .TP .BI \-f " logfile" output debug message to \fIlogfile\fP. .TP .B \-s Use syslog. .TP .BI \-c " config" indicates \fIconfig\fP file which contains the specifications of dictionaries. .TP .IB type ":" file \fBskksearch\fP program supports the following dictionary types. .RS 10 .TP .B db Berkeley DB .TP .B cdb constant database (see tinycdb). .TP .B plain plain text like SKK-JISYO.L .TP .B dummy dummy dictionary for debugging. .RE .P \fBskksearch\fP can take multiple dictionaries. .SH EXAMPLES Insert the following line in inetd.conf, and restart inetd. .RS 4 skkserv stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/skksearch -c /etc/skksearch.conf .RE .SH AUTHOR This manual page was written by Fumitoshi UKAI , for the Debian GNU/Linux system (but may be used by others). debian/control0000644000000000000000000000231212235044045010566 0ustar Source: skksearch Section: utils Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Tatsuya Kinoshita Build-Depends: cdbs, debhelper (>= 6), libdb-dev, libcdb-dev Standards-Version: 3.9.3 Vcs-Git: git://anonscm.debian.org/collab-maint/skksearch.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/skksearch.git Package: skksearch Architecture: any Provides: skkserv Conflicts: skkserv Replaces: skkserv Depends: ${shlibs:Depends}, ${misc:Depends}, skkdic-cdb | skkdic | skkdic-extra, openbsd-inetd | inet-superserver Enhances: skk Description: SKK dictionary server handling multiple dictionaries skksearch is a dictionary server for SKK Japanese input systems. skksearch can deal with more than one dictionary and supports three types of dictionaries, that is, plain, Berkeley DB and cdb (DJB's constant database). . skksearch is compatible with skkserv on the protocol behavior. It is called from an internet super-server. . By default, this package uses the SKK dictionary cdb file `SKK-JISYO.cdb' that is provided by the skkdic-cdb package. Also, you can use other dictionary files such as the skkdic-extra package. debian/rules0000755000000000000000000000132312020371574010246 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/makefile.mk DEB_INSTALL_DOCS_ALL := DEB_INSTALL_MANPAGES_skksearch := debian/skksearch.8 export DEB_BUILD_MAINT_OPTIONS = hardening=+all dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags CFLAGS=-Wall $(shell $(dpkg_buildflags) --get CFLAGS) CPPFLAGS=$(shell $(dpkg_buildflags) --get CPPFLAGS) LDFLAGS=$(shell $(dpkg_buildflags) --get LDFLAGS) DEB_MAKE_BUILD_TARGET := CFLAGS='$(CFLAGS) $(CPPFLAGS) -DSYSLOG' LDFLAGS='$(LDFLAGS) -lcdb -ldb' DEB_MAKE_INSTALL_TARGET := DEB_MAKE_CHECK_TARGET := install/skksearch:: install -D -m 644 README $(DEB_DESTDIR)/usr/share/doc/skksearch/README.ja debian/skksearch.install0000644000000000000000000000005611776205573012552 0ustar skksearch usr/sbin debian/skksearch.conf etc debian/patches/0000755000000000000000000000000012020371231010604 5ustar debian/patches/dic-bufsize.diff0000644000000000000000000000064112020371231013643 0ustar dic-bufsize.dpatch by SATOH Fumiyasu Increase DIC_BUFSIZE (Debian bug#376855). Index: skksearch-0.0/dic.h =================================================================== --- skksearch-0.0.orig/dic.h +++ skksearch-0.0/dic.h @@ -12,7 +12,7 @@ * GNU General Public License for more details. */ -#define DIC_BUFSIZE 1024 +#define DIC_BUFSIZE 4096 struct dic { char buf[DIC_BUFSIZE]; debian/patches/clean-build-errors-and-warnings.diff0000644000000000000000000000243312020371231017517 0ustar clean-build-errors-and-warnings.diff by Noritada Kobayashi Clean build errors and warnings from gcc. Index: skksearch-0.0/main.c =================================================================== --- skksearch-0.0.orig/main.c 2007-04-23 21:41:05.000000000 +0900 +++ skksearch-0.0/main.c 2007-04-23 21:41:05.000000000 +0900 @@ -15,6 +15,7 @@ #include #include #include +#include #include "config.h" @@ -60,11 +61,10 @@ void searchdicts(); -main(int argc, char *argv[]) { +int main(int argc, char *argv[]) { int c; int s; int i; - char *p; int errflag = 0; int terminal = 0; char *conf = NULL; Index: skksearch-0.0/dic_cdb.c =================================================================== --- skksearch-0.0.orig/dic_cdb.c 2007-04-23 21:40:22.000000000 +0900 +++ skksearch-0.0/dic_cdb.c 2007-04-23 21:48:04.000000000 +0900 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,7 @@ } char *dic_cdb_search(struct dic *d, char *key, int keylen) { - int dlen; + unsigned int dlen; int fd = ((struct dic_cdb_internal *)(d->internal))->fd; char *buf = d->buf; debian/patches/db4.3.diff0000644000000000000000000000557112020371231012260 0ustar db4.3.dpatch by Matej Vela Port to Berkeley DB 4.3-4.6. Index: skksearch-0.0/dic_db.c =================================================================== --- skksearch-0.0.orig/dic_db.c 2005-11-12 19:49:38.000000000 +0100 +++ skksearch-0.0/dic_db.c 2005-11-12 19:55:03.000000000 +0100 @@ -23,19 +23,21 @@ /* BerkeleyDB environment */ int env_initialized = 0; -DB_ENV env; -void errcall(const char *, char *); +DB_ENV *env; +void errcall(const DB_ENV *, const char *, const char *); struct dic *dic_db_open(struct dic *d, char *path) { + int ret; struct dic_db_internal *internal; if (!env_initialized) { - env.db_errcall = errcall; - if ((errno = db_appinit(NULL, NULL, &env, DB_USE_ENVIRON)) != 0) { - err(LOG_ERR, "dic_db_open: db_appinit failed\n"); + if ((ret = db_env_create(&env, 0)) != 0 + || (ret = env->open(env, NULL, 0, DB_USE_ENVIRON)) != 0) { + err(LOG_ERR, "dic_db_open: %s\n", db_strerror(ret)); exit(1); } + env->set_errcall(env, errcall); env_initialized = 1; } @@ -45,10 +47,10 @@ } memset(internal, 0, sizeof(struct dic_db_internal)); - if ((errno = - db_open(path, DB_UNKNOWN, DB_RDONLY, 0, &env, NULL, &(internal->db))) - != 0) { - err(LOG_ERR, "dic_db_open(%s): %s\n", path, strerror(errno)); + if ((ret = db_create(&(internal->db), env, 0)) != 0 + || (ret = internal->db->open(internal->db, NULL, path, NULL, + DB_UNKNOWN, DB_RDONLY, 0)) != 0) { + err(LOG_ERR, "dic_db_open(%s): %s\n", path, db_strerror(ret)); exit(1); } d->internal = (void *)internal; @@ -58,6 +60,7 @@ } char *dic_db_search(struct dic *d, char *keystr, int keylen) { + int ret; struct dic_db_internal *internal = (struct dic_db_internal *)(d->internal); DB *db = internal->db; DBT key; @@ -71,23 +74,24 @@ data.ulen = DIC_BUFSIZE - 1; /* -1 for '\0' */ data.flags = DB_DBT_USERMEM; - if ((errno = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) { + if ((ret = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) { return NULL; - } else if (errno == 0) { /* found */ + } else if (ret == 0) { /* found */ *((char *)(data.data) + data.size) = '\0'; return (char *)(data.data); } else { err(LOG_WARNING, "dic_db_search: %s (may be too long entry)\n", - strerror(errno)); + db_strerror(ret)); return NULL; } } int dic_db_close(struct dic *d) { + int ret; DB *db = ((struct dic_db_internal *)(d->internal))->db; - if ((errno = db->close(db, 0)) != 0) { - err(LOG_ERR, "dic_db_close: %s\n", strerror(errno)); + if ((ret = db->close(db, 0)) != 0) { + err(LOG_ERR, "dic_db_close: %s\n", db_strerror(ret)); exit(1); } free(d->internal); @@ -96,6 +100,6 @@ } -void errcall(const char *foo, char *message) { +void errcall(const DB_ENV *dbenv, const char *foo, const char *message) { err(LOG_ERR, "dic_db: %s\n", message); } debian/patches/plain-search.diff0000644000000000000000000000503412020371231014006 0ustar plain-search.dpatch by KIHARA Hideto Fix end condition in binary search algorithm for plain dictionaries (#209217). Received: from [146.82.138.7] (helo=master.debian.org) by nu.ike.tottori-u.ac.jp with esmtp (Exim 3.36 #1 (Debian)) for ml@kawamura.net id 19ut2u-0001MC-00; Thu, 04 Sep 2003 21:17:04 +0900 Received: from a15-c1.data-hotel.net [203.174.65.19] by master.debian.org with smtp (Exim 3.35 1 (Debian)) id 19ut2q-0000vR-00; Thu, 04 Sep 2003 07:17:00 -0500 Received: (qmail 71944 invoked by alias); 4 Sep 2003 21:16:44 +0900 Mailing-List: contact skk-help@ring.gr.jp; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: Reply-To: skk@ring.gr.jp List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list skk@ring.gr.jp Received: (qmail 71354 invoked from network); 4 Sep 2003 21:15:58 +0900 Date: Thu, 4 Sep 2003 21:16:41 +0900 From: KIHARA Hideto To: skk@ring.gr.jp Message-ID: <20030904121641.GA2684@m1.interq.or.jp> Mime-Version: 1.0 User-Agent: Mutt/1.4.1i-ja.1 Subject: [skk 5028] patch for skksearch X-Bogosity: No, tests=bogofilter, spamicity=0.000004, version=0.14.4 X-UIDL: ''7"!Le8!!?#@!!?06"! Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit skksearch-0.0用のパッチです。 配布元のページはもう無くなってしまったようですが、 Debianのパッケージに入っていて、 はまってる人をたまに見かけるので、SKK MLにも流しておきます。 # 2ちゃんねるの方には2月ごろに流したんですが。 * 現象 「あg」のような読みを検索するとskksearchが暴走してCPUを食いつぶす。 * 発生条件 okuri-ari entriesが空のplain辞書(SKK-JISYO.JIS2等)が 検索対象辞書に含まれるときに、 「あg」のようにokuri-nasi entriesよりも辞書順で小さい読みを検索すると、 無限ループにはまる。 CDB形式の辞書の場合は発生しない。 * 原因 okuri-ari entriesが空の場合に、ファイル中の位置が okuri-ari entriesの終了位置より後になるが、 ==で比較しているためループを抜けない。 * パッチ ==を>=に変更。 Index: skksearch-0.0/dic_plain.c =================================================================== --- skksearch-0.0.orig/dic_plain.c Fri Dec 15 18:06:06 2000 +++ skksearch-0.0/dic_plain.c Sat Feb 22 23:04:10 2003 @@ -118,7 +118,7 @@ while (1) { fseek(fp, (end + begin) / 2, SEEK_SET); /* center */ fgets(buf, DIC_BUFSIZE, fp); /* Skip */ - if ((half = ftell(fp)) == end) { + if ((half = ftell(fp)) >= end) { break; /* goto linear search */ } fgets(buf, DIC_BUFSIZE, fp); debian/patches/series0000644000000000000000000000014212020371231012016 0ustar conf-file.diff db4.3.diff dic-bufsize.diff plain-search.diff clean-build-errors-and-warnings.diff debian/patches/conf-file.diff0000644000000000000000000000352712020371231013307 0ustar conf-file.diff by Takao KAWAMURA Add support for a configuration file. Index: skksearch-0.0/main.c =================================================================== --- skksearch-0.0.orig/main.c Fri Dec 8 11:03:41 2000 +++ skksearch-0.0/main.c Fri Dec 8 11:04:31 2000 @@ -67,11 +67,12 @@ char *p; int errflag = 0; int terminal = 0; + char *conf = NULL; extern char *optarg; extern int optind; /* process arguments */ - while ((c = getopt(argc, argv, "l:f:sit")) != EOF) { + while ((c = getopt(argc, argv, "l:f:sic:t")) != EOF) { switch (c) { case 'l': loglevel = atoi(optarg); @@ -84,13 +85,16 @@ break; case 't': terminal = 1; + case 'c': + conf = optarg; + break; case '?': errflag = 1; } } if (errflag) { fprintf(stderr, - "usage: %s [-l digit] [-f logfile] [-s] dictinary1 ... \n", + "usage: %s [-l digit] [-f logfile] [-s] [-c config] [dictinary1 ...] \n", argv[0]); exit(1); } @@ -107,6 +111,33 @@ for (i = 0; i < dicnum; i++) { err(LOG_DEBUG, "openning dictionary %s", argv[optind + i]); diclist[i] = dic_open(argv[optind + i]); + } + if (conf != NULL) { + FILE *fp; + char line[1024]; + char *p; + fp = fopen(conf, "r"); + if (fp == NULL) { + err(LOG_ERR, "cannot open config file `%s'\n", conf); + exit(1); + } + while ((p = fgets(line, sizeof(line), fp)) != NULL) { + if (p[0] == '#' || p[0] == '\n') + continue; + p[strlen(p)-1] = '\0'; /* chop */ + if (i >= MAXDICNUM) { + err(LOG_ERR, "too many dicts in config file\n"); + exit(1); + } + err(LOG_DEBUG, "openning dictionary %s", p); + dicnum++; + diclist[i++] = dic_open(p); + } + fclose(fp); + } + if (dicnum == 0) { + err(LOG_ERR, "no dict specified\n"); + exit(1); } /* main loop */ debian/compat0000644000000000000000000000000211776205573010401 0ustar 6 debian/skksearch.conf0000644000000000000000000000203111776205573012024 0ustar # type:file cdb:/usr/share/skk/SKK-JISYO.cdb # plain:/usr/share/skk/SKK-JISYO # skkdic-extra # plain:/usr/share/skk/SKK-JISYO.JIS2 # plain:/usr/share/skk/SKK-JISYO.JIS2004 # plain:/usr/share/skk/SKK-JISYO.JIS3_4 # plain:/usr/share/skk/SKK-JISYO.assoc # plain:/usr/share/skk/SKK-JISYO.china_taiwan # plain:/usr/share/skk/SKK-JISYO.fullname # plain:/usr/share/skk/SKK-JISYO.geo # plain:/usr/share/skk/SKK-JISYO.hukugougo # plain:/usr/share/skk/SKK-JISYO.itaiji # plain:/usr/share/skk/SKK-JISYO.itaiji.JIS3_4 # plain:/usr/share/skk/SKK-JISYO.jinmei # plain:/usr/share/skk/SKK-JISYO.law # plain:/usr/share/skk/SKK-JISYO.mazegaki # plain:/usr/share/skk/SKK-JISYO.noregist # plain:/usr/share/skk/SKK-JISYO.not_wrong # plain:/usr/share/skk/SKK-JISYO.notes # plain:/usr/share/skk/SKK-JISYO.okinawa # plain:/usr/share/skk/SKK-JISYO.propernoun # plain:/usr/share/skk/SKK-JISYO.pubdic+ # plain:/usr/share/skk/SKK-JISYO.requested # plain:/usr/share/skk/SKK-JISYO.station # plain:/usr/share/skk/SKK-JISYO.zipcode # plain:/usr/share/skk/SKK-JISYO.office.zipcode