Debian Bug report logs -
#58667
Cursor and function keys are not handled by libcanna libraries
Reported by: Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>
Date: Tue, 22 Feb 2000 03:33:00 UTC
Severity: normal
Found in version 3.5b2-23
Fixed in version canna/3.5b2-27
Done: ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, ISHIKAWA Mutsumi <ishikawa@linux.or.jp>:
Bug#58667; Package libcanna1g.
(full text, mbox, link).
Acknowledgement sent to Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>:
New Bug report received and forwarded. Copy sent to ISHIKAWA Mutsumi <ishikawa@linux.or.jp>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libcanna1g
Version: 3.5b2-23
jrKanjiString() function in libcanna libraries cannot handle
the key codes >= 128.
As a symptom, the users of jvim-canna cannot use Left and Right
arrow keys for moving the cursor under the Japanese conversion mode.
To reproduce:
1. Install jvim-canna package (I use version 3.0-2.0-2).
2. Start KTerm.
4. Start jvim in the KTerm window.
3. Make sure that KTerm is in Application Cursor Key mode
(Press Control + Middle Button to confirm this).
4. Enter Japanese input mode (Press Control + Space)
5. Type some Japanese text (but do not hit Enter key yet),
and hit Left or Right arrow keys.
They never move the cursor at all.
This is certainly NOT a bug of jvim-canna, because jvim-canna
does the right thing: when jvim-canna receives Right arrow key
while it is in Japenese input mode, it properly translates
the key into Canna's internal key code 0x84 (= 132; as
#defined as CANNA_KEY_Right in /usr/include/canna/keydef.h)
and passes the translated key code to jrKanjiString() in libcanna1g.
Unfortunately, libcanna1g treats the key wrongly, looking up
the wrong position (-124-th entry, not 132nd) in the key table.
This is the result of the wrong type conversion from `int' to `char'
which is `signed' in gcc by default, and thus 0x84 is interpreted
as -124, not 132 as expected.
The following patch corrects the problem.
--- canna-3.5b2/lib/canna/ebind.c Wed Jun 5 15:09:02 1996
+++ canna-3.5b2.new/lib/canna/ebind.c Wed Feb 16 20:39:49 2000
@@ -205,9 +205,9 @@
}
}
- inbuf[0] = (wchar_t)buffer_return[0];
+ inbuf[0] = (wchar_t)(buffer_return[0] & 0xff);
for (i = 1 ; i < nbytes ; i++) {
- inbuf[i] = (wchar_t)buffer_return[i];
+ inbuf[i] = (wchar_t)(buffer_return[i] & 0xff);
}
ch = buffer_return[0] & 0xff;
ret = XwcLookupKanji2(dpy, win, inbuf, inbufsize, nbytes, functionalChar,
Here is the configuration of my machine:
Debian 2.2 (frozen) potato for i386
kernel version 2.2.14
libc 2.1.34
gcc 2.95.2-6
jvim 3.0-2.0-2
kterm 6.2.0-19
--
Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>
Dept. of Information and Computer Sciences
Ibaraki University, Hitachi, Japan
Reply sent to ISHIKAWA Mutsumi <ishikawa@linux.or.jp>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #10 received at 58667-close@bugs.debian.org (full text, mbox, reply):
Fixed
canna (3.5b2-27) unstable; urgency=low
* cleanup patch. remove some garbage files (Makefile, Makefile.bak) from
diff.gz
* apply Bugs#58667's patch, closes: Bugs#58667
* add Build-Depends: in control
-- ISHIKAWA Mutsumi <ishikawa@linux.or.jp> Mon, 16 Oct 2000 22:18:18 +0900
--
いしかわ むつみ
<ishikawa@linux.or.jp>, <ishikawa@debian.org>, <ishikawa@redhat.com>
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Jun 5 01:37:35 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.