lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev patch: alternate characters on Digital UNIX 4.0


From: Tomas Vanhala
Subject: lynx-dev patch: alternate characters on Digital UNIX 4.0
Date: Sun, 26 Apr 1998 22:48:00 +0300 (EET DST)

Lynx 2.8 has a problem with the alternate character set when
using the native curses library on Digital UNIX 4.0. The
problem is caused by the fact that the alternate character
set resides in _acs_map instead of acs_map on Digital UNIX
(see /usr/include/curses.h).

The following patch fixes the problem. However, it just occurred
to me that some people might be using ncurses on Digital UNIX.
The patch below should therefore also check that native curses
are being used and not ncurses. Unfortunately, I don't know what
the most elegant way of checking for ncurses is...


*** configure.orig      Fri Mar  6 19:04:16 1998
--- configure   Sun Apr 26 19:07:18 1998
***************
*** 6679,6687 ****
  #include "confdefs.h"
  
  #include <$cf_cv_ncurses_header>
        
  int main() {
! chtype x = acs_map['l']; acs_map['m'] = 0
  ; return 0; }
  EOF
  if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest; then
--- 6679,6692 ----
  #include "confdefs.h"
  
  #include <$cf_cv_ncurses_header>
+ #ifdef __osf__
+ #define ACS_MAP _acs_map
+ #else
+ #define ACS_MAP acs_map
+ #endif
        
  int main() {
! chtype x = ACS_MAP['l']; ACS_MAP['m'] = 0
  ; return 0; }
  EOF
  if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest; then
*** src/LYCurses.c.orig Fri Mar  6 19:04:16 1998
--- src/LYCurses.c      Sun Apr 26 20:29:06 1998
***************
*** 785,793 ****
        {
            int n;
            for (n = 0; n < 128; n++)
!               if (acs_map[n] & 0x80) {
!                   acs_map[n] &= 0xff;
!                   acs_map[n] |= A_ALTCHARSET;
                }
        }
  #endif
--- 785,793 ----
        {
            int n;
            for (n = 0; n < 128; n++)
!               if (ACS_MAP[n] & 0x80) {
!                   ACS_MAP[n] &= 0xff;
!                   ACS_MAP[n] |= A_ALTCHARSET;
                }
        }
  #endif
*** src/LYCurses.h.orig Fri Feb 27 20:25:07 1998
--- src/LYCurses.h      Sun Apr 26 20:28:33 1998
***************
*** 129,134 ****
--- 129,139 ----
  #ifdef ALT_CHAR_SET
  #define BOXVERT 0   /* use alt char set for popup window vertical borders */
  #define BOXHORI 0   /* use alt char set for popup window vertical borders */
+ #ifdef __osf__
+ #define ACS_MAP _acs_map
+ #else
+ #define ACS_MAP acs_map
+ #endif /* __osf__ */
  #endif
  
  #ifndef BOXVERT

reply via email to

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