完整的patch见下
diff -u newt-0.50.33/newt.c newt-0.50.33-lepton/newt.c
--- newt-0.50.33/newt.c Wed Apr 4 03:33:10 2001
+++ newt-0.50.33-lepton/newt.c Mon May 27 19:43:43 2002
@@ -301,9 +301,9 @@
} while (key == NEWT_KEY_SUSPEND);
switch (key) {
- case 'v' | 0x80:
- case 'V' | 0x80:
- return NEWT_KEY_PGUP;
+// case 'v' | 0x80:
+// case 'V' | 0x80:
+// return NEWT_KEY_PGUP; 会造成某些汉字 比如 "置" 不能输入 by ylsdd
case 22:
return NEWT_KEY_PGDN;
@@ -331,6 +331,8 @@
}
*chptr++ = key;
+ if(chptr-buf>8)
+ break; //嘿嘿 buffer overflow by lepton
/* this search should use bsearch(), but when we only look through
a list of 20 (or so) keymappings, it's probably faster just to
【 在 ylsdd (暂停中) 的大作中提到: 】
: Remember to update libnewt, since there is some problems with the old
: version. Get the newest newt src, and make a little additional
: correction to one of the source file. Sorry i forgot the filename,
: try to find the following code, then remove the three lines concerning
: 'v' and 'V'. Otherwise, some hanzi can't be input when using ncce.
: switch (key) {
: case 'v' | 0x80:
: case 'V' | 0x80:
: return NEWT_KEY_PGUP;
: ...................
--
FROM 211.154.164.129