lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.4dev.6.patch.gz


From: Hataguchi Takeshi
Subject: Re: lynx-dev lynx2.8.4dev.6.patch.gz
Date: Sun, 6 Aug 2000 18:30:57 +0900 (JST)

On Thu, 3 Aug 2000, Klaus Weide wrote:

> On Thu, 3 Aug 2000, Atsuhito Kohda wrote:
> > From: Henry Nelson <address@hidden>
> > Subject: Re: lynx-dev lynx2.8.4dev.6.patch.gz
> > Date: Thu, 3 Aug 2000 11:38:46 +0900 (JST)
> [attributions lost...:] 
> > > > > I found the patch of Hataguchi-san very effective so I strongly 
> > > > > wish that the patch is adopted as soon as possible.
> > > 
> > > I don't know.  It has a bad side-effect of making the status line
> > > blink in the case of those that are updated steadily, like the byte
> > > counter on a download status line.  The blinking is very unpleasant.
> 
> Is the refreshing really needed in the case of lynx with slang _with_
> kanji support (in slang) enabled?  It is my understanding that the
> purpose of that kanji support of slang is to avoid the problems for
> which the refresh is a workaround.  Am I wrong?

I believe you're right.

[snip]
> The code could at least check whether there are any bytes with the high
> bit set, in the new text to be written to the statusline.  If not, then
> the refresh should not be necessary.

I wrote a patch according to this advice.  This patch will avoid the
unnecessary refresh only when the statusline message doesn't contain
CJK characters.
--
Takeshi Hataguchi
E-mail: address@hidden

diff -bru orig/lynx2-8-4/src/LYUtils.c lynx2-8-4/src/LYUtils.c
--- orig/lynx2-8-4/src/LYUtils.c        Fri Aug  4 02:19:52 2000
+++ lynx2-8-4/src/LYUtils.c     Sun Aug  6 11:37:18 2000
@@ -2065,13 +2065,22 @@
     clrtoeol();
 
     if (text != NULL && text[0] != '\0') {
+       BOOLEAN has_CJK = FALSE;
+       if (HTCJK != NOCJK) {
+           for (i = 0; buffer[i] != '\0'; i++) {
+               if (buffer[i] & 0x80) {
+                   has_CJK = TRUE;
+                   break;
+               }
+           }
+       }
 #ifdef HAVE_UTF8_STATUSLINES
        if ((LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) || 
-           (HTCJK != NOCJK)) {
+           (has_CJK)) {
            refresh();
        }
 #else
-       if (HTCJK != NOCJK) {
+       if (has_CJK) {
            refresh();
        }
 #endif /* HAVE_UTF8_STATUSLINES */

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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