lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Patch for alternate character set on Digital UNIX


From: Jim Spath (Webmaster Jim)
Subject: LYNX-DEV Patch for alternate character set on Digital UNIX
Date: Thu, 19 Mar 1998 12:35:30 -0500 (EST)

It turns out that the existing configure test for line-drawing characters
under some forms of curses (e.g., Digital UNIX) doesn't work; their flavor
of the acs_map array is _acs_map.  Below is a patch against 2-8 to add an
additional test for this.  

I also modified the existing test to use
<${cf_cv_ncurses_header-curses.h}> instead of <$cf_cv_ncurses_header> on
the assumption this variable is "better."  I'm not clear about this since
the 2 forms are interspersed in aclocal.m4.

*** aclocal.m4.df       Fri Mar  6 12:04:16 1998
--- aclocal.m4  Thu Mar 19 11:38:55 1998
***************
*** 33,38 ****
--- 33,40 ----
  dnl 
---------------------------------------------------------------------------
  dnl Check for existence of alternate-character-set support in curses, so we
  dnl can decide to use it for box characters.
+ dnl At least two flavors exist; one has acs_map[], another has _acs_map[].
+ dnl Yeesh.
  dnl 
  AC_DEFUN([CF_ALT_CHAR_SET],
  [
***************
*** 39,45 ****
  AC_MSG_CHECKING([if curses supports alternate-character set])
  AC_CACHE_VAL(cf_cv_alt_char_set,[
        AC_TRY_LINK([
! #include <$cf_cv_ncurses_header>
        ],[chtype x = acs_map['l']; acs_map['m'] = 0],
        [cf_cv_alt_char_set=yes],  
        [cf_cv_alt_char_set=no])])
--- 41,47 ----
  AC_MSG_CHECKING([if curses supports alternate-character set])
  AC_CACHE_VAL(cf_cv_alt_char_set,[
        AC_TRY_LINK([
! #include <${cf_cv_ncurses_header-curses.h}>
        ],[chtype x = acs_map['l']; acs_map['m'] = 0],
        [cf_cv_alt_char_set=yes],  
        [cf_cv_alt_char_set=no])])
***************
*** 46,51 ****
--- 48,65 ----
  AC_MSG_RESULT($cf_cv_alt_char_set)
  test $cf_cv_alt_char_set = yes && AC_DEFINE(ALT_CHAR_SET)
  ])dnl
+ AC_DEFUN([CF_UND_ALT_CHAR_SET],
+ [
+ AC_MSG_CHECKING([if curses supports _alternate-character set])
+ AC_CACHE_VAL(cf_cv_und_alt_char_set,[
+       AC_TRY_LINK([
+ #include <${cf_cv_ncurses_header-curses.h}>
+       ],[chtype x = _acs_map['l']; _acs_map['m'] = 0],
+       [cf_cv_und_alt_char_set=yes],  
+       [cf_cv_und_alt_char_set=no])])
+ AC_MSG_RESULT($cf_cv_und_alt_char_set)
+ test $cf_cv_und_alt_char_set = yes && AC_DEFINE(UND_ALT_CHAR_SET)
+ ])dnl
  dnl 
---------------------------------------------------------------------------
  dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
  dnl in the sharutils 4.2 distribution.
***************
*** 719,727 ****
  ])dnl
  dnl 
---------------------------------------------------------------------------
  dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
! AC_DEFUN([CF_HELP_MESSAGE],
! [AC_DIVERT_HELP([$1])dnl
! ])dnl
  dnl 
---------------------------------------------------------------------------
  dnl Construct a search-list for a nonstandard library-file
  AC_DEFUN([CF_LIBRARY_PATH],
--- 733,741 ----
  ])dnl
  dnl 
---------------------------------------------------------------------------
  dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
! dnl AC_DEFUN([CF_HELP_MESSAGE],
! dnl [AC_DIVERT_HELP([$1])dnl
! dnl ])dnl
  dnl 
---------------------------------------------------------------------------
  dnl Construct a search-list for a nonstandard library-file
  AC_DEFUN([CF_LIBRARY_PATH],
*** config.hin.df       Fri Feb 27 13:25:07 1998
--- config.hin  Thu Mar 19 11:34:28 1998
***************
*** 3,8 ****
--- 3,9 ----
  #define LYNX_CFG_H 1
  
  #undef ALT_CHAR_SET           /* CF_ALT_CHAR_SET */
+ #undef UND_ALT_CHAR_SET               /* CF_UND_ALT_CHAR_SET */
  #undef ARCHIVE_ONLY           /* CF_ARG_DISABLE(dired-archive) */
  #undef CHMOD_PATH             /* CF_PATH_PROG(chmod) */
  #undef COLOR_CURSES           /* defined by CF_COLOR_CURSES */
*** configure.in.df     Wed Mar  4 13:49:48 1998
--- configure.in        Thu Mar 19 11:19:01 1998
***************
*** 366,371 ****
--- 366,372 ----
  ### These tests must be run after establishing the curses library.
  if test $cf_cv_screen != slang ; then
        CF_ALT_CHAR_SET
+       CF_UND_ALT_CHAR_SET
        CF_FANCY_CURSES
        CF_NCURSES_VERSION
        CF_NCURSES_BROKEN
*** src/LYCurses.c.df   Fri Mar  6 12:04:16 1998
--- src/LYCurses.c      Thu Mar 19 11:23:36 1998
***************
*** 792,797 ****
--- 792,811 ----
        }
  #endif
  
+       /* 
+        * This is for those curses with _acs_map
+        */
+ #if defined(UND_ALT_CHAR_SET) && !defined(NCURSES_VERSION)
+       {
+           int n;
+           for (n = 0; n < 128; n++)
+               if (_acs_map[n] & 0x80) {
+                   _acs_map[n] &= 0xff;
+                   _acs_map[n] |= A_ALTCHARSET;
+               }
+       }
+ #endif
+ 
  #if defined(USE_COLOR_STYLE) || defined(USE_COLOR_TABLE)
        if (has_colors()) {
            lynx_has_color = TRUE;
*** src/LYCurses.h.df   Fri Feb 27 13:25:07 1998
--- src/LYCurses.h      Thu Mar 19 11:44:57 1998
***************
*** 126,132 ****
  #define CR FROMASCII('\015')
  #endif /* REDEFINE_CR */
  
! #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 */
  #endif
--- 126,132 ----
  #define CR FROMASCII('\015')
  #endif /* REDEFINE_CR */
  
! #if defined (ALT_CHAR_SET) || defined (UND_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 */
  #endif


------
<http://www.cs.indiana.edu/picons/db/users/us/md/lib/bcpl/jspath/face.xbm>
Marvin the Paranoid Android says:
That's it is it?  Not even thank you.

reply via email to

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