Sat Jul 17 08:57:19 2010 UTC ()
Now, newer SKK-JISYO is installed as skk-jisyo and jisyo-tools are skktools.
So let to only install skkserv by this package.
Based on Ryo ONODERA's pkgsrc-wip/skkserv.

Bump PKGREVISION.


(obache)
diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/DESCR
diff -r1.21 -r1.22 pkgsrc/inputmethod/skkserv/Makefile
diff -r1.4 -r1.5 pkgsrc/inputmethod/skkserv/PLIST
diff -r1.4 -r1.5 pkgsrc/inputmethod/skkserv/distinfo
diff -r1.1 -r0 pkgsrc/inputmethod/skkserv/patches/patch-aa
diff -r1.1 -r0 pkgsrc/inputmethod/skkserv/patches/patch-jisyo
diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/patches/patch-af
diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/patches/patch-bsearch
diff -r1.2 -r0 pkgsrc/inputmethod/skkserv/patches/patch-ag
diff -r1.2 -r0 pkgsrc/inputmethod/skkserv/patches/patch-ah

cvs diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/DESCR (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/DESCR 2002/05/31 12:59:58 1.1
+++ pkgsrc/inputmethod/skkserv/DESCR 2010/07/17 08:57:18 1.2
@@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
1 skkserv is a dictionary server for SKK (Simple Kana to 1 skkserv is a dictionary server for SKK (Simple Kana to
2Kanji conversion) programs, including skk.el (Emacs Lisp), 2Kanji conversion) programs, including skk.el (Emacs Lisp),
3skkfep (tty-based frontend), and skkinput (X11 frontend). 3skkfep (tty-based frontend), and skkinput (X11 frontend),
4 4uim-skk, scim-skk.
5 This package also contains manipulation tools of 
6SKK-format dictionaries. 

cvs diff -r1.21 -r1.22 pkgsrc/inputmethod/skkserv/Makefile (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/Makefile 2010/02/14 22:07:38 1.21
+++ pkgsrc/inputmethod/skkserv/Makefile 2010/07/17 08:57:18 1.22
@@ -1,65 +1,56 @@ @@ -1,65 +1,56 @@
1# $NetBSD: Makefile,v 1.21 2010/02/14 22:07:38 dholland Exp $ 1# $NetBSD: Makefile,v 1.22 2010/07/17 08:57:18 obache Exp $
2 2
3DISTNAME= skk9.6 3DISTNAME= skk9.6
4PKGNAME= skkserv-3.9.4 4PKGNAME= skkserv-3.9.4
5PKGREVISION= 6 5PKGREVISION= 7
6CATEGORIES= japanese inputmethod 6CATEGORIES= japanese inputmethod
7MASTER_SITES= ftp://skk.kuis.kyoto-u.ac.jp/skk/9.6/ 7MASTER_SITES= ftp://skk.kuis.kyoto-u.ac.jp/skk/9.6/
8 8
9PATCHFILES= SKK-JISYO.L.diff.gz 
10PATCH_SITES= http://www.ht-net21.ne.jp/%7Enaoki-w/skk/ 
11PATCH_DIST_ARGS= -d ${WRKSRC}/jisyo --forward --quiet 
12 
13MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
14HOMEPAGE= http://skk.kuis.kyoto-u.ac.jp/ 10HOMEPAGE= http://skk.kuis.kyoto-u.ac.jp/
15COMMENT= Dictionary server for Simple Kana-Kanji conversion programs 11COMMENT= Dictionary server for Simple Kana-Kanji conversion programs
16 12
 13DEPENDS= skk-jisyo>=200708:../../inputmethod/skk-jisyo
 14
17PKG_DESTDIR_SUPPORT= user-destdir 15PKG_DESTDIR_SUPPORT= user-destdir
18 16
19WRKSRC= ${WRKDIR}/skk-9.6 17WRKSRC= ${WRKDIR}/skk-9.6
20 18
21BUILD_DEFS+= IPV6_READY 19BUILD_DEFS+= IPV6_READY
22 20
23DIST_SUBDIR= skk 21DIST_SUBDIR= skk
24 22
25GNU_CONFIGURE= YES 23GNU_CONFIGURE= YES
 24BUILD_DIRS= skkserv
26 25
27.include "../../mk/bsd.prefs.mk" 26.include "../../mk/bsd.prefs.mk"
28 27
29.if (${OPSYS} == "SunOS") 28.if (${OPSYS} == "SunOS")
30.if exists(/usr/ccs) 29.if exists(/usr/ccs)
31SKKSERV_UID?= 60002 # noaccess 30SKKSERV_UID?= 60002 # noaccess
32SKKSERV_GID?= 60002 # noaccess 31SKKSERV_GID?= 60002 # noaccess
33.else 32.else
34SKKSERV_UID?= 65534 # nobody 33SKKSERV_UID?= 65534 # nobody
35SKKSERV_GID?= 65534 # nogroup 34SKKSERV_GID?= 65534 # nogroup
36.endif 35.endif
37.endif 36.endif
38SKKSERV_UID?= 32767 # nobody 37SKKSERV_UID?= 32767 # nobody
39SKKSERV_GID?= 32766 # nogroup 38SKKSERV_GID?= 32766 # nogroup
40MAKE_ENV+= SKKUID=${SKKSERV_UID:Q} SKKGID=${SKKSERV_GID:Q} 39MAKE_ENV+= SKKUID=${SKKSERV_UID:Q} SKKGID=${SKKSERV_GID:Q}
41 40
42# tmp for building dictionary. ~16MB required. mfs would be much faster. 
43TMPDIR?= ${WRKDIR} 
44 
45RCD_SCRIPTS= skkserv 41RCD_SCRIPTS= skkserv
46 42
 43SUBST_CLASSES+= ver-num
 44SUBST_STAGE.ver-num= pre-configure
 45SUBST_MESSAGE.ver-num= Fixing version number and its comments.
 46SUBST_FILES.ver-num= skkserv/skkserv.c
 47SUBST_SED.ver-num= -e 's,"${PKGVERSION_NOREV} ","${PKGVERSION} (binary search) ",g'
 48
47INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} 49INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
48 50
49INSTALLATION_DIRS= share/skk 51INSTALLATION_DIRS= share/skk
50 52
51post-build: 
52 : 
53 : Merging dictionaries.... 
54 : 
55 ${WRKSRC}/jisyo-tools/skkdic-expr -d ${TMPDIR} \ 
56 ${WRKSRC}/jisyo/SKK-JISYO.L + ${WRKSRC}/jisyo/SKK-JISYO.JIS2 | \ 
57 ${WRKSRC}/jisyo-tools/skkdic-sort >${WRKDIR}/SKK-JISYO.L 
58 
59post-install: 53post-install:
60 ${INSTALL_DATA} ${WRKDIR}/SKK-JISYO.L ${DESTDIR}${PREFIX}/share/skk/SKK-JISYO.L 
61 ${INSTALL_DATA} ${WRKSRC}/skkserv/README ${DESTDIR}${PREFIX}/share/skk/README.skkserv 54 ${INSTALL_DATA} ${WRKSRC}/skkserv/README ${DESTDIR}${PREFIX}/share/skk/README.skkserv
62 ${INSTALL_DATA} ${WRKSRC}/jisyo-tools/README.1st ${DESTDIR}${PREFIX}/share/skk/README.1st.jisyo-tools 
63 ${INSTALL_DATA} ${WRKSRC}/jisyo-tools/README ${DESTDIR}${PREFIX}/share/skk/README.jisyo-tools 
64 55
65.include "../../mk/bsd.pkg.mk" 56.include "../../mk/bsd.pkg.mk"

cvs diff -r1.4 -r1.5 pkgsrc/inputmethod/skkserv/PLIST (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/PLIST 2009/06/14 18:01:32 1.4
+++ pkgsrc/inputmethod/skkserv/PLIST 2010/07/17 08:57:18 1.5
@@ -1,10 +1,4 @@ @@ -1,10 +1,4 @@
1@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:01:32 joerg Exp $ 1@comment $NetBSD: PLIST,v 1.5 2010/07/17 08:57:18 obache Exp $
2bin/skkdic-expr 
3bin/skkdic-sort 
4bin/skkdic-count 
5libexec/skkserv 2libexec/skkserv
6share/examples/rc.d/skkserv 3share/examples/rc.d/skkserv
7share/skk/SKK-JISYO.L 
8share/skk/README.skkserv 4share/skk/README.skkserv
9share/skk/README.1st.jisyo-tools 
10share/skk/README.jisyo-tools 

cvs diff -r1.4 -r1.5 pkgsrc/inputmethod/skkserv/distinfo (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/distinfo 2010/02/14 22:07:38 1.4
+++ pkgsrc/inputmethod/skkserv/distinfo 2010/07/17 08:57:18 1.5
@@ -1,19 +1,12 @@ @@ -1,19 +1,12 @@
1$NetBSD: distinfo,v 1.4 2010/02/14 22:07:38 dholland Exp $ 1$NetBSD: distinfo,v 1.5 2010/07/17 08:57:18 obache Exp $
2 2
3SHA1 (skk/skk9.6.tar.gz) = f462b4586dff6e36bfe331a526e054c3f6c3aad9 3SHA1 (skk/skk9.6.tar.gz) = f462b4586dff6e36bfe331a526e054c3f6c3aad9
4RMD160 (skk/skk9.6.tar.gz) = af182063e92f993cd2d9a69d7f89109ef0631526 4RMD160 (skk/skk9.6.tar.gz) = af182063e92f993cd2d9a69d7f89109ef0631526
5Size (skk/skk9.6.tar.gz) = 2407653 bytes 5Size (skk/skk9.6.tar.gz) = 2407653 bytes
6SHA1 (skk/SKK-JISYO.L.diff.gz) = aecf9a7aa8607b9e9a4a3c7e74268ffb09c775ad 
7RMD160 (skk/SKK-JISYO.L.diff.gz) = 74f6ca601b314e9c0f20cc7dce80dc084e1efba4 
8Size (skk/SKK-JISYO.L.diff.gz) = 15533 bytes 
9SHA1 (patch-aa) = d9ee708fe5dcf36258256bdb4ba4c8d7e16905da 
10SHA1 (patch-ab) = 5103484679c5d82a8d79460cc24e8857fc89460a 6SHA1 (patch-ab) = 5103484679c5d82a8d79460cc24e8857fc89460a
11SHA1 (patch-ac) = 3a1818c3bb453b69eb23154ed0daa6909275774b 7SHA1 (patch-ac) = 3a1818c3bb453b69eb23154ed0daa6909275774b
12SHA1 (patch-ad) = 27abe12b627e8e5c5de0a78fab3a5f4551f3c0f7 8SHA1 (patch-ad) = 27abe12b627e8e5c5de0a78fab3a5f4551f3c0f7
13SHA1 (patch-ae) = 356b3bab93365bb769a340b99979161f07f60de4 9SHA1 (patch-ae) = 356b3bab93365bb769a340b99979161f07f60de4
14SHA1 (patch-af) = 0ee1792a36a220096048801346c466c9e3ec2736 10SHA1 (patch-af) = 010ee51ad8b8e078fc14e7297fbcdf7259245014
15SHA1 (patch-ag) = 9d972fe066228d77214693bdfdcc14a827db79d2 
16SHA1 (patch-ah) = c5c75fa2b74e7878b3a489be458f5000889d316d 
17SHA1 (patch-ai) = 38f6169507d12c500298cba555a57b77cafa19c4 11SHA1 (patch-ai) = 38f6169507d12c500298cba555a57b77cafa19c4
18SHA1 (patch-bsearch) = d753fe29c2d0301a9e7bbf8c2d1f624447761cad 12SHA1 (patch-bsearch) = 32a0ab43b6695e19748abed250dd0e1ad632260b
19SHA1 (patch-jisyo) = 0711c55fb8df69648bd182de68ea6a69d42ac9af 

File Deleted: pkgsrc/inputmethod/skkserv/patches/Attic/patch-aa

File Deleted: pkgsrc/inputmethod/skkserv/patches/Attic/patch-jisyo

cvs diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/patches/Attic/patch-af (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/patches/Attic/patch-af 2002/05/31 12:59:58 1.1
+++ pkgsrc/inputmethod/skkserv/patches/Attic/patch-af 2010/07/17 08:57:18 1.2
@@ -1,109 +1,102 @@ @@ -1,109 +1,102 @@
1$NetBSD: patch-af,v 1.1 2002/05/31 12:59:58 seb Exp $ 1$NetBSD: patch-af,v 1.2 2010/07/17 08:57:18 obache Exp $
2 2
3--- skkserv/skkserv.c.orig Tue Jan 21 04:16:36 1997 3--- skkserv/skkserv.c.orig 1997-01-20 19:16:36.000000000 +0000
4+++ skkserv/skkserv.c Mon Nov 6 00:12:57 2000 4+++ skkserv/skkserv.c
5@@ -100,14 +100,16 @@ 5@@ -100,8 +100,10 @@
6 #define SERVER_NOT_FOUND "4" 6 #define SERVER_NOT_FOUND "4"
7 #define SERVER_FULL "9" 7 #define SERVER_FULL "9"
8  8
9+#define warn(m) \ 9+#define warn(m) \
10+ {if (debug) fprintf(errout, "%s: %s\n", pgmnm, m);} 10+ {if (debug) fprintf(errout, "%s: %s\n", pgmnm, m);}
11 #define err(m) \ 11 #define err(m) \
12- {if (debug) fprintf(errout, "%s: %s\n", pgmnm, m); exit(1);} 12- {if (debug) fprintf(errout, "%s: %s\n", pgmnm, m); exit(1);}
13+ {warn(m); exit(1);} 13+ {warn(m); exit(1);}
14  14
15 /* 15 /*
16 * Global Variables 16 * Global Variables
17 */ 17@@ -121,6 +123,9 @@ int format; /* 0 (old-style) / non-0 (n
18  
19-char pgmver[] = "3.9.4 "; /* version number */ 
20+char pgmver[] = "3.9.4nb1 "; /* version number */ 
21  
22 char *pgmnm; /* program name */ 
23 char *jname; /* name of shared dictionary */ 
24@@ -121,6 +123,9 @@ 
25 int jtab1[KANAMOJI]; /* index-table by 1st letter (1st part)*/ 18 int jtab1[KANAMOJI]; /* index-table by 1st letter (1st part)*/
26 int jtab2[KANAMOJI]; /* index-table by 1st letter (2nd part)*/ 19 int jtab2[KANAMOJI]; /* index-table by 1st letter (2nd part)*/
27 int initsock; /* socket for waiting requests */ 20 int initsock; /* socket for waiting requests */
28+#ifdef PF_INET6 21+#ifdef PF_INET6
29+int initsock6; /* IPv6 socket for waiting requests */ 22+int initsock6; /* IPv6 socket for waiting requests */
30+#endif 23+#endif
31 int clientsock[MAXCLNT]; /* socket for each client */ 24 int clientsock[MAXCLNT]; /* socket for each client */
32 int nclients; /* max index for active clients */ 25 int nclients; /* max index for active clients */
33  26
34@@ -130,8 +135,18 @@ 27@@ -130,8 +135,18 @@ char *argv[];
35 int parg; 28 int parg;
36 int setjisho = 0; 29 int setjisho = 0;
37 int ctlterm; /* fildes for control terminal */ 30 int ctlterm; /* fildes for control terminal */
38- void reread(); 31- void reread();
39+ RETSIGTYPE req_reread(); 32+ RETSIGTYPE req_reread();
40+ 33+
41+#ifdef SKKSERV_UID 34+#ifdef SKKSERV_UID
42+ gid_t gid = SKKSERV_GID; 35+ gid_t gid = SKKSERV_GID;
43  36
44+ /* revoke privilege if any */ 37+ /* revoke privilege if any */
45+ if (geteuid() == 0) { 38+ if (geteuid() == 0) {
46+ setgroups(1, &gid); 39+ setgroups(1, &gid);
47+ setgid(SKKSERV_GID); 40+ setgid(SKKSERV_GID);
48+ setuid(SKKSERV_UID); 41+ setuid(SKKSERV_UID);
49+ } 42+ }
50+#endif 43+#endif
51 pgmnm = argv[0]; 44 pgmnm = argv[0];
52 debug = 0; 45 debug = 0;
53 errout = stderr; 46 errout = stderr;
54@@ -200,7 +215,10 @@ 47@@ -200,7 +215,10 @@ char *argv[];
55 fclose(stderr); 48 fclose(stderr);
56  49
57 /* detach child process from control terminal */ 50 /* detach child process from control terminal */
58-#ifdef HAVE_TIOCNOTTY 51-#ifdef HAVE_TIOCNOTTY
59+#ifdef HAVE_SETSID 52+#ifdef HAVE_SETSID
60+ setsid(); 53+ setsid();
61+#else 54+#else
62+#ifdef TIOCNOTTY 55+#ifdef TIOCNOTTY
63 if ((ctlterm = open("/dev/tty", 2)) >= 0) {  56 if ((ctlterm = open("/dev/tty", 2)) >= 0) {
64 ioctl(ctlterm, TIOCNOTTY, 0); 57 ioctl(ctlterm, TIOCNOTTY, 0);
65 close(ctlterm); 58 close(ctlterm);
66@@ -215,6 +233,7 @@ 59@@ -215,6 +233,7 @@ char *argv[];
67 signal(SIGHUP, SIG_IGN); 60 signal(SIGHUP, SIG_IGN);
68 if (fork() != 0) exit(0); 61 if (fork() != 0) exit(0);
69 #endif 62 #endif
70+#endif 63+#endif
71 } else { /* debug mode */ 64 } else { /* debug mode */
72 fprintf(errout, "SKK-JISYO is %s\n", jname); 65 fprintf(errout, "SKK-JISYO is %s\n", jname);
73 fflush(errout); 66 fflush(errout);
74@@ -222,7 +241,7 @@ 67@@ -222,7 +241,7 @@ char *argv[];
75 if (errout != stderr) fclose(stderr); 68 if (errout != stderr) fclose(stderr);
76 } 69 }
77  70
78- signal(SIGINT, reread); 71- signal(SIGINT, reread);
79+ signal(SIGINT, req_reread); 72+ signal(SIGINT, req_reread);
80 /* 1993/6/5 by kam, re-read dictionary by "INT" signal */ 73 /* 1993/6/5 by kam, re-read dictionary by "INT" signal */
81  74
82 nclients = 0; 75 nclients = 0;
83@@ -244,8 +263,11 @@ 76@@ -244,8 +263,11 @@ showusage()
84 mksock() 77 mksock()
85 { 78 {
86 struct sockaddr_in sin; 79 struct sockaddr_in sin;
87+#ifdef PF_INET6 80+#ifdef PF_INET6
88+ struct sockaddr_in6 sin6; 81+ struct sockaddr_in6 sin6;
89+#endif 82+#endif
90 struct servent *sp; 83 struct servent *sp;
91- int optbuf = 1; /* enable socket REUSEADDR */ 84- int optbuf = 1; /* enable socket REUSEADDR */
92+ int optbuf; /* enable socket REUSEADDR */ 85+ int optbuf; /* enable socket REUSEADDR */
93  86
94 bzero((char*)&sin, sizeof(sin)); 87 bzero((char*)&sin, sizeof(sin));
95 sin.sin_family = AF_INET; 88 sin.sin_family = AF_INET;
96@@ -262,16 +284,54 @@ 89@@ -262,16 +284,54 @@ mksock()
97 sin.sin_port = htons(portnum);  90 sin.sin_port = htons(portnum);
98  91
99 if ((initsock = socket(PF_INET, SOCK_STREAM, 0)) < 0) 92 if ((initsock = socket(PF_INET, SOCK_STREAM, 0)) < 0)
100- err("socket error; socket cannot be created"); 93- err("socket error; socket cannot be created");
101- if (setsockopt(initsock, SOL_SOCKET, SO_REUSEADDR,  94- if (setsockopt(initsock, SOL_SOCKET, SO_REUSEADDR,
102+ warn("socket error; socket cannot be created"); 95+ warn("socket error; socket cannot be created");
103+#ifdef PF_INET6 96+#ifdef PF_INET6
104+ bzero((char*)&sin6, sizeof(sin6)); 97+ bzero((char*)&sin6, sizeof(sin6));
105+ sin6.sin6_family = AF_INET6; 98+ sin6.sin6_family = AF_INET6;
106+ /* sin6.sin6_addr.s6_addr = IN6ADDR_ANY_INIT; ... all-zero pattern */ 99+ /* sin6.sin6_addr.s6_addr = IN6ADDR_ANY_INIT; ... all-zero pattern */
107+ sin6.sin6_port = htons(portnum);  100+ sin6.sin6_port = htons(portnum);
108+ if ((initsock6 = socket(PF_INET6, SOCK_STREAM, 0)) < 0) 101+ if ((initsock6 = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
109+ warn("socket error; IPv6 socket cannot be created"); 102+ warn("socket error; IPv6 socket cannot be created");
@@ -144,73 +137,73 @@ $NetBSD: patch-af,v 1.1 2002/05/31 12:59 @@ -144,73 +137,73 @@ $NetBSD: patch-af,v 1.1 2002/05/31 12:59
144 err("listen error; something wrong happened with the socket"); 137 err("listen error; something wrong happened with the socket");
145+#ifdef PF_INET6 138+#ifdef PF_INET6
146+ if (initsock6 >= 0 && listen(initsock6, MAXQUE) < 0)  139+ if (initsock6 >= 0 && listen(initsock6, MAXQUE) < 0)
147+ err("listen error; something wrong happened with the IPv6 socket"); 140+ err("listen error; something wrong happened with the IPv6 socket");
148+#endif 141+#endif
149 if (debug) { 142 if (debug) {
150 fprintf(errout, "file descriptor for initsock is %d\n", initsock); 143 fprintf(errout, "file descriptor for initsock is %d\n", initsock);
151+#ifdef PF_INET6 144+#ifdef PF_INET6
152+ fprintf(errout, "file descriptor for initsock6 is %d\n", initsock6); 145+ fprintf(errout, "file descriptor for initsock6 is %d\n", initsock6);
153+#endif 146+#endif
154 fflush(errout); 147 fflush(errout);
155 } 148 }
156 } 149 }
157@@ -303,8 +363,19 @@ 150@@ -303,8 +363,19 @@ mkjtab()
158 mkoldjtab(buf); 151 mkoldjtab(buf);
159 } 152 }
160  153
161+/* using stdio in signal handler is unsafe */ 154+/* using stdio in signal handler is unsafe */
162+#ifdef __STDC__ 155+#ifdef __STDC__
163+volatile 156+volatile
164+#endif 157+#endif
165+int reread_requested; 158+int reread_requested;
166+ 159+
167+RETSIGTYPE req_reread() 160+RETSIGTYPE req_reread()
168+{ 161+{
169+ reread_requested = 1; 162+ reread_requested = 1;
170+} 163+}
171+ 164+
172 /* 1993/6/5 by kam, re-read dictionary by "INT" signal */ 165 /* 1993/6/5 by kam, re-read dictionary by "INT" signal */
173-RETSIGTYPE reread() 166-RETSIGTYPE reread()
174+void reread() 167+void reread()
175 { 168 {
176 if (fclose(jisho) < 0) { 169 if (fclose(jisho) < 0) {
177 fprintf(stderr,  170 fprintf(stderr,
178@@ -455,15 +526,22 @@ 171@@ -455,15 +526,22 @@ mknewjtab()
179 main_loop() 172 main_loop()
180 { 173 {
181 fd_set readfds, writefds, exceptfds; 174 fd_set readfds, writefds, exceptfds;
182- fd_set getrfds(); 175- fd_set getrfds();
183+ void getrfds(); 176+ void getrfds();
184 struct sockaddr_in from; 177 struct sockaddr_in from;
185+#ifdef PF_INET6 178+#ifdef PF_INET6
186+ struct sockaddr_in6 from6; 179+ struct sockaddr_in6 from6;
187+#endif 180+#endif
188 int len; 181 int len;
189 register int i; 182 register int i;
190  183
191 FD_ZERO(&writefds); 184 FD_ZERO(&writefds);
192 FD_ZERO(&exceptfds); 185 FD_ZERO(&exceptfds);
193 for(;;) { /* infinite loop; waiting for client's request */ 186 for(;;) { /* infinite loop; waiting for client's request */
194- readfds = getrfds(); 187- readfds = getrfds();
195+ if (reread_requested) { 188+ if (reread_requested) {
196+ reread(); 189+ reread();
197+ reread_requested = 0; 190+ reread_requested = 0;
198+ } 191+ }
199+ getrfds(&readfds); 192+ getrfds(&readfds);
200 if (select(MAXDTAB, &readfds, &writefds, &exceptfds, NULL) < 0) { 193 if (select(MAXDTAB, &readfds, &writefds, &exceptfds, NULL) < 0) {
201 if (errno == EINTR) /* if signal happens */ 194 if (errno == EINTR) /* if signal happens */
202 continue; 195 continue;
203@@ -474,16 +552,32 @@ 196@@ -474,16 +552,32 @@ main_loop()
204 fflush(errout); 197 fflush(errout);
205 } 198 }
206  199
207- if (FD_ISSET(initsock, &readfds)) { 200- if (FD_ISSET(initsock, &readfds)) {
208+ if (initsock >= 0 && FD_ISSET(initsock, &readfds)) { 201+ if (initsock >= 0 && FD_ISSET(initsock, &readfds)) {
209 len = sizeof(from); 202 len = sizeof(from);
210 if ((clientsock[nclients ++] = accept(initsock, &from, &len)) < 0) { 203 if ((clientsock[nclients ++] = accept(initsock, &from, &len)) < 0) {
211 err("accept error; something wrong happened with the socket"); 204 err("accept error; something wrong happened with the socket");
212 } 205 }
213- if (nclients >= MAXDTAB - 3 - debug * 2) { 206- if (nclients >= MAXDTAB - 3 - debug * 2) {
214+ if (nclients >= MAXDTAB - 3 207+ if (nclients >= MAXDTAB - 3
215+#ifdef PF_INET6 208+#ifdef PF_INET6
216+ -1 209+ -1
@@ -225,58 +218,58 @@ $NetBSD: patch-af,v 1.1 2002/05/31 12:59 @@ -225,58 +218,58 @@ $NetBSD: patch-af,v 1.1 2002/05/31 12:59
225+ len = sizeof(from6); 218+ len = sizeof(from6);
226+ if ((clientsock[nclients ++] = accept(initsock6, &from6, &len)) < 0) { 219+ if ((clientsock[nclients ++] = accept(initsock6, &from6, &len)) < 0) {
227+ err("accept error; something wrong happened with the socket"); 220+ err("accept error; something wrong happened with the socket");
228+ } 221+ }
229+ if (nclients >= MAXDTAB - 4 - debug * 2) { 222+ if (nclients >= MAXDTAB - 4 - debug * 2) {
230+ write(clientsock[--nclients], SERVER_FULL, 1); 223+ write(clientsock[--nclients], SERVER_FULL, 1);
231+ close(clientsock[nclients]); 224+ close(clientsock[nclients]);
232+ } 225+ }
233+ } 226+ }
234+#endif 227+#endif
235  228
236 /* naiive scheduling */ 229 /* naiive scheduling */
237 for (i = 0; i < nclients; i ++) 230 for (i = 0; i < nclients; i ++)
238@@ -511,16 +605,20 @@ 231@@ -511,16 +605,20 @@ main_loop()
239 * get bit pattern of read file descriptor 232 * get bit pattern of read file descriptor
240 */ 233 */
241  234
242-fd_set getrfds() 235-fd_set getrfds()
243+void getrfds(rfds) 236+void getrfds(rfds)
244+fd_set *rfds; 237+fd_set *rfds;
245 { 238 {
246- fd_set rfds; 239- fd_set rfds;
247 register int i; 240 register int i;
248  241
249- FD_ZERO(&rfds); 242- FD_ZERO(&rfds);
250- FD_SET(initsock, &rfds); 243- FD_SET(initsock, &rfds);
251+ FD_ZERO(rfds); 244+ FD_ZERO(rfds);
252+ if (initsock >= 0) 245+ if (initsock >= 0)
253+ FD_SET(initsock, rfds); 246+ FD_SET(initsock, rfds);
254+#ifdef PF_INET6 247+#ifdef PF_INET6
255+ if (initsock6 >= 0) 248+ if (initsock6 >= 0)
256+ FD_SET(initsock6, rfds); 249+ FD_SET(initsock6, rfds);
257+#endif 250+#endif
258 for (i = 0; i < nclients; i ++) 251 for (i = 0; i < nclients; i ++)
259- FD_SET(clientsock[i], &rfds); 252- FD_SET(clientsock[i], &rfds);
260- return (rfds); 253- return (rfds);
261+ FD_SET(clientsock[i], rfds); 254+ FD_SET(clientsock[i], rfds);
262 } 255 }
263  256
264 /* 257 /*
265@@ -724,6 +822,9 @@ 258@@ -724,6 +822,9 @@ set_hname()
266 exit(1); 259 exit(1);
267 } 260 }
268 hentry = gethostbyname(hname); 261 hentry = gethostbyname(hname);
269+ if (hentry == NULL) { 262+ if (hentry == NULL) {
270+ fprintf(errout, "%s: WARNING: gethostbyname(%s) failed\n", pgmnm, hname); 263+ fprintf(errout, "%s: WARNING: gethostbyname(%s) failed\n", pgmnm, hname);
271+ } else { 264+ } else {
272 #ifdef NO_ADDR_LIST 265 #ifdef NO_ADDR_LIST
273 strcat(hname, ":"); 266 strcat(hname, ":");
274 strcat(hname, hentry->h_addr); 267 strcat(hname, hentry->h_addr);
275@@ -736,6 +837,7 @@ 268@@ -736,6 +837,7 @@ set_hname()
276 strcat(hname, inet_ntoa(*(struct in_addr *)*p++)); 269 strcat(hname, inet_ntoa(*(struct in_addr *)*p++));
277 } 270 }
278 #endif 271 #endif
279+ } 272+ }
280 strcat(hname, ": "); 273 strcat(hname, ": ");
281 } 274 }
282  275

cvs diff -r1.1 -r1.2 pkgsrc/inputmethod/skkserv/patches/Attic/patch-bsearch (expand / switch to unified diff)

--- pkgsrc/inputmethod/skkserv/patches/Attic/patch-bsearch 2002/05/31 12:59:59 1.1
+++ pkgsrc/inputmethod/skkserv/patches/Attic/patch-bsearch 2010/07/17 08:57:18 1.2
@@ -1,48 +1,35 @@ @@ -1,48 +1,35 @@
1$NetBSD: patch-bsearch,v 1.1 2002/05/31 12:59:59 seb Exp $ 1$NetBSD: patch-bsearch,v 1.2 2010/07/17 08:57:18 obache Exp $
2 2
3Binary search patch. 3--- skkserv/skkserv.c.orig 2010-07-16 09:36:31.000000000 +0000
4Originally from skk-users mailing list 4+++ skkserv/skkserv.c
5(Masahiro Doteguchi, Mailinglist-Id: 1779). 5@@ -622,7 +622,7 @@ fd_set *rfds;
6 
7--- skkserv/skkserv.c.patch1 Mon Nov 6 00:12:57 2000 
8+++ skkserv/skkserv.c Mon Nov 6 00:15:00 2000 
9@@ -109,7 +109,7 @@ 
10 * Global Variables 
11 */ 
12  
13-char pgmver[] = "3.9.4nb1 "; /* version number */ 
14+char pgmver[] = "3.9.4nb1 (binary search) "; /* version number */ 
15  
16 char *pgmnm; /* program name */ 
17 char *jname; /* name of shared dictionary */ 
18@@ -622,7 +622,7 @@ 
19 } 6 }
20  7
21 /* 8 /*
22- * reply to client: linear search 9- * reply to client: linear search
23+ * reply to client: binary search 10+ * reply to client: binary search
24 */ 11 */
25  12
26 search(commsock) 13 search(commsock)
27@@ -635,6 +635,7 @@ 14@@ -635,6 +635,7 @@ int commsock;
28 int n; /* number of characters from client */ 15 int n; /* number of characters from client */
29 int sttpnt; /* start point of searching */ 16 int sttpnt; /* start point of searching */
30 int endpnt; /* end point of searching */ 17 int endpnt; /* end point of searching */
31+ int curpnt; /* current point of searching */ 18+ int curpnt; /* current point of searching */
32 int errcod = 0; /* error flag */ 19 int errcod = 0; /* error flag */
33 int sstyle; /* search style */ 20 int sstyle; /* search style */
34  21
35@@ -743,18 +744,36 @@ 22@@ -743,18 +744,36 @@ int commsock;
36 endpnt = jtab1[KANA_END - code + 1]; 23 endpnt = jtab1[KANA_END - code + 1];
37 } 24 }
38 } 25 }
39- fseek(jisho, sttpnt, 0); 26- fseek(jisho, sttpnt, 0);
40 if (debug) 27 if (debug)
41- fprintf(stderr, "from %d to %d\n", sttpnt, endpnt); 28- fprintf(stderr, "from %d to %d\n", sttpnt, endpnt);
42+ fprintf(errout, "from %d to %d\n", sttpnt, endpnt); 29+ fprintf(errout, "from %d to %d\n", sttpnt, endpnt);
43  30
44- while ((c = fgetc(jisho)) != EOF) { 31- while ((c = fgetc(jisho)) != EOF) {
45+ for (;;) { 32+ for (;;) {
46+ if ((sstyle & 0x4) == 0) { /* binary search? */ 33+ if ((sstyle & 0x4) == 0) { /* binary search? */
47+ curpnt = (sttpnt + endpnt) / 2; 34+ curpnt = (sttpnt + endpnt) / 2;
48+ fseek(jisho, curpnt, 0); 35+ fseek(jisho, curpnt, 0);
@@ -65,27 +52,27 @@ Originally from skk-users mailing list @@ -65,27 +52,27 @@ Originally from skk-users mailing list
65+/* if (debug) {fprintf(errout, "1:%d:%d:%d:%d:", c, *pbuf, ' ', EOL);}*/ 52+/* if (debug) {fprintf(errout, "1:%d:%d:%d:%d:", c, *pbuf, ' ', EOL);}*/
66+ if (debug) {fprintf(errout, "%c", c);} 53+ if (debug) {fprintf(errout, "%c", c);}
67 c = fgetc(jisho); pbuf++; 54 c = fgetc(jisho); pbuf++;
68- }  55- }
69- if (debug) {fprintf(errout, "1:%d:%d:%d:%d:\n", c, *pbuf, ' ', EOL);} 56- if (debug) {fprintf(errout, "1:%d:%d:%d:%d:\n", c, *pbuf, ' ', EOL);}
70+ } 57+ }
71+/* if (debug) {fprintf(errout, "1:%d:%d:%d:%d:", c, *pbuf, ' ', EOL);}*/ 58+/* if (debug) {fprintf(errout, "1:%d:%d:%d:%d:", c, *pbuf, ' ', EOL);}*/
72+ if (debug) {fprintf(errout, "%c", c);} 59+ if (debug) {fprintf(errout, "%c", c);}
73 if (c == ' ' && (*pbuf == ' ' || *pbuf == '\n')) { /* found */ 60 if (c == ' ' && (*pbuf == ' ' || *pbuf == '\n')) { /* found */
74+ if (debug) {fprintf(errout, "found\n");} 61+ if (debug) {fprintf(errout, "found\n");}
75 if ((errcod = write(commsock, SERVER_FOUND, 1)) >= 0) 62 if ((errcod = write(commsock, SERVER_FOUND, 1)) >= 0)
76 while ((c = fgetc(jisho)) != EOF) { 63 while ((c = fgetc(jisho)) != EOF) {
77 *pbuf = c; 64 *pbuf = c;
78@@ -770,18 +789,35 @@ 65@@ -770,18 +789,35 @@ int commsock;
79 } 66 }
80 return(0); 67 return(0);
81 } 68 }
82- if (comp(*pbuf, c, sstyle)) { 69- if (comp(*pbuf, c, sstyle)) {
83- if (debug) { 70- if (debug) {
84- fprintf(stderr, "comp break %d \n", ftell(jisho)); 71- fprintf(stderr, "comp break %d \n", ftell(jisho));
85- } 72- }
86- break;  73- break;
87+ if (debug) { 74+ if (debug) {
88+ int ch; 75+ int ch;
89+ 76+
90+ if (c != ' ') 77+ if (c != ' ')
91+ do { 78+ do {

File Deleted: pkgsrc/inputmethod/skkserv/patches/Attic/patch-ag

File Deleted: pkgsrc/inputmethod/skkserv/patches/Attic/patch-ah