lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev patches for slang and shift_jis


From: nsh
Subject: lynx-dev patches for slang and shift_jis
Date: Sat, 12 Jun 1999 07:55:49 +0900

Hello,

I use lynx with slang-1.2.2_j055 on FreeBSD-2.2.8R.  I had
some problems and solved them.  All patches below are for
lynx2.8.3dev.1.

First, configure with `--with-screen=slang' does not work
correctly.  My slang needs to link libtermcap, but the script
does not think so, I always must add `-ltermcap' by hand.

aclocal.m4 of lynx checks that by SLtt_get_screen_size(), but 
the function is not affected with USE_TERMCAP in src of slang.
`#ifndef USE_TERMCAP' appears only in sldisply.c:

  1705  # ifndef USE_TERMCAP
  1706  static char *Tbuf;
  1707  static char *Tstr_Buf;
  1708  
  1709  #  define tgetstr SLtt_tigetstr
  1710  #  define tgetent SLtt_tigetent
  1711  #  define TGETNUM(x) SLtt_tigetnum((x), &Tbuf)
  1712  #  define TGETFLAG(x) SLtt_tigetflag((x), &Tbuf)
  1713  # else
  1714  
  1715  extern char *tgetstr(char *, char **);
  1716  extern int tgetent(char *, char *);
  1717  extern int tgetnum(char *);
  1718  extern int tgetflag(char *);
  1719  static char Tstr_Buf[1024];
  1720  static char Tbuf[4096];
  1721  #  define TGETNUM tgetnum
  1722  #  define TGETFLAG tgetflag
  1723  # endif

Then I think that tgetstr() or something must be used instead
of SLtt_get_screen_size().  I edited configure and that works 
correctly with `-ltermlib', since my autoconf-2.14.1 can't
regenerate configure.  Could someone check this patch?

diff -ru lynx2-8-3.orig/aclocal.m4 lynx2-8-3/aclocal.m4
--- lynx2-8-3.orig/aclocal.m4   Sun May  9 02:46:28 1999
+++ lynx2-8-3/aclocal.m4        Sat Jun 12 06:44:07 1999
@@ -1838,7 +1838,7 @@
 fi
 LIBS=`echo ".$cf_slang_LIBS3" | sed -e "address@hidden@@" -e 
'address@hidden@@'`
 AC_TRY_LINK([#include <slang.h>],
-       [SLtt_get_screen_size()],
+       [tgetstr()],
        [cf_result=yes],
        [cf_result=no])
 AC_MSG_RESULT($cf_result)
diff -ru lynx2-8-3.orig/configure lynx2-8-3/configure
--- lynx2-8-3.orig/configure    Sun May 30 12:27:26 1999
+++ lynx2-8-3/configure Sat Jun 12 06:44:06 1999
@@ -8017,7 +8017,7 @@
 #include "confdefs.h"
 #include <slang.h>
 int main() {
-SLtt_get_screen_size()
+tgetstr()
 ; return 0; }
 EOF
 if { (eval echo configure:8024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then


And some Japanese pages written in shift_jis charset are not
displayed correctly.  Such a page has 
        CONTENT="text/html; charset=x-sjis"
in META tag.  I myself never want to use shift_jis, but there
are too many pages with `x-sjis'!  ;-(

diff -ru lynx2-8-3.orig/src/GridText.c lynx2-8-3/src/GridText.c
--- lynx2-8-3.orig/src/GridText.c       Fri Jun 11 18:34:08 1999
+++ lynx2-8-3/src/GridText.c    Sat Jun 12 06:40:06 1999
@@ -9183,7 +9183,8 @@
     **  appropriately. - FM
     */
     if (!strcmp(charset, "shift_jis") ||
-       !strcmp(charset, "x-shift-jis")) {
+       !strcmp(charset, "x-shift-jis") ||
+       !strcmp(charset, "x-sjis")) {
        text->kcode = SJIS;
     } else if ((p_in && (p_in->enc == UCT_ENC_CJK)) ||
               !strcmp(charset, "euc-jp") ||
diff -ru lynx2-8-3.orig/src/UCdomap.c lynx2-8-3/src/UCdomap.c
--- lynx2-8-3.orig/src/UCdomap.c        Fri Apr 23 23:56:35 1999
+++ lynx2-8-3/src/UCdomap.c     Sat Jun 12 06:40:06 1999
@@ -1555,7 +1555,8 @@
        !strcasecomp(value, "x-euc-jp")) {
        return UCGetLYhndl_byMIME("euc-jp");
     }
-    if (!strcasecomp(value, "x-shift-jis")) {
+    if (!strcasecomp(value, "x-shift-jis") ||
+       !strcasecomp(value, "x-sjis")) {
        return UCGetLYhndl_byMIME("shift_jis");
     }
     if (!strcasecomp(value, "iso-2022-kr")) {


Thank you.
---
address@hidden

reply via email to

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