X input method for japanese.
Port by Hitoshi Suzuki <sigh@kuzirabekon.econ.nagasaki-u.ac.jp>, with a few flavor tricks by me. Domo arigato, Suzuki san !
This commit is contained in:
parent
172f75b10f
commit
9675fc3c39
51
japanese/kinput2/Makefile
Normal file
51
japanese/kinput2/Makefile
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Date created: 26 Apr. 2000
|
||||||
|
# Whom: SUZUKI Hitoshi <sigh@kuzirabekon.econ.nagasaki-u.ac.jp>
|
||||||
|
|
||||||
|
DISTNAME= kinput2-v3
|
||||||
|
MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/
|
||||||
|
CATEGORIES= japanese x11
|
||||||
|
|
||||||
|
LICENSE_TYPE= NOFEE
|
||||||
|
PERMIT_PACKAGE_CDROM= Yes
|
||||||
|
PERMIT_PACKAGE_FTP= Yes
|
||||||
|
PERMIT_DISTFILES_CDROM= Yes
|
||||||
|
PERMIT_DISTFILES_FTP= Yes
|
||||||
|
|
||||||
|
MAINTAINER= sigh@kuzirabekon.econ.nagasaki-u.ac.jp
|
||||||
|
|
||||||
|
NEED_VERSION= 1.270
|
||||||
|
USE_IMAKE= Yes
|
||||||
|
FAKE= Yes
|
||||||
|
FLAVORS= canna wnn
|
||||||
|
FLAVOR?= wnn
|
||||||
|
|
||||||
|
PKGNAME= ja-kinput2-3.0
|
||||||
|
|
||||||
|
.if ${FLAVOR:L:Mwnn}
|
||||||
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libwnn.a::japanese/Wnn
|
||||||
|
.endif
|
||||||
|
.if ${FLAVOR:L:Mcanna}
|
||||||
|
LIB_DEPENDS= canna16::japanese/canna
|
||||||
|
.endif
|
||||||
|
|
||||||
|
PORT_DOCDIR=${PREFIX}/share/doc/kinput2
|
||||||
|
|
||||||
|
pre-configure:
|
||||||
|
mv -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org
|
||||||
|
cp ${FILESDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf
|
||||||
|
.if ${FLAVOR:L:Mwnn}
|
||||||
|
echo "#define UseWnn" >>${WRKSRC}/Kinput2.conf
|
||||||
|
.endif
|
||||||
|
.if ${FLAVOR:L:Mcanna}
|
||||||
|
echo "#define UseCanna" >>${WRKSRC}/Kinput2.conf
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
-mkdir ${PREFIX}/share/doc/kinput2
|
||||||
|
cp ${WRKSRC}/README ${PORT_DOCDIR}
|
||||||
|
cp ${WRKSRC}/NEWS ${PORT_DOCDIR}
|
||||||
|
@(cd ${WRKSRC}/doc; tar -cf - . | \
|
||||||
|
(cd ${PORT_DOCDIR}; tar -xf -))
|
||||||
|
@chown -R ${SHAREOWN}.${SHAREGRP} ${PORT_DOCDIR}
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
5
japanese/kinput2/files/Kinput2.conf
Normal file
5
japanese/kinput2/files/Kinput2.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
CCDEF_DIR = ${LOCALBASE}/lib/X11/ccdef
|
||||||
|
CANNASRC = ${LOCALBASE}/include
|
||||||
|
CANNALIB = -L${LOCALBASE} -lcanna16
|
||||||
|
WNNINCDIR = ${LOCALBASE}/include/wnn
|
||||||
|
WNNLIB = -L${LOCALBASE} -lwnn
|
3
japanese/kinput2/files/md5
Normal file
3
japanese/kinput2/files/md5
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MD5 (kinput2-v3.tar.gz) = 3b3b6470879b5071c651bcdc84d52f3e
|
||||||
|
RMD160 (kinput2-v3.tar.gz) = 8c8a72a693edc52882be392ef91e7ad9a5c2a7e6
|
||||||
|
SHA1 (kinput2-v3.tar.gz) = a9e2be1fe4da4c5f4921a1d753f58d20f1ef3693
|
21
japanese/kinput2/patches/patch-client_convlib_c
Normal file
21
japanese/kinput2/patches/patch-client_convlib_c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
$OpenBSD: patch-client_convlib_c,v 1.1.1.1 2000/04/26 00:43:14 espie Exp $
|
||||||
|
--- client/convlib.c.orig Thu May 27 01:55:33 1999
|
||||||
|
+++ client/convlib.c Wed Apr 26 02:18:47 2000
|
||||||
|
@@ -322,7 +322,7 @@ String s;
|
||||||
|
String p;
|
||||||
|
char buf[64];
|
||||||
|
|
||||||
|
- (void)strcpy(buf, s);
|
||||||
|
+ (void)strlcpy(buf, s, sizeof(buf));
|
||||||
|
for (p = buf; *p != '\0'; p++) {
|
||||||
|
if ('A' <= *p && *p <= 'Z') *p += 'a' - 'A';
|
||||||
|
}
|
||||||
|
@@ -338,7 +338,7 @@ String s;
|
||||||
|
String p;
|
||||||
|
char buf[64];
|
||||||
|
|
||||||
|
- (void)strcpy(buf, s);
|
||||||
|
+ (void)strlcpy(buf, s, sizeof(buf));
|
||||||
|
for (p = buf; *p != '\0'; p++) {
|
||||||
|
if ('A' <= *p && *p <= 'Z') *p += 'a' - 'A';
|
||||||
|
}
|
21
japanese/kinput2/patches/patch-lib_ConvCtrl_c
Normal file
21
japanese/kinput2/patches/patch-lib_ConvCtrl_c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
$OpenBSD: patch-lib_ConvCtrl_c,v 1.1.1.1 2000/04/26 00:43:12 espie Exp $
|
||||||
|
--- lib/ConvCtrl.c.orig Thu May 27 01:55:23 1999
|
||||||
|
+++ lib/ConvCtrl.c Wed Apr 26 02:18:47 2000
|
||||||
|
@@ -1246,7 +1246,7 @@ String msg;
|
||||||
|
params[0] = XtClass(w)->core_class.class_name;
|
||||||
|
num_params = 1;
|
||||||
|
|
||||||
|
- (void)sprintf(buf, "%%s: %s", msg);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "%%s: %s", msg);
|
||||||
|
|
||||||
|
XtAppErrorMsg(XtWidgetToApplicationContext(w),
|
||||||
|
name, type, "WidgetError", buf, params, &num_params);
|
||||||
|
@@ -1266,7 +1266,7 @@ String msg;
|
||||||
|
params[0] = XtClass(w)->core_class.class_name;
|
||||||
|
num_params = 1;
|
||||||
|
|
||||||
|
- (void)sprintf(buf, "%%s: %s", msg);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "%%s: %s", msg);
|
||||||
|
|
||||||
|
XtAppWarningMsg(XtWidgetToApplicationContext(w),
|
||||||
|
name, type, "WidgetError", buf, params, &num_params);
|
79
japanese/kinput2/patches/patch-lib_IMProto_c
Normal file
79
japanese/kinput2/patches/patch-lib_IMProto_c
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
$OpenBSD: patch-lib_IMProto_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/IMProto.c.orig Thu May 27 01:55:23 1999
|
||||||
|
+++ lib/IMProto.c Wed Apr 26 02:18:47 2000
|
||||||
|
@@ -298,7 +298,7 @@ Cardinal *num_args;
|
||||||
|
#else
|
||||||
|
(void)chmod(UNIX_SOCKET_DIR, 0777);
|
||||||
|
#endif
|
||||||
|
- (void)sprintf(path, "%s/%s", UNIX_SOCKET_DIR,
|
||||||
|
+ (void)snprintf(path, sizeof(path), "%s/%s", UNIX_SOCKET_DIR,
|
||||||
|
DisplayString(XtDisplay(new)));
|
||||||
|
/*
|
||||||
|
* Omit screen number and the preceding period.
|
||||||
|
@@ -312,8 +312,8 @@ Cardinal *num_args;
|
||||||
|
/*
|
||||||
|
* Append language part.
|
||||||
|
*/
|
||||||
|
- (void)strcat(path, "-");
|
||||||
|
- (void)strcat(path, ipw->imp.language);
|
||||||
|
+ (void)strlcat(path, "-", sizeof(path));
|
||||||
|
+ (void)strlcat(path, ipw->imp.language, sizeof(path));
|
||||||
|
/*
|
||||||
|
* Change every ':' in the path name to '_', since ':' is not
|
||||||
|
* included in POSIX Portable Filename Character Set.
|
||||||
|
@@ -454,8 +454,8 @@ IMProtocolWidget ipw;
|
||||||
|
|
||||||
|
TRACE(("IMProtocolWidget:getAtoms()\n"));
|
||||||
|
|
||||||
|
- (void)strcpy(buf, "@server=");
|
||||||
|
- (void)strcat(buf, ipw->imp.server_name);
|
||||||
|
+ (void)strlcpy(buf, "@server=", sizeof(buf));
|
||||||
|
+ (void)strlcat(buf, ipw->imp.server_name, sizeof(buf));
|
||||||
|
#define MAKEATOM(s) XInternAtom(dpy, s, False)
|
||||||
|
ipw->imp.server_atom = MAKEATOM(buf);
|
||||||
|
ipw->imp.ctext_atom = MAKEATOM("COMPOUND_TEXT");
|
||||||
|
@@ -599,8 +599,8 @@ int *formatp;
|
||||||
|
char buf[1024];
|
||||||
|
|
||||||
|
TRACE(("target is \"LOCALES\"\n"));
|
||||||
|
- (void)strcpy(buf, "@locale=");
|
||||||
|
- (void)strcat(buf, ipw->imp.locales);
|
||||||
|
+ (void)strlcpy(buf, "@locale=", sizeof(buf));
|
||||||
|
+ (void)strlcat(buf, ipw->imp.locales, sizeof(buf));
|
||||||
|
TRACE(("\ttype: STRING, value: %s\n", buf));
|
||||||
|
/*
|
||||||
|
* The protocol spec is unclear on the type of the
|
||||||
|
@@ -621,27 +621,27 @@ int *formatp;
|
||||||
|
|
||||||
|
XmuGetHostname(hostname, 256);
|
||||||
|
|
||||||
|
- (void)strcpy(buf, "@transport=");
|
||||||
|
+ (void)strlcpy(buf, "@transport=", sizeof(buf));
|
||||||
|
|
||||||
|
#ifdef IM_X_TRANSPORT
|
||||||
|
if (ipw->imp.use_x_transport) {
|
||||||
|
- (void)strcat(buf, "X/,");
|
||||||
|
+ (void)strlcat(buf, "X/,", sizeof(buf));
|
||||||
|
}
|
||||||
|
#endif /* IM_X_TRANSPORT */
|
||||||
|
|
||||||
|
#ifdef IM_TCP_TRANSPORT
|
||||||
|
if (ipw->imp.use_tcp_transport) {
|
||||||
|
char t_buf[1024];
|
||||||
|
- (void)sprintf(t_buf, "tcp/%s:%d,", hostname, ipw->imp.tcp_port);
|
||||||
|
- (void)strcat(buf, t_buf);
|
||||||
|
+ (void)snprintf(t_buf, sizeof(t_buf), "tcp/%s:%d,", hostname, ipw->imp.tcp_port);
|
||||||
|
+ (void)strlcat(buf, t_buf, sizeof(buf));
|
||||||
|
}
|
||||||
|
#endif /* IM_TCP_TRANSPORT */
|
||||||
|
|
||||||
|
#ifdef IM_UNIX_TRANSPORT
|
||||||
|
if (ipw->imp.use_unix_transport) {
|
||||||
|
char u_buf[1024];
|
||||||
|
- (void)sprintf(u_buf, "local/%s:%s,", hostname, ipw->imp.unix_path);
|
||||||
|
- (void)strcat(buf, u_buf);
|
||||||
|
+ (void)snprintf(u_buf, sizeof(u_buf), "local/%s:%s,", hostname, ipw->imp.unix_path);
|
||||||
|
+ (void)strlcat(buf, u_buf, sizeof(buf));
|
||||||
|
}
|
||||||
|
#endif /* IM_UNIX_TRANSPORT */
|
||||||
|
|
34
japanese/kinput2/patches/patch-lib_KIProto_c
Normal file
34
japanese/kinput2/patches/patch-lib_KIProto_c
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
$OpenBSD: patch-lib_KIProto_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/KIProto.c.orig Thu May 27 01:55:24 1999
|
||||||
|
+++ lib/KIProto.c Wed Apr 26 02:18:47 2000
|
||||||
|
@@ -314,10 +314,10 @@ KinputProtocolWidget kpw;
|
||||||
|
Display *dpy = XtDisplay((Widget)kpw);
|
||||||
|
char buf[256];
|
||||||
|
|
||||||
|
- (void)sprintf(buf, "_%s_CONVERSION", kpw->kinput.language);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_%s_CONVERSION", kpw->kinput.language);
|
||||||
|
kpw->kinput.convAtom = XInternAtom(dpy, buf, False);
|
||||||
|
if (kpw->kinput.backward_compatible) {
|
||||||
|
- (void)sprintf(buf, "%s_CONVERSION", kpw->kinput.language);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "%s_CONVERSION", kpw->kinput.language);
|
||||||
|
kpw->kinput.oldConvAtom = XInternAtom(dpy, buf, False);
|
||||||
|
} else {
|
||||||
|
kpw->kinput.oldConvAtom = None;
|
||||||
|
@@ -331,7 +331,7 @@ KinputProtocolWidget kpw;
|
||||||
|
kpw->kinput.convNotifyAtom = MAKEATOM("CONVERSION_NOTIFY");
|
||||||
|
kpw->kinput.convEndAtom = MAKEATOM("CONVERSION_END");
|
||||||
|
|
||||||
|
- (void)sprintf(buf, "%s_CONVERSION_VERSION", kpw->kinput.language);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "%s_CONVERSION_VERSION", kpw->kinput.language);
|
||||||
|
kpw->kinput.convVersionAtom = XInternAtom(dpy, buf, False);
|
||||||
|
kpw->kinput.convInitialTypeAtom = MAKEATOM("CONVERSION_INITIAL_TYPE");
|
||||||
|
kpw->kinput.convOpenNotifyAtom = MAKEATOM("CONVERSION_OPEN_NOTIFY");
|
||||||
|
@@ -1239,7 +1239,7 @@ long *modmaskp;
|
||||||
|
* Ctrl, Shift, Lock, Meta, Alt, Mod1, Mod2, Mod3, Mod4, Mod5
|
||||||
|
*/
|
||||||
|
|
||||||
|
- strcpy(buf, s);
|
||||||
|
+ strlcpy(buf, s, sizeof(buf));
|
||||||
|
|
||||||
|
/* find "<Key>" */
|
||||||
|
if ((p = mystrstr(buf, "<Key>")) != NULL) {
|
27
japanese/kinput2/patches/patch-lib_Sj3_c
Normal file
27
japanese/kinput2/patches/patch-lib_Sj3_c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
$OpenBSD: patch-lib_Sj3_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/Sj3.c.orig Thu May 27 01:55:24 1999
|
||||||
|
+++ lib/Sj3.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -249,19 +249,19 @@ setUser()
|
||||||
|
|
||||||
|
|
||||||
|
if (login = getlogin())
|
||||||
|
- strcpy(uname, login);
|
||||||
|
+ strlcpy(uname, login, sizeof(uname));
|
||||||
|
setpwent();
|
||||||
|
if (!uname || *uname == '\0') {
|
||||||
|
if (pwd = getpwuid(getuid())) {
|
||||||
|
- strcpy(uname, pwd->pw_name);
|
||||||
|
+ strlcpy(uname, pwd->pw_name, sizeof(uname));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pwd = getpwnam(uname);
|
||||||
|
}
|
||||||
|
if (pwd)
|
||||||
|
- strcpy(home, pwd->pw_dir);
|
||||||
|
+ strlcpy(home, pwd->pw_dir, sizeof(home));
|
||||||
|
else
|
||||||
|
- strcpy(home, getenv("HOME"));
|
||||||
|
+ strlcpy(home, getenv("HOME"), sizeof(home));
|
||||||
|
endpwent();
|
||||||
|
}
|
||||||
|
|
39
japanese/kinput2/patches/patch-lib_XimpProto_c
Normal file
39
japanese/kinput2/patches/patch-lib_XimpProto_c
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
$OpenBSD: patch-lib_XimpProto_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/XimpProto.c.orig Thu May 27 01:55:25 1999
|
||||||
|
+++ lib/XimpProto.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -387,9 +387,9 @@ XimpProtocolWidget xpw;
|
||||||
|
char buf[256];
|
||||||
|
|
||||||
|
#define MAKEATOM(s) XInternAtom(dpy, s, False)
|
||||||
|
- (void)sprintf(buf, "_XIMP_%s", xpw->ximp.localename);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_%s", xpw->ximp.localename);
|
||||||
|
xpw->ximp.selAtom1 = MAKEATOM(buf);
|
||||||
|
- (void)sprintf(buf, "_XIMP_%s@%s.%d",
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_%s@%s.%d",
|
||||||
|
xpw->ximp.localename,
|
||||||
|
xpw->ximp.servername,
|
||||||
|
DefaultScreen(XtDisplay((Widget)xpw)));
|
||||||
|
@@ -474,17 +474,17 @@ Window client;
|
||||||
|
char buf[30];
|
||||||
|
|
||||||
|
ccp = XtNew(ConvClient);
|
||||||
|
- (void)sprintf(buf, "_XIMP_STRING_%d", xpw->ximp.propid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_STRING_%d", xpw->ximp.propid++);
|
||||||
|
ccp->property = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
- (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
ccp->preeditdata = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
- (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
ccp->preedittext = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
- (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
ccp->preeditfeedback = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
- (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
ccp->statustext = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
- (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
+ (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
|
||||||
|
ccp->statusfeedback = XInternAtom(XtDisplay((Widget)xpw), buf, False);
|
||||||
|
}
|
||||||
|
ccp->id = xpw->ximp.icid++;
|
59
japanese/kinput2/patches/patch-lib_cconv_c
Normal file
59
japanese/kinput2/patches/patch-lib_cconv_c
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
$OpenBSD: patch-lib_cconv_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/cconv.c.orig Thu May 27 01:55:25 1999
|
||||||
|
+++ lib/cconv.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -611,7 +611,7 @@ static char *rcsid = "$Id: cconv.c,v 10.
|
||||||
|
|
||||||
|
#define EPROC2(efunc, format, a) { \
|
||||||
|
char tmp[1024]; \
|
||||||
|
- (void)sprintf(tmp, format, a); \
|
||||||
|
+ (void)snprintf(tmp, sizeof(tmp), format, a); \
|
||||||
|
eproc(efunc, tmp); }
|
||||||
|
|
||||||
|
/* $B%-!<%3!<%I$N%(%s%3!<%IJ}K!(B */
|
||||||
|
@@ -965,7 +965,7 @@ char *file;
|
||||||
|
if (q == filename) continue;
|
||||||
|
*q++ = '/';
|
||||||
|
*q = '\0';
|
||||||
|
- (void)Strcat(filename, file);
|
||||||
|
+ (void)strlcat(filename, file, sizeof(filename));
|
||||||
|
if ((fp = fopen(filename, "r")) != NULL)
|
||||||
|
return fp;
|
||||||
|
}
|
||||||
|
@@ -973,8 +973,8 @@ char *file;
|
||||||
|
/* $B%G%U%)%k%H$N%5!<%A%Q%9(B CCDEFPATH(/usr/lib/X11/ccdef) $B$N(B
|
||||||
|
* $B2<$r%5!<%A$9$k(B
|
||||||
|
*/
|
||||||
|
- (void)Strcpy(filename, CCDEFPATH);
|
||||||
|
- (void)Strcat(filename, file);
|
||||||
|
+ (void)strlcpy(filename, (char *)CCDEFPATH, sizeof(filename));
|
||||||
|
+ (void)strlcat(filename, file, sizeof(filename));
|
||||||
|
fp = fopen(filename, "r");
|
||||||
|
}
|
||||||
|
return fp;
|
||||||
|
@@ -1078,7 +1078,7 @@ char *file;
|
||||||
|
rule->initialmode = -1;
|
||||||
|
|
||||||
|
while (getline(line, sizeof(line), &files, efunc)) {
|
||||||
|
- (void)Strcpy(tmp, line);
|
||||||
|
+ (void)strlcpy(tmp, line, sizeof(tmp));
|
||||||
|
if ((argc = parseLine(tmp, argv, 20)) == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
@@ -1302,7 +1302,7 @@ int *funcp;
|
||||||
|
"context" key "result" [function...]
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (void)Strcpy(tmp, line);
|
||||||
|
+ (void)strlcpy(tmp, line, sizeof(tmp));
|
||||||
|
ac = parseLine(tmp, av, 20);
|
||||||
|
if (ac < 3) {
|
||||||
|
EPROC2(efunc, "syntax error - %s", line);
|
||||||
|
@@ -1885,7 +1885,7 @@ char *funcname;
|
||||||
|
fnrec->funcnameend = cp + size;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)strcpy(fnrec->funcnamep, funcname);
|
||||||
|
+ (void)strlcpy(fnrec->funcnamep, funcname, MOREFUNCNAMESIZE);
|
||||||
|
fnrec->funcnames[nfunc] = fnrec->funcnamep - fnrec->funcnamebuf;
|
||||||
|
fnrec->funcnamep += len;
|
||||||
|
|
25
japanese/kinput2/patches/patch-lib_fontset_c
Normal file
25
japanese/kinput2/patches/patch-lib_fontset_c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
$OpenBSD: patch-lib_fontset_c,v 1.1.1.1 2000/04/26 00:43:14 espie Exp $
|
||||||
|
--- lib/fontset.c.orig Thu May 27 01:55:26 1999
|
||||||
|
+++ lib/fontset.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -208,9 +208,9 @@ Cardinal numlist;
|
||||||
|
|
||||||
|
if (*name != '-' && *name != '+') continue; /* not an XLFD name */
|
||||||
|
|
||||||
|
- (void)strcpy(namebuf, name);
|
||||||
|
- (void)strcat(namebuf, "-");
|
||||||
|
- (void)strcat(namebuf, csetstr);
|
||||||
|
+ (void)strlcpy(namebuf, name, sizeof(namebuf));
|
||||||
|
+ (void)strlcat(namebuf, "-", sizeof(namebuf));
|
||||||
|
+ (void)strlcat(namebuf, csetstr, sizeof(namebuf));
|
||||||
|
|
||||||
|
if ((font = CachedLoadQueryFontByName(dpy, namebuf)) != NULL) {
|
||||||
|
TRACE(("\tmatched in csSuppliedMatchFont()\n"));
|
||||||
|
@@ -249,7 +249,7 @@ Cardinal numlist;
|
||||||
|
}
|
||||||
|
namelist++;
|
||||||
|
|
||||||
|
- (void)strcpy(namebuf, name);
|
||||||
|
+ (void)strlcpy(namebuf, name, sizeof(namebuf));
|
||||||
|
namelen = strlen(namebuf);
|
||||||
|
|
||||||
|
/* find charset part of the font name */
|
12
japanese/kinput2/patches/patch-lib_imlib_imxport_c
Normal file
12
japanese/kinput2/patches/patch-lib_imlib_imxport_c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-lib_imlib_imxport_c,v 1.1.1.1 2000/04/26 00:43:12 espie Exp $
|
||||||
|
--- lib/imlib/imxport.c.orig Thu May 27 01:55:30 1999
|
||||||
|
+++ lib/imlib/imxport.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -504,7 +504,7 @@ char *path;
|
||||||
|
|
||||||
|
bzero((char *)&addr, sizeof(addr));
|
||||||
|
addr.sun_family = AF_UNIX;
|
||||||
|
- (void)strcpy(addr.sun_path, path);
|
||||||
|
+ (void)strlcpy(addr.sun_path, path, 104);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove socket which is created by the previous process.
|
15
japanese/kinput2/patches/patch-lib_wnnlib_c
Normal file
15
japanese/kinput2/patches/patch-lib_wnnlib_c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
$OpenBSD: patch-lib_wnnlib_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
|
||||||
|
--- lib/wnnlib.c.orig Thu May 27 01:55:26 1999
|
||||||
|
+++ lib/wnnlib.c Wed Apr 26 02:18:48 2000
|
||||||
|
@@ -3554,9 +3554,9 @@ int timeout;
|
||||||
|
#if defined(LIBDIR) && JSERVER_VERSION > 0x4030
|
||||||
|
static char envrc[256];
|
||||||
|
rcfile = envrc;
|
||||||
|
- (void)sprintf(rcfile, "%s/ja_JP/wnnenvrc", LIBDIR);
|
||||||
|
+ (void)snprintf(rcfile, sizeof(envrc), "%s/ja_JP/wnnenvrc", LIBDIR);
|
||||||
|
if (access(rcfile, R_OK) != 0)
|
||||||
|
- (void) sprintf(rcfile, "%s/wnnenvrc", LIBDIR);
|
||||||
|
+ (void) snprintf(rcfile, sizeof(envrc), "%s/wnnenvrc", LIBDIR);
|
||||||
|
#else
|
||||||
|
rcfile = "wnnenvrc";
|
||||||
|
#endif
|
1
japanese/kinput2/pkg/COMMENT-canna
Normal file
1
japanese/kinput2/pkg/COMMENT-canna
Normal file
@ -0,0 +1 @@
|
|||||||
|
X input method for Japanese, canna support
|
1
japanese/kinput2/pkg/COMMENT-canna-wnn
Normal file
1
japanese/kinput2/pkg/COMMENT-canna-wnn
Normal file
@ -0,0 +1 @@
|
|||||||
|
X input method for Japanese, canna and wnn support
|
1
japanese/kinput2/pkg/COMMENT-wnn
Normal file
1
japanese/kinput2/pkg/COMMENT-wnn
Normal file
@ -0,0 +1 @@
|
|||||||
|
X input method for Japanese, wnn support
|
13
japanese/kinput2/pkg/DESCR
Normal file
13
japanese/kinput2/pkg/DESCR
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Kinput2 is an input server for X11 applications that want
|
||||||
|
Japanese text input.
|
||||||
|
|
||||||
|
A client that wants kana-kanji conversion service for Japanese
|
||||||
|
text sends a request to kinput2. Kinput2 receives the request,
|
||||||
|
does kana-kanji conversion, and sends the converted text back
|
||||||
|
to the client.
|
||||||
|
|
||||||
|
Depending on the package, kinput may be able to use Wnn jserver,
|
||||||
|
Canna server (see Canna documents for more info), or both.
|
||||||
|
|
||||||
|
With Wnn, you may request Egg binding by using
|
||||||
|
kinput2 -ccdef ccdef.kinput2.egg
|
18
japanese/kinput2/pkg/PLIST-canna
Normal file
18
japanese/kinput2/pkg/PLIST-canna
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
@comment $OpenBSD: PLIST-canna,v 1.1.1.1 2000/04/26 00:43:12 espie Exp $
|
||||||
|
bin/kinput2
|
||||||
|
lib/X11/app-defaults/Kinput2
|
||||||
|
man/cat1/kinput2.0
|
||||||
|
share/doc/kinput2/README
|
||||||
|
share/doc/kinput2/NEWS
|
||||||
|
share/doc/kinput2/README
|
||||||
|
share/doc/kinput2/ccdef
|
||||||
|
share/doc/kinput2/classes
|
||||||
|
share/doc/kinput2/defaultkeys
|
||||||
|
share/doc/kinput2/defkeys.wnn
|
||||||
|
share/doc/kinput2/problems
|
||||||
|
share/doc/kinput2/protocol
|
||||||
|
share/doc/kinput2/resources
|
||||||
|
share/doc/kinput2/sj3def
|
||||||
|
share/doc/kinput2/sj3guide.ps
|
||||||
|
share/doc/kinput2/sj3guide.tex
|
||||||
|
@dirrm share/doc/kinput2
|
31
japanese/kinput2/pkg/PLIST-canna-wnn
Normal file
31
japanese/kinput2/pkg/PLIST-canna-wnn
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
@comment $OpenBSD: PLIST-canna-wnn,v 1.1.1.1 2000/04/26 00:43:12 espie Exp $
|
||||||
|
bin/kinput2
|
||||||
|
lib/X11/app-defaults/Kinput2
|
||||||
|
lib/X11/ccdef/ccdef.kinput2
|
||||||
|
lib/X11/ccdef/ccdef.kinput2.egg
|
||||||
|
lib/X11/ccdef/rule.eggfunc
|
||||||
|
lib/X11/ccdef/rule.func
|
||||||
|
lib/X11/ccdef/rule.greek
|
||||||
|
lib/X11/ccdef/rule.hiragana.egg
|
||||||
|
lib/X11/ccdef/rule.kana
|
||||||
|
lib/X11/ccdef/rule.kana2
|
||||||
|
lib/X11/ccdef/rule.katakana.egg
|
||||||
|
lib/X11/ccdef/rule.kigou.egg
|
||||||
|
lib/X11/ccdef/rule.roma
|
||||||
|
lib/X11/ccdef/rule.wnnroma
|
||||||
|
lib/X11/ccdef/rule.zascii
|
||||||
|
man/cat1/kinput2.0
|
||||||
|
share/doc/kinput2/NEWS
|
||||||
|
share/doc/kinput2/README
|
||||||
|
share/doc/kinput2/ccdef
|
||||||
|
share/doc/kinput2/classes
|
||||||
|
share/doc/kinput2/defaultkeys
|
||||||
|
share/doc/kinput2/defkeys.wnn
|
||||||
|
share/doc/kinput2/problems
|
||||||
|
share/doc/kinput2/protocol
|
||||||
|
share/doc/kinput2/resources
|
||||||
|
share/doc/kinput2/sj3def
|
||||||
|
share/doc/kinput2/sj3guide.ps
|
||||||
|
share/doc/kinput2/sj3guide.tex
|
||||||
|
@dirrm share/doc/kinput2
|
||||||
|
@dirrm lib/X11/ccdef
|
31
japanese/kinput2/pkg/PLIST-wnn
Normal file
31
japanese/kinput2/pkg/PLIST-wnn
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
@comment $OpenBSD: PLIST-wnn,v 1.1.1.1 2000/04/26 00:43:12 espie Exp $
|
||||||
|
bin/kinput2
|
||||||
|
lib/X11/app-defaults/Kinput2
|
||||||
|
lib/X11/ccdef/ccdef.kinput2
|
||||||
|
lib/X11/ccdef/ccdef.kinput2.egg
|
||||||
|
lib/X11/ccdef/rule.eggfunc
|
||||||
|
lib/X11/ccdef/rule.func
|
||||||
|
lib/X11/ccdef/rule.greek
|
||||||
|
lib/X11/ccdef/rule.hiragana.egg
|
||||||
|
lib/X11/ccdef/rule.kana
|
||||||
|
lib/X11/ccdef/rule.kana2
|
||||||
|
lib/X11/ccdef/rule.katakana.egg
|
||||||
|
lib/X11/ccdef/rule.kigou.egg
|
||||||
|
lib/X11/ccdef/rule.roma
|
||||||
|
lib/X11/ccdef/rule.wnnroma
|
||||||
|
lib/X11/ccdef/rule.zascii
|
||||||
|
man/cat1/kinput2.0
|
||||||
|
share/doc/kinput2/NEWS
|
||||||
|
share/doc/kinput2/README
|
||||||
|
share/doc/kinput2/ccdef
|
||||||
|
share/doc/kinput2/classes
|
||||||
|
share/doc/kinput2/defaultkeys
|
||||||
|
share/doc/kinput2/defkeys.wnn
|
||||||
|
share/doc/kinput2/problems
|
||||||
|
share/doc/kinput2/protocol
|
||||||
|
share/doc/kinput2/resources
|
||||||
|
share/doc/kinput2/sj3def
|
||||||
|
share/doc/kinput2/sj3guide.ps
|
||||||
|
share/doc/kinput2/sj3guide.tex
|
||||||
|
@dirrm share/doc/kinput2
|
||||||
|
@dirrm lib/X11/ccdef
|
Loading…
x
Reference in New Issue
Block a user