Imported Debian patch 1:1.01-17
Tatsuya Kinoshita
9 years ago
71 | 71 |
#include <signal.h>
|
72 | 72 |
#include <limits.h>
|
73 | 73 |
#include <syslog.h>
|
74 | |
#include <cdb.h>
|
|
74 |
#include "cdb.h"
|
75 | 75 |
|
76 | 76 |
/* architectural dependencies */
|
77 | 77 |
|
|
148 | 148 |
register unsigned char *pbuf, *key, *p;
|
149 | 149 |
int length, errcode, get_status;
|
150 | 150 |
unsigned int keylen;
|
151 | |
unsigned datalen;
|
|
151 |
uint32 datalen;
|
152 | 152 |
|
153 | 153 |
length = read(STDIN, &combuf[0], BUFSIZE - 1);
|
154 | 154 |
if (length < 0) {
|
0 | 0 |
dbskkd-cdb for Debian
|
1 | 1 |
----------------------
|
2 | 2 |
|
3 | |
This package uses `/usr/share/skk/SKK-JISYO.cdb', dictionary file of the
|
4 | |
skkdic-cdb package.
|
|
3 |
This package uses the SKK dictionary cdb file
|
|
4 |
`/usr/share/skk/SKK-JISYO.cdb' that is provided by the skkdic-cdb package.
|
5 | 5 |
|
6 | |
If you want to make your own dictionary for dbskkd-cdb, use
|
7 | |
examples/makeskkcdbdic. Note you must install the tinycdb package to use
|
8 | |
makeskkcdbdic.
|
|
6 |
If you want to convert your own dictionary to cdb, use the
|
|
7 |
`makeskkcdbdic' command. Note that this command requires the tinycdb
|
|
8 |
package. See also the manpage makeskkcdbdic(1).
|
9 | 9 |
|
10 | |
-- Tatsuya Kinoshita <tats@debian.org>, Mon, 14 Aug 2006 06:14:05 +0900
|
|
10 |
-- Tatsuya Kinoshita <tats@debian.org>, Sun, 3 Sep 2006 07:59:54 +0900
|
|
0 |
dbskkd-cdb (1:1.01-17) unstable; urgency=low
|
|
1 |
|
|
2 |
* debian/patches/tinycdb-seek.patch: Fix that cdb_seek() fails if datalen
|
|
3 |
is zero. (Workaround for cdb_seek() bug in tinycdb, Debian bug#383417)
|
|
4 |
* debian/patches/datalen-type.patch: Fix that cdb_seek() fails on 64bit
|
|
5 |
systems. Use unsigned int instead of uint32 for datalen and use
|
|
6 |
tinycdb's header. (already fixed in version 1:1.01-14)
|
|
7 |
* debian/patches/awk-locale.patch: Set LC_ALL to C for awk.
|
|
8 |
* Depend on quilt (>= 0.40) to handle patches at build time.
|
|
9 |
* debian/rules: Install `debian/makeskkcdbdic' into `/usr/bin'.
|
|
10 |
* debian/rules: Install manpage `debian/makeskkcdbdic.1'.
|
|
11 |
* debian/rules: Install `skktocdbm.sh' into `/usr/share/dbskkd-cdb'.
|
|
12 |
* debian/makeskkcdbdic: Set LC_ALL to C for awk.
|
|
13 |
* debian/makeskkcdbdic: Check whether cdb command exists.
|
|
14 |
* debian/makeskkcdbdic.1: New file.
|
|
15 |
* debian/control: Move tinycdb from `Suggests' to `Recommends'.
|
|
16 |
* debian/control (Description): Revised.
|
|
17 |
* debian/README.Debian: Revised.
|
|
18 |
|
|
19 |
-- Tatsuya Kinoshita <tats@debian.org> Sun, 3 Sep 2006 22:52:22 +0900
|
|
20 |
|
0 | 21 |
dbskkd-cdb (1:1.01-16) unstable; urgency=low
|
1 | 22 |
|
2 | 23 |
* debian/control: Remove `skksearch' from `Conflicts' and `Replaces',
|
1 | 1 |
Section: utils
|
2 | 2 |
Priority: optional
|
3 | 3 |
Maintainer: Tatsuya Kinoshita <tats@debian.org>
|
4 | |
Build-Depends: debhelper (>= 5), tinycdb
|
|
4 |
Build-Depends: debhelper (>= 5), tinycdb, quilt (>= 0.40)
|
5 | 5 |
Standards-Version: 3.7.2
|
6 | 6 |
|
7 | 7 |
Package: dbskkd-cdb
|
|
9 | 9 |
Provides: skkserv
|
10 | 10 |
Conflicts: skkserv
|
11 | 11 |
Replaces: skkserv
|
12 | |
Suggests: tinycdb
|
|
12 |
Depends: ${shlibs:Depends}, skkdic-cdb, netbase
|
|
13 |
Recommends: tinycdb
|
13 | 14 |
Enhances: ddskk | skk
|
14 | |
Depends: ${shlibs:Depends}, skkdic-cdb, netbase
|
15 | 15 |
Description: SKK dictionary server using cdb for faster access
|
16 | 16 |
dbskkd-cdb is a dictionary server for SKK Japanese input systems,
|
17 | 17 |
using D. J. Bernstein's cdb database for faster dictionary access.
|
18 | 18 |
.
|
19 | 19 |
dbskkd-cdb is compatible with skkserv on the protocol behavior.
|
20 | 20 |
It is called from an internet super-server.
|
|
21 |
.
|
|
22 |
This package uses the SKK dictionary cdb file `SKK-JISYO.cdb' that
|
|
23 |
is provided by the skkdic-cdb package.
|
|
24 |
.
|
|
25 |
If you want to convert your own dictionary to cdb, use the
|
|
26 |
`makeskkcdbdic' command. This command requires the tinycdb package.
|
|
27 |
.
|
|
28 |
Homepage: http://www.ne.jp/asahi/bdx/info/software/jp-dbskkd.html
|
0 | 0 |
#!/bin/sh
|
1 | 1 |
set -e
|
2 | 2 |
|
|
3 |
CDB="`which cdb`" || CDB=""
|
|
4 |
if [ -z "$CDB" ]; then
|
|
5 |
echo "${0##*/}: tinycdb's cdb command not found" >&2
|
|
6 |
exit 1
|
|
7 |
fi
|
|
8 |
|
3 | 9 |
if [ $# -eq 0 ]; then
|
4 | |
echo "Usage: ${0##*/} SKK-JISYO [SKK-JISYO-CDB]" >&2
|
|
10 |
echo "usage: ${0##*/} SKK-JISYO [SKK-JISYO-CDB]" >&2
|
5 | 11 |
exit 1
|
6 | 12 |
fi
|
7 | 13 |
|
|
18 | 24 |
tmpf=`tempfile -d "$dir" -m 0644`
|
19 | 25 |
trap 'rm -f "$tmpf"' EXIT INT TERM
|
20 | 26 |
|
21 | |
awk '
|
|
27 |
LC_ALL=C awk '
|
22 | 28 |
/^[^;]/ {
|
23 | 29 |
s = substr($0, index($0, " ") + 1)
|
24 | 30 |
print "+" length($1) "," length(s) ":" $1 "->" s
|
|
26 | 32 |
END {
|
27 | 33 |
print ""
|
28 | 34 |
}
|
29 | |
' "$1" | cdb -c -t "$tmpf" "$2"
|
|
35 |
' "$1" | "$CDB" -c -t "$tmpf" "$2"
|
|
0 |
.TH MAKESKKCDBDIC 1
|
|
1 |
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
|
|
2 |
.\" other parms are allowed: see man(7), man(1)
|
|
3 |
.SH NAME
|
|
4 |
makeskkcdbdic \- SKK dictionary file to cdb converter
|
|
5 |
.SH SYNOPSIS
|
|
6 |
.B makeskkcdbdic
|
|
7 |
SKK-JISYO [SKK-JISYO-CDB]
|
|
8 |
.SH DESCRIPTION
|
|
9 |
makeskkcdbdic converts SKK dictionary plain text file SKK-JISYO to cdb (DJB's constant database) file SKK-JISYO-CDB or SKK-JISYO+".cdb".
|
|
10 |
.PP
|
|
11 |
This command is a improvement of dbskkd-cdb's `makeskkcdb.sh'.
|
|
12 |
.PP
|
|
13 |
This command requires tinycdb's `cdb' command.
|
|
14 |
.SH EXAMPLES
|
|
15 |
.SS Convert SKK-JISYO.foobar to SKK-JISYO.foobar.cdb
|
|
16 |
.na
|
|
17 |
.nf
|
|
18 |
makeskkcdbdic SKK-JISYO.foobar
|
|
19 |
or
|
|
20 |
makeskkcdbdic SKK-JISYO.foobar SKK-JISYO.foobar.cdb
|
|
21 |
.fi
|
|
22 |
.ad
|
|
23 |
.SH BUGS
|
|
24 |
This command is provided by Debian.
|
|
25 |
It is not integrated in the upstream source.
|
|
26 |
.SH SEE ALSO
|
|
27 |
dbskkd-cdb(8)
|
|
28 |
.\" This manual page is written by Tatsuya Kinoshita <tats@debian.org>.
|
|
29 |
.\" Unlimited permission is granted to use, copy, distribute and/or modify
|
|
30 |
.\" this file. There is NO WARRANTY.
|
|
0 |
--- dbskkd-cdb-1.01-16/skktocdbm.sh 1998-12-12 20:11:35.000000000 +0900
|
|
1 |
+++ dbskkd-cdb-1.01/skktocdbm.sh 2006-09-03 07:50:37.000000000 +0900
|
|
2 |
@@ -4,7 +4,7 @@
|
|
3 |
# Originally by D. J. Bernstein's 12tocdbm.sh
|
|
4 |
# modified by Kenji Rikitake
|
|
5 |
# bugfix of truncated strings by Hideto Kihara
|
|
6 |
-awk '
|
|
7 |
+LC_ALL=C awk '
|
|
8 |
/^[^;]/ {
|
|
9 |
s = substr($0, index($0, " ") + 1)
|
|
10 |
print "+" length($1) "," length(s) ":" $1 "->" s
|
|
0 |
diff -urN dbskkd-cdb-1.01.orig/dbskkd-cdb.c dbskkd-cdb-1.01/dbskkd-cdb.c
|
|
1 |
--- dbskkd-cdb-1.01.orig/dbskkd-cdb.c 1999-09-28 21:14:47.000000000 +0900
|
|
2 |
+++ dbskkd-cdb-1.01/dbskkd-cdb.c 2006-08-13 17:26:58.000000000 +0900
|
|
3 |
@@ -72,7 +72,7 @@
|
|
4 |
#include <signal.h>
|
|
5 |
#include <limits.h>
|
|
6 |
#include <syslog.h>
|
|
7 |
-#include "cdb.h"
|
|
8 |
+#include <cdb.h>
|
|
9 |
|
|
10 |
/* architectural dependencies */
|
|
11 |
|
|
12 |
@@ -149,7 +149,7 @@
|
|
13 |
register unsigned char *pbuf, *key, *p;
|
|
14 |
int length, errcode, get_status;
|
|
15 |
unsigned int keylen;
|
|
16 |
- uint32 datalen;
|
|
17 |
+ unsigned int datalen;
|
|
18 |
|
|
19 |
length = read(STDIN, &combuf[0], BUFSIZE - 1);
|
|
20 |
if (length < 0) {
|
|
0 |
datalen-type.patch
|
|
1 |
tinycdb-seek.patch
|
|
2 |
awk-locale.patch
|
|
0 |
diff -urN dbskkd-cdb-1.01-16/dbskkd-cdb.c dbskkd-cdb-1.01/dbskkd-cdb.c
|
|
1 |
--- dbskkd-cdb-1.01-16/dbskkd-cdb.c 2006-08-13 17:26:58.000000000 +0900
|
|
2 |
+++ dbskkd-cdb-1.01/dbskkd-cdb.c 2006-09-01 21:37:35.000000000 +0900
|
|
3 |
@@ -199,6 +199,7 @@
|
|
4 |
/* NOTREACHED */
|
|
5 |
}
|
|
6 |
else {
|
|
7 |
+ datalen = 1; /* workaround for cdb_seek() bug in tinycdb, Debian bug#383417 */
|
|
8 |
get_status = cdb_seek(jisho_fd, key, keylen, &datalen);
|
|
9 |
}
|
|
10 |
switch (get_status) {
|
3 | 3 |
# Uncomment this to turn on verbose mode.
|
4 | 4 |
#export DH_VERBOSE=1
|
5 | 5 |
|
|
6 |
include /usr/share/quilt/quilt.make
|
|
7 |
|
6 | 8 |
CFLAGS := -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
|
7 | 9 |
|
8 | 10 |
build: build-stamp
|
9 | |
build-stamp:
|
|
11 |
build-stamp: debian/stamp-patched
|
10 | 12 |
dh_testdir
|
11 | 13 |
|
12 | 14 |
$(MAKE) SERVERDIR=/usr/sbin\
|
13 | 15 |
CC='gcc $(CFLAGS)'\
|
14 | 16 |
COMPAT='-DJISHO_FILE=\"/usr/share/skk/SKK-JISYO.cdb\"'\
|
15 | 17 |
LDFLAGS=-lcdb
|
16 | |
chmod +x debian/makeskkcdbdic
|
17 | 18 |
|
18 | 19 |
touch build-stamp
|
19 | 20 |
|
20 | |
clean:
|
|
21 |
clean: unpatch
|
21 | 22 |
dh_testdir
|
22 | 23 |
dh_testroot
|
23 | 24 |
rm -f build-stamp
|
|
33 | 34 |
dh_installdirs
|
34 | 35 |
|
35 | 36 |
dh_install dbskkd-cdb usr/sbin
|
|
37 |
dh_install debian/makeskkcdbdic usr/bin
|
|
38 |
dh_install skktocdbm.sh usr/share/dbskkd-cdb
|
36 | 39 |
|
37 | 40 |
# Build architecture-independent files here.
|
38 | 41 |
binary-indep: build install
|
|
45 | 48 |
dh_installdocs Release-Notes.*
|
46 | 49 |
dh_installexamples debian/makeskkcdbdic
|
47 | 50 |
dh_installman debian/dbskkd-cdb.8
|
|
51 |
dh_installman debian/makeskkcdbdic.1
|
48 | 52 |
dh_link
|
49 | 53 |
dh_strip
|
50 | 54 |
dh_compress
|