xterm-95.patch.txt

# ------------------------------------------------------------------------------
#  INSTALL                   |   63 ++--
#  Makefile.in               |    6 
#  VTPrsTbl.c                |  377 +++++++++++++++++++++++++++-
#  VTparse.def               |    2 
#  VTparse.h                 |    2 
#  aclocal.m4                |    4 
#  button.c                  |   50 +--
#  charproc.c                |  162 +++++++-----
#  configure                 |  588 +++++++++++++++++++++++---------------------
#  configure.in              |   38 ++
#  ctlseqs.ms                |   48 +++
#  data.c                    |   49 ---
#  data.h                    |   24 -
#  fontutils.c               |    4 
#  input.c                   |    3 
#  main.c                    |  175 ++++++++++---
#  misc.c                    |   32 +-
#  os2main.c                 |   43 ++-
#  print.c                   |    7 
#  ptyx.h                    |   58 ++--
#  screen.c                  |  105 ++++++-
#  testxmc.c                 |    6 
#  util.c                    |  132 +++++++++
#  version.h                 |   11 
#  vttests/dynamic.sh        |   42 ++-
#  vttests/resize.sh         |   53 ++-
#  vttests/title.sh          |   36 ++
#  xterm-95/vttests/fonts.sh |   51 +++
#  xterm.h                   |   14 -
#  xterm.log.html            |   50 +++
#  xterm.man                 |   49 ++-
#  xtermcfg.hin              |    2 
#  32 files changed, 1661 insertions, 625 deletions
# ------------------------------------------------------------------------------
Index: INSTALL
--- xterm-94+/INSTALL   Sun Mar 14 14:59:36 1999
+++ xterm-95/INSTALL    Fri Apr  2 05:49:59 1999
@@ -32,29 +32,29 @@
 
 The options (in alphabetic order):
 
-  --disable-16-color      disable 16-color support (default: on)
+  --disable-16-color      disable 16-color support
 
        Do not compile-in code to recognize aixterm-style control sequences
        that support color values 8-15.
-       
+
        Most color applications know only about 8 ANSI colors, but some
        (e.g., ones built with ncurses) do.
 
-  --disable-active-icon   disable X11R6.3 active-icon feature (default: on)
+  --disable-active-icon   disable X11R6.3 active-icon feature
 
        Do not compile-in code to support the active-icon feature.  This is
        not configured on systems (e.g., X11R5) which lack the library
        support needed.
-       
+
        Xterms with an active icon continue to respond to input and update
        their display when iconified.  Not all window managers support
        active icons.  Those that do include fvwm, olvwm and mwm.
 
-  --disable-ansi-color    disable ANSI color (default: on)
+  --disable-ansi-color    disable ANSI color
 
        Do not compile-in code for ANSI colors.
 
-  --disable-bold-color    disable PC-style mapping of bold colors (default: on)
+  --disable-bold-color    disable PC-style mapping of bold colors
 
        Do not compile-in code that maps colors 8-15 to bold versions of
        colors 0-7.
@@ -62,7 +62,7 @@
        Some applications have hardcoded logic that assumes this.  It does
        not interfere with the 16-color support.
 
-  --disable-boxchars      disable fallback-support for box chars (default: on)
+  --disable-boxchars      disable fallback-support for box chars
 
        Do not compile-in code to generate approximations for box/graphic
        characters.
@@ -72,35 +72,35 @@
        e.g., to make boxes.  When xterm loads a font, it checks if those
        characters are present, and draws its own if they are missing.
 
-  --disable-color-mode    disable default colorMode resource (default: on)
+  --disable-color-mode    disable default colorMode resource
 
        Do not compile-in code that sets the default value of the colorMode
        resource to ``true''.
 
-  --disable-doublechars   disable support for double-size chars (default: on)
+  --disable-doublechars   disable support for double-size chars
 
        Do not compile-in code that supports font-manipulation needed to
        implement vt100-style double-sized characters.
 
-  --disable-echo          test: display "compiling" commands (default: on)
+  --disable-echo          test: display "compiling" commands
 
        Modify the generated Makefile so that most compiler options are
        not shown.  This makes it simpler to read a build log and see the
        actual warning messages.
 
-  --disable-highlighting  disable support for color highlighting (default: on)
+  --disable-highlighting  disable support for color highlighting
 
        Do not compile-in code that allows the selected region to be a
        different color than the reverse of foreground/background colors.
 
        See the discussion of highlightColor in the manual.
 
-  --disable-i18n          disable internationalization (default: on)
+  --disable-i18n          disable internationalization
 
        Do not compile-in code to handle multi-byte characters.  This is
        related to, but not identical with the input method logic.
 
-  --disable-imake         disable use of imake for definitions (default: on)
+  --disable-imake         disable use of imake for definitions
 
        Do not attempt to use imake to determine compiler options.
 
@@ -108,7 +108,14 @@
        known only to imake.  The configure script implements only a
        portion of the tests needed to supplant imake.
 
-  --disable-input-method  disable input-method (default: on)
+  --disable-initial-erase disable initial-erase setup
+
+       Do not compile-in code which aligns the stty erase and the backarrow
+       key.  When compiled-in, xterm will optionally use the pty's sense
+       of stty erase and apply that to the backarrow mode (sending 8 or 127),
+       or go the other way, setting stty erase to match xterm's configuration.
+
+  --disable-input-method  disable input-method
 
        Do not compile-in code for "input method".  This is an X11R6
        feature which deals with translation of composite characters.
@@ -135,7 +142,7 @@
        quirks of the keyboard tables.  Use the ``numLock'' resource to
        disable this feature if you must customize xterm in some other way.
 
-  --disable-rightbar      disable right-scrollbar support (default: on)
+  --disable-rightbar      disable right-scrollbar support
 
        Do not compile-in code that supports a scrollbar on the right.
 
@@ -144,12 +151,12 @@
        leaving the right scrollbar incorrectly positioned after changing
        the font size.
 
-  --disable-samename      disable check for redundant name-change (default: on)
+  --disable-samename      disable check for redundant name-change
 
        Do not compile-in code that suppresses redundant updates to the
        titlebar when the text has not changed.
 
-  --disable-tek4014       disable tek4014 emulation (default: on)
+  --disable-tek4014       disable tek4014 emulation
 
        Do not compile-in code to support Tektronix 4014 emulation.
 
@@ -159,47 +166,51 @@
        for many years) as an example of code bloat, though this is not an
        accurate impression.
 
-  --disable-vt52          disable VT52 emulation (default: on)
+  --disable-vt52          disable VT52 emulation
 
        Do not compile-in code to support vt52 emulation.
 
        A genuine vt100 emulates a vt52.
 
-  --disable-ziconbeep     disable -ziconbeep option (default: on)
+  --disable-ziconbeep     disable -ziconbeep option
 
        Do not compile-in code that modifies the icon's title and sounds a
        beep when they receive output.
 
-  --enable-hp-fkeys       enable support for HP-style function keys (default: off)
+  --enable-hp-fkeys       enable support for HP-style function keys
 
        Compile-in code to support HP-style function keys.
 
-  --enable-logfile-exec   enable exec'd logfile filter (default: off)
+  --enable-logfile-exec   enable exec'd logfile filter
 
        Compile-in code that allows logging piped via an external filter.
 
-  --enable-logging        enable logging (default: off)
+  --enable-logging        enable logging
 
        Compile-in code that allows logging.
 
        Logging was disabled in X11R5 xterm because of security problems.
        They were addressed in X11R6, but the feature was not reinstated.
 
-  --enable-trace          test: set to enable debugging traces (default: off)
+  --enable-trace          test: set to enable debugging traces
 
        Compile-in code to trace xterm's internal states.
 
        This is a debugging feature.  It causes xterm to produce two files
        (Trace-parent.out and Trace-child.out).
 
-  --enable-warnings       test: turn on GCC compiler warnings (default: off)
+  --enable-warnings       test: turn on GCC compiler warnings
 
        Modify the generate Makefile to turn on gcc compiler warnings.
 
        I use this option regularly, and correct all but a few (difficult)
        problems.
 
-  --enable-xmc-glitch     test: enable xmc magic-cookie emulation (default: off)
+  --enable-wide-chars     enable wide-character support
+
+       Compile-in code that supports 16-bit characters.
+
+  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
 
        Compile-in code that simulates the terminfo "magic cookie" glitch.
 
@@ -250,6 +261,6 @@
 
        The default value "xterm", can be overridden to avoid conflict
        with older versions of xterm, e.g., those that do not implement
-       vt220 emulation. 
+       vt220 emulation.
 
        You can always override this with the command-line option "-tn".
Index: Makefile.in
--- xterm-94+/Makefile.in       Mon Mar 29 13:36:18 1999
+++ xterm-95/Makefile.in        Sun Apr  4 14:51:48 1999
@@ -38,6 +38,7 @@
 
 SHELL          = /bin/sh
 RM              = rm -f
+AWK            = awk
 
 LDFLAGS                =
 
@@ -67,7 +68,7 @@
 
 all:   $(PROGRAMS)
 
-.SUFFIXES : .i
+.SUFFIXES : .i .def .hin
 
 .c.o:
 @RULE_CC@
@@ -76,6 +77,9 @@
 .c.i:
 @RULE_CC@
        @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
+
+.def.hin:
+       grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@
 
 main.o: version.h
 
Index: VTPrsTbl.c
--- xterm-94+/VTPrsTbl.c        Sun Mar 14 14:59:36 1999
+++ xterm-95/VTPrsTbl.c Sun Apr  4 15:18:59 1999
@@ -4,6 +4,36 @@
  */
 
 /*
+ *
+ * Copyright 1999 by Thomas E. Dickey <dickey@clark.net>
+ *
+ *                         All Rights Reserved
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization.
+ *
+ *
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  *
  *                         All Rights Reserved
@@ -34,8 +64,17 @@
 #define OPT_VT52_MODE   1 /* true if xterm supports VT52 emulation */
 #endif
 
+#ifndef OPT_WIDE_CHARS
+#define OPT_WIDE_CHARS  0 /* true if xterm supports 16-bit characters */
+#endif
+
 #include <VTparse.h>
 
+#if !OPT_WIDE_CHARS
+#undef  CASE_ESC_PERCENT
+#define CASE_ESC_PERCENT CASE_ESC_IGNORE
+#endif
+
 /*
  * Stupid Apollo C preprocessor can't handle long lines.  So... To keep
  * it happy, we put each onto a separate line....  Sigh...
@@ -122,7 +161,7 @@
 CASE_PRINT,
 CASE_PRINT,
 CASE_PRINT,
-CASE_PRINT, 
+CASE_PRINT,
 /*     @               A               B               C       */
 CASE_PRINT,
 CASE_PRINT,
@@ -2682,7 +2721,7 @@
 CASE_SCR_STATE,
 /*     $               %               &               '       */
 CASE_ESC_IGNORE,
-CASE_ESC_IGNORE,
+CASE_ESC_PERCENT,
 CASE_ESC_IGNORE,
 CASE_ESC_IGNORE,
 /*     (               )               *               +       */
@@ -3638,7 +3677,7 @@
 CASE_IGNORE,
 CASE_IGNORE,
 /*     CAN             EM              SUB             ESC     */
-CASE_GROUND_STATE, 
+CASE_GROUND_STATE,
 CASE_IGNORE,
 CASE_GROUND_STATE,
 CASE_IGNORE_ESC,
@@ -4662,7 +4701,7 @@
 CASE_IGNORE,
 CASE_IGNORE,
 CASE_IGNORE,
-CASE_IGNORE, 
+CASE_IGNORE,
 /*     @               A               B               C       */
 CASE_IGNORE,
 CASE_IGNORE,
@@ -4987,7 +5026,7 @@
 CASE_PRINT,
 CASE_PRINT,
 CASE_PRINT,
-CASE_PRINT, 
+CASE_PRINT,
 /*     @               A               B               C       */
 CASE_PRINT,
 CASE_PRINT,
@@ -5311,7 +5350,7 @@
 CASE_ANSI_LEVEL_1,
 CASE_DECKPAM,
 CASE_DECKPNM,
-CASE_IGNORE, 
+CASE_IGNORE,
 /*     @               A               B               C       */
 CASE_IGNORE,
 CASE_CUU,
@@ -5554,3 +5593,329 @@
 CASE_IGNORE,
 };
 #endif /* OPT_VT52_MODE */
+
+#if OPT_WIDE_CHARS
+Const PARSE_T esc_pct_table[] =                /* ESC % */
+{
+/*     NUL             SOH             STX             ETX     */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*     EOT             ENQ             ACK             BEL     */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_BELL,
+/*     BS              HT              NL              VT      */
+CASE_BS,
+CASE_TAB,
+CASE_VMOT,
+CASE_VMOT,
+/*     NP              CR              SO              SI      */
+CASE_VMOT,
+CASE_CR,
+CASE_SO,
+CASE_SI,
+/*     DLE             DC1             DC2             DC3     */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*     DC4             NAK             SYN             ETB     */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*     CAN             EM              SUB             ESC     */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_ESC,
+/*     FS              GS              RS              US      */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*     SP              !               "               #       */
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+/*     $               %               &               '       */
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+/*     (               )               *               +       */
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+/*     ,               -               .               /       */
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+CASE_ESC_IGNORE,
+/*     0               1               2               3       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     4               5               6               7       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     8               9               :               ;       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     <               =               >               ?       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     @               A               B               C       */
+CASE_UTF8,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     D               E               F               G       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_UTF8,
+/*     H               I               J               K       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     L               M               N               O       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     P               Q               R               S       */
+CASE_IGNORE_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     T               U               V               W       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     X               Y               Z               [       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     \               ]               ^               _       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     `               a               b               c       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     d               e               f               g       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     h               i               j               k       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     l               m               n               o       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     p               q               r               s       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     t               u               v               w       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     x               y               z               {       */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*     |               }               ~               DEL     */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      0x80            0x81            0x82            0x83    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x84            0x85            0x86            0x87    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x88            0x89            0x8a            0x8b    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x8c            0x8d            0x8e            0x8f    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x90            0x91            0x92            0x93    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x94            0x95            0x96            0x97    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x98            0x99            0x9a            0x9b    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      0x9c            0x9d            0x9e            0x9f    */
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+CASE_IGNORE,
+/*      nobreakspace    exclamdown      cent            sterling        */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      currency        yen             brokenbar       section         */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      diaeresis       copyright       ordfeminine     guillemotleft   */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      notsign         hyphen          registered      macron          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      degree          plusminus       twosuperior     threesuperior   */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      acute           mu              paragraph       periodcentered  */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      cedilla         onesuperior     masculine       guillemotright  */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      onequarter      onehalf         threequarters   questiondown    */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Agrave          Aacute          Acircumflex     Atilde          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Adiaeresis      Aring           AE              Ccedilla        */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Igrave          Iacute          Icircumflex     Idiaeresis      */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Eth             Ntilde          Ograve          Oacute          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Ocircumflex     Otilde          Odiaeresis      multiply        */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Ooblique        Ugrave          Uacute          Ucircumflex     */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      Udiaeresis      Yacute          Thorn           ssharp          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      agrave          aacute          acircumflex     atilde          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      adiaeresis      aring           ae              ccedilla        */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      egrave          eacute          ecircumflex     ediaeresis      */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      igrave          iacute          icircumflex     idiaeresis      */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      eth             ntilde          ograve          oacute          */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      ocircumflex     otilde          odiaeresis      division        */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      oslash          ugrave          uacute          ucircumflex     */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+/*      udiaeresis      yacute          thorn           ydiaeresis      */
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+CASE_GROUND_STATE,
+};
+#endif
Index: VTparse.def
--- xterm-94+/VTparse.def       Wed Aug 13 09:29:16 1997
+++ xterm-95/VTparse.def        Sun Apr  4 15:18:38 1999
@@ -121,3 +121,5 @@
 CASE_DECSWL
 CASE_DECDWL
 CASE_DEC_MC
+CASE_ESC_PERCENT
+CASE_UTF8
Index: VTparse.h
--- xterm-94+/VTparse.h Sun Oct 25 13:31:39 1998
+++ xterm-95/VTparse.h  Sun Apr  4 15:19:14 1999
@@ -188,5 +188,7 @@
 #define CASE_DECSWL 111
 #define CASE_DECDWL 112
 #define CASE_DEC_MC 113
+#define CASE_ESC_PERCENT 114
+#define CASE_UTF8 115
 
 #endif /* included_VTparse_h */
Index: aclocal.m4
--- xterm-94+/aclocal.m4        Sun Mar 14 14:59:36 1999
+++ xterm-95/aclocal.m4 Thu Apr  1 20:34:17 1999
@@ -78,11 +78,11 @@
 dnl ---------------------------------------------------------------------------
 dnl Allow user to disable a normally-on option.
 AC_DEFUN([CF_ARG_DISABLE],
-[CF_ARG_OPTION($1,[$2 (default: on)],[$3],[$4],yes)])dnl
+[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
 dnl ---------------------------------------------------------------------------
 dnl Allow user to enable a normally-off option.
 AC_DEFUN([CF_ARG_ENABLE],
-[CF_ARG_OPTION($1,[$2 (default: off)],[$3],[$4],no)])dnl
+[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
 dnl ---------------------------------------------------------------------------
 dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
 dnl values.
Index: button.c
--- xterm-94+/button.c  Sun Mar 21 13:38:47 1999
+++ xterm-95/button.c   Sat Apr  3 14:53:08 1999
@@ -48,11 +48,14 @@
 #include <menu.h>
 #include <xcharmouse.h>
 
+#undef  CTRL
+#define        CTRL(c) ((c) & 0x1f)
+
 #define KeyState(x) (((x) & (ShiftMask|ControlMask)) + (((x) & Mod1Mask) ? 2 : 0))
     /* adds together the bits:
-        shift key -> 1
-        meta key  -> 2
-        control key -> 4 */
+       shift key -> 1
+       meta key  -> 2
+       control key -> 4 */
 
 #define TEXTMODES 4
 #define NBUTS 3
@@ -119,13 +122,13 @@
     TScreen *screen;
 
     if (!IsXtermWidget(w))
-       return False;
+       return False;
 
     screen = &((XtermWidget)w)->screen;
 
     /* If send_mouse_pos mode isn't on, we shouldn't be here */
     if (screen->send_mouse_pos == MOUSE_OFF)
-        return False;
+       return False;
 
     /* Make sure the event is an appropriate type */
     if ((screen->send_mouse_pos != BTN_EVENT_MOUSE)
@@ -202,7 +205,7 @@
        register unsigned line, col;
 
     if (event->type != ButtonPress && event->type != ButtonRelease)
-       return;
+       return;
     strcpy( Line, "\030\033G  " );
 
        line = ( event->xbutton.y - screen->border ) / FontHeight( screen );
@@ -225,21 +228,20 @@
        register int line;
 
     if (event->type != ButtonPress && event->type != ButtonRelease)
-       return;
+       return;
 
        line = screen->cur_row -
                (( event->xbutton.y - screen->border ) / FontHeight( screen ));
-/* fprintf( stderr, "xtdb line=%d\n", line ); */
        if ( ! line ) return;
        Line[ 1 ] = 0;
        Line[ 0 ] = 27;
        v_write(pty, Line, 1 );
 
-       Line[ 0 ] = 'p' & 0x1f;
+       Line[ 0 ] = CTRL('p');
 
-       if ( line < 0 )
-       {       line = -line;
-               Line[ 0 ] = 'n' & 0x1f;
+       if ( line < 0 ) {
+               line = -line;
+               Line[ 0 ] = CTRL('n');
        }
        while ( --line >= 0 ) v_write(pty, Line, 1 );
 }
@@ -279,7 +281,7 @@
                        if ( screen->send_mouse_pos == BTN_EVENT_MOUSE
                         ||  screen->send_mouse_pos == ANY_EVENT_MOUSE )
                            SendMousePosition(w,event);
-                       break;
+                       break;
        }
 }
 
@@ -621,7 +623,7 @@
                        }
                        if (rawRow == startSRow && rawCol == startSCol
                            && row == endSRow && col == endSCol) {
-                               /* Use short-form emacs select */
+                               /* Use short-form emacs select */
                                line[count++] = 't';
                                line[count++] = ' ' + endSCol + 1;
                                line[count++] = ' ' + endSRow + 1;
@@ -718,12 +720,12 @@
        if (Abs(coord - Coordinate(startSRow, startSCol))
             < Abs(coord - Coordinate(endSRow, endSCol))
            || coord < Coordinate(startSRow, startSCol)) {
-               /* point is close to left side of selection */
+               /* point is close to left side of selection */
                eventMode = LEFTEXTENSION;
                startERow = row;
                startECol = col;
        } else {
-               /* point is close to left side of selection */
+               /* point is close to left side of selection */
                eventMode = RIGHTEXTENSION;
                endERow = row;
                endECol = col;
@@ -745,7 +747,7 @@
                startECol = saveStartRCol;
        } else if (eventMode == RIGHTEXTENSION
         && coord < Coordinate(startSRow, startSCol)) {
-               /* Whoops, he's changed his mind.  Do LEFTEXTENSION */
+               /* Whoops, he's changed his mind.  Do LEFTEXTENSION */
                eventMode = LEFTEXTENSION;
                endERow   = saveEndRRow;
                endECol   = saveEndRCol;
@@ -787,7 +789,7 @@
     register int maxcol = screen->max_col;
 
 #define scroll_update_one(row, col) \
-       row += amount; \
+       row += amount; \
        if (row < minrow) { \
            row = minrow; \
            col = 0; \
@@ -869,7 +871,7 @@
        register Char *ch;
 
        for ( i = screen->max_col,
-               ch = SCRN_BUF_ATTRS(screen, (row + screen->topline)) + i ;
+               ch = SCRN_BUF_ATTRS(screen, (row + screen->topline)) + i ;
              i >= 0 && !(*ch & CHARDRAWN) ;
              ch--, i--)
            ;
@@ -884,7 +886,7 @@
 **     - control characters    [0,0x1f] U [0x80,0x9f]
 **     - separators            [0x20,0x3f] U [0xa0,0xb9]
 **     - binding characters    [0x40,0x7f] U [0xc0,0xff]
-**     - execeptions
+**     - exceptions
 */
 static int charClass[256] = {
 /* NUL  SOH  STX  ETX  EOT  ENQ  ACK  BEL */
@@ -953,7 +955,7 @@
     48,  48,  48,  48,  48,  48,  48,  48};
 
 int SetCharacterClassRange (
-    register int low,                  /* in range of [0..255] */
+    register int low,                  /* in range of [0..255] */
     register int high,
     register int value)                        /* arbitrary */
 {
@@ -1496,7 +1498,7 @@
     register int scol,
     register int ecol)
 {
-        register int lastcol = LastTextCol(row);
+       register int lastcol = LastTextCol(row);
 
        if (ecol > lastcol)
            ecol = lastcol;
@@ -1527,7 +1529,7 @@
 #endif
        *eol = !ScrnTstWrapped(screen, row);
        for (i = scol; i < ecol; i++) {
-               c = ch[i];
+               c = ch[i];
                if (c == 0)
                        c = ' ';
                else if(c < ' ') {
@@ -1674,6 +1676,6 @@
        ev_time = event->xkey.time;
     else if ((event->xany.type == ButtonPress) ||
             (event->xany.type == ButtonRelease))
-        ev_time = event->xbutton.time;
+       ev_time = event->xbutton.time;
     DoSecureKeyboard (ev_time);
 }
Index: charproc.c
--- xterm-94+/charproc.c        Mon Mar 29 13:36:18 1999
+++ xterm-95/charproc.c Mon Apr  5 18:50:15 1999
@@ -83,6 +83,7 @@
 
 /* charproc.c */
 
+#include <version.h>
 #include <xterm.h>
 
 #include <X11/Xos.h>
@@ -148,7 +149,7 @@
 static void SwitchBufs (TScreen *screen);
 static void ToAlternate (TScreen *screen);
 static void VTallocbuf (void);
-static void WriteText (TScreen *screen, Char *str, int len);
+static void WriteText (TScreen *screen, PAIRED_CHARS(Char *str, Char *str2), Cardinal len);
 static void ansi_modes (XtermWidget termw, void (*func)(unsigned *p, unsigned mask));
 static void bitclr (unsigned *p, unsigned mask);
 static void bitcpy (unsigned *p, unsigned q, unsigned mask);
@@ -265,6 +266,7 @@
 #define XtNtiteInhibit         "titeInhibit"
 #define XtNunderLine           "underLine"
 #define XtNvisualBell          "visualBell"
+#define XtNwideChars           "wideChars"
 #define XtNxmcAttributes       "xmcAttributes"
 #define XtNxmcGlitch           "xmcGlitch"
 #define XtNxmcInline           "xmcInline"
@@ -329,6 +331,7 @@
 #define XtCTiteInhibit         "TiteInhibit"
 #define XtCUnderLine           "UnderLine"
 #define XtCVisualBell          "VisualBell"
+#define XtCWideChars           "WideChars"
 #define XtCXmcAttributes       "XmcAttributes"
 #define XtCXmcGlitch           "XmcGlitch"
 #define XtCXmcInline           "XmcInline"
@@ -879,6 +882,11 @@
        XtOffsetOf(XtermWidgetRec, misc.icon_border_pixel),
        XtRString, XtExtdefaultbackground},
 #endif /* NO_ACTIVE_ICON */
+#if OPT_WIDE_CHARS
+{XtNwideChars, XtCWideChars, XtRBoolean, sizeof(Boolean),
+       XtOffsetOf(XtermWidgetRec, screen.wide_chars),
+       XtRBoolean, (XtPointer) &defaultFALSE},
+#endif
 };
 
 static Boolean VTSetValues (Widget cur, Widget request, Widget new_arg, ArgList args, Cardinal *num_args);
@@ -1156,16 +1164,16 @@
                        if(screen->curss) {
                                thischar = *bptr;
                                dotext(screen,
-                                screen->gsets[(int)(screen->curss)],
-                                       bptr, bptr + 1);
+                                       screen->gsets[(int)(screen->curss)],
+                                       PAIRED_CHARS(bptr, 0), 1);
                                bptr += 1;
                                screen->curss = 0;
                        }
                        if(bptr < cp) {
                                thischar = cp[-1];
                                dotext(screen,
-                                screen->gsets[(int)(screen->curgl)],
-                                       bptr, cp);
+                                       screen->gsets[(int)(screen->curgl)],
+                                       PAIRED_CHARS(bptr, 0), cp - bptr);
                        }
                        bptr = cp;
                        break;
@@ -1504,7 +1512,7 @@
                        /* FALLTHRU */
                 case CASE_DA1:
                        /* DA1 */
-                       if (param[0] <= 0) {    /* less than means DEFAULT */
+                       if (param[0] <= 1) {    /* less than means DEFAULT */
                            count = 0;
                            reply.a_type   = CSI;
                            reply.a_pintro = '?';
@@ -1533,9 +1541,13 @@
                            } else {
                                reply.a_param[count++] = 60 + screen->terminal_id/100;
                                reply.a_param[count++] = 1; /* 132-columns */
-                               /* reply.a_param[count++] = 2; NO printer */
+                               reply.a_param[count++] = 2; /* printer */
                                reply.a_param[count++] = 6; /* selective-erase */
+#if OPT_SUNPC_KBD
+                               if (sunKeyboard)
+#endif
                                reply.a_param[count++] = 8; /* user-defined-keys */
+                               reply.a_param[count++] = 9; /* national replacement charsets */
                                reply.a_param[count++] = 15; /* technical characters */
                            }
                            reply.a_nparam = count;
@@ -1548,14 +1560,16 @@
 
                 case CASE_DA2:
                        /* DA2 */
-                       if ((screen->terminal_id >= 200)
-                        && (param[0] <= 0)) {  /* less than means DEFAULT */
+                       if (param[0] <= 0) {    /* less than means DEFAULT */
                                count = 0;
                                reply.a_type   = CSI;
                                reply.a_pintro = '>';
 
-                               reply.a_param[count++] = 1; /* VT220 */
-                               reply.a_param[count++] = 0; /* Version */
+                               if (screen->terminal_id >= 200)
+                                       reply.a_param[count++] = 1; /* VT220 */
+                               else
+                                       reply.a_param[count++] = 0; /* VT100 (nonstandard) */
+                               reply.a_param[count++] = XTERM_PATCH; /* Version */
                                reply.a_param[count++] = 0; /* options (none) */
                                reply.a_nparam = count;
                                reply.a_inters = 0;
@@ -1864,6 +1878,10 @@
                                 col = screen->max_col + 1);
                                for(cp = SCRN_BUF_CHARS(screen, row) ; col > 0 ; col--)
                                        *cp++ = (unsigned char) 'E';
+                               if_OPT_WIDE_CHARS(screen,{
+                                       bzero(SCRN_BUF_WIDEC(screen, row),
+                                             screen->max_col+1);
+                               })
                        }
                        ScrnRefresh(screen, 0, 0, screen->max_row + 1,
                         screen->max_col + 1, False);
@@ -2149,7 +2167,7 @@
                            while (count-- > 0) {
                                dotext(screen,
                                        screen->gsets[(int)(screen->curgl)],
-                                       repeated, repeated+1);
+                                       PAIRED_CHARS(repeated, 0), 1);
                            }
                        }
                        parsestate = groundtable;
@@ -2199,6 +2217,12 @@
                        window_ops(term);
                        parsestate = groundtable;
                        break;
+#if OPT_WIDE_CHARS
+                case CASE_UTF8:
+                       screen->utf8_mode = (c == 'G');
+                       parsestate = groundtable;
+                       break;
+#endif
            }
            if (parsestate == groundtable)
                    lastchar = thischar;
@@ -2540,27 +2564,24 @@
 dotext(
        register TScreen *screen,
        int     charset,
-       Char    *buf,           /* start of characters to process */
-       Char    *ptr)           /* end */
+       PAIRED_CHARS(Char *buf,Char *buf2), /* start of characters to process */
+       Cardinal len)           /* end */
 {
-       register int    len;
-       register int    n;
-       register int    next_col;
+       Cardinal n, next_col, offset;
 
-       if (!xtermCharSetOut(buf, ptr, charset))
+       if (!xtermCharSetOut(buf, buf+len, charset))
                return;
 
        if_OPT_XMC_GLITCH(screen,{
-               register Char   *s;
-               if (charset != '?')
-                       for (s=buf; s<ptr; ++s)
-                               if (*s == XMC_GLITCH)
-                                       *s = XMC_GLITCH+1;
+               if (charset != '?') {
+                       for (n = 0; n < len; n++) {
+                               if (buf[n] == XMC_GLITCH)
+                                       buf[n] = XMC_GLITCH+1;
+                       }
+               }
        })
 
-       len = ptr - buf;
-       ptr = buf;
-       while (len > 0) {
+       for (offset = 0; offset < len; offset += n) {
                n = screen->max_col - screen->cur_col +1;
                if (n <= 1) {
                        if (screen->do_wrap && (term->flags & WRAPAROUND)) {
@@ -2574,20 +2595,20 @@
                        } else
                            n = 1;
                }
-               if (len < n)
-                       n = len;
+               if (offset + n > len)
+                       n = len - offset;
                next_col = screen->cur_col + n;
 
-               WriteText(screen, ptr, n);
+               WriteText(screen, PAIRED_CHARS(
+                       buf+offset,
+                       buf2 ? buf2+offset : 0), n);
 
                /*
                 * the call to WriteText updates screen->cur_col.
                 * If screen->cur_col != next_col, we must have
                 * hit the right margin, so set the do_wrap flag.
                 */
-               screen->do_wrap = (screen->cur_col < next_col);
-               len -= n;
-               ptr += n;
+               screen->do_wrap = (screen->cur_col < (int)next_col);
        }
 }
 
@@ -2610,10 +2631,7 @@
  * the current cursor position.  update cursor position.
  */
 static void
-WriteText(
-       register TScreen *screen,
-       register Char   *str,
-       register int    len)
+WriteText(TScreen *screen, PAIRED_CHARS(Char *str, Char *str2), Cardinal len)
 {
        unsigned flags  = term->flags;
        int     fg_bg = makeColorPair(term->cur_foreground, term->cur_background);
@@ -2623,7 +2641,7 @@
                screen->cur_row,
                screen->cur_col,
                curXtermChrSet(screen->cur_row),
-               len, len, str))
+               len, (int)len, str))
 
        if(screen->cur_row - screen->topline <= screen->max_row) {
                if(screen->cursor_state)
@@ -2649,7 +2667,7 @@
                                CurCursorX(screen, screen->cur_row, screen->cur_col),
                                CursorY(screen, screen->cur_row),
                                curXtermChrSet(screen->cur_row),
-                               str, len);
+                               PAIRED_CHARS(str, str2), len);
 
                        resetXtermGC(screen, flags, False);
 
@@ -3488,12 +3506,13 @@
        /* If send/receive mode is reset, we echo characters locally */
        if ((term->keyboard.flags & MODE_SRM) == 0) {
                register TScreen *screen = &term->screen;
-               dotext(screen, screen->gsets[(int)(screen->curgl)], buf, buf+i);
+               dotext(screen, screen->gsets[(int)(screen->curgl)],
+                       PAIRED_CHARS(buf, 0), i);
        }
 }
 
 void
-unparseputs(Char *s, int fd)
+unparseputs(char *s, int fd)
 {
        while (*s)
                unparseputc(*s++, fd);
@@ -3947,6 +3966,7 @@
    wnew->screen.font_doublesize = request->screen.font_doublesize;
 #endif
 
+   wnew->num_ptrs = 3; /* OFF_FLAGS, OFF_CHARS, OFF_ATTRS */
 #if OPT_ISO_COLORS
    wnew->screen.boldColors    = request->screen.boldColors;
    wnew->screen.colorAttrMode = request->screen.colorAttrMode;
@@ -3971,7 +3991,7 @@
    if (!color_ok)
        wnew->screen.colorMode = False;
 
-   wnew->num_ptrs = wnew->screen.colorMode ? 3 : 2;
+   wnew->num_ptrs += 1;
    wnew->sgr_foreground = -1;
 #endif /* OPT_ISO_COLORS */
 
@@ -3980,7 +4000,13 @@
 #endif
 
 #if OPT_DEC_CHRSET
-   wnew->num_ptrs = 5;
+   wnew->num_ptrs += 1;
+#endif
+
+#if OPT_WIDE_CHARS
+   wnew->screen.utf8_mode = False; /* will activate with control-sequence */
+   if ((wnew->screen.wide_chars = request->screen.wide_chars) != False)
+      wnew->num_ptrs += 1;
 #endif
 
    wnew->screen.underline = request->screen.underline;
@@ -4474,7 +4500,7 @@
 {
        register TScreen *screen = &term->screen;
        register int x, y, flags;
-       Char    c;
+       Char    clo;
        Char    fg_bg = 0;
        GC      currentGC;
        Boolean in_selection;
@@ -4484,6 +4510,9 @@
 #if OPT_HIGHLIGHT_COLOR
        Pixel hi_pix = screen->highlightcolor;
 #endif
+#if OPT_WIDE_CHARS
+       Char    chi = 0;
+#endif
 
        if (screen->cursor_state == BLINKED_OFF)
                return;
@@ -4496,9 +4525,6 @@
        screen->cursor_row = screen->cur_row;
        screen->cursor_col = screen->cur_col;
 
-       c     = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col];
-       flags = SCRN_BUF_ATTRS(screen, screen->cursor_row)[screen->cursor_col];
-
 #ifndef NO_ACTIVE_ICON
        if (IsIcon(screen)) {
            screen->cursor_state = ON;
@@ -4506,8 +4532,15 @@
        }
 #endif /* NO_ACTIVE_ICON */
 
-       if (c == 0)
-               c = ' ';
+       clo   = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col];
+       flags = SCRN_BUF_ATTRS(screen, screen->cursor_row)[screen->cursor_col];
+
+       if_OPT_WIDE_CHARS(screen,{
+           chi = SCRN_BUF_WIDEC(screen, screen->cursor_row)[screen->cursor_col];
+       })
+
+       if (clo == 0)
+               clo = ' ';
 
        /*
         * Compare the current cell to the last set of colors used for the
@@ -4593,7 +4626,7 @@
                x = CurCursorX(screen, screen->cur_row, screen->cur_col),
                y = CursorY(screen, screen->cur_row),
                curXtermChrSet(screen->cur_row),
-               &c, 1);
+               PAIRED_CHARS(&clo, &chi), 1);
 
        if (!screen->select && !screen->always_highlight) {
                screen->box->x = x;
@@ -4614,22 +4647,19 @@
 {
        register TScreen *screen = &term->screen;
        GC      currentGC;
-       register int flags, fg_bg = 0;
-       Char c;
+       register int flags;
+       register int fg_bg = 0;
+       Char    clo;
        Boolean in_selection;
+#if OPT_WIDE_CHARS
+       Char    chi = 0;
+#endif
 
        if (screen->cursor_state == OFF)        /* FIXME */
                return;
        if(screen->cursor_row - screen->topline > screen->max_row)
                return;
 
-       c     = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col];
-       flags = SCRN_BUF_ATTRS(screen, screen->cursor_row)[screen->cursor_col];
-
-       if_OPT_ISO_COLORS(screen,{
-           fg_bg = SCRN_BUF_COLOR(screen, screen->cursor_row)[screen->cursor_col];
-       })
-
 #ifndef NO_ACTIVE_ICON
        if (IsIcon(screen)) {
            screen->cursor_state = OFF;
@@ -4637,6 +4667,16 @@
        }
 #endif /* NO_ACTIVE_ICON */
 
+       clo   = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col];
+       flags = SCRN_BUF_ATTRS(screen, screen->cursor_row)[screen->cursor_col];
+
+       if_OPT_ISO_COLORS(screen,{
+           fg_bg = SCRN_BUF_COLOR(screen, screen->cursor_row)[screen->cursor_col];
+       })
+
+       if_OPT_WIDE_CHARS(screen,{
+           chi = SCRN_BUF_WIDEC(screen, screen->cursor_row)[screen->cursor_col];
+       })
 
        if (screen->cursor_row > screen->endHRow ||
            (screen->cursor_row == screen->endHRow &&
@@ -4650,15 +4690,15 @@
 
        currentGC = updatedXtermGC(screen, flags, fg_bg, in_selection);
 
-       if (c == 0)
-               c = ' ';
+       if (clo == 0)
+               clo = ' ';
 
        TRACE(("%s @%d, HideCursor calling drawXtermText\n", __FILE__, __LINE__))
        drawXtermText(screen, flags, currentGC,
                CurCursorX(screen, screen->cursor_row, screen->cursor_col),
                CursorY(screen, screen->cursor_row),
                curXtermChrSet(screen->cursor_row),
-               &c, 1);
+               PAIRED_CHARS(&clo, &chi), 1);
 
        screen->cursor_state = OFF;
        resetXtermGC(screen, flags, in_selection);
Index: configure
--- xterm-94+/configure Sun Mar 14 14:59:36 1999
+++ xterm-95/configure  Fri Apr  2 05:47:58 1999
@@ -186,38 +186,40 @@
   --with-x                use the X Window System
   --with-Xaw3d            link with Xaw 3d library
   --with-neXtaw           link with neXT Athena library
-  --disable-imake         disable use of imake for definitions (default: on)
+  --disable-imake         disable use of imake for definitions
   --with-terminal-id[=V]  set default decTerminalID (default: vt100)
   --with-terminal-type=T  set default \$TERM (default: xterm)
   --with-own-terminfo=P   set default \$TERMINFO (default: from environment)
-  --disable-active-icon   disable X11R6.3 active-icon feature (default: on)
-  --disable-ansi-color    disable ANSI color (default: on)
-  --disable-16-color      disable 16-color support (default: on)
-  --disable-bold-color    disable PC-style mapping of bold colors (default: on)
-  --disable-color-mode    disable default colorMode resource (default: on)
-  --disable-highlighting  disable support for color highlighting (default: on)
+  --disable-active-icon   disable X11R6.3 active-icon feature
+  --disable-ansi-color    disable ANSI color
+  --disable-16-color      disable 16-color support
+  --disable-bold-color    disable PC-style mapping of bold colors
+  --disable-color-mode    disable default colorMode resource
+  --disable-highlighting  disable support for color highlighting
 EOF
 cat <<EOF
-  --disable-doublechars   disable support for double-size chars (default: on)
-  --disable-boxchars      disable fallback-support for box chars (default: on)
-  --enable-hp-fkeys       enable support for HP-style function keys (default: off)
-  --disable-input-method  disable input-method (default: on)
-  --disable-i18n          disable internationalization (default: on)
-  --enable-logging        enable logging (default: off)
-  --enable-logfile-exec   enable exec'd logfile filter (default: off)
-  --disable-maximize      disable actions for iconify/deiconify/maximize/restore (default: on)
-  --disable-num-lock      disable NumLock keypad support (default: on)
-  --disable-rightbar      disable right-scrollbar support (default: on)
-  --disable-samename      disable check for redundant name-change (default: on)
-  --disable-tek4014       disable tek4014 emulation (default: on)
+  --disable-doublechars   disable support for double-size chars
+  --disable-boxchars      disable fallback-support for box chars
+  --enable-hp-fkeys       enable support for HP-style function keys
+  --disable-i18n          disable internationalization
+  --disable-initial-erase disable setup for stty erase
+  --disable-input-method  disable input-method
+  --enable-logging        enable logging
+  --enable-logfile-exec   enable exec'd logfile filter
+  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
+  --disable-num-lock      disable NumLock keypad support
+  --disable-rightbar      disable right-scrollbar support
+  --disable-samename      disable check for redundant name-change
 EOF
 cat <<EOF
-  --disable-vt52          disable VT52 emulation (default: on)
-  --disable-ziconbeep     disable -ziconbeep option (default: on)
-  --enable-trace          test: set to enable debugging traces (default: off)
-  --disable-echo          test: display "compiling" commands (default: on)
-  --enable-xmc-glitch     test: enable xmc magic-cookie emulation (default: off)
-  --enable-warnings       test: turn on GCC compiler warnings (default: off)
+  --disable-tek4014       disable tek4014 emulation
+  --disable-vt52          disable VT52 emulation
+  --enable-wide-chars     enable wide-character support
+  --disable-ziconbeep     disable -ziconbeep option
+  --enable-trace          test: set to enable debugging traces
+  --disable-echo          test: display "compiling" commands
+  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
+  --enable-warnings       test: turn on GCC compiler warnings
 EOF
     exit 0 ;;
 
@@ -585,7 +587,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:589: checking host system type" >&5
+echo "configure:591: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -636,7 +638,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:640: checking for $ac_word" >&5
+echo "configure:642: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -666,7 +668,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:670: checking for $ac_word" >&5
+echo "configure:672: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -717,7 +719,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:721: checking for $ac_word" >&5
+echo "configure:723: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -749,7 +751,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -760,12 +762,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 764 "configure"
+#line 766 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -791,12 +793,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:800: checking whether we are using GNU C" >&5
+echo "configure:802: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -805,7 +807,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -824,7 +826,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:828: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -856,7 +858,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:860: checking how to run the C preprocessor" >&5
+echo "configure:862: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -871,13 +873,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 875 "configure"
+#line 877 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -888,13 +890,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 892 "configure"
+#line 894 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -905,13 +907,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 909 "configure"
+#line 911 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -937,13 +939,13 @@
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:941: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:943: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 947 "configure"
+#line 949 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -961,7 +963,7 @@
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 965 "configure"
+#line 967 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -994,7 +996,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:998: checking for a BSD compatible install" >&5
+echo "configure:1000: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1049,9 +1051,9 @@
 
 ###    checks for UNIX variants that set C preprocessor variables
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1053: checking for AIX" >&5
+echo "configure:1055: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1055 "configure"
+#line 1057 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -1073,7 +1075,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1077: checking for POSIXized ISC" >&5
+echo "configure:1079: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -1095,17 +1097,17 @@
 
 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1099: checking for minix/config.h" >&5
+echo "configure:1101: checking for minix/config.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1104 "configure"
+#line 1106 "configure"
 #include "confdefs.h"
 #include <minix/config.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1148,17 +1150,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1152: checking for $ac_hdr" >&5
+echo "configure:1154: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
+#line 1159 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1188,13 +1190,13 @@
 ###    checks for typedefs
 
 echo $ac_n "checking for size_t in <sys/types.h> or <stdio.h>""... $ac_c" 1>&6
-echo "configure:1192: checking for size_t in <sys/types.h> or <stdio.h>" >&5
+echo "configure:1194: checking for size_t in <sys/types.h> or <stdio.h>" >&5
 if eval "test \"`echo '$''{'cf_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 1198 "configure"
+#line 1200 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1207,7 +1209,7 @@
 size_t x
 ; return 0; }
 EOF
-if { (eval echo configure:1211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_size_t=yes
 else
@@ -1227,12 +1229,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1231: checking for ANSI C header files" >&5
+echo "configure:1233: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1236 "configure"
+#line 1238 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1240,7 +1242,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1257,7 +1259,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1261 "configure"
+#line 1263 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1275,7 +1277,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1279 "configure"
+#line 1281 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1296,7 +1298,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1300 "configure"
+#line 1302 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1307,7 +1309,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1331,12 +1333,12 @@
 fi
 
 echo $ac_n "checking for time_t""... $ac_c" 1>&6
-echo "configure:1335: checking for time_t" >&5
+echo "configure:1337: checking for time_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1340 "configure"
+#line 1342 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1374,12 +1376,12 @@
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1378: checking for $ac_func" >&5
+echo "configure:1380: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1383 "configure"
+#line 1385 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1402,7 +1404,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1428,12 +1430,12 @@
 
 
 echo $ac_n "checking for memmove""... $ac_c" 1>&6
-echo "configure:1432: checking for memmove" >&5
+echo "configure:1434: checking for memmove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1437 "configure"
+#line 1439 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char memmove(); below.  */
@@ -1456,7 +1458,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_memmove=yes"
 else
@@ -1475,12 +1477,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for bcopy""... $ac_c" 1>&6
-echo "configure:1479: checking for bcopy" >&5
+echo "configure:1481: checking for bcopy" >&5
 if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1484 "configure"
+#line 1486 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char bcopy(); below.  */
@@ -1503,7 +1505,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_bcopy=yes"
 else
@@ -1519,7 +1521,7 @@
   echo "$ac_t""yes" 1>&6
   
        echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
-echo "configure:1523: checking if bcopy does overlapping moves" >&5
+echo "configure:1525: checking if bcopy does overlapping moves" >&5
 if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1528,7 +1530,7 @@
   cf_cv_good_bcopy=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 1532 "configure"
+#line 1534 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1541,7 +1543,7 @@
 }
                
 EOF
-if { (eval echo configure:1545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   cf_cv_good_bcopy=yes
 else
@@ -1579,7 +1581,7 @@
 
 
 echo $ac_n "checking for full tgetent function""... $ac_c" 1>&6
-echo "configure:1583: checking for full tgetent function" >&5
+echo "configure:1585: checking for full tgetent function" >&5
 if eval "test \"`echo '$''{'cf_cv_lib_tgetent'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1594,7 +1596,7 @@
   echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
 else
   cat > conftest.$ac_ext <<EOF
-#line 1598 "configure"
+#line 1600 "configure"
 #include "confdefs.h"
 
 /* terminfo implementations ignore the buffer argument, making it useless for
@@ -1608,7 +1610,7 @@
        tgetent(buffer, "vt100");
        exit(buffer[0] == 0); }
 EOF
-if { (eval echo configure:1612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
         if test -n "$cf_termlib" ; then
@@ -1643,17 +1645,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1647: checking for $ac_hdr" >&5
+echo "configure:1649: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1652 "configure"
+#line 1654 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1686,7 +1688,7 @@
         # validate values for the TERM environment variable given to
         # child processes.
        echo $ac_n "checking for partial tgetent function""... $ac_c" 1>&6
-echo "configure:1690: checking for partial tgetent function" >&5
+echo "configure:1692: checking for partial tgetent function" >&5
 if eval "test \"`echo '$''{'cf_cv_lib_part_tgetent'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1695,14 +1697,14 @@
        for cf_termlib in $cf_TERMLIB ; do
                LIBS="$cf_save_LIBS -l$cf_termlib"
                cat > conftest.$ac_ext <<EOF
-#line 1699 "configure"
+#line 1701 "configure"
 #include "confdefs.h"
 
 int main() {
 tgetent(0, 0)
 ; return 0; }
 EOF
-if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
                         cf_cv_lib_part_tgetent="-l$cf_termlib"
@@ -1725,17 +1727,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1729: checking for $ac_hdr" >&5
+echo "configure:1731: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1734 "configure"
+#line 1736 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1775,13 +1777,13 @@
 ###    checks for structures
 
 echo $ac_n "checking for declaration of fd_set""... $ac_c" 1>&6
-echo "configure:1779: checking for declaration of fd_set" >&5
+echo "configure:1781: checking for declaration of fd_set" >&5
 if eval "test \"`echo '$''{'cf_cv_type_fd_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 1785 "configure"
+#line 1787 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1789,7 +1791,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_fd_set=sys/types.h
 else
@@ -1797,7 +1799,7 @@
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1801 "configure"
+#line 1803 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1806,7 +1808,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_fd_set=sys/select.h
 else
@@ -1830,14 +1832,14 @@
 
 
 echo $ac_n "checking if POSIX VDISABLE symbol should be used""... $ac_c" 1>&6
-echo "configure:1834: checking if POSIX VDISABLE symbol should be used" >&5
+echo "configure:1836: checking if POSIX VDISABLE symbol should be used" >&5
 if eval "test \"`echo '$''{'cf_cv_posix_vdisable'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 1841 "configure"
+#line 1843 "configure"
 #include "confdefs.h"
 
 #if HAVE_TERMIOS_H && HAVE_TCGETATTR
@@ -1855,7 +1857,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_posix_vdisable=yes
 else
@@ -1867,7 +1869,7 @@
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 1871 "configure"
+#line 1873 "configure"
 #include "confdefs.h"
 
 #if HAVE_TERMIOS_H && HAVE_TCGETATTR
@@ -1880,7 +1882,7 @@
 int main() { exit(_POSIX_VDISABLE == -1); }
 #endif
 EOF
-if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   cf_cv_posix_vdisable=yes
 else
@@ -1906,13 +1908,13 @@
 
 
 echo $ac_n "checking declaration of errno""... $ac_c" 1>&6
-echo "configure:1910: checking declaration of errno" >&5
+echo "configure:1912: checking declaration of errno" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 1916 "configure"
+#line 1918 "configure"
 #include "confdefs.h"
 
 #if HAVE_STDLIB_H
@@ -1925,7 +1927,7 @@
 long x = (long) errno
 ; return 0; }
 EOF
-if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'errno'=yes'
 else
@@ -1955,9 +1957,9 @@
 EOF
 
     echo $ac_n "checking existence of errno""... $ac_c" 1>&6
-echo "configure:1959: checking existence of errno" >&5
+echo "configure:1961: checking existence of errno" >&5
         cat > conftest.$ac_ext <<EOF
-#line 1961 "configure"
+#line 1963 "configure"
 #include "confdefs.h"
 
 #undef errno
@@ -1967,7 +1969,7 @@
 errno = 2
 ; return 0; }
 EOF
-if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'errno'=yes'
 else
@@ -1998,12 +2000,12 @@
 
 ###    checks for compiler characteristics
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2002: checking for working const" >&5
+echo "configure:2004: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2007 "configure"
+#line 2009 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2052,7 +2054,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2074,7 +2076,7 @@
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:2078: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:2080: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2098,7 +2100,7 @@
 do
        CFLAGS="$cf_save_CFLAGS $cf_arg"
        cat > conftest.$ac_ext <<EOF
-#line 2102 "configure"
+#line 2104 "configure"
 #include "confdefs.h"
 
 #ifndef CC_HAS_PROTOS
@@ -2114,7 +2116,7 @@
        struct s2 {int (*f) (double a);};
 ; return 0; }
 EOF
-if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2144,12 +2146,12 @@
 ###    checks for system services and user specified options
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2148: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2150: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2153 "configure"
+#line 2155 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2165,7 +2167,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2191,7 +2193,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:2195: checking for X" >&5
+echo "configure:2197: checking for X" >&5
 
 
 # Check whether --with-x or --without-x was given.
@@ -2254,12 +2256,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 2258 "configure"
+#line 2260 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2328,14 +2330,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2332 "configure"
+#line 2334 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2435,7 +2437,7 @@
        # FIXME: modify the library lookup in autoconf to
        # allow _s.a suffix ahead of .a
        echo $ac_n "checking for open in -lc_s""... $ac_c" 1>&6
-echo "configure:2439: checking for open in -lc_s" >&5
+echo "configure:2441: checking for open in -lc_s" >&5
 ac_lib_var=`echo c_s'_'open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2443,7 +2445,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2447 "configure"
+#line 2449 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2454,7 +2456,7 @@
 open()
 ; return 0; }
 EOF
-if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2471,7 +2473,7 @@
   echo "$ac_t""yes" 1>&6
   LIBS="-lc_s $LIBS"
        echo $ac_n "checking for gethostname in -lbsd""... $ac_c" 1>&6
-echo "configure:2475: checking for gethostname in -lbsd" >&5
+echo "configure:2477: checking for gethostname in -lbsd" >&5
 ac_lib_var=`echo bsd'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2479,7 +2481,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2483 "configure"
+#line 2485 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2490,7 +2492,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2507,7 +2509,7 @@
   echo "$ac_t""yes" 1>&6
   LIBS="-lbsd $LIBS"
        echo $ac_n "checking for gethostname in -lnsl_s""... $ac_c" 1>&6
-echo "configure:2511: checking for gethostname in -lnsl_s" >&5
+echo "configure:2513: checking for gethostname in -lnsl_s" >&5
 ac_lib_var=`echo nsl_s'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2515,7 +2517,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
+#line 2521 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2526,7 +2528,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2543,7 +2545,7 @@
   echo "$ac_t""yes" 1>&6
   LIBS="-lnsl_s $LIBS"
        echo $ac_n "checking for XOpenDisplay in -lX11_s""... $ac_c" 1>&6
-echo "configure:2547: checking for XOpenDisplay in -lX11_s" >&5
+echo "configure:2549: checking for XOpenDisplay in -lX11_s" >&5
 ac_lib_var=`echo X11_s'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2551,7 +2553,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lX11_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2555 "configure"
+#line 2557 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2562,7 +2564,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2579,7 +2581,7 @@
   echo "$ac_t""yes" 1>&6
   LIBS="-lX11_s $LIBS"
        echo $ac_n "checking for XtAppInitialize in -lXt_s""... $ac_c" 1>&6
-echo "configure:2583: checking for XtAppInitialize in -lXt_s" >&5
+echo "configure:2585: checking for XtAppInitialize in -lXt_s" >&5
 ac_lib_var=`echo Xt_s'_'XtAppInitialize | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2587,7 +2589,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXt_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2591 "configure"
+#line 2593 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2598,7 +2600,7 @@
 XtAppInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2639,7 +2641,7 @@
        ;;
 *)
        echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2643: checking for socket in -lsocket" >&5
+echo "configure:2645: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2647,7 +2649,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
+#line 2653 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2658,7 +2660,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2686,7 +2688,7 @@
 fi
 
        echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:2690: checking for gethostname in -lnsl" >&5
+echo "configure:2692: checking for gethostname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2694,7 +2696,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2698 "configure"
+#line 2700 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2705,7 +2707,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2756,17 +2758,17 @@
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:2760: checking whether -R must be followed by a space" >&5
+echo "configure:2762: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 2763 "configure"
+#line 2765 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2782,14 +2784,14 @@
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2786 "configure"
+#line 2788 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2821,7 +2823,7 @@
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:2825: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2827: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2829,7 +2831,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2833 "configure"
+#line 2835 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2840,7 +2842,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2862,7 +2864,7 @@
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:2866: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2868: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2870,7 +2872,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
+#line 2876 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2881,7 +2883,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2910,12 +2912,12 @@
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2914: checking for gethostbyname" >&5
+echo "configure:2916: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2919 "configure"
+#line 2921 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2938,7 +2940,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2959,7 +2961,7 @@
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2963: checking for gethostbyname in -lnsl" >&5
+echo "configure:2965: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2967,7 +2969,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2971 "configure"
+#line 2973 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2978,7 +2980,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3008,12 +3010,12 @@
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3012: checking for connect" >&5
+echo "configure:3014: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3017 "configure"
+#line 3019 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3036,7 +3038,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -3057,7 +3059,7 @@
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3061: checking for connect in -lsocket" >&5
+echo "configure:3063: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3065,7 +3067,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
+#line 3071 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3076,7 +3078,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3100,12 +3102,12 @@
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:3104: checking for remove" >&5
+echo "configure:3106: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3109 "configure"
+#line 3111 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3128,7 +3130,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -3149,7 +3151,7 @@
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3153: checking for remove in -lposix" >&5
+echo "configure:3155: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3157,7 +3159,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3161 "configure"
+#line 3163 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3168,7 +3170,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3192,12 +3194,12 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3196: checking for shmat" >&5
+echo "configure:3198: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3201 "configure"
+#line 3203 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3220,7 +3222,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -3241,7 +3243,7 @@
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3245: checking for shmat in -lipc" >&5
+echo "configure:3247: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3249,7 +3251,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3253 "configure"
+#line 3255 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3260,7 +3262,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3293,7 +3295,7 @@
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:3297: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3299: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3301,7 +3303,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3305 "configure"
+#line 3307 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3312,7 +3314,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3339,7 +3341,7 @@
        LDFLAGS="$LDFLAGS $X_LIBS"
        CFLAGS="$CFLAGS $X_CFLAGS"
        echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:3343: checking for XOpenDisplay in -lX11" >&5
+echo "configure:3345: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3347,7 +3349,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3351 "configure"
+#line 3353 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3358,7 +3360,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3379,7 +3381,7 @@
 fi
 
        echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
-echo "configure:3383: checking for XtAppInitialize in -lXt" >&5
+echo "configure:3385: checking for XtAppInitialize in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3387,7 +3389,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3391 "configure"
+#line 3393 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3398,7 +3400,7 @@
 XtAppInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3454,17 +3456,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3458: checking for $ac_hdr" >&5
+echo "configure:3460: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3463 "configure"
+#line 3465 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3514,17 +3516,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3518: checking for $ac_hdr" >&5
+echo "configure:3520: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3523 "configure"
+#line 3525 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3552,7 +3554,7 @@
 
 
 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
-echo "configure:3556: checking for XextCreateExtension in -lXext" >&5
+echo "configure:3558: checking for XextCreateExtension in -lXext" >&5
 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3560,7 +3562,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXext  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3564 "configure"
+#line 3566 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3571,7 +3573,7 @@
 XextCreateExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3593,7 +3595,7 @@
 
 
 echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6
-echo "configure:3597: checking for XmuClientWindow in -lXmu" >&5
+echo "configure:3599: checking for XmuClientWindow in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3601,7 +3603,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXmu  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3605 "configure"
+#line 3607 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3612,7 +3614,7 @@
 XmuClientWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3639,7 +3641,7 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for XmuClientWindow in -lXmu_s""... $ac_c" 1>&6
-echo "configure:3643: checking for XmuClientWindow in -lXmu_s" >&5
+echo "configure:3645: checking for XmuClientWindow in -lXmu_s" >&5
 ac_lib_var=`echo Xmu_s'_'XmuClientWindow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3647,7 +3649,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXmu_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3651 "configure"
+#line 3653 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3658,7 +3660,7 @@
 XmuClientWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3689,7 +3691,7 @@
 
 
 echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -l$cf_x_athena""... $ac_c" 1>&6
-echo "configure:3693: checking for XawSimpleMenuAddGlobalActions in -l$cf_x_athena" >&5
+echo "configure:3695: checking for XawSimpleMenuAddGlobalActions in -l$cf_x_athena" >&5
 ac_lib_var=`echo $cf_x_athena'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3697,7 +3699,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l$cf_x_athena  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3701 "configure"
+#line 3703 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3708,7 +3710,7 @@
 XawSimpleMenuAddGlobalActions()
 ; return 0; }
 EOF
-if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3728,7 +3730,7 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -l${cf_x_athena}_s""... $ac_c" 1>&6
-echo "configure:3732: checking for XawSimpleMenuAddGlobalActions in -l${cf_x_athena}_s" >&5
+echo "configure:3734: checking for XawSimpleMenuAddGlobalActions in -l${cf_x_athena}_s" >&5
 ac_lib_var=`echo ${cf_x_athena}_s'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3736,7 +3738,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l${cf_x_athena}_s $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3740 "configure"
+#line 3742 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3747,7 +3749,7 @@
 XawSimpleMenuAddGlobalActions()
 ; return 0; }
 EOF
-if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3787,7 +3789,7 @@
 # Extract the first word of "xterm", so it can be a program name with args.
 set dummy xterm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3791: checking for $ac_word" >&5
+echo "configure:3793: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XTERM_PATH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3821,7 +3823,7 @@
 
 XTERM_MODE=755
 echo $ac_n "checking for presumed installation-mode""... $ac_c" 1>&6
-echo "configure:3825: checking for presumed installation-mode" >&5
+echo "configure:3827: checking for presumed installation-mode" >&5
 if test -f "$XTERM_PATH" ; then
        ls -l $XTERM_PATH >conftest.out
        read cf_mode cf_rest <conftest.out
@@ -3840,12 +3842,12 @@
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3844: checking for $ac_func" >&5
+echo "configure:3846: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3849 "configure"
+#line 3851 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3868,7 +3870,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3894,7 +3896,7 @@
 
 
 echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6
-echo "configure:3898: checking if we should use imake to help" >&5
+echo "configure:3900: checking if we should use imake to help" >&5
 
 # Check whether --enable-imake or --disable-imake was given.
 if test "${enable_imake+set}" = set; then
@@ -3919,7 +3921,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3923: checking for $ac_word" >&5
+echo "configure:3925: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4058,7 +4060,7 @@
 
 
 echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6
-echo "configure:4062: checking for default terminal-id" >&5
+echo "configure:4064: checking for default terminal-id" >&5
 
 # Check whether --with-terminal-id or --without-terminal-id was given.
 if test "${with_terminal_id+set}" = set; then
@@ -4079,7 +4081,7 @@
 
 
 echo $ac_n "checking for default terminal-type""... $ac_c" 1>&6
-echo "configure:4083: checking for default terminal-type" >&5
+echo "configure:4085: checking for default terminal-type" >&5
 
 # Check whether --with-terminal-type or --without-terminal-type was given.
 if test "${with_terminal_type+set}" = set; then
@@ -4096,7 +4098,7 @@
 
 
 echo $ac_n "checking for private terminfo-directory""... $ac_c" 1>&6
-echo "configure:4100: checking for private terminfo-directory" >&5
+echo "configure:4102: checking for private terminfo-directory" >&5
 
 # Check whether --with-own-terminfo or --without-own-terminfo was given.
 if test "${with_own_terminfo+set}" = set; then
@@ -4127,7 +4129,7 @@
 
 ###    checks for optional features
 echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6
-echo "configure:4131: checking if you want active-icons" >&5
+echo "configure:4133: checking if you want active-icons" >&5
 
 # Check whether --enable-active-icon or --disable-active-icon was given.
 if test "${enable_active_icon+set}" = set; then
@@ -4153,7 +4155,7 @@
 fi
 
 echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6
-echo "configure:4157: checking if you want ANSI color" >&5
+echo "configure:4159: checking if you want ANSI color" >&5
 
 # Check whether --enable-ansi-color or --disable-ansi-color was given.
 if test "${enable_ansi_color+set}" = set; then
@@ -4177,7 +4179,7 @@
 
 
 echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6
-echo "configure:4181: checking if you want 16 colors like aixterm" >&5
+echo "configure:4183: checking if you want 16 colors like aixterm" >&5
 
 # Check whether --enable-16-color or --disable-16-color was given.
 if test "${enable_16_color+set}" = set; then
@@ -4201,7 +4203,7 @@
 
 
 echo $ac_n "checking if you want bold colors mapped like IBM PC""... $ac_c" 1>&6
-echo "configure:4205: checking if you want bold colors mapped like IBM PC" >&5
+echo "configure:4207: checking if you want bold colors mapped like IBM PC" >&5
 
 # Check whether --enable-bold-color or --disable-bold-color was given.
 if test "${enable_bold_color+set}" = set; then
@@ -4225,7 +4227,7 @@
 
 
 echo $ac_n "checking if you want color-mode enabled by default""... $ac_c" 1>&6
-echo "configure:4229: checking if you want color-mode enabled by default" >&5
+echo "configure:4231: checking if you want color-mode enabled by default" >&5
 
 # Check whether --enable-color-mode or --disable-color-mode was given.
 if test "${enable_color_mode+set}" = set; then
@@ -4249,7 +4251,7 @@
 
 
 echo $ac_n "checking if you want support for color highlighting""... $ac_c" 1>&6
-echo "configure:4253: checking if you want support for color highlighting" >&5
+echo "configure:4255: checking if you want support for color highlighting" >&5
 
 # Check whether --enable-highlighting or --disable-highlighting was given.
 if test "${enable_highlighting+set}" = set; then
@@ -4273,7 +4275,7 @@
 
 
 echo $ac_n "checking if you want support for doublesize characters""... $ac_c" 1>&6
-echo "configure:4277: checking if you want support for doublesize characters" >&5
+echo "configure:4279: checking if you want support for doublesize characters" >&5
 
 # Check whether --enable-doublechars or --disable-doublechars was given.
 if test "${enable_doublechars+set}" = set; then
@@ -4297,7 +4299,7 @@
 
 
 echo $ac_n "checking if you want fallback-support for box characters""... $ac_c" 1>&6
-echo "configure:4301: checking if you want fallback-support for box characters" >&5
+echo "configure:4303: checking if you want fallback-support for box characters" >&5
 
 # Check whether --enable-boxchars or --disable-boxchars was given.
 if test "${enable_boxchars+set}" = set; then
@@ -4321,7 +4323,7 @@
 
 
 echo $ac_n "checking if you want support for HP-style function keys""... $ac_c" 1>&6
-echo "configure:4325: checking if you want support for HP-style function keys" >&5
+echo "configure:4327: checking if you want support for HP-style function keys" >&5
 
 # Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
 if test "${enable_hp_fkeys+set}" = set; then
@@ -4346,60 +4348,86 @@
 
 fi
 
-echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
-echo "configure:4351: checking if you want support for input-method" >&5
+echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
+echo "configure:4353: checking if you want support for internationalization" >&5
 
-# Check whether --enable-input-method or --disable-input-method was given.
-if test "${enable_input_method+set}" = set; then
-  enableval="$enable_input_method"
+# Check whether --enable-i18n or --disable-i18n was given.
+if test "${enable_i18n+set}" = set; then
+  enableval="$enable_i18n"
   test "$enableval" != no && enableval=yes
   if test "$enableval" != "yes" ; then
-    enable_ximp=no 
+    enable_i18n=no 
   else
-    enable_ximp=yes
+    enable_i18n=yes
   fi
 else
   enableval=yes 
-  enable_ximp=yes
+  enable_i18n=yes
   
 fi
 
-echo "$ac_t""$enable_ximp" 1>&6
-if test $enable_ximp = no ; then
+echo "$ac_t""$enable_i18n" 1>&6
+if test $enable_i18n = no ; then
        cat >> confdefs.h <<\EOF
-#define OPT_INPUT_METHOD 0
+#define OPT_I18N_SUPPORT 0
 EOF
 
 fi
 
-echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
-echo "configure:4377: checking if you want support for internationalization" >&5
+echo $ac_n "checking if you want support for initial-erase setup""... $ac_c" 1>&6
+echo "configure:4379: checking if you want support for initial-erase setup" >&5
 
-# Check whether --enable-i18n or --disable-i18n was given.
-if test "${enable_i18n+set}" = set; then
-  enableval="$enable_i18n"
+# Check whether --enable-initial-erase or --disable-initial-erase was given.
+if test "${enable_initial_erase+set}" = set; then
+  enableval="$enable_initial_erase"
   test "$enableval" != no && enableval=yes
   if test "$enableval" != "yes" ; then
-    enable_i18n=no 
+    enable_ie=no 
   else
-    enable_i18n=yes
+    enable_ie=yes
   fi
 else
   enableval=yes 
-  enable_i18n=yes
+  enable_ie=yes
   
 fi
 
-echo "$ac_t""$enable_i18n" 1>&6
-if test $enable_i18n = no ; then
+echo "$ac_t""$enable_ie" 1>&6
+if test $enable_ie = no ; then
        cat >> confdefs.h <<\EOF
-#define OPT_I18N_SUPPORT 0
+#define OPT_INITIAL_ERASE 0
+EOF
+
+fi
+
+echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
+echo "configure:4405: checking if you want support for input-method" >&5
+
+# Check whether --enable-input-method or --disable-input-method was given.
+if test "${enable_input_method+set}" = set; then
+  enableval="$enable_input_method"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    enable_ximp=no 
+  else
+    enable_ximp=yes
+  fi
+else
+  enableval=yes 
+  enable_ximp=yes
+  
+fi
+
+echo "$ac_t""$enable_ximp" 1>&6
+if test $enable_ximp = no ; then
+       cat >> confdefs.h <<\EOF
+#define OPT_INPUT_METHOD 0
 EOF
 
 fi
 
 echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6
-echo "configure:4403: checking if you want support for logging" >&5
+echo "configure:4431: checking if you want support for logging" >&5
 
 # Check whether --enable-logging or --disable-logging was given.
 if test "${enable_logging+set}" = set; then
@@ -4423,7 +4451,7 @@
 EOF
 
        echo $ac_n "checking if you want to allow logging via a pipe""... $ac_c" 1>&6
-echo "configure:4427: checking if you want to allow logging via a pipe" >&5
+echo "configure:4455: checking if you want to allow logging via a pipe" >&5
        
 # Check whether --enable-logfile-exec or --disable-logfile-exec was given.
 if test "${enable_logfile_exec+set}" = set; then
@@ -4450,7 +4478,7 @@
 fi
 
 echo $ac_n "checking if you want support for iconify/maximize translations""... $ac_c" 1>&6
-echo "configure:4454: checking if you want support for iconify/maximize translations" >&5
+echo "configure:4482: checking if you want support for iconify/maximize translations" >&5
 
 # Check whether --enable-maximize or --disable-maximize was given.
 if test "${enable_maximize+set}" = set; then
@@ -4474,7 +4502,7 @@
 
 
 echo $ac_n "checking if you want NumLock to override keyboard tables""... $ac_c" 1>&6
-echo "configure:4478: checking if you want NumLock to override keyboard tables" >&5
+echo "configure:4506: checking if you want NumLock to override keyboard tables" >&5
 
 # Check whether --enable-num-lock or --disable-num-lock was given.
 if test "${enable_num_lock+set}" = set; then
@@ -4498,7 +4526,7 @@
 
 
 echo $ac_n "checking if you want support for right-scrollbar""... $ac_c" 1>&6
-echo "configure:4502: checking if you want support for right-scrollbar" >&5
+echo "configure:4530: checking if you want support for right-scrollbar" >&5
 
 # Check whether --enable-rightbar or --disable-rightbar was given.
 if test "${enable_rightbar+set}" = set; then
@@ -4524,7 +4552,7 @@
 fi
 
 echo $ac_n "checking if you want check for redundant name-change""... $ac_c" 1>&6
-echo "configure:4528: checking if you want check for redundant name-change" >&5
+echo "configure:4556: checking if you want check for redundant name-change" >&5
 
 # Check whether --enable-samename or --disable-samename was given.
 if test "${enable_samename+set}" = set; then
@@ -4548,7 +4576,7 @@
 
 
 echo $ac_n "checking if you want support for tek4014""... $ac_c" 1>&6
-echo "configure:4552: checking if you want support for tek4014" >&5
+echo "configure:4580: checking if you want support for tek4014" >&5
 
 # Check whether --enable-tek4014 or --disable-tek4014 was given.
 if test "${enable_tek4014+set}" = set; then
@@ -4578,7 +4606,7 @@
 fi
 
 echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6
-echo "configure:4582: checking if you want VT52 emulation" >&5
+echo "configure:4610: checking if you want VT52 emulation" >&5
 
 # Check whether --enable-vt52 or --disable-vt52 was given.
 if test "${enable_vt52+set}" = set; then
@@ -4601,8 +4629,32 @@
 EOF
 
 
+echo $ac_n "checking if you want wide-character support""... $ac_c" 1>&6
+echo "configure:4634: checking if you want wide-character support" >&5
+
+# Check whether --enable-wide-chars or --disable-wide-chars was given.
+if test "${enable_wide_chars+set}" = set; then
+  enableval="$enable_wide_chars"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    enable_wchar=yes 
+  else
+    enable_wchar=no
+  fi
+else
+  enableval=no 
+  enable_wchar=no
+  
+fi
+
+echo "$ac_t""$enable_wchar" 1>&6
+test $enable_wchar = yes && cat >> confdefs.h <<\EOF
+#define OPT_WIDE_CHARS 1
+EOF
+
+
 echo $ac_n "checking if you want -ziconbeep option""... $ac_c" 1>&6
-echo "configure:4606: checking if you want -ziconbeep option" >&5
+echo "configure:4658: checking if you want -ziconbeep option" >&5
 
 # Check whether --enable-ziconbeep or --disable-ziconbeep was given.
 if test "${enable_ziconbeep+set}" = set; then
@@ -4627,7 +4679,7 @@
 
 # development/testing aids
 echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6
-echo "configure:4631: checking if you want debugging traces" >&5
+echo "configure:4683: checking if you want debugging traces" >&5
 
 # Check whether --enable-trace or --disable-trace was given.
 if test "${enable_trace+set}" = set; then
@@ -4656,7 +4708,7 @@
 
 
 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:4660: checking if you want to see long compiling messages" >&5
+echo "configure:4712: checking if you want to see long compiling messages" >&5
 
 # Check whether --enable-echo or --disable-echo was given.
 if test "${enable_echo+set}" = set; then
@@ -4696,7 +4748,7 @@
 
 
 echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6
-echo "configure:4700: checking if you want magic cookie emulation" >&5
+echo "configure:4752: checking if you want magic cookie emulation" >&5
 
 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
 if test "${enable_xmc_glitch+set}" = set; then
@@ -4725,7 +4777,7 @@
 
 if test -n "$GCC" ; then
 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:4729: checking if you want to turn on gcc warnings" >&5
+echo "configure:4781: checking if you want to turn on gcc warnings" >&5
 
 # Check whether --enable-warnings or --disable-warnings was given.
 if test "${enable_warnings+set}" = set; then
@@ -4765,9 +4817,9 @@
 if test -n "$GCC"
 then
        echo "checking for gcc __attribute__ directives" 1>&6
-echo "configure:4769: checking for gcc __attribute__ directives" >&5
+echo "configure:4821: checking for gcc __attribute__ directives" >&5
        cat > conftest.$ac_ext <<EOF
-#line 4771 "configure"
+#line 4823 "configure"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -4805,7 +4857,7 @@
 EOF
                        ;;
                esac
-               if { (eval echo configure:4809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+               if { (eval echo configure:4861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                        test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
                        cat conftest.h >>confdefs.h
 #              else
@@ -4822,11 +4874,11 @@
 if test -n "$GCC"
 then
                cat > conftest.$ac_ext <<EOF
-#line 4826 "configure"
+#line 4878 "configure"
 int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
 EOF
                echo "checking for gcc warning options" 1>&6
-echo "configure:4830: checking for gcc warning options" >&5
+echo "configure:4882: checking for gcc warning options" >&5
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-W -Wall"
        cf_warn_CONST=""
@@ -4844,7 +4896,7 @@
                Wstrict-prototypes $cf_warn_CONST
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+               if { (eval echo configure:4900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                        test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                        test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
Index: configure.in
--- xterm-94+/configure.in      Sun Mar 14 14:59:36 1999
+++ xterm-95/configure.in       Fri Apr  2 05:47:30 1999
@@ -236,16 +236,6 @@
        AC_DEFINE(OPT_HP_FUNC_KEYS,1)
 fi
 
-AC_MSG_CHECKING(if you want support for input-method)
-CF_ARG_DISABLE(input-method,
-       [  --disable-input-method  disable input-method],
-       [enable_ximp=no],
-       [enable_ximp=yes])
-AC_MSG_RESULT($enable_ximp)
-if test $enable_ximp = no ; then
-       AC_DEFINE(OPT_INPUT_METHOD,0)
-fi
-
 AC_MSG_CHECKING(if you want support for internationalization)
 CF_ARG_DISABLE(i18n,
        [  --disable-i18n          disable internationalization],
@@ -256,6 +246,26 @@
        AC_DEFINE(OPT_I18N_SUPPORT,0)
 fi
 
+AC_MSG_CHECKING(if you want support for initial-erase setup)
+CF_ARG_DISABLE(initial-erase,
+       [  --disable-initial-erase disable setup for stty erase],
+       [enable_ie=no],
+       [enable_ie=yes])
+AC_MSG_RESULT($enable_ie)
+if test $enable_ie = no ; then
+       AC_DEFINE(OPT_INITIAL_ERASE,0)
+fi
+
+AC_MSG_CHECKING(if you want support for input-method)
+CF_ARG_DISABLE(input-method,
+       [  --disable-input-method  disable input-method],
+       [enable_ximp=no],
+       [enable_ximp=yes])
+AC_MSG_RESULT($enable_ximp)
+if test $enable_ximp = no ; then
+       AC_DEFINE(OPT_INPUT_METHOD,0)
+fi
+
 AC_MSG_CHECKING(if you want support for logging)
 CF_ARG_ENABLE(logging,
        [  --enable-logging        enable logging],
@@ -330,6 +340,14 @@
        [enable_vt52=yes])
 AC_MSG_RESULT($enable_vt52)
 test $enable_vt52 = no && AC_DEFINE(OPT_VT52_MODE,0)
+
+AC_MSG_CHECKING(if you want wide-character support)
+CF_ARG_ENABLE(wide-chars,
+       [  --enable-wide-chars     enable wide-character support],
+       [enable_wchar=yes],
+       [enable_wchar=no])
+AC_MSG_RESULT($enable_wchar)
+test $enable_wchar = yes && AC_DEFINE(OPT_WIDE_CHARS,1)
 
 AC_MSG_CHECKING(if you want -ziconbeep option)
 CF_ARG_DISABLE(ziconbeep,
Index: ctlseqs.ms
--- xterm-94+/ctlseqs.ms        Sat Mar 27 16:50:45 1999
+++ xterm-95/ctlseqs.ms Sun Apr  4 15:28:35 1999
@@ -149,6 +149,7 @@
 .[] $ $
 .[] ! !
 .[] # #
+.[] % %
 .[] (( (
 .[] ) )
 .[] * *
@@ -237,9 +238,12 @@
 .ds Cb \fIC\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
 .ds Cx \fIC\v'.3m'\h'-.2m'\s-2x\s0\v'-.3m'\fP
 .ds Cy \fIC\v'.3m'\h'-.2m'\s-2y\s0\v'-.3m'\fP
-.ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP
+.ds Pc \fIP\v'.3m'\h'-.2m'\s-2c\s0\v'-.3m'\fP
 .ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP
+.ds Pp \fIP\v'.3m'\h'-.2m'\s-2p\s0\v'-.3m'\fP
+.ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP
 .ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP
+.ds Pv \fIP\v'.3m'\h'-.2m'\s-2v\s0\v'-.3m'\fP
 .ds Ix \fIx\fP
 .ds Iy \fIy\fP
 .ds Iw \fIw\fP
@@ -264,7 +268,7 @@
 .AU
 Thomas Dickey
 .AI
-XFree86 Project (1996)
+XFree86 Project (1996-1999)
 .AU
 .
 .am BT                  \" add page numbers after first page
@@ -420,6 +424,12 @@
 .IP \\*(Es\\*#\\*8
 DEC Screen Alignment Test (DECALN)
 .
+.IP \\*(Es\\*%\\*@
+Select default character set, ISO 8859-1 (ISO 2022)
+.
+.IP \\*(Es\\*%\\*G
+Select UTF-8 character set (ISO 2022)
+.
 .IP \\*(Es\\*(((\\*(Cc
 Designate G0 Character Set (ISO 2022)
 .IP \\*(Es\\*)\\*(Cc
@@ -620,9 +630,37 @@
 Repeat the preceding graphic character \*(Ps times (REP)
 .
 .IP \\*(Cs\\*(Ps\\*s\\*c
-Send Device Attributes (DA)
-  \*(Ps = \*0 or omitted \(-> request attributes from terminal
-  \(-> \*(Cs\*?\*1\*;\*2\*c (``I am a VT100 with Advanced Video Option.'')
+Send Device Attributes (Primary DA)
+  \*(Ps = \*0, 1 or omitted \(-> request attributes from terminal.
+The response depends on the \fBdecTerminalId\fP resource setting.
+  \(-> \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
+  \(-> \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
+  \(-> \*(Cs\*?\*6\*c (``VT102'')
+  \(-> \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
+.br
+The VT100-style response parameters do not mean anything by themselves.
+VT220 parameters do, telling the host what features the terminal supports:
+  \(-> \*1 132-columns
+  \(-> \*2 Printer
+  \(-> \*6 Selective erase
+  \(-> \*8 User-defined keys
+  \(-> \*9 National replacement character sets
+  \(-> \*1\*5 Technical characters
+.
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*c
+Send Device Attributes (Secondary DA)
+  \*(Ps = \*0, 1 or omitted \(-> request the terminal's identification code.
+The response depends on the \fBdecTerminalId\fP resource setting.
+It should apply only to VT220 and up, but \fIxterm\fP extends this to VT100.
+  \(-> \*(Cs\*(Pp\*s\*;\*(Pv\*s\*;\*(Pc\*s\*c
+.br
+where \*(Pc denotes the terminal type
+  \(-> \*0 (``VT100'')
+  \(-> \*1 (``VT220'')
+.br
+and \*(Pv is the firmware version (for \fIxterm\fP, this is the XFree86
+patch number, starting with 95), and \*(Pc indicates the ROM cartridge
+registration number (always zero).
 .
 .IP \\*(Cs\\*(Pm\\*s\\*d
 Line Position Absolute  [row] (default = [1,column]) (VPA)
Index: data.c
--- xterm-94+/data.c    Sun Dec 20 22:50:38 1998
+++ xterm-95/data.c     Sat Apr  3 16:19:04 1999
@@ -36,49 +36,24 @@
 #include <setjmp.h>
 
 #if OPT_TEK4014
-TekWidget tekWidget;
-TekLink *TekRefresh;
-
-XPoint T_boxlarge[NBOX] = {
-       {0, 0},
-       {8, 0},
-       {0, 14},
-       {-8, 0},
-       {0, -14},
-};
-XPoint T_box2[NBOX] = {
-       {0, 0},
-       {7, 0},
-       {0, 12},
-       {-7, 0},
-       {0, -12},
-};
-XPoint T_box3[NBOX] = {
-       {0, 0},
-       {5, 0},
-       {0, 12},
-       {-5, 0},
-       {0, -12},
-};
-XPoint T_boxsmall[NBOX] = {
-       {0, 0},
-       {5, 0},
-       {0, 9},
-       {-5, 0},
-       {0, -9},
-};
-jmp_buf Tekend;
-int Tbcnt = 0;
-Char *Tbuffer;
 Char *Tbptr;
+Char *Tbuffer;
 Char *Tpushb;
 Char *Tpushback;
+TekLink *TekRefresh;
+TekWidget tekWidget;
+int TEKgcFontMask = GCFont;
+int T_lastx = -1;
+int T_lasty = -1;
+int Tbcnt = 0;
 int Ttoggled = 0;
+jmp_buf Tekend;
 #endif
 
 int bcnt = 0;
 Char VTbuffer[BUF_SIZE];
 Char *bptr = VTbuffer;
+
 jmp_buf VTend;
 
 #ifdef DEBUG
@@ -119,13 +94,7 @@
 #ifdef ALLOWLOGGING
 char log_def_name[] = "XtermLog.XXXXXX";
 #endif
-int T_lastx = -1;
-int T_lasty = -1;
 
 int waitingForTrackInfo = 0;
 EventMode eventMode = NORMAL;
 
-GC visualBellGC;
-
-int VTgcFontMask = GCFont;
-int TEKgcFontMask = GCFont;
Index: data.h
--- xterm-94+/data.h    Sun Mar 14 14:59:36 1999
+++ xterm-95/data.h     Sat Apr  3 16:19:57 1999
@@ -45,17 +45,13 @@
 extern XtAppContext app_con;
 
 #if OPT_TEK4014
-extern TekLink *TekRefresh;
-extern TekWidget tekWidget;
-
-extern XPoint T_box2[];
-extern XPoint T_box3[];
-extern XPoint T_boxlarge[];
-extern XPoint T_boxsmall[];
 extern Char *Tbptr;
 extern Char *Tbuffer;
 extern Char *Tpushb;
 extern Char *Tpushback;
+extern TekLink *TekRefresh;
+extern TekWidget tekWidget;
+extern int TEKgcFontMask;
 extern int T_lastx;
 extern int T_lasty;
 extern int Tbcnt;
@@ -70,27 +66,32 @@
 extern char *ttydev;
 extern char *xterm_name;
 extern Boolean sunFunctionKeys;
+
 #if OPT_HP_FUNC_KEYS
 extern Boolean hpFunctionKeys;
 #endif
+
 #if OPT_ZICONBEEP 
 extern int zIconBeep; 
 extern Boolean zIconBeep_flagged; 
 #endif 
+
 #if OPT_SAME_NAME 
 extern Boolean sameName; 
 #endif 
+
 #if OPT_SUNPC_KBD
 extern Boolean sunKeyboard;
 #endif
+
 extern Char VTbuffer[];
 extern int am_slave;
 extern int bcnt;
+extern int max_plus1;
+
 #ifdef DEBUG
 extern int debug;
 #endif /* DEBUG */
-extern int max_plus1;
-extern int switchfb[];
 
 extern fd_set Select_mask;
 extern fd_set X_mask;
@@ -99,11 +100,6 @@
 extern int waitingForTrackInfo;
 
 extern EventMode eventMode;
-
-extern GC visualBellGC;
-
-extern int VTgcFontMask;
-extern int TEKgcFontMask;
 
 extern XtermWidget term;
 
Index: fontutils.c
--- xterm-94+/fontutils.c       Sun Mar 14 14:59:36 1999
+++ xterm-95/fontutils.c        Sat Apr  3 08:19:23 1999
@@ -1036,6 +1036,10 @@
 {
     TScreen *screen = &term->screen;
 
+    TRACE(("SetVTFont(i=%d, name1=%s, name2=%s)\n", i,
+       name1 ? name1 : "<null>",
+       name2 ? name2 : "<null>"))
+
     if (i >= 0 && i < NMENUFONTS) {
        if (i == fontMenu_fontsel) {    /* go get the selection */
            FindFontSelection (name1, False);  /* name1 = atom, name2 is ignored */
Index: input.c
--- xterm-94+/input.c   Mon Mar 29 13:36:18 1999
+++ xterm-95/input.c    Tue Mar 30 19:12:00 1999
@@ -453,6 +453,9 @@
 
                dec_code = decfuncvalue(keysym);
                if ((event->state & ShiftMask)
+#if OPT_SUNPC_KBD
+                && sunKeyboard
+#endif
                 && ((string = udk_lookup(dec_code, &nbytes)) != 0)) {
                        while (nbytes-- > 0)
                                unparseputc(*string++, pty);
Index: main.c
--- xterm-94+/main.c    Mon Mar 29 13:36:18 1999
+++ xterm-95/main.c     Sat Apr  3 16:30:31 1999
@@ -69,6 +69,8 @@
 
 /* main.c */
 
+#define _GNU_SOURCE 1  /* needed to prototype getpt() with glibc 2.1 */
+
 #include <version.h>
 #include <xterm.h>
 
@@ -154,6 +156,11 @@
 #define USE_HANDSHAKE
 #endif
 
+#if defined USE_USG_PTYS && (defined (__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))
+#define USE_GETPT
+#include <stdlib.h>
+#endif
+
 #if defined(SYSV) && !defined(SVR4) && !defined(ISC22) && !defined(ISC30)
 /* older SYSV systems cannot ignore SIGHUP.
    Shell hangs, or you get extra shells, or something like that */
@@ -511,8 +518,6 @@
 extern char *ptsname();
 #endif
 
-int switchfb[] = {0, 2, 1, 3};
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -523,6 +528,9 @@
        }
 #endif
 
+#undef  CTRL
+#define        CTRL(c) ((c) & 0x1f)
+
 static SIGNAL_T reapchild (int n);
 static char *base_name (char *name);
 static int pty_search (int *pty);
@@ -588,15 +596,17 @@
 #endif /* sony */
 #endif /* USE_SYSV_TERMIO */
 
+#define VAL_INITIAL_ERASE 127
+
 /* allow use of system default characters if defined and reasonable */
 #ifndef CEOF
-#define CEOF ('D'&037)
+#define CEOF     CTRL('D')
 #endif
 #ifndef CSUSP
-#define CSUSP ('Z'&037)
+#define CSUSP    CTRL('Z')
 #endif
 #ifndef CQUIT
-#define CQUIT ('\\'&037)
+#define CQUIT    CTRL('\\')
 #endif
 #ifndef CEOL
 #define CEOL 0
@@ -608,22 +618,22 @@
 #define CSWTCH 0
 #endif
 #ifndef CLNEXT
-#define CLNEXT ('V'&037)
+#define CLNEXT   CTRL('V')
 #endif
 #ifndef CWERASE
-#define CWERASE ('W'&037)
+#define CWERASE  CTRL('W')
 #endif
 #ifndef CRPRNT
-#define CRPRNT ('R'&037)
+#define CRPRNT   CTRL('R')
 #endif
 #ifndef CFLUSH
-#define CFLUSH ('O'&037)
+#define CFLUSH   CTRL('O')
 #endif
 #ifndef CSTOP
-#define CSTOP ('S'&037)
+#define CSTOP    CTRL('S')
 #endif
 #ifndef CSTART
-#define CSTART ('Q'&037)
+#define CSTART   CTRL('Q')
 #endif
 
 /*
@@ -752,6 +762,9 @@
 #if OPT_HP_FUNC_KEYS
     Boolean hpFunctionKeys;
 #endif
+#if OPT_INITIAL_ERASE
+    Boolean ptyInitialErase;   /* if true, use pty's sense of erase char */
+#endif
     Boolean wait_for_map;
     Boolean useInsertMode;
 #if OPT_ZICONBEEP
@@ -795,6 +808,10 @@
     {"hpFunctionKeys", "HpFunctionKeys", XtRBoolean, sizeof (Boolean),
        offset(hpFunctionKeys), XtRString, "false"},
 #endif
+#if OPT_INITIAL_ERASE
+    {"ptyInitialErase", "PtyInitialErase", XtRBoolean, sizeof (Boolean),
+       offset(ptyInitialErase), XtRString, "false"},
+#endif
     {"waitForMap", "WaitForMap", XtRBoolean, sizeof (Boolean),
        offset(wait_for_map), XtRString, "false"},
     {"useInsertMode", "UseInsertMode", XtRBoolean, sizeof (Boolean),
@@ -866,6 +883,10 @@
 {"-hf",                "*hpKeyboard",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+hf",                "*hpKeyboard",  XrmoptionNoArg,         (caddr_t) "off"},
 #endif
+#if OPT_INITIAL_ERASE
+{"-ie",                "*ptyInitialErase", XrmoptionNoArg,     (caddr_t) "on"},
+{"+ie",                "*ptyInitialErase", XrmoptionNoArg,     (caddr_t) "off"},
+#endif
 {"-j",         "*jumpScroll",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+j",         "*jumpScroll",  XrmoptionNoArg,         (caddr_t) "off"},
 /* parse logging options anyway for compatibility */
@@ -917,6 +938,10 @@
 {"+im",                "*useInsertMode", XrmoptionNoArg,       (caddr_t) "off"},
 {"-vb",                "*visualBell",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+vb",                "*visualBell",  XrmoptionNoArg,         (caddr_t) "off"},
+#if OPT_WIDE_CHARS
+{"-wc",                "*wideChars",   XrmoptionNoArg,         (caddr_t) "on"},
+{"+wc",                "*wideChars",   XrmoptionNoArg,         (caddr_t) "off"},
+#endif
 {"-wf",                "*waitForMap",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+wf",                "*waitForMap",  XrmoptionNoArg,         (caddr_t) "off"},
 #if OPT_ZICONBEEP
@@ -1023,6 +1048,9 @@
 { "-/+ut",                 "turn on/off utmp inhibit (not supported)" },
 #endif
 { "-/+vb",                 "turn on/off visual bell" },
+#if OPT_WIDE_CHARS
+{ "-/+wc",                 "turn on/off wide-character mode" },
+#endif
 { "-/+wf",                 "turn on/off wait for map before command exec" },
 { "-e command args ...",   "command to execute" },
 #if OPT_TEK4014
@@ -1086,7 +1114,7 @@
 
 static void Version (void)
 {
-    puts (XTERM_VERSION);
+    printf("%s(%d)\n", XFREE86_VERSION, XTERM_PATCH);
     exit (0);
 }
 
@@ -1095,8 +1123,8 @@
     struct _options *opt;
     char **cpp;
 
-    fprintf (stderr, "%s usage:\n    %s [-options ...] [-e command args]\n\n",
-            XTERM_VERSION, ProgramName);
+    fprintf (stderr, "%s(%d) usage:\n    %s [-options ...] [-e command args]\n\n",
+            XFREE86_VERSION, XTERM_PATCH, ProgramName);
     fprintf (stderr, "where options include:\n");
     for (opt = options; opt->opt; opt++) {
        fprintf (stderr, "    %-28s %s\n", opt->opt, opt->desc);
@@ -1336,9 +1364,9 @@
         d_tio.c_cflag &= ~(HUPCL|PARENB);
         d_tio.c_iflag |= BRKINT|ISTRIP|IGNPAR;
 #endif
-       d_tio.c_cc[VINTR] = 'C' & 0x3f;         /* '^C' */
+       d_tio.c_cc[VINTR] = CTRL('C');          /* '^C' */
        d_tio.c_cc[VERASE] = 0x7f;              /* DEL  */
-       d_tio.c_cc[VKILL] = 'U' & 0x3f;         /* '^U' */
+       d_tio.c_cc[VKILL] = CTRL('U');          /* '^U' */
        d_tio.c_cc[VQUIT] = CQUIT;              /* '^\' */
        d_tio.c_cc[VEOF] = CEOF;                /* '^D' */
        d_tio.c_cc[VEOL] = CEOL;                /* '^@' */
@@ -1890,9 +1918,15 @@
         if (pty_search(pty) == 0)
            return 0;
 #elif defined(USE_USG_PTYS)
+#if defined USE_GETPT
+       if ((*pty = getpt ()) < 0) {
+           return 1;
+       }
+#else
        if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) {
            return 1;
        }
+#endif
 #if defined(SVR4) || defined(SCO325) || (defined(i386) && defined(SYSV))
        strcpy(ttydev, ptsname(*pty));
 #if defined (SYSV) && defined(i386) && !defined(SVR4)
@@ -2188,6 +2222,9 @@
 #ifdef USE_HANDSHAKE
        handshake_t handshake;
 #endif
+#if OPT_INITIAL_ERASE
+       int initial_erase = VAL_INITIAL_ERASE;
+#endif
        int tty = -1;
        int done;
 #ifdef USE_SYSV_TERMIO
@@ -2279,6 +2316,9 @@
                        tty = -1;
                        errno = ENXIO;
                }
+#if OPT_INITIAL_ERASE
+               initial_erase = VAL_INITIAL_ERASE;
+#endif
                signal(SIGALRM, SIG_DFL);
 
                /*
@@ -2313,6 +2353,7 @@
                            SysError(ERROR_OPDEVTTY);
                        }
                } else {
+
                        /* Get a copy of the current terminal's state,
                         * if we can.  Some systems (e.g., SVR4 and MacII)
                         * may not have a controlling terminal at this point
@@ -2330,7 +2371,6 @@
 #ifdef USE_SYSV_TERMIO
                        if(ioctl(tty, TCGETA, &tio) == -1)
                                tio = d_tio;
-
 #elif defined(USE_POSIX_TERMIOS)
                        if (tcgetattr(tty, &tio) == -1)
                                tio = d_tio;
@@ -2348,6 +2388,22 @@
                                jtc = d_jtc;
 #endif /* sony */
 #endif /* USE_SYSV_TERMIO */
+
+#if OPT_INITIAL_ERASE
+                       if (resource.ptyInitialErase) {
+#ifdef USE_SYSV_TERMIO
+                               initial_erase = tio.c_cc[VERASE];
+#elif defined(USE_POSIX_TERMIOS)
+                               initial_erase = tio.c_cc[VERASE];
+#else   /* !USE_SYSV_TERMIO && !USE_POSIX_TERMIOS */
+                               initial_erase = sg.sg_erase;
+#endif /* USE_SYSV_TERMIO */
+                       }
+                       if (initial_erase == 0177) {    /* see input.c */
+                               term->keyboard.flags &= ~MODE_DECBKM;
+                       }
+#endif
+
 #ifdef MINIX
                        /* Editing shells interfere with xterms started in
                         * the background.
@@ -2362,19 +2418,16 @@
 #ifdef         PUCC_PTYD
                if(-1 == (screen->respond = openrpty(ttydev, ptydev,
                                (resource.utmpInhibit ?  OPTY_NOP : OPTY_LOGIN),
-                               getuid(), XDisplayString(screen->display)))) {
+                               getuid(), XDisplayString(screen->display))))
 #else /* not PUCC_PTYD */
-               if (get_pty (&screen->respond)) {
+               if (get_pty (&screen->respond))
 #endif /* PUCC_PTYD */
+               {
                        /*  no ptys! */
                        (void) fprintf(stderr, "%s: no available ptys\n",
                                       xterm_name);
                        exit (ERROR_PTYS);
-#ifdef PUCC_PTYD
                }
-#else
-               }                       /* keep braces balanced for emacs */
-#endif
 #ifdef PUCC_PTYD
                  else {
                        /*
@@ -2456,6 +2509,31 @@
            }
        }
 
+#if OPT_INITIAL_ERASE
+       if (!resource.ptyInitialErase && *newtc) {
+               char *s = strstr(newtc, "kD=");
+               TRACE(("extracting initial_erase value from termcap\n"))
+               if (s != 0) {
+                       s += 3;
+                       if (*s == '^') {
+                               if (*++s == '?') {
+                                       initial_erase = 127;
+                               } else {
+                                       initial_erase = *s & 31;
+                               }
+                       } else if (*s == '\\') {
+                               char *d;
+                               int value = strtol(s, &d, 8);
+                               if (value > 0 && d != s)
+                                       initial_erase = value;
+                       } else {
+                               initial_erase = *s;
+                       }
+                       initial_erase &= 0xff;
+               }
+       }
+#endif
+
 #if defined(TIOCSSIZE) && (defined(sun) && !defined(SVR4))
        /* tell tty how big window is */
        if(TEK4014_ACTIVE(screen)) {
@@ -2963,6 +3041,27 @@
                signal (SIGQUIT, SIG_DFL);
                signal (SIGTERM, SIG_DFL);
 
+#if OPT_INITIAL_ERASE
+               if (! resource.ptyInitialErase) {
+#ifdef USE_SYSV_TERMIO
+                       if(ioctl(tty, TCGETA, &tio) == -1)
+                               tio = d_tio;
+                       tio.c_cc[VERASE] = initial_erase;
+                       ioctl(tty, TCSETA, &tio);
+#elif defined(USE_POSIX_TERMIOS)
+                       if (tcgetattr(tty, &tio) == -1)
+                               tio = d_tio;
+                       tio.c_cc[VERASE] = initial_erase;
+                       tcsetattr(tty, TCSANOW, &tio);
+#else   /* !USE_SYSV_TERMIO && !USE_POSIX_TERMIOS */
+                       if(ioctl(tty, TIOCGETP, (char *)&sg) == -1)
+                               sg = d_sg;
+                       sg.sg_erase = initial_erase;
+                       ioctl(tty, TIOCSETP, (char *)&sg);
+#endif /* USE_SYSV_TERMIO */
+               }
+#endif
+
                /* copy the environment before Setenving */
                for (i = 0 ; environ [i] != NULL ; i++)
                    ;
@@ -3343,6 +3442,12 @@
                    if(*newtc)
                        strcat (newtc, ":im=\\E[4h:ei=\\E[4l:mi:");
                }
+#if OPT_INITIAL_ERASE
+               remove_termcap_entry (newtc, ":kD=");
+               if (*newtc) {
+                   sprintf(newtc + strlen(newtc), ":kD=\\%03o", initial_erase & 0377);
+               }
+#endif
                if(*newtc)
                    Setenv ("TERMCAP=", newtc);
 #endif /* USE_SYSV_ENVVARS */
@@ -4030,6 +4135,7 @@
        register int li_first = 0;
        register char *temp;
 
+       TRACE(("resize %s\n", oldtc))
        if ((ptr1 = strindex (oldtc, "co#")) == NULL){
                strcat (oldtc, "co#80:");
                ptr1 = strindex (oldtc, "co#");
@@ -4047,17 +4153,20 @@
        ptr1 += 3;
        ptr2 += 3;
        strncpy (newtc, oldtc, i = ptr1 - oldtc);
-       newtc += i;
-       sprintf (newtc, "%d", li_first ? screen->max_row + 1 :
-        screen->max_col + 1);
-       newtc += strlen(newtc);
+       temp = newtc + i;
+       sprintf (temp, "%d", li_first
+                       ? screen->max_row + 1
+                       : screen->max_col + 1);
+       temp += strlen(temp);
        ptr1 = strchr(ptr1, ':');
-       strncpy (newtc, ptr1, i = ptr2 - ptr1);
-       newtc += i;
-       sprintf (newtc, "%d", li_first ? screen->max_col + 1 :
-        screen->max_row + 1);
+       strncpy (temp, ptr1, i = ptr2 - ptr1);
+       temp += i;
+       sprintf (temp, "%d", li_first
+                       ? screen->max_col + 1
+                       : screen->max_row + 1);
        ptr2 = strchr(ptr2, ':');
-       strcat (newtc, ptr2);
+       strcat (temp, ptr2);
+       TRACE(("   ==> %s\n", newtc))
 #endif /* USE_SYSV_ENVVARS */
 }
 
@@ -4164,7 +4273,7 @@
 
        if (*s == '^') {
            s++;
-           c = ((*s == '?') ? 0177 : *s & 31);  /* keep control bits */
+           c = ((*s == '?') ? 0177 : CTRL(*s));
            if (*s == '-') {
 #if HAVE_TERMIOS_H && HAVE_TCGETATTR
 #  if HAVE_POSIX_VDISABLE
Index: misc.c
--- xterm-94+/misc.c    Mon Mar 29 13:36:18 1999
+++ xterm-95/misc.c     Sat Apr  3 09:11:22 1999
@@ -241,7 +241,7 @@
 
 #ifdef ACTIVEWINDOWINPUTONLY
     if (w != CURRENT_EMU(screen))
-       return;
+       return;
 #endif
 
     if (*nparams != 1) return;
@@ -356,14 +356,14 @@
        Boolean *cont GCC_UNUSED)
 {
        register XFocusChangeEvent *event = (XFocusChangeEvent  *)ev;
-        register TScreen *screen = &term->screen;
+       register TScreen *screen = &term->screen;
 
-        if(event->type == FocusIn)
-                selectwindow(screen,
+       if(event->type == FocusIn)
+               selectwindow(screen,
                             (event->detail == NotifyPointer) ? INWINDOW :
                                                                FOCUS);
-        else {
-                unselectwindow(screen,
+       else {
+               unselectwindow(screen,
                               (event->detail == NotifyPointer) ? INWINDOW :
                                                                  FOCUS);
                if (screen->grabbedKbd && (event->mode == NotifyUngrab)) {
@@ -550,7 +550,7 @@
     Cardinal *nparams GCC_UNUSED)
 {
     if (IsXtermWidget(gw)) {
-       register TScreen *screen = &((XtermWidget)gw)->screen;
+       register TScreen *screen = &((XtermWidget)gw)->screen;
        XMapWindow(screen->display, VShellWindow);
     }
 }
@@ -563,7 +563,7 @@
     Cardinal *nparams GCC_UNUSED)
 {
     if (IsXtermWidget(gw)) {
-       register TScreen *screen = &((XtermWidget)gw)->screen;
+       register TScreen *screen = &((XtermWidget)gw)->screen;
        XIconifyWindow(screen->display,
                       VShellWindow,
                       DefaultScreen(screen->display));
@@ -598,10 +598,12 @@
        *width -= (screen->border * 2),
        *height -= (screen->border * 2);
 
+       hints.flags = PMaxSize;
        if (XGetWMNormalHints(screen->display,
                            VShellWindow,
                            &hints,
-                           &supp)) {
+                           &supp)
+        && (hints.flags & PMaxSize) != 0) {
 
            TRACE(("QueryMaximize: WM hints max_w %#x max_h %#x\n",
                    hints.max_width,
@@ -712,7 +714,7 @@
        event.count = 0;
 
        if(VWindow(screen)) {
-               event.window = VWindow(screen);
+               event.window = VWindow(screen);
                event.width = term->core.width;
                event.height = term->core.height;
                (*term->core.widget_class->core_class.expose)((Widget)term, (XEvent *)&event, NULL);
@@ -722,7 +724,7 @@
 
 #if OPT_TEK4014
        if(TWindow(screen) && screen->Tshow) {
-               event.window = TWindow(screen);
+               event.window = TWindow(screen);
                event.width = tekWidget->core.width;
                event.height = tekWidget->core.height;
                TekExpose ((Widget)tekWidget, (XEvent *)&event, NULL);
@@ -1003,7 +1005,7 @@
        case 16:        case 17:
                if (term->misc.dynamicColors)
                       ChangeColorsRequest(term, mode-10, buf, final);
-               break;
+               break;
 
 #ifdef ALLOWLOGGING
         case 46:       /* new log file */
@@ -1061,7 +1063,7 @@
                            int val = atoi(buf);
                            if (rel > 0)
                                num += val;
-                           else if (rel < 1)
+                           else if (rel < 0)
                                num -= val;
                            else
                                num = val;
@@ -1072,7 +1074,7 @@
                        }
 
                        if (num < 0
-                        || num > fontMenu_lastBuiltin 
+                        || num > fontMenu_lastBuiltin
                         || (buf = screen->menu_font_names[num]) == 0) {
                            Bell(XkbBI_MinorError,0);
                            break;
@@ -1476,7 +1478,7 @@
                names++;
            }
            if (thisName != 0 && !strcmp(thisName, "?"))
-               ReportColorRequest(pTerm, ndx, final);
+               ReportColorRequest(pTerm, ndx, final);
            else if (!pOldColors->names[ndx]
             || (thisName
              && strcmp(thisName, pOldColors->names[ndx]))) {
Index: os2main.c
--- xterm-94+/os2main.c Sun Mar 14 14:59:36 1999
+++ xterm-95/os2main.c  Sat Apr  3 16:36:55 1999
@@ -106,7 +106,8 @@
 
 extern char *strindex ();
 
-int switchfb[] = {0, 2, 1, 3};
+#undef  CTRL
+#define        CTRL(c) ((c) & 0x1f)
 
 static SIGNAL_T reapchild (int n);
 static char *base_name (char *name);
@@ -128,37 +129,40 @@
 
 /* allow use of system default characters if defined and reasonable */
 #ifndef CEOF
-#define CEOF ('D'&037)
+#define CEOF     CTRL('D')
 #endif
 #ifndef CSUSP
-#define CSUSP ('Z'&037)
+#define CSUSP    CTRL('Z')
 #endif
 #ifndef CQUIT
-#define CQUIT ('\\'&037)
+#define CQUIT    CTRL('\\')
 #endif
 #ifndef CEOL
 #define CEOL 0
 #endif
+#ifndef CNUL
+#define CNUL 0
+#endif
 #ifndef CSWTCH
 #define CSWTCH 0
 #endif
 #ifndef CLNEXT
-#define CLNEXT ('V'&037)
+#define CLNEXT   CTRL('V')
 #endif
 #ifndef CWERASE
-#define CWERASE ('W'&037)
+#define CWERASE  CTRL('W')
 #endif
 #ifndef CRPRNT
-#define CRPRNT ('R'&037)
+#define CRPRNT   CTRL('R')
 #endif
 #ifndef CFLUSH
-#define CFLUSH ('O'&037)
+#define CFLUSH   CTRL('O')
 #endif
 #ifndef CSTOP
-#define CSTOP ('S'&037)
+#define CSTOP    CTRL('S')
 #endif
 #ifndef CSTART
-#define CSTART ('Q'&037)
+#define CSTART   CTRL('Q')
 #endif
 
 /*
@@ -409,6 +413,10 @@
 {"+im",                "*useInsertMode", XrmoptionNoArg,       (caddr_t) "off"},
 {"-vb",                "*visualBell",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+vb",                "*visualBell",  XrmoptionNoArg,         (caddr_t) "off"},
+#if OPT_WIDE_CHARS
+{"-wc",                "*wideChars",   XrmoptionNoArg,         (caddr_t) "on"},
+{"+wc",                "*wideChars",   XrmoptionNoArg,         (caddr_t) "off"},
+#endif
 {"-wf",                "*waitForMap",  XrmoptionNoArg,         (caddr_t) "on"},
 {"+wf",                "*waitForMap",  XrmoptionNoArg,         (caddr_t) "off"},
 #if OPT_ZICONBEEP
@@ -511,6 +519,9 @@
 { "-/+ulc",                "turn off/on display of underline as color" },
 { "-/+ut",                 "turn on/off utmp inhibit (not supported)" },
 { "-/+vb",                 "turn on/off visual bell" },
+#if OPT_WIDE_CHARS
+{ "-/+wc",                 "turn on/off wide-character mode" },
+#endif
 { "-/+wf",                 "turn on/off wait for map before command exec" },
 { "-e command args ...",   "command to execute" },
 #if OPT_TEK4014
@@ -585,7 +596,7 @@
 
 static void Version (void)
 {
-    puts (XTERM_VERSION);
+    printf("%s(%d)\n", XFREE86_VERSION, XTERM_PATCH);
     exit (0);
 }
 
@@ -594,8 +605,8 @@
     struct _options *opt;
     char **cpp;
 
-    fprintf (stderr, "%s usage:\n    %s [-options ...] [-e command args]\n\n",
-            XTERM_VERSION, ProgramName);
+    fprintf (stderr, "%s(%d) usage:\n    %s [-options ...] [-e command args]\n\n",
+            XFREE86_VERSION, XTERM_PATCH, ProgramName);
     fprintf (stderr, "where options include:\n");
     for (opt = options; opt->opt; opt++) {
        fprintf (stderr, "    %-28s %s\n", opt->opt, opt->desc);
@@ -851,9 +862,9 @@
        d_tio.c_cflag = B9600|CS8|CREAD|PARENB|HUPCL;
        d_tio.c_lflag = ISIG|ICANON|ECHO|ECHOE|ECHOK;
        d_tio.c_line = 0;
-       d_tio.c_cc[VINTR] = 'C' & 0x3f;         /* '^C' */
+       d_tio.c_cc[VINTR] = CTRL('C');          /* '^C' */
        d_tio.c_cc[VERASE] = 0x7f;              /* DEL  */
-       d_tio.c_cc[VKILL] = 'U' & 0x3f;         /* '^U' */
+       d_tio.c_cc[VKILL] = CTRL('U');          /* '^U' */
        d_tio.c_cc[VQUIT] = CQUIT;              /* '^\' */
        d_tio.c_cc[VEOF] = CEOF;                /* '^D' */
        d_tio.c_cc[VEOL] = CEOL;                /* '^@' */
@@ -1827,7 +1838,7 @@
 
        if (*s == '^') {
            s++;
-           c = ((*s == '?') ? 0177 : *s & 31);  /* keep control bits */
+           c = ((*s == '?') ? 0177 : CTRL(*s));
            if (*s == '-') {
                errno = 0;
                c = fpathconf(0, _PC_VDISABLE);
Index: print.c
--- xterm-94+/print.c   Sun Oct 25 13:31:39 1998
+++ xterm-95/print.c    Sat Apr  3 09:27:41 1999
@@ -40,6 +40,9 @@
 #include <data.h>
 #include <error.h>
 
+#undef  CTRL
+#define        CTRL(c) ((c) & 0x1f)
+
 #define SHIFT_IN  '\017'
 #define SHIFT_OUT '\016'
 
@@ -411,8 +414,8 @@
 
        switch (chr) {
        case 0:
-       case 'Q' & 0x1f:
-       case 'S' & 0x1f:
+       case CTRL('Q'):
+       case CTRL('S'):
                return 0;       /* ignored by application */
 
        case CSI:
Index: ptyx.h
--- xterm-94+/ptyx.h    Mon Mar 29 13:36:18 1999
+++ xterm-95/ptyx.h     Sat Apr  3 16:52:17 1999
@@ -367,6 +367,10 @@
 #endif
 #endif
 
+#ifndef OPT_INITIAL_ERASE
+#define OPT_INITIAL_ERASE 1 /* use pty's erase character if it's not 128 */
+#endif
+
 #ifndef OPT_INPUT_METHOD
 #if XtSpecificationRelease >= 6
 #define OPT_INPUT_METHOD 1 /* true if xterm uses input-method support */
@@ -423,6 +427,10 @@
 #define OPT_VT52_MODE   1 /* true if xterm supports VT52 emulation */
 #endif
 
+#ifndef OPT_WIDE_CHARS
+#define OPT_WIDE_CHARS  0 /* true if xterm supports 16-bit characters */
+#endif
+
 #ifndef OPT_XMC_GLITCH
 #define OPT_XMC_GLITCH 0 /* true if xterm supports xmc (magic cookie glitch) */
 #endif
@@ -516,7 +524,7 @@
 #endif
 
        /* the number of pointers per row in 'ScrnBuf' */
-#if OPT_ISO_COLORS || OPT_DEC_CHRSET
+#if OPT_ISO_COLORS || OPT_DEC_CHRSET || OPT_WIDE_CHARS
 #define MAX_PTRS term->num_ptrs
 #else
 #define MAX_PTRS 3
@@ -567,36 +575,46 @@
 
 /***====================================================================***/
 
-#define OFF_CHARS (BUF_HEAD + 0)
-#define OFF_ATTRS (BUF_HEAD + 1)
-#define OFF_COLOR (BUF_HEAD + 2)
-#define OFF_CSETS (BUF_HEAD + 3)
+#if OPT_WIDE_CHARS
+#define if_OPT_WIDE_CHARS(screen, code) if(screen->wide_chars) code
+#define PAIRED_CHARS(a,b) a,b
+#else
+#define if_OPT_WIDE_CHARS(screen, code) /* nothing */
+#define PAIRED_CHARS(a,b) a
+#endif
 
-       /* ScrnBuf-level macros */
-#define BUF_FLAGS(buf, row) (buf[MAX_PTRS * (row) + 0])
-#define BUF_CHARS(buf, row) (buf[MAX_PTRS * (row) + OFF_CHARS])
-#define BUF_ATTRS(buf, row) (buf[MAX_PTRS * (row) + OFF_ATTRS])
+/***====================================================================***/
 
+typedef enum {
+       OFF_FLAGS = 0           /* BUF_HEAD */
+       , OFF_CHARS
+       , OFF_ATTRS
 #if OPT_ISO_COLORS
-#define BUF_COLOR(buf, row) (buf[MAX_PTRS * (row) + OFF_COLOR])
+       , OFF_COLOR
 #endif
-
 #if OPT_DEC_CHRSET
-#define BUF_CSETS(buf, row) (buf[MAX_PTRS * (row) + OFF_CSETS])
+       , OFF_CSETS
 #endif
+#if OPT_WIDE_CHARS
+       , OFF_WIDEC
+#endif
+} BufOffsets;
+
+       /* ScrnBuf-level macros */
+#define BUF_FLAGS(buf, row) (buf[MAX_PTRS * (row) + OFF_FLAGS])
+#define BUF_CHARS(buf, row) (buf[MAX_PTRS * (row) + OFF_CHARS])
+#define BUF_ATTRS(buf, row) (buf[MAX_PTRS * (row) + OFF_ATTRS])
+#define BUF_COLOR(buf, row) (buf[MAX_PTRS * (row) + OFF_COLOR])
+#define BUF_CSETS(buf, row) (buf[MAX_PTRS * (row) + OFF_CSETS])
+#define BUF_WIDEC(buf, row) (buf[MAX_PTRS * (row) + OFF_WIDEC])
 
        /* TScreen-level macros */
 #define SCRN_BUF_FLAGS(screen, row) BUF_FLAGS(screen->visbuf, row)
 #define SCRN_BUF_CHARS(screen, row) BUF_CHARS(screen->visbuf, row)
 #define SCRN_BUF_ATTRS(screen, row) BUF_ATTRS(screen->visbuf, row)
-
-#if OPT_ISO_COLORS
 #define SCRN_BUF_COLOR(screen, row) BUF_COLOR(screen->visbuf, row)
-#endif
-
-#if OPT_DEC_CHRSET
 #define SCRN_BUF_CSETS(screen, row) BUF_CSETS(screen->visbuf, row)
-#endif
+#define SCRN_BUF_WIDEC(screen, row) BUF_WIDEC(screen->visbuf, row)
 
        /* indices into save_modes[] */
 typedef enum {
@@ -697,6 +715,10 @@
        XFontStruct *   double_fs[NUM_CHRSET];
        GC              double_gc[NUM_CHRSET];
        char *          double_fn[NUM_CHRSET];
+#endif
+#if OPT_WIDE_CHARS
+       Boolean         wide_chars;     /* true when 16-bit chars       */
+       Boolean         utf8_mode;      /* use UTF-8 decode/encode      */
 #endif
        int             border;         /* inner border                 */
        Cursor          arrow;          /* arrow cursor                 */
Index: screen.c
--- xterm-94+/screen.c  Mon Mar 29 13:36:18 1999
+++ xterm-95/screen.c   Sun Apr  4 12:50:57 1999
@@ -3,6 +3,35 @@
  */
 
 /*
+ * Copyright 1999 by Thomas E. Dickey <dickey@clark.net>
+ * 
+ *                         All Rights Reserved
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization.
+ *
+ *
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  *
  *                         All Rights Reserved
@@ -332,10 +361,16 @@
        if (TERM_COLOR_FLAGS) {
                int flags = TERM_COLOR_FLAGS;
                for (i = 0; i < last; i += MAX_PTRS) {
-                       screen->save_ptr[i] = 0;
-                       bzero( screen->save_ptr[i+ OFF_CHARS], size);
-                       memset(screen->save_ptr[i+ OFF_ATTRS], flags, size);
-                       memset(screen->save_ptr[i+ OFF_COLOR], xtermColorPair(), size);
+                       for (j = 0; j < MAX_PTRS; j++) {
+                               if (j < BUF_HEAD)
+                                       screen->save_ptr[i+j] = 0;
+                               else if (j == OFF_ATTRS)
+                                       memset(screen->save_ptr[i+j], flags, size);
+                               else if (j == OFF_COLOR)
+                                       memset(screen->save_ptr[i+j], xtermColorPair(), size);
+                               else
+                                       bzero( screen->save_ptr[i+j], size);
+                       }
                }
        } else {
                for (i = 0; i < last; i += MAX_PTRS) {
@@ -460,14 +495,19 @@
        for (i=col; i<col+n; i++)
            attrs[i] = flags;
        if_OPT_ISO_COLORS(screen,{
-           Char *colors = BUF_COLOR(sb, row);
-           memmove(colors + col + n, colors + col, nbytes);
-           memset(colors + col, xtermColorPair(), n);
+           ptr = BUF_COLOR(sb, row);
+           memmove(ptr + col + n, ptr + col, nbytes);
+           memset(ptr + col, xtermColorPair(), n);
        })
        if_OPT_DEC_CHRSET({
-           Char *csets = BUF_CSETS(sb, row);
-           memmove(csets + col + n, csets + col, nbytes);
-           memset(csets + col, curXtermChrSet(row), n);
+           ptr = BUF_CSETS(sb, row);
+           memmove(ptr + col + n, ptr + col, nbytes);
+           memset(ptr + col, curXtermChrSet(row), n);
+       })
+       if_OPT_WIDE_CHARS(screen,{
+           ptr = BUF_WIDEC(sb, row);
+           memmove(ptr + col + n, ptr + col, nbytes);
+           memset(ptr + col, 0, n);
        })
 
        if (wrappedbit)
@@ -498,14 +538,19 @@
        memset (attrs + size - n, TERM_COLOR_FLAGS, n);
 
        if_OPT_ISO_COLORS(screen,{
-           Char *colors = BUF_COLOR(sb, row);
-           memmove(colors + col, colors + col + n, nbytes);
-           memset(colors + size - n, xtermColorPair(), n);
+           ptr = BUF_COLOR(sb, row);
+           memmove(ptr + col, ptr + col + n, nbytes);
+           memset(ptr + size - n, xtermColorPair(), n);
        })
        if_OPT_DEC_CHRSET({
-           Char *csets = BUF_CSETS(sb, row);
-           memmove(csets + col, csets + col + n, nbytes);
-           memset(csets + size - n, curXtermChrSet(row), n);
+           ptr = BUF_CSETS(sb, row);
+           memmove(ptr + col, ptr + col + n, nbytes);
+           memset(ptr + size - n, curXtermChrSet(row), n);
+       })
+       if_OPT_WIDE_CHARS(screen,{
+           ptr = BUF_CSETS(sb, row);
+           memmove(ptr + col, ptr + col + n, nbytes);
+           memset(ptr + size - n, 0, n);
        })
        ScrnClrWrapped(screen, row);
 }
@@ -555,6 +600,9 @@
 #if OPT_DEC_CHRSET
           register Char *cb = 0;
 #endif
+#if OPT_WIDE_CHARS
+          Char *widec = 0;
+#endif
           Char cs = 0;
           register Char *chars;
           register Char *attrs;
@@ -583,6 +631,10 @@
                cb = SCRN_BUF_CSETS(screen, lastind + topline);
           })
 
+          if_OPT_WIDE_CHARS(screen,{
+               widec = SCRN_BUF_WIDEC(screen, lastind + topline);
+          })
+
           if (row < screen->startHRow || row > screen->endHRow ||
               (row == screen->startHRow && maxcol < screen->startHCol) ||
               (row == screen->endHRow && col >= screen->endHCol))
@@ -699,7 +751,8 @@
                        col - lastind, &chars[lastind]))
                   x = drawXtermText(screen, flags, gc, x, y,
                        cs,
-                       &chars[lastind], col - lastind);
+                       PAIRED_CHARS(&chars[lastind], &widec[lastind]),
+                       col - lastind);
                   resetXtermGC(screen, flags, hilite);
 
                   lastind = col;
@@ -730,7 +783,8 @@
                col - lastind, &chars[lastind]))
           drawXtermText(screen, flags, gc, x, y,
                cs,
-               &chars[lastind], col - lastind);
+               PAIRED_CHARS(&chars[lastind], &widec[lastind]),
+               col - lastind);
           resetXtermGC(screen, flags, hilite);
        }
 
@@ -786,6 +840,9 @@
            if_OPT_DEC_CHRSET({
                memset(BUF_CSETS(buf, row), 0, len);
            })
+           if_OPT_WIDE_CHARS(screen,{
+               memset(BUF_WIDEC(buf, row), 0, len);
+           })
        }
 }
 
@@ -990,6 +1047,10 @@
        return (long)SCRN_BUF_FLAGS(screen, row + screen->topline) & LINEWRAPPED;
 }
 
+/*
+ * Return true if any character cell starting at [row,col], for len-cells is
+ * nonnull.
+ */
 Bool
 non_blank_line(
        ScrnBuf sb,
@@ -1004,5 +1065,13 @@
                if (ptr[i])
                        return True;
        }
+#if OPT_WIDE_CHARS
+       if ((ptr = BUF_WIDEC(sb, row)) != 0) {
+           for (i = col; i < len; i++) {
+               if (ptr[i])
+                   return True;
+           }
+       }
+#endif
        return False;
 }
Index: testxmc.c
--- xterm-94+/testxmc.c Sun Oct 25 13:31:39 1998
+++ xterm-95/testxmc.c  Sat Apr  3 14:41:16 1999
@@ -135,7 +135,7 @@
                unsigned save = term->flags;
                term->flags ^= whichone;
                TRACE(("XMC Writing glitch (%d/%d) after SGR %d\n", my_attrs, whichone, param))
-               dotext(screen, '?', glitch, glitch + screen->xmc_glitch);
+               dotext(screen, '?', PAIRED_CHARS(glitch, 0), screen->xmc_glitch);
                term->flags = save;
        }
 }
@@ -166,7 +166,7 @@
 
        /* Find the preceding cell.
         */
-       if (SCRN_BUF_CHARS(screen, row)[col] != XMC_GLITCH) {
+       if (getXtermCell(screen, row, col) != XMC_GLITCH) {
                if (col != 0) {
                        col--;
                } else if (!screen->xmc_inline && row != 0) {
@@ -187,7 +187,7 @@
                        col = 0;
                } else
                        break;
-               if (SCRN_BUF_CHARS(screen, row)[col] == XMC_GLITCH)
+               if (getXtermCell(screen, row, col) == XMC_GLITCH)
                        break;
                if ((SCRN_BUF_ATTRS(screen, row)[col] & my_attrs) != start) {
                        SCRN_BUF_ATTRS(screen, row)[col] = start |
Index: util.c
--- xterm-94+/util.c    Sun Mar 14 14:59:36 1999
+++ xterm-95/util.c     Sat Apr  3 16:39:35 1999
@@ -4,6 +4,35 @@
  */
 
 /*
+ * Copyright 1999 by Thomas E. Dickey <dickey@clark.net>
+ * 
+ *                         All Rights Reserved
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization.
+ *
+ *
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  *
  *                         All Rights Reserved
@@ -693,6 +722,9 @@
        if_OPT_DEC_CHRSET({
                memset(SCRN_BUF_CSETS(screen, row) + col, curXtermChrSet(screen->cur_row), len);
        })
+       if_OPT_WIDE_CHARS(screen,{
+               memset(SCRN_BUF_WIDEC(screen, row) + col, 0, len);
+       })
 
        return rc;
 }
@@ -1316,9 +1348,26 @@
        int x,
        int y,
        int chrset,
-       Char *text,
-       int len)
+       PAIRED_CHARS(Char *text, Char *text2),
+       Cardinal len)
 {
+#if OPT_WIDE_CHARS
+       /*
+        * It's simpler to pass in a null pointer for text2 in places where
+        * we only use codes through 255.  Fix text2 here so we can increment
+        * it, etc.
+        */
+       if (text2 == 0) {
+               static Char *dbuf;
+               static unsigned dlen;
+               if (dlen < len) {
+                       dlen = (len + 1) * 2;
+                       dbuf = XtRealloc(dbuf, dlen);
+                       memset(dbuf, 0, dlen);
+               }
+               text2 = dbuf;
+       }
+#endif
 #if OPT_DEC_CHRSET
        if (CSET_DOUBLE(chrset)) {
                GC gc2 = screen->font_doublesize
@@ -1327,7 +1376,7 @@
 
                TRACE(("DRAWTEXT%c[%4d,%4d] (%d) %d:%.*s\n",
                        screen->cursor_state == OFF ? ' ' : '*',
-                       y, x, chrset, len, len, text))
+                       y, x, chrset, len, (int)len, text))
 
                if (gc2 != 0) { /* draw actual double-sized characters */
                        XFontStruct *fs = screen->double_fs[chrset % NUM_CHRSET];
@@ -1389,12 +1438,16 @@
                        {
                                while (len--) {
                                        x = drawXtermText(screen, flags, gc2,
-                                               x, y, 0, text++, 1);
+                                               x, y, 0,
+                                               PAIRED_CHARS(text++, text2++),
+                                               1);
                                        x += FontWidth(screen);
                                }
                        } else {
                                x = drawXtermText(screen, flags, gc2,
-                                       x, y, 0, text, len);
+                                       x, y, 0,
+                                       PAIRED_CHARS(text, text2),
+                                       len);
                                x += len * FontWidth(screen);
                        }
 
@@ -1403,13 +1456,24 @@
 
                } else {        /* simulate double-sized characters */
                        Char *temp = (Char *) malloc(2 * len);
+                       Char *wide = 0;
                        int n = 0;
+                       if_OPT_WIDE_CHARS(screen,{
+                               wide = (Char *)malloc(2 * len);
+                       })
                        while (len--) {
+                               if_OPT_WIDE_CHARS(screen,{
+                                       wide[n] = *text2++;
+                                       wide[n+1] = 0;
+                               })
                                temp[n++] = *text++;
                                temp[n++] = ' ';
                        }
-                       x = drawXtermText(screen, flags, gc, x, y, 0, temp, n);
+                       x = drawXtermText(screen, flags, gc, x, y, 0, PAIRED_CHARS(temp, wide), n);
                        free(temp);
+                       if_OPT_WIDE_CHARS(screen,{
+                               free(wide);
+                       })
                }
                return x;
        }
@@ -1447,10 +1511,12 @@
                XFillRectangle (screen->display, VWindow(screen), fillGC,
                        x, y, len * FontWidth(screen), FontHeight(screen));
 
-               while (len-- > 0) {
+               while (len--) {
                        width = XTextWidth(fs, (char *)text, 1);
                        adj = (FontWidth(screen) - width) / 2;
-                       (void)drawXtermText(screen, flags, gc, x + adj, y, chrset, text++, 1);
+                       (void)drawXtermText(screen, flags, gc, x + adj, y,
+                                           chrset,
+                                           PAIRED_CHARS(text++, text2++), 1);
                        x += FontWidth(screen);
                }
                screen->fnt_prop = True;
@@ -1461,10 +1527,29 @@
        if (screen->fnt_boxes) {
                TRACE(("drawtext%c[%4d,%4d] (%d) %d:%.*s\n",
                        screen->cursor_state == OFF ? ' ' : '*',
-                       y, x, chrset, len, len, text))
+                       y, x, chrset, len, (int)len, text))
                y += FontAscent(screen);
+
+#if OPT_WIDE_CHARS
+               if (screen->wide_chars) {
+                       static XChar2b *sbuf;
+                       static Cardinal slen;
+                       Cardinal n;
+                       if (slen < len) {
+                               slen = (len + 1) * 2;
+                               sbuf = (XChar2b *)XtRealloc((char *)sbuf, slen * sizeof(*sbuf));
+                       }
+                       for (n = 0; n < len; n++) {
+                               sbuf[n].byte2 = text[n];
+                               sbuf[n].byte1 = text2[n];
+                       }
+                       XDrawImageString16(screen->display, VWindow(screen), gc,
+                               x, y, sbuf, len);
+               } else
+#endif
                XDrawImageString(screen->display, VWindow(screen), gc,
                        x, y,  (char *)text, len);
+
                if ((flags & (BOLD|BLINK)) && screen->enbolden)
                        XDrawString(screen->display, VWindow(screen), gc,
                                x+1, y,  (char *)text, len);
@@ -1476,12 +1561,12 @@
                }
 #if OPT_BOX_CHARS
 #define DrawX(col) x + (col * FontWidth(screen))
-#define DrawSegment(first,last) (void)drawXtermText(screen, flags, gc, DrawX(first), y, chrset, text+first, last-first)
+#define DrawSegment(first,last) (void)drawXtermText(screen, flags, gc, DrawX(first), y, chrset, PAIRED_CHARS(text+first, text2+first), last-first)
        } else {        /* fill in missing box-characters */
                XFontStruct *font = (flags & BOLD)
                                  ? screen->fnt_bold
                                  : screen->fnt_norm;
-               int last, first = 0;
+               Cardinal last, first = 0;
 
                screen->fnt_boxes = True;
                for (last = 0; last < len; last++) {
@@ -1715,6 +1800,31 @@
        return set;
 }
 #endif /* OPT_DEC_CHRSET */
+
+#if OPT_WIDE_CHARS
+/*
+ * Returns a single 8/16-bit number for the given cell
+ */
+int getXtermCell (TScreen *screen, int row, int col)
+{
+    int ch = SCRN_BUF_CHARS(screen, row)[col];
+    if_OPT_WIDE_CHARS(screen,{
+       ch |= (SCRN_BUF_WIDEC(screen, row)[col] << 8);
+    })
+    return ch;
+}
+
+/*
+ * Sets a single 8/16-bit number for the given cell
+ */
+void putXtermCell (TScreen *screen, int row, int col, int ch)
+{
+    SCRN_BUF_CHARS(screen, row)[col] = ch;
+    if_OPT_WIDE_CHARS(screen,{
+       SCRN_BUF_WIDEC(screen, row)[col] = (ch >> 8);
+    })
+}
+#endif
 
 #ifdef HAVE_CONFIG_H
 #if USE_MY_MEMMOVE
Index: version.h
--- xterm-94+/version.h Mon Mar 29 13:36:18 1999
+++ xterm-95/version.h  Mon Apr  5 20:54:51 1999
@@ -1,9 +1,10 @@
 /* $XFree86: xc/programs/xterm/version.h,v 3.20 1999/03/28 15:33:23 dawes Exp $ */
 
 /*
- * This is the string that's printed in response to "xterm -version", or
- * embedded in "xterm -help".  It is the version of XFree86 to which this
- * version of xterm has been built.  The number in parentheses is my patch
- * number (T.Dickey).
+ * These definitions are used to build the string that's printed in response to
+ * "xterm -version", or embedded in "xterm -help".  It is the version of
+ * XFree86 to which this version of xterm has been built.  The number in
+ * parentheses is my patch number (T.Dickey).
  */
-#define XTERM_VERSION "XFree86 3.9Pf(94)"
+#define XTERM_PATCH   95
+#define XFREE86_VERSION "XFree86 3.9Ph"
Index: vttests/dynamic.sh
--- xterm-94+/vttests/dynamic.sh        Mon Mar 29 13:36:18 1999
+++ xterm-95/vttests/dynamic.sh Fri Apr  2 17:54:21 1999
@@ -5,24 +5,48 @@
 # Demonstrate the use of dynamic colors by setting the background successively
 # to different values.
 
-LIST="00 30 d0 ff"
+ESC="^["
+CMD='echo'
+OPT='-n'
+SUF=''
+TMP=/tmp/xterm$$
+for verb in print printf ; do
+    rm -f $TMP
+    eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null
+    if test -f $TMP ; then
+       if test ! -s $TMP ; then
+           CMD="$verb"
+           OPT=
+           SUF='\c'
+           break
+       fi
+    fi
+done
+rm -f $TMP
+
+LIST="00 30 80 d0 ff"
 
 exec </dev/tty
 old=`stty -g`
-stty raw -echo min 0  time 0
-echo -n '^[]11;?^G' > /dev/tty
+stty raw -echo min 0  time 5
+
+$CMD $OPT "${ESC}]11;?^G${SUF}" > /dev/tty
 read original
 stty $old
+original=${original}${SUF}
 
-trap 'echo -n "$original"; exit' 0 1 2 5 15
-for R in $LIST
+trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15
+while true
 do
-    for G in $LIST
+    for R in $LIST
     do
-       for B in $LIST
+       for G in $LIST
        do
-           echo -n "^[]11;rgb:$R/$G/$B^G"
-           sleep 1
+           for B in $LIST
+           do
+               $CMD $OPT "${ESC}]11;rgb:$R/$G/$B^G${SUF}" >/dev/tty
+               sleep 1
+           done
        done
     done
 done
Index: vttests/fonts.sh
--- /dev/null   Sun Jul 17 19:46:18 1994
+++ xterm-95/vttests/fonts.sh   Fri Apr  2 18:06:22 1999
@@ -0,0 +1,51 @@
+#!/bin/sh
+# $XFree86: xc/programs/xterm/vttests/dynamic.sh,v 1.1 1999/03/28 15:33:29 dawes Exp $
+#
+# -- Thomas Dickey (1999/3/27)
+# Demonstrate the use of dynamic colors by setting the background successively
+# to different values.
+
+ESC="^["
+CMD='echo'
+OPT='-n'
+SUF=''
+TMP=/tmp/xterm$$
+for verb in print printf ; do
+    rm -f $TMP
+    eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null
+    if test -f $TMP ; then
+       if test ! -s $TMP ; then
+           CMD="$verb"
+           OPT=
+           SUF='\c'
+           break
+       fi
+    fi
+done
+rm -f $TMP
+
+exec </dev/tty
+old=`stty -g`
+stty raw -echo min 0  time 5
+
+$CMD $OPT "${ESC}]50;?^G${SUF}" > /dev/tty
+read original
+
+stty $old
+original="${original}${SUF}"
+
+trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15
+F=1
+D=1
+T=6
+while true
+do
+    $CMD $OPT "${ESC}]50;#$F^G${SUF}" >/dev/tty
+    #sleep 1
+    if test .$D = .1 ; then
+       test $F = $T && D=-1
+    else
+       test $F = 1 && D=1
+    fi
+    F=`expr $F + $D`
+done
Index: vttests/resize.sh
--- xterm-94+/vttests/resize.sh Mon Mar 29 13:36:18 1999
+++ xterm-95/vttests/resize.sh  Sat Apr  3 09:19:35 1999
@@ -5,43 +5,66 @@
 # Obtain the current screen size, then resize the terminal to the nominal
 # screen width/height, and restore the size.
 
+ESC="^["
+CMD='echo'
+OPT='-n'
+SUF=''
+TMP=/tmp/xterm$$
+for verb in print printf ; do
+    rm -f $TMP
+    eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null
+    if test -f $TMP ; then
+       if test ! -s $TMP ; then
+           CMD="$verb"
+           OPT=
+           SUF='\c'
+           break
+       fi
+    fi
+done
+rm -f $TMP
+
 exec </dev/tty
 old=`stty -g`
-stty raw -echo min 0  time 0
+stty raw -echo min 0  time 5
 
-echo -n "^[[18t" > /dev/tty
-IFS=';' read junk height width
+$CMD $OPT "${ESC}[18t${SUF}" > /dev/tty
+IFS=';' read junk high wide
 
-echo -n "^[[19t" > /dev/tty
-IFS=';' read junk maxheight maxwidth
+$CMD $OPT "${ESC}[19t${SUF}" > /dev/tty
+IFS=';' read junk maxhigh maxwide
 
 stty $old
 
-width=`echo $width|sed -e 's/t.*//'`
-maxwidth=`echo $maxwidth|sed -e 's/t.*//'`
+wide=`echo $wide|sed -e 's/t.*//'`
+maxwide=`echo $maxwide|sed -e 's/t.*//'`
+original=${ESC}[8\;${high}\;${wide}t${SUF}
+
+test $maxwide = 0 && maxwide=`expr $wide \* 2`
+test $maxhigh = 0 && maxhigh=`expr $high \* 2`
 
-trap 'echo -n "^[[8;${height};${width}t"; exit' 0 1 2 5 15
-w=$width
-h=$height
+trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15
+w=$wide
+h=$high
 a=1
 while true
 do
 #      sleep 1
        echo resizing to $h by $w
-       echo -n "^[[8;${h};${w}t"
+       $CMD $OPT "${ESC}[8;${h};${w}t" >/dev/tty
        if test $a = 1 ; then
-               if test $w = $maxwidth ; then
+               if test $w = $maxwide ; then
                        h=`expr $h + $a`
-                       if test $h = $maxheight ; then
+                       if test $h = $maxhigh ; then
                                a=-1
                        fi
                else
                        w=`expr $w + $a`
                fi
        else
-               if test $w = $width ; then
+               if test $w = $wide ; then
                        h=`expr $h + $a`
-                       if test $h = $height ; then
+                       if test $h = $high ; then
                                a=1
                        fi
                else
Index: vttests/title.sh
--- xterm-94+/vttests/title.sh  Mon Mar 29 13:36:18 1999
+++ xterm-95/vttests/title.sh   Fri Apr  2 17:27:58 1999
@@ -5,18 +5,42 @@
 # Obtain the current title of the window, set up a simple clock which runs
 # until this script is interrupted, then restore the title.
 
+ESC="^["
+CMD='echo'
+OPT='-n'
+SUF=''
+TMP=/tmp/xterm$$
+for verb in print printf ; do
+    rm -f $TMP
+    eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null
+    if test -f $TMP ; then
+       if test ! -s $TMP ; then
+           CMD="$verb"
+           OPT=
+           SUF='\c'
+           break
+       fi
+    fi
+done
+rm -f $TMP
+
 exec </dev/tty
 old=`stty -g`
-stty raw -echo min 0  time 0
-echo -n "^[[21t" > /dev/tty
-read title
+stty raw -echo min 0  time 5
+
+$CMD $OPT "${ESC}[21t${SUF}" > /dev/tty
+read original
+
 stty $old
 
-title=`echo "$title" |sed -e 's/^...//' -e 's/.$//'`
+# We actually get this terminated by an <esc>backslash, but the backslash
+# is lost.  We'll also lose doublequote characters when restoring the title.
+original=`echo "$original" |sed -e 's/^...//' -e 's/.$//'`
+original=${ESC}]2\;"${original}^G"${SUF}
 
-trap 'echo -n "^[]2;$title^G"; exit' 0 1 2 5 15
+trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15
 while true
 do
        sleep 1
-       echo -n "^[]2;`date`^G"
+       $CMD $OPT "${ESC}]2;`date`^G" >/dev/tty
 done
Index: xterm.h
--- xterm-94+/xterm.h   Mon Mar 29 13:36:18 1999
+++ xterm-95/xterm.h    Mon Apr  5 18:50:31 1999
@@ -175,12 +175,12 @@
 extern void ToggleAlternate (TScreen *screen);
 extern void VTReset (int full, int saved);
 extern void VTRun (void);
-extern void dotext (TScreen *screen, int charset, Char *buf, Char *ptr);
+extern void dotext (TScreen *screen, int charset, PAIRED_CHARS(Char *buf, Char *buf2), Cardinal len);
 extern void resetCharsets (TScreen *screen);
 extern void set_cursor_gcs (TScreen *screen);
 extern void unparseputc (int c, int fd);
 extern void unparseputc1 (int c, int fd);
-extern void unparseputs (Char *s, int fd);
+extern void unparseputs (char *s, int fd);
 extern void unparseseq (ANSI *ap, int fd);
 
 #if OPT_ISO_COLORS
@@ -347,7 +347,7 @@
 extern int AddToRefresh (TScreen *screen);
 extern int HandleExposure (TScreen *screen, XEvent *event);
 extern int char2lower(int ch);
-extern int drawXtermText (TScreen *screen, unsigned flags, GC gc, int x, int y, int chrset, Char *text, int len);
+extern int drawXtermText (TScreen *screen, unsigned flags, GC gc, int x, int y, int chrset, PAIRED_CHARS(Char *text, Char *text2), Cardinal len);
 extern void ChangeColors (XtermWidget tw, ScrnColors *pNew);
 extern void ClearRight (TScreen *screen, int n);
 extern void ClearScreen (TScreen *screen);
@@ -402,6 +402,14 @@
 #else
 #define getXtermChrSet(row, col) 0
 #define curXtermChrSet(row) 0
+#endif
+
+#if OPT_WIDE_CHARS
+extern int getXtermCell (TScreen *screen, int row, int col);
+extern void putXtermCell (TScreen *screen, int row, int col, int ch);
+#else
+#define getXtermCell(screen,row,col) SCRN_BUF_CHARS(screen, row)[col]
+#define putXtermCell(screen,row,col,ch) SCRN_BUF_CHARS(screen, row)[col] = ch
 #endif
 
 #if OPT_XMC_GLITCH
Index: xterm.log.html
--- xterm-94+/xterm.log.html    Mon Mar 29 13:36:18 1999
+++ xterm-95/xterm.log.html     Mon Apr  5 20:56:53 1999
@@ -41,6 +41,7 @@
 xc/programs/Xserver/hw/xfree86).
 
 <UL>
+<LI><A HREF="#xterm_95">Patch #95 - 1999/4/5 - XFree86 3.9Ph</A>
 <LI><A HREF="#xterm_94">Patch #94 - 1999/3/27 - XFree86 3.9Pf</A>
 <LI><A HREF="#xterm_93">Patch #93 - 1999/3/14 - XFree86 3.9Pd</A>
 <LI><A HREF="#xterm_92">Patch #92 - 1999/2/5 - XFree86 3.9Nz</A>
@@ -138,6 +139,53 @@
 <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
 </UL>
 
+<H1><A NAME="xterm_95">Patch #95 - 1999/4/5 - XFree86 3.9Ph</A></H1>
+<ul>
+       <li>modify primary DA response to allow a '1' parameter.
+
+       <li>add printer and national replacment character sets to VT220
+         primary DA response.
+
+       <li>document primary and secondary DA responses in ctlseqs.ms
+
+       <li>use the patch number (e.g., 95) in the secondary DA response,
+         providing user applications a means of determining the version
+         of xterm for feature comparison (request by Bram Moolenaar).
+
+       <li>make xterm respond to secondary DA when the decTerminalId
+         is set for VT100.
+
+       <li>limit user-defined keys (DECUDK) to VT220-style keyboard
+         when sunKeyBoard resource is true.
+
+       <li>modify ifdef's for Linux-2.2.x with GLibc-2.1 to work with
+         Glibc-2.1 and no Unix98 PTY support (patch from From Andreas Jaeger
+         &lt;aj@arthur.rhein-neckar.de&gt;)
+
+       <li>add optional feature (resource and command-line options) to make
+         xterm use the pty's sense of erase character on startup, rather than
+         requiring it to be \177, or set the pty's erase character to match
+         xterm's configuration.  Note that while $TERMCAP is modified to
+         reflect the actual configuration, the terminfo kdch1 string is not
+         (request by Dirk H Hohndel &lt;hohndel@suse.de&gt;)
+
+       <li>improve scripts in vttest to work with newer shells that do not
+         use 'echo -n'.
+
+       <li>add fonts.sh example script
+
+       <li>correct inequality in handling of "#1" font specification.
+
+       <li>correct call to XGetWMNormalHints() used for computing maximum
+         screen size; the size hints may not have been set.
+
+       <li>begin implementation of support for wide-characters (configure
+         option --enable-wide-chars defines OPT_WIDE_CHARS, invoke xterm with
+         -wc option to activate this feature).  This patch optionally widens
+         internal data structures, invokes the 16-bit text output rather than
+         the 8-bit version and adds some tables.
+
+</ul>
 <H1><A NAME="xterm_94">Patch #94 - 1999/3/27 - XFree86 3.9Pf</A></H1>
 <ul>
        <li>further fixes for terminfo: ka1, ka3, etc., differ between the
@@ -187,7 +235,7 @@
          program control.
 
        <li>corrected ifdef's for menus, which did not allow tek4014 to
-         be suppressed properly (reported by Clark Morgan).
+         be suppressed properly (reported by Clint Olsen).
 
        <li>integrated patch from Pavel Roskin
          &lt;pavel_roskin@geocities.com&gt; 
Index: xterm.man
--- xterm-94+/xterm.man Mon Mar 29 13:36:18 1999
+++ xterm-95/xterm.man  Sun Apr  4 20:26:31 1999
@@ -335,6 +335,12 @@
 This option indicates that HP Function Key escape codes should not be generated
 for function keys.
 .TP 8
+.B \-ie
+Turn on the \fBptyInitialErase\fP resource.
+.TP 8
+.B +ie
+Turn off the \fBptyInitialErase\fP resource.
+.TP 8
 .B \-im
 Turn on the \fBuseInsertMode\fP resource.
 .TP 8
@@ -536,6 +542,9 @@
 .B \+vb
 This option indicates that a visual bell should not be used.
 .TP 8
+.B \-wc
+This option sets the \fBwideChars\fP resource.
+.TP 8
 .B \-wf
 This option indicates that \fIxterm\fP should wait for the window to be mapped
 the first time before starting the subprocess so that the initial terminal
@@ -668,13 +677,23 @@
 .B "iconName (\fPclass\fB IconName)"
 Specifies the icon name.  The default is the application name.
 .TP 8
+.B "ptyInitialErase (\fPclass\fB PtyInitialErase)"
+If ``true'', \fIxterm\fP will use the pseudo-terminal's sense of the stty erase
+value to set the \fBbackarrowKey\fP resource toggle.
+If ``false'', \fIxterm\fP will set the stty erase value to match its own
+configuration, using the \fBkD\fP string from the termcap entry as
+a reference, if available.
+In either case, the result is applied to the TERMCAP variable
+which \fIxterm\fP sets.
+The default is ``false''.
+.TP 8
 .B "sameName (\fPclass\fB SameName)"
-If the value of this resource is "true", xterm doesn't send
+If the value of this resource is ``true'', xterm doesn't send
 title and icon name change requests when the request
 would have no effect: the name isn't changed.  This has the advantage
 of preventing flicker and the disadvantage of requiring an extra
 round trip to the server to find out the previous value.  In practice
-this should never be a problem.  The default is "true".
+this should never be a problem.  The default is ``true''.
 .TP 8
 .B "sunFunctionKeys (\fPclass\fB SunFunctionKeys)"
 Specifies whether or not Sun Function Key escape codes should be generated for
@@ -831,15 +850,15 @@
 The default is ``false.''
 .TP 8
 .B "cutNewline (\fPclass\fB CutNewline)"
-If false, triple clicking to select a line does not include the Newline
+If ``false'', triple clicking to select a line does not include the Newline
 at the end of the line.
-If true, the Newline is selected.
+If ``true'', the Newline is selected.
 The default is ``true.''
 .TP 8
 .B "cutToBeginningOfLine (\fPclass\fB CutToBeginningOfLine)"
-If false, triple clicking to select a line selects only from the
+If ``false'', triple clicking to select a line selects only from the
 current word forward.
-If true, the entire line is selected.
+If ``true'', the entire line is selected.
 The default is ``true.''
 .TP 8
 .B "charClass (\fPclass\fB CharClass)"
@@ -957,9 +976,9 @@
 The default is ``false.''
 .TP 8
 .B "eightBitInput (\fPclass\fB EightBitInput\fP)"
-If true, Meta characters input from the keyboard are presented as a
+If ``true'', Meta characters input from the keyboard are presented as a
 single character with the eighth bit turned on.
-If false, Meta characters are converted into a two-character
+If ``false'', Meta characters are converted into a two-character
 sequence with the character itself preceded by ESC.
 The default is ``true.''
 .TP 8
@@ -1007,9 +1026,9 @@
 Specifies the preferred size and position of the VT102 window.
 .TP 8
 .B "highlightSelection (\fPclass\fB HighlightSelection)"
-If false, selecting with the mouse highlights all positions on the screen
+If ``false'', selecting with the mouse highlights all positions on the screen
 between the beginning of the selection and the current position.
-If true, \fIxterm\fP highlights only the positions that contain text that
+If ``true'', \fIxterm\fP highlights only the positions that contain text that
 can be selected.
 The default is ``false.''
 .TP 8
@@ -1069,7 +1088,7 @@
 bell should be rung, when enabled.
 .TP 8
 .B "numLock (\fPclass\fB NumLock)"
-If true, xterm checks if NumLock is used as a modifier (see \fIxmodmap\fP(1)).
+If ``true'', xterm checks if NumLock is used as a modifier (see \fIxmodmap\fP(1)).
 If so, this modifier is used to simplify the logic when implementing special
 NumLock for the \fBsunKeyboard\fP resource.
 Also (when \fBsunKeyboard\fP is false), similar logic is used to find the
@@ -1077,7 +1096,7 @@
 The default is ``true.''
 .TP 8
 .B "oldXtermFKeys (\fPclass\fB OldXtermFKeys)"
-If true, xterm will use old-style control sequences for function keys F1 to F4,
+If ``true'', xterm will use old-style control sequences for function keys F1 to F4,
 for compatibility with X Consortium xterm.  Otherwise, it uses the VT100-style
 codes for PF1 to PF4.
 The default is ``false.''
@@ -1104,7 +1123,7 @@
 The default is ``1.''
 .TP 8
 .B "printerAutoClose (\fPclass\fB PrinterAutoClose)"
-If true, xterm will close the printer (a pipe) when the application switches
+If ``true'', xterm will close the printer (a pipe) when the application switches
 the printer offline with a Media Copy command.
 The default is ``false.''
 .TP 8
@@ -1227,6 +1246,10 @@
 .B "visualBell (\fPclass\fB VisualBell)"
 Specifies whether or not a visible bell (i.e. flashing) should be used instead
 of an audible bell when Control-G is received.  The default is ``false.''
+.TP 8
+.B "wideChars (\fPclass\fB WideChars)"
+Specifies if \fIxterm\fP should respond to control sequences that
+process 16-bit characters.
 .sp
 .PP
 The following resources are specified as part of the \fItek4014\fP widget
Index: xtermcfg.hin
--- xterm-94+/xtermcfg.hin      Sun Mar 14 14:59:36 1999
+++ xterm-95/xtermcfg.hin       Sat Apr  3 10:41:40 1999
@@ -58,6 +58,7 @@
 #undef OPT_HIGHLIGHT_COLOR /* CF_ARG_DISABLE(highlighting) */
 #undef OPT_HP_FUNC_KEYS        /* CF_ARG_ENABLE(hp-fkeys) */
 #undef OPT_I18N_SUPPORT        /* CF_ARG_DISABLE(i18n) */
+#undef OPT_INITIAL_ERASE /* CF_ARG_DISABLE(initial-erase) */
 #undef OPT_INPUT_METHOD        /* CF_ARG_DISABLE(input-method) */
 #undef OPT_ISO_COLORS  /* CF_ARG_DISABLE(ansi-color) */
 #undef OPT_MAXIMIZE    /* CF_ARG_DISABLE(maximize) */
@@ -66,6 +67,7 @@
 #undef OPT_TEK4014     /* CF_ARG_DISABLE(tek4014) */
 #undef OPT_TRACE       /* CF_ARG_ENABLE(trace) */
 #undef OPT_VT52_MODE   /* CF_ARG_DISABLE(vt52) */
+#undef OPT_WIDE_CHARS  /* CF_ARG_ENSABLE(wide-chars) */
 #undef OPT_XMC_GLITCH  /* CF_ARG_ENABLE(xmc-glitch) */
 #undef OWN_TERMINFO_DIR        /* AC_ARG_WITH(own-terminfo) */
 #undef SCROLLBAR_RIGHT /* CF_ARG_ENABLE(rightbar) */