summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-09-07 14:50:30 +0000
committerMamoru Komachi <usata@gentoo.org>2004-09-07 14:50:30 +0000
commitaa75e4a31412b586cede1baab60b5ac5180a6450 (patch)
treece0ab0c8e1130cd637be690d2cb26007ab53e7f5 /app-editors/qemacs/files
parentsg3_utils already provides this (diff)
downloadhistorical-aa75e4a31412b586cede1baab60b5ac5180a6450.tar.gz
historical-aa75e4a31412b586cede1baab60b5ac5180a6450.tar.bz2
historical-aa75e4a31412b586cede1baab60b5ac5180a6450.zip
Added utf8 patch. Closing bug #62829.
Diffstat (limited to 'app-editors/qemacs/files')
-rw-r--r--app-editors/qemacs/files/qemacs-0.3.1-tty_utf8.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/app-editors/qemacs/files/qemacs-0.3.1-tty_utf8.patch b/app-editors/qemacs/files/qemacs-0.3.1-tty_utf8.patch
new file mode 100644
index 000000000000..6ca528074975
--- /dev/null
+++ b/app-editors/qemacs/files/qemacs-0.3.1-tty_utf8.patch
@@ -0,0 +1,37 @@
+--- qemacs-0.3.1/tty.c 2003-04-22 00:01:42.000000000 +0200
++++ qemacs-0.3.1-tty_utf8/tty.c 2004-03-14 17:38:58.000000000 +0100
+@@ -53,7 +53,6 @@
+ /* input handling */
+ enum InputState input_state;
+ int input_param;
+- int utf8_state;
+ int utf8_index;
+ unsigned char buf[10];
+ } TTYState;
+@@ -211,15 +210,20 @@
+
+ /* charset handling */
+ if (s->charset == &charset_utf8) {
+- if (ts->utf8_state == 0) {
++
++ /* Make sure utf8 input works correctly 20040314 <damm@opensource.se> */
++
++ ts->utf8_index++;
++
++ if (utf8_length[ts->buf[0]] == ts->utf8_index) {;
+ const char *p;
+ p = ts->buf;
+ ch = utf8_decode(&p);
+- } else {
+- ts->utf8_state = utf8_length[ts->buf[0]] - 1;
+- ts->utf8_index = 0;
+- return;
+- }
++ ts->utf8_index = 0;
++ }
++ else {
++ return;
++ }
+ } else {
+ ch = ts->buf[0];
+ }