File: debian.patch

package info (click to toggle)
kinput2 3.1-14
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 3,284 kB
  • sloc: ansic: 49,965; makefile: 104; sh: 68
file content (238 lines) | stat: -rw-r--r-- 8,635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
--- kinput2-3.1.orig/Kinput2.conf
+++ kinput2-3.1/Kinput2.conf
@@ -8,18 +8,17 @@ XCOMM
 
 /**
  ** Conversion system configuration:
- **	Kinput2 supports 4 conversion systems, Wnn, Canna, Sj3 and Atok.
+ **	Kinput2 supports 3 conversion systems, Wnn, Canna and Sj3.
  **	In order to install and use kinput2, you have to compile and
  **	install at least one of them.  If you select more than one
  **	conversion system, you can choose one at run time with a
  **	command line option.
  **/
 
-/* #define UseWnn */	/* define if you are going to use Wnn (v4, v6 or v7) */
-/* #define UseWnn6 */	/* define if you are going to use Wnn6 or above */
+/* #define UseWnn */	/* define if you are going to use Wnn (v4 or v6) */
+/* #define UseWnn6 */	/* define if you are going to use Wnn6 */
 #define UseCanna	/* define if you are going to use Canna */
 #define UseSj3		/* define if you are going to use Sj3 */
-/* #define UseAtok */	/* define if you are going to use Atok */
 
 
 XCOMM Wnn configuration
@@ -121,22 +120,6 @@ SJ3SRC = $(CONTRIBSRC)/programs/sj3
 SJ3LIB = $(SJ3SRC)/sj3lib/libsj3lib.a
 
 
-XCOMM Atok configuration
-/*
- * If you define UseAtok, set following 2 variables:
- *	ATOKINCDIR: Atok include file directory (if atok.h is there)
- *	ATOKLIBDIR: Atok client-side library directory
- */
-
-/*
- * If you have already installed Atok header files and libraries..
- */
-XCOMM use installed headers/libraries
-XCOMM ATOKINCDIR = /usr/include/atok
-XCOMM ATOKLIBDIR = /usr/jp/lib
-ATOKLIB = -latok12n -latok12util
-
-
 /**
  ** Transport configuration:
  **	Kinput2 X Input Method Protocol handler supports
--- kinput2-3.1.orig/cmd/Kinput2.ad
+++ kinput2-3.1/cmd/Kinput2.ad
@@ -17,6 +17,27 @@ Kinput2.height: 1
 *SeparateConversion.title: Kana-Kanji Conversion
 *selectionShell.title: Candidate Selection
 *auxShell.title: Auxiliary Control
+
+!! Don't give input focus to the windows of kinput2, they don't need input focus
+!! it just causes problems if they get input focus.
+!!
+!! For example, if you use kinput2 with Canna and open the 'auxShell' window
+!! by pressing the 'insert' key a window pops up where special symbols
+!! can be selected. If this window gets focus, the selected symbol will not
+!! appear in the application until the application gets focus again. This is
+!! quite confusing.
+!! And there are even some applications where the selected symbol will never appear,
+!! not even when the application gets focus again. Gvim currently behaves
+!! like that and XIM in Gvim may even become completely unusable after one of
+!! the kinput2 windows got focus, making it necessary to restart Gvim to be able
+!! to use XIM again.
+!!
+!! I found no reason why one of kinput2's windows should need input focus.
+!! 
+*SeparateConversion.input: false
+*selectionShell.input: false
+*auxShell.input: false
+
 ! if you're using mwm (Motif1.1), you can set kanji titles.
 !*SeparateConversion.title: \033$(B$+$J4A;zJQ49
 !*SeparateConversion.titleEncoding: COMPOUND_TEXT
@@ -32,9 +53,9 @@ Kinput2.height: 1
 !!
 !!	Wnn setup
 !!
-!*CcWnn.Jserver:	"primary-jserver-host"
+*CcWnn.Jserver:	localhost
 !*CcWnn.jserver2nd:	"secondary-jserver-host-if-any"
-*CcWnn.ccdef:		ccdef.kinput2
+*CcWnn.ccdef:		ccdef.kinput2.egg
 !*CcWnn.wnnEnvrc4:	"wnenvrc-file-for-Wnn4"
 !*CcWnn.wnnEnvrc6:	"wnenvrc-file-for-Wnn6"
 !!
@@ -118,4 +139,4 @@ Kinput2.height: 1
 ! the following resource.  This phenomenon is caused by the incorrent
 ! focus management of your window manager, and this resource avoids
 ! it by making the window manager totally ignore the mode window.
-!*OverTheSpotConversion.UseOverrideShellForMode: True
+*OverTheSpotConversion.UseOverrideShellForMode: True
--- kinput2-3.1.orig/lib/ConvCtrl.c
+++ kinput2-3.1/lib/ConvCtrl.c
@@ -18,6 +18,7 @@ static char *rcsid = "$Id: ConvCtrl.c,v
  * Author:  Makoto Ishisone, Software Research Associates, Inc., Japan
  */
 
+#include <stdio.h>
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
 #include <X11/Xmu/CharSet.h>
@@ -1247,7 +1248,8 @@ String msg;
     params[0] = XtClass(w)->core_class.class_name;
     num_params = 1;
 
-    (void)sprintf(buf, "%%s: %s", msg);
+    /*FIXED with snprintf */
+    (void)snprintf(buf, 512, "%%s: %s", msg);
 
     XtAppErrorMsg(XtWidgetToApplicationContext(w),
 		  name, type, "WidgetError", buf, params, &num_params);
--- kinput2-3.1.orig/lib/KIProto.c
+++ kinput2-3.1/lib/KIProto.c
@@ -18,6 +18,8 @@ static char *rcsid = "$Id: KIProto.c,v 1
  * Author:  Makoto Ishisone, Software Research Associates, Inc., Japan
  */
 
+/* for sprintf() prototype. */
+#include <stdio.h>
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
 #include <X11/Xatom.h>
@@ -314,10 +316,11 @@ KinputProtocolWidget kpw;
     Display *dpy = XtDisplay((Widget)kpw);
     char buf[256];
 
-    (void)sprintf(buf, "_%s_CONVERSION", kpw->kinput.language);
+    /* FIXED with snprintf */
+    (void)snprintf(buf, 256, "_%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, 256, "%s_CONVERSION", kpw->kinput.language);
 	kpw->kinput.oldConvAtom = XInternAtom(dpy, buf, False);
     } else {
 	kpw->kinput.oldConvAtom = None;
@@ -331,7 +334,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, 256, "%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");
--- kinput2-3.1.orig/lib/cconv.c
+++ kinput2-3.1/lib/cconv.c
@@ -604,6 +604,7 @@ static char	*rcsid = "$Id: cconv.c,v 10.
 #endif
 
 #include	<stdio.h>
+#include        <stdlib.h>
 #include	<X11/Xlib.h>
 #include	<X11/keysym.h>
 #include	<X11/Xutil.h>
@@ -790,7 +791,7 @@ static wchar *promptsave(wchar *);
 static int parseLine(uchar *, uchar **, int);
 static FILE *openfile(char *);
 static int doinclude(uchar *, Files *, void (*)());
-static uchar *getline(uchar *, int, Files *, void (*)());
+static uchar *getLine(uchar *, int, Files *, void (*)());
 static int readRuleFile(ccRule, char *);
 static int registMode(ccRule, int, uchar **);
 static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *,
@@ -1035,8 +1036,8 @@ void (*efunc)();
 	return 0;
 }
 
-/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
-static uchar *getline(line, linesize, files, efunc)
+/* getLine -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
+static uchar *getLine(line, linesize, files, efunc)
 uchar *line;
 int linesize;
 Files *files;
@@ -1100,7 +1101,7 @@ char *file;
 	rule->nmode = 0;
 	rule->initialmode = -1;
 
-	while (getline(line, sizeof(line), &files, efunc)) {
+	while (getLine(line, sizeof(line), &files, efunc)) {
 		(void)Strcpy(tmp, line);
 		if ((argc = parseLine(tmp, argv, 20)) == 0)
 			continue;
@@ -1269,7 +1270,7 @@ uchar **av;
 	cdbuf.cdbuf = NULL;
 
 	/* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */
-	while (getline(line, sizeof(line), files, efunc)) {
+	while (getLine(line, sizeof(line), files, efunc)) {
 		/* '#' $B$G;O$^$k9T$O%3%a%s%H(B */
 		if (*line == '\0' || *line == '\n' || *line == '#')
 			continue;
--- kinput2-3.1.orig/lib/imlib/imxport.c
+++ kinput2-3.1/lib/imlib/imxport.c
@@ -355,6 +355,9 @@ IMConnection *conn;
 
     if ((length = IMBUFLEN(ibp)) == 0) return TRANSPORT_OK;
 
+    /*FIXME: repl time field? */
+    bzero(&repl, sizeof(repl));
+
     repl.type = ClientMessage;
     repl.window = client_win;
 
@@ -569,6 +572,10 @@ XEvent *xev;
 
     TRACE(("IMXConnection()\n"));
 
+    /* FIXME: repl time ? */
+    bzero(&repl, sizeof(repl));
+
+
     if (event->type != ClientMessage ||
 	event->display != dpy ||
 	event->window != XtWindow(protocol) ||
@@ -609,6 +616,7 @@ XEvent *xev;
     repl.data.l[1] = ServerMajorTransportVersion;
     repl.data.l[2] = ServerMinorTransportVersion;
     repl.data.l[3] = XTransportDividingSize;
+
     /* make it safe... */
     h = XAESetIgnoreErrors(dpy);
     XSendEvent(dpy, client_window, False, NoEventMask, (XEvent *)&repl);
--- kinput2-3.1.orig/lib/ioecall.c
+++ kinput2-3.1/lib/ioecall.c
@@ -23,6 +23,7 @@ static char *rcsid = "$Id: ioecall.c,v 1
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xfuncproto.h>
 #include "IOECall.h"