lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev SUPPORT_MULTIBYTE_EDIT


From: Hataguchi Takeshi
Subject: lynx-dev SUPPORT_MULTIBYTE_EDIT
Date: Sat, 15 Apr 2000 11:04:25 +0900 (JST)

I wrote a patch concerned with SUPPORT_MULTIBYTE_EDIT referring
Klaus's comment (*). The routine which is enabled by
SUPPORT_MULTIBYTE_EDIT provides better support of CJK characters to
Lynx's Line Editor.

(*) http://www.flora.org/lynx-dev/html/month121999/msg00295.html

This patch defines SUPPORT_MULTIBYTE_EDIT. I belive there are no side
effects.
--
Takeshi Hataguchi
E-mail: address@hidden

%%% Created Sat Apr 15 10:45:51 JST 2000 by target lynx.patch. %%%
diff -bru orig/lynx2-8-3/src/LYStrings.c lynx2-8-3/src/LYStrings.c
--- orig/lynx2-8-3/src/LYStrings.c      Fri Apr  7 10:18:52 2000
+++ lynx2-8-3/src/LYStrings.c   Sat Apr 15 09:07:12 2000
@@ -38,10 +38,6 @@
 extern unsigned short *LYKbLayout;
 extern BOOL HTPassHighCtrlRaw;
 
-#ifdef SUPPORT_MULTIBYTE_EDIT
-#define IS_KANA(c)     (0xa0 <= c && c <= 0xdf)
-#endif
-
 #if defined(WIN_EX)
 #undef  BUTTON_CTRL
 #define BUTTON_CTRL    0       /* Quick hack */
@@ -2314,7 +2310,7 @@
 #ifdef SUPPORT_MULTIBYTE_EDIT  /* 1998/11/23 (Mon) 17:04:55 */
     {
        if (buffer[i] & 0x80) {
-           if (IS_KANA(buffer[i])) {
+           if ((kanji_code == SJIS) && IS_SJIS_X0201KANA((unsigned 
char)(buffer[i]))) {
                continue;
            }
            i++;
@@ -2339,7 +2335,7 @@
 #ifdef SUPPORT_MULTIBYTE_EDIT  /* 1998/11/23 (Mon) 17:05:10 */
     {
        if (buffer[i] & 0x80) {
-           if (IS_KANA(buffer[i])) {
+           if ((kanji_code == SJIS) && IS_SJIS_X0201KANA((unsigned 
char)(buffer[i]))) {
                continue;
            }
            i++;
@@ -2540,8 +2536,8 @@
        while (i < pos - 1) {
            int c;
            c = Buf[i];
-
-           if (!(isascii(c) || IS_KANA(c))) {
+           if (!(isascii(c) || 
+                 ((kanji_code == SJIS) && IS_SJIS_X0201KANA((unsigned 
char)c)))) {
                i++;
            }
            i++;
diff -bru orig/lynx2-8-3/userdefs.h lynx2-8-3/userdefs.h
--- orig/lynx2-8-3/userdefs.h   Fri Apr 14 11:39:30 2000
+++ lynx2-8-3/userdefs.h        Sat Apr 15 10:45:28 2000
@@ -1442,6 +1442,14 @@
 
 
 /***************************** 
+ * SUPPORT_MULTIBYTE_EDIT provides better support of CJK characters to
+ * Lynx's Line Editor.  JIS X0201 Kana is partially supported.  The
+ * reason why I didn't support it fully is I think supporting it is not
+ * required so much and I don't have an environment to test it. - TH
+ */
+#define SUPPORT_MULTIBYTE_EDIT
+
+/***************************** 
  * USE_TH_JP_AUTO_DETECT, CONV_JISX0201KANA_JISX0208KANA,  
  * and KANJI_CODE_OVERRIDE are the macros for Japanese. - TH 
  */ 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]