xterm-148.patch.txt

# ------------------------------------------------------------------------------
# INSTALL                   |    7 
# Makefile.in               |    5 
# aclocal.m4                |   19 -
# charproc.c                |  308 +++++++++++----------
# configure                 |  627 +++++++++++++++++++++++---------------------
# configure.in              |   16 -
# fontutils.c               |  116 ++++++--
# fontutils.h               |    8 
# input.c                   |    6 
# main.c                    |   16 -
# main.h                    |   11 
# menu.c                    |    2 
# misc.c                    |   37 +-
# os2main.c                 |    8 
# precompose.c              |    6 
# ptyx.h                    |   18 +
# resize.c                  |    8 
# termcap                   |   11 
# terminfo                  |   47 +--
# unicode/README            |    2 
# unicode/precompose.c.tail |    4 
# util.c                    |   22 +
# version.h                 |    4 
# xterm.h                   |    2 
# xterm.log.html            |   50 +++
# xterm.man                 |   30 +-
# 26 files changed, 835 insertions(+), 555 deletions(-)
# ------------------------------------------------------------------------------
Index: INSTALL
--- xterm-147+/INSTALL  Wed Jun 14 15:50:37 2000
+++ xterm-148/INSTALL   Mon Oct 30 05:38:49 2000
@@ -222,6 +222,13 @@
 
        Compile-in code to support SCO-style function keys.
 
+  --enable-tcap-query     enable termcap query/report
+
+       Compile-in code to support experimental DCS '+' control sequence, which
+       allows an application to ask xterm what control sequences it would
+       transmit for specified function keys, given the termcap or terminfo
+       names.
+
   --enable-toolbar        enable pulldown menus on toolbar
 
        Compile-in code that builds a toolbar with pulldown menus.  The
Index: Makefile.in
--- xterm-147+/Makefile.in      Fri Oct 27 21:21:05 2000
+++ xterm-148/Makefile.in       Sun Oct 29 18:03:09 2000
@@ -40,6 +40,7 @@
 #### End of system configuration section. ####
 
 RM              = rm -f
+LINT           = lint
 
 DESTDIR                =
 BINDIR         = $(DESTDIR)$(bindir)
@@ -179,8 +180,8 @@
        tbl ctlseqs.ms | groff -ms >$@
 
 lint:
-       lint $(CPPFLAGS) $(SRCS1)
-       lint $(CPPFLAGS) $(SRCS2)
+       $(LINT) $(CPPFLAGS) $(SRCS1)
+       $(LINT) $(CPPFLAGS) $(SRCS2)
 
 tags:
        ctags $(SRCS) $(HDRS)
Index: aclocal.m4
--- xterm-147+/aclocal.m4       Fri Oct 27 21:21:05 2000
+++ xterm-148/aclocal.m4        Mon Oct 30 05:19:35 2000
@@ -483,18 +483,23 @@
 make an error
 #endif],
        [cf_cv_gnu_source=no],
-       [cf_save="$CFLAGS"
-        CFLAGS="$CFLAGS -D_GNU_SOURCE"
+       [cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
         AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifdef _XOPEN_SOURCE
 make an error
 #endif],
        [cf_cv_gnu_source=no],
        [cf_cv_gnu_source=yes])
-       CFLAGS="$cf_save"
+       CPPFLAGS="$cf_save"
        ])
 ])
-test "$cf_cv_gnu_source" = yes && CFLAGS="$CFLAGS -D_GNU_SOURCE"
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
+AC_DEFUN([CF_HELP_MESSAGE],
+[AC_DIVERT_HELP([$1])dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl Use imake to obtain compiler flags.  We could, in principle, write tests to
@@ -1122,10 +1127,10 @@
 do
 
        if test -z "$cf_x_athena_include" ; then
-               cf_save="$CFLAGS"
+               cf_save="$CPPFLAGS"
                cf_test=X11/$cf_x_athena/SimpleMenu.h
                if test $cf_path != default ; then
-                       CFLAGS="-I$cf_path/include $cf_save"
+                       CPPFLAGS="-I$cf_path/include $cf_save"
                        AC_MSG_CHECKING(for $cf_test in $cf_path)
                else
                        AC_MSG_CHECKING(for $cf_test)
@@ -1139,7 +1144,7 @@
                if test "$cf_result" = yes ; then
                        cf_x_athena_include=$cf_path
                else
-                       CFLAGS="$cf_save"
+                       CPPFLAGS="$cf_save"
                fi
        fi
 
Index: charproc.c
--- xterm-147+/charproc.c       Fri Oct 27 21:21:05 2000
+++ xterm-148/charproc.c        Sun Oct 29 20:44:45 2000
@@ -349,131 +349,138 @@
 #endif
 };
 
+#ifdef VMS
+#define OS_DEPENDENT_PRINT_COMMAND "print/delete/noflag"
+#else  /* VMS */
+#define OS_DEPENDENT_PRINT_COMMAND "lpr"
+#endif /* VMS */
+
 static XtResource resources[] = {
-Sres(XtNfont,          XtCFont,        misc.f_n,               DEFFONT),
-Sres(XtNboldFont,      XtCBoldFont,    misc.f_b,               DEFBOLDFONT),
+Bres(XtNallowSendEvents, XtCAllowSendEvents, screen.allowSendEvents, FALSE),
+Bres(XtNalwaysHighlight, XtCAlwaysHighlight, screen.always_highlight, FALSE),
+Bres(XtNappcursorDefault, XtCAppcursorDefault, misc.appcursorDefault, FALSE),
+Bres(XtNappkeypadDefault, XtCAppkeypadDefault, misc.appkeypadDefault, FALSE),
+Bres(XtNautoWrap,      XtCAutoWrap,    misc.autoWrap,          TRUE),
+Bres(XtNawaitInput,    XtCAwaitInput,  screen.awaitInput,      FALSE),
+Bres(XtNbackarrowKey,  XtCBackarrowKey, screen.backarrow_key, TRUE),
+Bres(XtNboldMode,      XtCBoldMode, screen.bold_mode,          TRUE),
 Bres(XtNc132,          XtCC132,        screen.c132,            FALSE),
-Sres(XtNcharClass,     XtCCharClass,   screen.charClass,       NULL),
 Bres(XtNcurses,                XtCCurses,      screen.curses,          FALSE),
-Bres(XtNhpLowerleftBugCompat, XtCHpLowerleftBugCompat, screen.hp_ll_bc, FALSE),
-#if OPT_XMC_GLITCH
-Ires(XtNxmcGlitch,     XtCXmcGlitch,   screen.xmc_glitch,      0),
-Ires(XtNxmcAttributes, XtCXmcAttributes, screen.xmc_attributes, 1),
-Bres(XtNxmcInline,     XtCXmcInline,   screen.xmc_inline,      FALSE),
-Bres(XtNxmcMoveSGR,    XtCXmcMoveSGR,  screen.move_sgr_ok,     TRUE),
-#endif
 Bres(XtNcutNewline,    XtCCutNewline,  screen.cutNewline,      TRUE),
 Bres(XtNcutToBeginningOfLine, XtCCutToBeginningOfLine, screen.cutToBeginningOfLine, TRUE),
-Bres(XtNhighlightSelection, XtCHighlightSelection, screen.highlight_selection, FALSE),
-Bres(XtNtrimSelection, XtCTrimSelection, screen.trim_selection, FALSE),
-{XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
-       XtOffsetOf(XtermWidgetRec, core.background_pixel),
-       XtRString, XtDefaultBackground},
-Cres(XtNforeground,    screen.foreground,      XtDefaultForeground),
-Cres(XtNcursorColor,   screen.cursorcolor,     XtDefaultForeground),
-#if OPT_BLINK_CURS
-Bres(XtNcursorBlink,   XtCCursorBlink, screen.cursor_blink,    FALSE),
-Ires(XtNcursorOnTime,  XtCCursorOnTime, screen.cursor_on,      600),
-Ires(XtNcursorOffTime, XtCCursorOffTime, screen.cursor_off,    300),
-#endif
-Sres(XtNkeyboardDialect, XtCKeyboardDialect, screen.keyboard_dialect, DFT_KBD_DIALECT),
-Bres(XtNeightBitInput, XtCEightBitInput, screen.input_eight_bits, TRUE),
-Bres(XtNeightBitOutput, XtCEightBitOutput, screen.output_eight_bits, TRUE),
+Bres(XtNdeleteIsDEL,   XtCDeleteIsDEL, screen.delete_is_del,   2),
+Bres(XtNdynamicColors, XtCDynamicColors, misc.dynamicColors,   TRUE),
 Bres(XtNeightBitControl, XtCEightBitControl, screen.control_eight_bits, FALSE),
-Bres(XtNmetaSendsEscape, XtCMetaSendsEscape, screen.meta_sends_esc, FALSE),
-Sres(XtNgeometry,      XtCGeometry, misc.geo_metry,            NULL),
-Bres(XtNalwaysHighlight, XtCAlwaysHighlight, screen.always_highlight, FALSE),
-Bres(XtNappcursorDefault, XtCAppcursorDefault, misc.appcursorDefault, FALSE),
-Bres(XtNappkeypadDefault, XtCAppkeypadDefault, misc.appkeypadDefault, FALSE),
-Bres(XtNbackarrowKey, XtCBackarrowKey, screen.backarrow_key, TRUE),
-Ires(XtNbellSuppressTime, XtCBellSuppressTime, screen.bellSuppressTime, BELLSUPPRESSMSEC),
-Sres(XtNtekGeometry,   XtCGeometry, misc.T_geometry,           NULL),
-Ires(XtNinternalBorder, XtCBorderWidth, screen.border,         DEFBORDER),
+Bres(XtNeightBitInput, XtCEightBitInput, screen.input_eight_bits, TRUE),
+Bres(XtNeightBitOutput, XtCEightBitOutput, screen.output_eight_bits, TRUE),
+Bres(XtNhighlightSelection, XtCHighlightSelection, screen.highlight_selection, FALSE),
+Bres(XtNhpLowerleftBugCompat, XtCHpLowerleftBugCompat, screen.hp_ll_bc, FALSE),
 Bres(XtNjumpScroll,    XtCJumpScroll, screen.jumpscroll,       TRUE),
-Bres(XtNoldXtermFKeys, XtCOldXtermFKeys, screen.old_fkeys,     FALSE),
-Bres(XtNdeleteIsDEL,   XtCDeleteIsDEL, screen.delete_is_del,   2),
-#ifdef ALLOWLOGGING
-Sres(XtNlogFile,       XtCLogfile, screen.logfile,             NULL),
-Bres(XtNlogging,       XtCLogging, misc.log_on,                FALSE),
-Bres(XtNlogInhibit,    XtCLogInhibit, misc.logInhibit,         FALSE),
-#endif
 Bres(XtNloginShell,    XtCLoginShell, misc.login_shell,        FALSE),
 Bres(XtNmarginBell,    XtCMarginBell, screen.marginbell,       FALSE),
-Cres(XtNpointerColor,  screen.mousecolor,      XtDefaultForeground),
-{XtNpointerColorBackground, XtCBackground, XtRPixel, sizeof(Pixel),
-       XtOffsetOf(XtermWidgetRec, screen.mousecolorback),
-       XtRString, "XtDefaultBackground"},
-{XtNpointerShape,XtCCursor, XtRCursor, sizeof(Cursor),
-       XtOffsetOf(XtermWidgetRec, screen.pointer_cursor),
-       XtRString, (XtPointer) "xterm"},
-Sres(XtNanswerbackString, XtCAnswerbackString, screen.answer_back, ""),
-#if OPT_PRINT_COLORS
-Ires(XtNprintAttributes, XtCPrintAttributes, screen.print_attributes, 1),
-#endif
+Bres(XtNmetaSendsEscape, XtCMetaSendsEscape, screen.meta_sends_esc, FALSE),
+Bres(XtNmultiScroll,   XtCMultiScroll, screen.multiscroll, FALSE),
+Bres(XtNoldXtermFKeys, XtCOldXtermFKeys, screen.old_fkeys,     FALSE),
 Bres(XtNprinterAutoClose, XtCPrinterAutoClose, screen.printer_autoclose, FALSE),
-Ires(XtNprinterControlMode, XtCPrinterControlMode, screen.printer_controlmode, 0),
-#ifdef VMS
-#define OS_DEPENDENT_PRINT_COMMAND "print/delete/noflag"
-#else  /* VMS */
-#define OS_DEPENDENT_PRINT_COMMAND "lpr"
-#endif /* VMS */
-Sres(XtNprinterCommand,        XtCPrinterCommand, screen.printer_command, OS_DEPENDENT_PRINT_COMMAND),
 Bres(XtNprinterExtent, XtCPrinterExtent, screen.printer_extent, FALSE),
 Bres(XtNprinterFormFeed, XtCPrinterFormFeed, screen.printer_formfeed, FALSE),
-Ires(XtNmultiClickTime, XtCMultiClickTime, screen.multiClickTime, MULTICLICKTIME),
-Bres(XtNmultiScroll,   XtCMultiScroll, screen.multiscroll, FALSE),
-Ires(XtNnMarginBell,   XtCColumn, screen.nmarginbell, N_MARGINBELL),
 Bres(XtNreverseVideo,  XtCReverseVideo, misc.re_verse, FALSE),
-{XtNresizeGravity, XtCResizeGravity, XtRGravity, sizeof(XtGravity),
-       XtOffsetOf(XtermWidgetRec, misc.resizeGravity),
-       XtRImmediate, (XtPointer) SouthWestGravity},
 Bres(XtNreverseWrap,   XtCReverseWrap, misc.reverseWrap,       FALSE),
-Bres(XtNautoWrap,      XtCAutoWrap,    misc.autoWrap,          TRUE),
-Ires(XtNsaveLines,     XtCSaveLines,   screen.savelines,       SAVELINES),
 Bres(XtNscrollBar,     XtCScrollBar,   misc.scrollbar,         FALSE),
-Ires(XtNlimitResize,   XtCLimitResize, misc.limit_resize,      1),
-#ifdef SCROLLBAR_RIGHT
-Bres(XtNrightScrollBar, XtCRightScrollBar, misc.useRight, FALSE),
-#endif
-Bres(XtNscrollTtyOutput, XtCScrollCond, screen.scrollttyoutput, TRUE),
 Bres(XtNscrollKey,     XtCScrollCond,  screen.scrollkey,       FALSE),
-Ires(XtNscrollLines,   XtCScrollLines, screen.scrolllines,     SCROLLLINES),
+Bres(XtNscrollTtyOutput, XtCScrollCond, screen.scrollttyoutput, TRUE),
 Bres(XtNsignalInhibit, XtCSignalInhibit, misc.signalInhibit,   FALSE),
-#if OPT_NUM_LOCK
-Bres(XtNnumLock,       XtCNumLock,     misc.real_NumLock,      TRUE),
-Bres(XtNalwaysUseMods, XtCAlwaysUseMods, misc.alwaysUseMods,   FALSE),
-#endif
-#if OPT_SHIFT_KEYS
-Bres(XtNshiftKeys,     XtCShiftKeys,   misc.shift_keys,        TRUE),
-#endif
-#if OPT_SUNPC_KBD
-Ires(XtNctrlFKeys,     XtCCtrlFKeys,   misc.ctrl_fkeys,        10),
-#endif
-#if OPT_TEK4014
-Bres(XtNtekInhibit,    XtCTekInhibit,  misc.tekInhibit,        FALSE),
-Bres(XtNtekSmall,      XtCTekSmall,    misc.tekSmall,          FALSE),
-Bres(XtNtekStartup,    XtCTekStartup,  screen.TekEmu,          FALSE),
-#endif
 Bres(XtNtiteInhibit,   XtCTiteInhibit, misc.titeInhibit,       FALSE),
+Bres(XtNtrimSelection, XtCTrimSelection, screen.trim_selection, FALSE),
+Bres(XtNunderLine,     XtCUnderLine, screen.underline,         TRUE),
 Bres(XtNvisualBell,    XtCVisualBell,  screen.visualbell,      FALSE),
-Bres(XtNallowSendEvents, XtCAllowSendEvents, screen.allowSendEvents, FALSE),
-Bres(XtNawaitInput,    XtCAwaitInput,  screen.awaitInput,      FALSE),
-Sres("font1", "Font1", screen.menu_font_names[fontMenu_font1], NULL),
-Sres("font2", "Font2", screen.menu_font_names[fontMenu_font2], NULL),
-Sres("font3", "Font3", screen.menu_font_names[fontMenu_font3], NULL),
-Sres("font4", "Font4", screen.menu_font_names[fontMenu_font4], NULL),
-Sres("font5", "Font5", screen.menu_font_names[fontMenu_font5], NULL),
-Sres("font6", "Font6", screen.menu_font_names[fontMenu_font6], NULL),
+Cres(XtNcursorColor,   screen.cursorcolor,     XtDefaultForeground),
+Cres(XtNforeground,    screen.foreground,      XtDefaultForeground),
+Cres(XtNpointerColor,  screen.mousecolor,      XtDefaultForeground),
+Dres(XtNbackground,    core.background_pixel,  XtDefaultBackground),
+Dres(XtNpointerColorBackground, screen.mousecolorback, "XtDefaultBackground"),
+Ires(XtNbellSuppressTime, XtCBellSuppressTime, screen.bellSuppressTime, BELLSUPPRESSMSEC),
+Ires(XtNinternalBorder, XtCBorderWidth, screen.border,         DEFBORDER),
+Ires(XtNlimitResize,   XtCLimitResize, misc.limit_resize,      1),
+Ires(XtNmultiClickTime, XtCMultiClickTime, screen.multiClickTime, MULTICLICKTIME),
+Ires(XtNnMarginBell,   XtCColumn, screen.nmarginbell, N_MARGINBELL),
+Ires(XtNprinterControlMode, XtCPrinterControlMode, screen.printer_controlmode, 0),
+Ires(XtNsaveLines,     XtCSaveLines,   screen.savelines,       SAVELINES),
+Ires(XtNscrollLines,   XtCScrollLines, screen.scrolllines,     SCROLLLINES),
+Sres("font1",          "Font1", screen.menu_font_names[fontMenu_font1], NULL),
+Sres("font2",          "Font2", screen.menu_font_names[fontMenu_font2], NULL),
+Sres("font3",          "Font3", screen.menu_font_names[fontMenu_font3], NULL),
+Sres("font4",          "Font4", screen.menu_font_names[fontMenu_font4], NULL),
+Sres("font5",          "Font5", screen.menu_font_names[fontMenu_font5], NULL),
+Sres("font6",          "Font6", screen.menu_font_names[fontMenu_font6], NULL),
+Sres(XtNanswerbackString, XtCAnswerbackString, screen.answer_back, ""),
+Sres(XtNboldFont,      XtCBoldFont,    misc.f_b,               DEFBOLDFONT),
+Sres(XtNcharClass,     XtCCharClass,   screen.charClass,       NULL),
+Sres(XtNdecTerminalID, XtCDecTerminalID, screen.term_id,       DFT_DECID),
+Sres(XtNfont,          XtCFont,        misc.f_n,               DEFFONT),
+Sres(XtNgeometry,      XtCGeometry, misc.geo_metry,            NULL),
+Sres(XtNkeyboardDialect, XtCKeyboardDialect, screen.keyboard_dialect, DFT_KBD_DIALECT),
+Sres(XtNprinterCommand,        XtCPrinterCommand, screen.printer_command, OS_DEPENDENT_PRINT_COMMAND),
+Sres(XtNtekGeometry,   XtCGeometry,    misc.T_geometry,        NULL),
+
+{XtNresizeGravity, XtCResizeGravity, XtRGravity, sizeof(XtGravity),
+       XtOffsetOf(XtermWidgetRec, misc.resizeGravity),
+       XtRImmediate, (XtPointer) SouthWestGravity},
+
+{XtNpointerShape,XtCCursor, XtRCursor, sizeof(Cursor),
+       XtOffsetOf(XtermWidgetRec, screen.pointer_cursor),
+       XtRString, (XtPointer) "xterm"},
+
+#ifdef ALLOWLOGGING
+Bres(XtNlogInhibit,    XtCLogInhibit, misc.logInhibit,         FALSE),
+Bres(XtNlogging,       XtCLogging, misc.log_on,                FALSE),
+Sres(XtNlogFile,       XtCLogfile, screen.logfile,             NULL),
+#endif
+
+#ifndef NO_ACTIVE_ICON
+Bres("activeIcon",     "ActiveIcon", misc.active_icon,         FALSE),
+Ires("iconBorderWidth", XtCBorderWidth, misc.icon_border_width, 2),
+
+{"iconFont", "IconFont", XtRFontStruct, sizeof(XFontStruct),
+       XtOffsetOf(XtermWidgetRec, screen.fnt_icon),
+       XtRString, (XtPointer)XtExtdefaultfont},
+
+{"iconBorderColor", XtCBorderColor, XtRPixel, sizeof(Pixel),
+       XtOffsetOf(XtermWidgetRec, misc.icon_border_pixel),
+       XtRString, XtExtdefaultbackground},
+
+#endif /* NO_ACTIVE_ICON */
+
+#if OPT_BLINK_CURS
+Bres(XtNcursorBlink,   XtCCursorBlink, screen.cursor_blink,    FALSE),
+Ires(XtNcursorOnTime,  XtCCursorOnTime, screen.cursor_on,      600),
+Ires(XtNcursorOffTime, XtCCursorOffTime, screen.cursor_off,    300),
+#endif
+
 #if OPT_DEC_CHRSET
 Bres(XtNfontDoublesize, XtCFontDoublesize, screen.font_doublesize, TRUE),
 Ires(XtNcacheDoublesize, XtCCacheDoublesize, screen.cache_doublesize, NUM_CHRSET),
 #endif
+
+#if OPT_HIGHLIGHT_COLOR
+Cres(XtNhighlightColor,        screen.highlightcolor,  XtDefaultForeground),
+#endif /* OPT_HIGHLIGHT_COLOR */
+
 #if OPT_INPUT_METHOD
+Bres(XtNopenIm,                XtCOpenIm,      misc.open_im,           TRUE),
 Sres(XtNinputMethod,   XtCInputMethod, misc.input_method,      NULL),
 Sres(XtNpreeditType,   XtCPreeditType, misc.preedit_type,      "Root"),
-Bres(XtNopenIm,                XtCOpenIm,      misc.open_im,           TRUE),
 #endif
+
 #if OPT_ISO_COLORS
+Bres(XtNboldColors,    XtCColorMode, screen.boldColors,        TRUE),
+Bres(XtNcolorAttrMode, XtCColorMode, screen.colorAttrMode,     FALSE),
+Bres(XtNcolorBDMode,   XtCColorMode, screen.colorBDMode,       FALSE),
+Bres(XtNcolorBLMode,   XtCColorMode, screen.colorBLMode,       FALSE),
+Bres(XtNcolorMode,     XtCColorMode, screen.colorMode,         DFT_COLORMODE),
+Bres(XtNcolorRVMode,   XtCColorMode, screen.colorRVMode,       FALSE),
+Bres(XtNcolorULMode,   XtCColorMode, screen.colorULMode,       FALSE),
+
 COLOR_RES(XtNcolor0,   screen.Acolors[COLOR_0],        DFT_COLOR("black")),
 COLOR_RES(XtNcolor1,   screen.Acolors[COLOR_1],        DFT_COLOR("red3")),
 COLOR_RES(XtNcolor2,   screen.Acolors[COLOR_2],        DFT_COLOR("green3")),
@@ -490,56 +497,72 @@
 COLOR_RES(XtNcolor13,  screen.Acolors[COLOR_13],       DFT_COLOR("magenta")),
 COLOR_RES(XtNcolor14,  screen.Acolors[COLOR_14],       DFT_COLOR("cyan")),
 COLOR_RES(XtNcolor15,  screen.Acolors[COLOR_15],       DFT_COLOR("white")),
+COLOR_RES(XtNcolorBD,  screen.Acolors[COLOR_BD],       DFT_COLOR(XtDefaultForeground)),
+COLOR_RES(XtNcolorBL,  screen.Acolors[COLOR_BL],       DFT_COLOR(XtDefaultForeground)),
+COLOR_RES(XtNcolorUL,  screen.Acolors[COLOR_UL],       DFT_COLOR(XtDefaultForeground)),
+COLOR_RES(XtNcolorRV,  screen.Acolors[COLOR_RV],       DFT_COLOR(XtDefaultForeground)),
+
 #if OPT_256_COLORS
 # include <256colres.h>
 #elif OPT_88_COLORS
 # include <88colres.h>
 #endif
-COLOR_RES(XtNcolorBD,  screen.Acolors[COLOR_BD],       DFT_COLOR(XtDefaultForeground)),
-COLOR_RES(XtNcolorBL,  screen.Acolors[COLOR_BL],       DFT_COLOR(XtDefaultForeground)),
-COLOR_RES(XtNcolorUL,  screen.Acolors[COLOR_UL],       DFT_COLOR(XtDefaultForeground)),
-COLOR_RES(XtNcolorRV,  screen.Acolors[COLOR_RV],       DFT_COLOR(XtDefaultForeground)),
-Bres(XtNcolorMode,     XtCColorMode, screen.colorMode, DFT_COLORMODE),
-Bres(XtNcolorULMode,   XtCColorMode, screen.colorULMode,       FALSE),
-Bres(XtNcolorBDMode,   XtCColorMode, screen.colorBDMode,       FALSE),
-Bres(XtNcolorBLMode,   XtCColorMode, screen.colorBLMode,       FALSE),
-Bres(XtNcolorRVMode,   XtCColorMode, screen.colorRVMode,       FALSE),
-Bres(XtNcolorAttrMode, XtCColorMode, screen.colorAttrMode,     FALSE),
-Bres(XtNboldColors,    XtCColorMode, screen.boldColors,        TRUE),
+
 #endif /* OPT_ISO_COLORS */
-Bres(XtNdynamicColors, XtCDynamicColors, misc.dynamicColors,   TRUE),
-#if OPT_HIGHLIGHT_COLOR
-Cres(XtNhighlightColor,        screen.highlightcolor,  XtDefaultForeground),
-#endif /* OPT_HIGHLIGHT_COLOR */
-Bres(XtNboldMode,      XtCBoldMode, screen.bold_mode,          TRUE),
-Bres(XtNunderLine,     XtCUnderLine, screen.underline,         TRUE),
-Sres(XtNdecTerminalID, XtCDecTerminalID, screen.term_id,       DFT_DECID),
-#ifndef NO_ACTIVE_ICON
-Bres("activeIcon",     "ActiveIcon", misc.active_icon,         FALSE),
-{"iconFont", "IconFont", XtRFontStruct, sizeof(XFontStruct),
-       XtOffsetOf(XtermWidgetRec, screen.fnt_icon),
-       XtRString, (XtPointer)XtExtdefaultfont},
-Ires("iconBorderWidth", XtCBorderWidth, misc.icon_border_width, 2),
-{"iconBorderColor", XtCBorderColor, XtRPixel, sizeof(Pixel),
-       XtOffsetOf(XtermWidgetRec, misc.icon_border_pixel),
-       XtRString, XtExtdefaultbackground},
-#endif /* NO_ACTIVE_ICON */
+
+#if OPT_NUM_LOCK
+Bres(XtNalwaysUseMods, XtCAlwaysUseMods, misc.alwaysUseMods,   FALSE),
+Bres(XtNnumLock,       XtCNumLock,     misc.real_NumLock,      TRUE),
+#endif
+
+#if OPT_PRINT_COLORS
+Ires(XtNprintAttributes, XtCPrintAttributes, screen.print_attributes, 1),
+#endif
+
+#if OPT_SHIFT_KEYS
+Bres(XtNshiftKeys,     XtCShiftKeys,   misc.shift_keys,        TRUE),
+#endif
+
+#if OPT_SUNPC_KBD
+Ires(XtNctrlFKeys,     XtCCtrlFKeys,   misc.ctrl_fkeys,        10),
+#endif
+
+#if OPT_TEK4014
+Bres(XtNtekInhibit,    XtCTekInhibit,  misc.tekInhibit,        FALSE),
+Bres(XtNtekSmall,      XtCTekSmall,    misc.tekSmall,          FALSE),
+Bres(XtNtekStartup,    XtCTekStartup,  screen.TekEmu,          FALSE),
+#endif
+
 #if OPT_TOOLBAR
 {XtNmenuBar, XtCMenuBar, XtRWidget, sizeof(Widget),
        XtOffsetOf(XtermWidgetRec, screen.fullVwin.menu_bar),
        XtRWidget, (XtPointer) 0},
 Ires(XtNmenuHeight, XtCMenuHeight, screen.fullVwin.menu_height, 25),
 #endif
+
 #if OPT_WIDE_CHARS
 {XtNutf8, XtCUtf8, XtRInt, sizeof(int),
        XtOffsetOf(XtermWidgetRec, screen.utf8_mode),
        XtRString, defaultUTF8},
-Bres(XtNwideChars,     XtCWideChars,   screen.wide_chars,      FALSE),
-Sres(XtNwideFont,      XtCWideFont,    misc.f_w,               DEFWIDEFONT),
+Bres(XtNwideChars,     XtCWideChars,           screen.wide_chars,      FALSE),
+Sres(XtNwideBoldFont,  XtCWideBoldFont,        misc.f_wb,              DEFWIDEBOLDFONT),
+Sres(XtNwideFont,      XtCWideFont,            misc.f_w,               DEFWIDEFONT),
+#endif
+
+#if OPT_XMC_GLITCH
+Bres(XtNxmcInline,     XtCXmcInline,   screen.xmc_inline,      FALSE),
+Bres(XtNxmcMoveSGR,    XtCXmcMoveSGR,  screen.move_sgr_ok,     TRUE),
+Ires(XtNxmcAttributes, XtCXmcAttributes, screen.xmc_attributes, 1),
+Ires(XtNxmcGlitch,     XtCXmcGlitch,   screen.xmc_glitch,      0),
 #endif
+
+#ifdef SCROLLBAR_RIGHT
+Bres(XtNrightScrollBar, XtCRightScrollBar, misc.useRight, FALSE),
+#endif
+
 #ifdef XRENDERFONT
-Sres(XtNfaceName,      XtCFaceName,    misc.face_name,         DEFFACENAME),
 Ires(XtNfaceSize,      XtCFaceSize,    misc.face_size,         DEFFACESIZE),
+Sres(XtNfaceName,      XtCFaceName,    misc.face_name,         DEFFACENAME),
 #endif
 };
 
@@ -4226,7 +4249,7 @@
 
    wnew->screen.term_id = request->screen.term_id;
    for (s = request->screen.term_id; *s; s++) {
-       if (!isalpha(*s))
+       if (!isalpha(CharOf(*s)))
            break;
    }
    wnew->screen.terminal_id = atoi(s);
@@ -4502,18 +4525,24 @@
        TabReset (term->tabs);
 
        screen->menu_font_names[fontMenu_fontdefault] = term->misc.f_n;
-       screen->fnt_norm = screen->fnt_bold = screen->fnt_dwd = NULL;
+       screen->fnt_norm = NULL;
+       screen->fnt_bold = NULL;
+#if OPT_WIDE_CHARS
+       screen->fnt_dwd = NULL;
+       screen->fnt_dwdb = NULL;
+#endif
        if (!xtermLoadFont(screen,
                           VT_FONTSET(term->misc.f_n,
                                      term->misc.f_b,
-                                     term->misc.f_w),
+                                     term->misc.f_w,
+                                     term->misc.f_wb),
                           False, 0)) {
            if (XmuCompareISOLatin1(term->misc.f_n, "fixed") != 0) {
                fprintf (stderr,
                     "%s:  unable to open font \"%s\", trying \"fixed\"....\n",
                     xterm_name, term->misc.f_n);
                (void) xtermLoadFont (screen,
-                                     VT_FONTSET("fixed", NULL, NULL),
+                                     VT_FONTSET("fixed", NULL, NULL, NULL),
                                      False, 0);
                screen->menu_font_names[fontMenu_fontdefault] = "fixed";
            }
@@ -4756,11 +4785,11 @@
            SysError(ERROR_VINIT);
 
        for(ns = s; ns && *s;) {
-           while (*s && isspace(*s)) s++;
+           while (*s && isspace(CharOf(*s))) s++;
            if (!*s) break;
            if ((ns = end = strchr(s, ',')) == 0)
                end = s + strlen(s);
-           while ((end != s) && isspace(end[-1])) end--;
+           while ((end != s) && isspace(CharOf(end[-1]))) end--;
 
            if (end != s) {
                strcpy(t, "@im=");
@@ -4793,13 +4822,13 @@
 
     found = False;
     for(s = term->misc.preedit_type; s && !found;) {
-       while (*s && isspace(*s)) s++;
+       while (*s && isspace(CharOf(*s))) s++;
        if (!*s) break;
        if ((ns = end = strchr(s, ',')) != 0)
            ns++;
        else
            end = s + strlen(s);
-       while ((end != s) && isspace(end[-1])) end--;
+       while ((end != s) && isspace(CharOf(end[-1]))) end--;
 
        if (end != s) { /* just in case we have a spurious comma */
            if (!strncmp(s, "OverTheSpot", end - s)) {
@@ -4877,6 +4906,7 @@
        if (xtermLoadFont(&newvt->screen,
                        VT_FONTSET(newvt->screen.menu_font_names[curvt->screen.menu_font_number],
                                   newvt->screen.menu_font_names[curvt->screen.menu_font_number],
+                                  NULL,
                                   NULL),
                        TRUE, newvt->screen.menu_font_number)) {
            /* resizing does the redisplay, so don't ask for it here */
@@ -5394,7 +5424,7 @@
 
     for (i = 0, len = strlen (s), acc = 0, numbers = digits = 0;
         i < len; i++) {
-       char c = s[i];
+       Char c = s[i];
 
        if (isspace(c)) {
            continue;
@@ -5507,7 +5537,7 @@
 
     (void) sprintf( pmapName, "%sKeymap", params[0] );
     (void) strcpy( pmapClass, pmapName );
-    if (islower(pmapClass[0])) pmapClass[0] = toupper(pmapClass[0]);
+    if (islower(CharOf(pmapClass[0]))) pmapClass[0] = toupper(pmapClass[0]);
     XtGetSubresources( w, (XtPointer)&keymap, pmapName, pmapClass,
                       key_resources, (Cardinal)1, NULL, (Cardinal)0 );
     if (keymap != NULL)
@@ -5580,7 +5610,7 @@
           we are a little more liberal here. */
        if (len > 1000  ||  strchr(val, '\n'))
            return;
-       if (!xtermLoadFont (&term->screen, VT_FONTSET(val, NULL, NULL), True, fontMenu_fontsel))
+       if (!xtermLoadFont (&term->screen, VT_FONTSET(val, NULL, NULL, NULL), True, fontMenu_fontsel))
            Bell(XkbBI_MinorError,0);
     }
 }
Index: configure
--- xterm-147+/configure        Fri Oct 27 21:21:05 2000
+++ xterm-148/configure Mon Oct 30 05:34:48 2000
@@ -191,13 +191,14 @@
   --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)
+Optional Features:
   --disable-active-icon   disable X11R6.3 active-icon feature
   --disable-ansi-color    disable ANSI color
   --disable-16-color      disable 16-color support
   --enable-256-color      enable 256-color support
-  --enable-88-color       enable 88-color support
 EOF
 cat <<EOF
+  --enable-88-color       enable 88-color support
   --disable-blink-cursor  disable support for blinking cursor
   --disable-bold-color    disable PC-style mapping of bold colors
   --disable-color-mode    disable default colorMode resource
@@ -209,23 +210,25 @@
   --disable-i18n          disable internationalization
   --disable-initial-erase disable setup for stty erase
   --disable-input-method  disable input-method
-  --enable-logging        enable logging
 EOF
 cat <<EOF
+  --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
+  --enable-tcap-query     compile-in termcap-query support
   --disable-tek4014       disable tek4014 emulation
   --enable-toolbar        compile-in toolbar for pulldown menus
   --disable-vt52          disable VT52 emulation
   --enable-wide-chars     enable wide-character support
   --enable-dec-locator    enable DECterm Locator support
-  --disable-ziconbeep     disable -ziconbeep option
-  --enable-trace          test: set to enable debugging traces
 EOF
 cat <<EOF
+  --disable-ziconbeep     disable -ziconbeep option
+Testing/development Options:
+  --enable-trace          test: set to enable debugging traces
   --disable-echo          display "compiling" commands
   --enable-xmc-glitch     test: enable xmc magic-cookie emulation
   --enable-warnings       test: turn on GCC compiler warnings
@@ -596,7 +599,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:600: checking host system type" >&5
+echo "configure:603: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -654,7 +657,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:658: checking for $ac_word" >&5
+echo "configure:661: 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
@@ -684,7 +687,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:688: checking for $ac_word" >&5
+echo "configure:691: 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
@@ -735,7 +738,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:739: checking for $ac_word" >&5
+echo "configure:742: 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
@@ -767,7 +770,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:774: 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.
@@ -778,12 +781,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 782 "configure"
+#line 785 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:790: \"$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
@@ -809,12 +812,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:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:816: 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:818: checking whether we are using GNU C" >&5
+echo "configure:821: 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
@@ -823,7 +826,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$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:830: \"$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
@@ -842,7 +845,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:849: 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
@@ -874,7 +877,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:878: checking how to run the C preprocessor" >&5
+echo "configure:881: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -889,13 +892,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 893 "configure"
+#line 896 "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:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:902: \"$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
   :
@@ -906,13 +909,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 910 "configure"
+#line 913 "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:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:919: \"$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
   :
@@ -923,13 +926,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 927 "configure"
+#line 930 "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:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:936: \"$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
   :
@@ -955,13 +958,13 @@
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:959: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:962: 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 965 "configure"
+#line 968 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -979,7 +982,7 @@
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 983 "configure"
+#line 986 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1005,7 +1008,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:1009: checking for $ac_word" >&5
+echo "configure:1012: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1046,7 +1049,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:1050: checking for a BSD compatible install" >&5
+echo "configure:1053: 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
@@ -1101,9 +1104,9 @@
 
 ###    checks for UNIX variants that set C preprocessor variables
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1105: checking for AIX" >&5
+echo "configure:1108: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1107 "configure"
+#line 1110 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -1125,7 +1128,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1129: checking for POSIXized ISC" >&5
+echo "configure:1132: 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
@@ -1147,17 +1150,17 @@
 
 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1151: checking for minix/config.h" >&5
+echo "configure:1154: 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 1156 "configure"
+#line 1159 "configure"
 #include "confdefs.h"
 #include <minix/config.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1161: \"$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*
@@ -1204,17 +1207,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1208: checking for $ac_hdr" >&5
+echo "configure:1211: 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 1213 "configure"
+#line 1216 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1221: \"$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*
@@ -1244,13 +1247,13 @@
 ###    checks for typedefs
 
 echo $ac_n "checking for size_t in <sys/types.h> or <stdio.h>""... $ac_c" 1>&6
-echo "configure:1248: checking for size_t in <sys/types.h> or <stdio.h>" >&5
+echo "configure:1251: 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 1254 "configure"
+#line 1257 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1263,7 +1266,7 @@
 size_t x
 ; return 0; }
 EOF
-if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_size_t=yes
 else
@@ -1283,12 +1286,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1287: checking for ANSI C header files" >&5
+echo "configure:1290: 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 1292 "configure"
+#line 1295 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1296,7 +1299,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1303: \"$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*
@@ -1313,7 +1316,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 1317 "configure"
+#line 1320 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1331,7 +1334,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 1335 "configure"
+#line 1338 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1352,7 +1355,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1356 "configure"
+#line 1359 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1363,7 +1366,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1387,12 +1390,12 @@
 fi
 
 echo $ac_n "checking for time_t""... $ac_c" 1>&6
-echo "configure:1391: checking for time_t" >&5
+echo "configure:1394: 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 1396 "configure"
+#line 1399 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1430,12 +1433,12 @@
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1434: checking for $ac_func" >&5
+echo "configure:1437: 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 1439 "configure"
+#line 1442 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1458,7 +1461,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1465: \"$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
@@ -1484,12 +1487,12 @@
 
 
 echo $ac_n "checking for memmove""... $ac_c" 1>&6
-echo "configure:1488: checking for memmove" >&5
+echo "configure:1491: 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 1493 "configure"
+#line 1496 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char memmove(); below.  */
@@ -1512,7 +1515,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1519: \"$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
@@ -1531,12 +1534,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for bcopy""... $ac_c" 1>&6
-echo "configure:1535: checking for bcopy" >&5
+echo "configure:1538: 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 1540 "configure"
+#line 1543 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char bcopy(); below.  */
@@ -1559,7 +1562,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1566: \"$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
@@ -1575,7 +1578,7 @@
   echo "$ac_t""yes" 1>&6
   
        echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
-echo "configure:1579: checking if bcopy does overlapping moves" >&5
+echo "configure:1582: 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
@@ -1584,7 +1587,7 @@
   cf_cv_good_bcopy=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 1588 "configure"
+#line 1591 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1597,7 +1600,7 @@
 }
                
 EOF
-if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1604: \"$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
@@ -1635,7 +1638,7 @@
 
 
 echo $ac_n "checking for full tgetent function""... $ac_c" 1>&6
-echo "configure:1639: checking for full tgetent function" >&5
+echo "configure:1642: 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
@@ -1650,7 +1653,7 @@
   echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
 else
   cat > conftest.$ac_ext <<EOF
-#line 1654 "configure"
+#line 1657 "configure"
 #include "confdefs.h"
 
 /* terminfo implementations ignore the buffer argument, making it useless for
@@ -1664,7 +1667,7 @@
        tgetent(buffer, "vt100");
        exit(buffer[0] == 0); }
 EOF
-if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1671: \"$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
@@ -1700,7 +1703,7 @@
 EOF
 
        cat > conftest.$ac_ext <<EOF
-#line 1704 "configure"
+#line 1707 "configure"
 #include "confdefs.h"
 
 #include <termcap.h>
@@ -1711,7 +1714,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define HAVE_TERMCAP_H 1
@@ -1729,7 +1732,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:1733: checking for partial tgetent function" >&5
+echo "configure:1736: 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
@@ -1738,14 +1741,14 @@
        for cf_termlib in $cf_TERMLIB ; do
                LIBS="$cf_save_LIBS -l$cf_termlib"
                cat > conftest.$ac_ext <<EOF
-#line 1742 "configure"
+#line 1745 "configure"
 #include "confdefs.h"
 
 int main() {
 tgetent(0, 0)
 ; return 0; }
 EOF
-if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1752: \"$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"
@@ -1768,17 +1771,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1772: checking for $ac_hdr" >&5
+echo "configure:1775: 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 1777 "configure"
+#line 1780 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1785: \"$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*
@@ -1819,17 +1822,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1823: checking for $ac_hdr" >&5
+echo "configure:1826: 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 1828 "configure"
+#line 1831 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1836: \"$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*
@@ -1856,13 +1859,13 @@
 done
 
 echo $ac_n "checking for lastlog path""... $ac_c" 1>&6
-echo "configure:1860: checking for lastlog path" >&5
+echo "configure:1863: checking for lastlog path" >&5
 if eval "test \"`echo '$''{'cf_cv_path_lastlog'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1869 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1877,7 +1880,7 @@
 char *path = _PATH_LASTLOG
 ; return 0; }
 EOF
-if { (eval echo configure:1881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_path_lastlog="_PATH_LASTLOG"
 else
@@ -1904,7 +1907,7 @@
 
 
 echo $ac_n "checking for utmp implementation""... $ac_c" 1>&6
-echo "configure:1908: checking for utmp implementation" >&5
+echo "configure:1911: checking for utmp implementation" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1912,7 +1915,7 @@
        cf_cv_have_utmp=no
 for cf_header in utmpx utmp ; do
        cat > conftest.$ac_ext <<EOF
-#line 1916 "configure"
+#line 1919 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1928,7 +1931,7 @@
        
 ; return 0; }
 EOF
-if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=$cf_header
         break
@@ -1938,7 +1941,7 @@
   rm -rf conftest*
   
        cat > conftest.$ac_ext <<EOF
-#line 1942 "configure"
+#line 1945 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -1954,7 +1957,7 @@
        
 ; return 0; }
 EOF
-if { (eval echo configure:1958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=$cf_header
         cat >> confdefs.h <<\EOF
@@ -1989,13 +1992,13 @@
 
 if test $cf_cv_have_utmp != no ; then
 echo $ac_n "checking if utmp.ut_host is declared""... $ac_c" 1>&6
-echo "configure:1993: checking if utmp.ut_host is declared" >&5
+echo "configure:1996: checking if utmp.ut_host is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_host'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 1999 "configure"
+#line 2002 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2004,7 +2007,7 @@
 struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp_ut_host=yes
 else
@@ -2028,7 +2031,7 @@
 
 if test $cf_cv_have_utmp != no ; then
 echo $ac_n "checking for exit-status in $cf_cv_have_utmp""... $ac_c" 1>&6
-echo "configure:2032: checking for exit-status in $cf_cv_have_utmp" >&5
+echo "configure:2035: checking for exit-status in $cf_cv_have_utmp" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_xstatus'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2040,7 +2043,7 @@
        ut_exit.ut_exit
 do
 cat > conftest.$ac_ext <<EOF
-#line 2044 "configure"
+#line 2047 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2049,7 +2052,7 @@
 struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
 ; return 0; }
 EOF
-if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp_ut_xstatus=$cf_result
         break
@@ -2081,13 +2084,13 @@
 
 if test $cf_cv_have_utmp != no ; then
 echo $ac_n "checking if utmp.ut_xtime is declared""... $ac_c" 1>&6
-echo "configure:2085: checking if utmp.ut_xtime is declared" >&5
+echo "configure:2088: checking if utmp.ut_xtime is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_xtime'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 2091 "configure"
+#line 2094 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2096,7 +2099,7 @@
 struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
 ; return 0; }
 EOF
-if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp_ut_xtime=yes
 else
@@ -2104,7 +2107,7 @@
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 2108 "configure"
+#line 2111 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2113,7 +2116,7 @@
 struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
 ; return 0; }
 EOF
-if { (eval echo configure:2117: \"$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_have_utmp_ut_xtime=define
 else
@@ -2148,13 +2151,13 @@
 
 if test $cf_cv_have_utmp != no ; then
 echo $ac_n "checking if utmp.ut_session is declared""... $ac_c" 1>&6
-echo "configure:2152: checking if utmp.ut_session is declared" >&5
+echo "configure:2155: checking if utmp.ut_session is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_session'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 2158 "configure"
+#line 2161 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2163,7 +2166,7 @@
 struct $cf_cv_have_utmp x; long y = x.ut_session
 ; return 0; }
 EOF
-if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp_ut_session=yes
 else
@@ -2188,14 +2191,14 @@
        
 
 echo $ac_n "checking if $cf_cv_have_utmp is SYSV flavor""... $ac_c" 1>&6
-echo "configure:2192: checking if $cf_cv_have_utmp is SYSV flavor" >&5
+echo "configure:2195: checking if $cf_cv_have_utmp is SYSV flavor" >&5
 if eval "test \"`echo '$''{'cf_cv_sysv_utmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
 cat > conftest.$ac_ext <<EOF
-#line 2199 "configure"
+#line 2202 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2209,7 +2212,7 @@
        end${cf_prefix}ent();
 ; return 0; }
 EOF
-if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_sysv_utmp=yes
 else
@@ -2232,7 +2235,7 @@
 
 
 echo $ac_n "checking if you want to link with utempter""... $ac_c" 1>&6
-echo "configure:2236: checking if you want to link with utempter" >&5
+echo "configure:2239: checking if you want to link with utempter" >&5
 
 # Check whether --with-utempter or --without-utempter was given.
 if test "${with_utempter+set}" = set; then
@@ -2247,7 +2250,7 @@
 if test $use_utempter = yes ; then
        
 echo $ac_n "checking if we can link with utempter library""... $ac_c" 1>&6
-echo "configure:2251: checking if we can link with utempter library" >&5
+echo "configure:2254: checking if we can link with utempter library" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utempter'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2255,7 +2258,7 @@
 cf_save_LIBS="$LIBS"
 LIBS="-lutempter $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2259 "configure"
+#line 2262 "configure"
 #include "confdefs.h"
 
 #include <utempter.h>
@@ -2267,7 +2270,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
        cf_cv_have_utempter=yes
@@ -2298,13 +2301,13 @@
 
 
 echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
-echo "configure:2302: checking if external errno is declared" >&5
+echo "configure:2305: checking if external errno is declared" >&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 2308 "configure"
+#line 2311 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_STDLIB_H
@@ -2317,7 +2320,7 @@
 long x = (long) errno
 ; return 0; }
 EOF
-if { (eval echo configure:2321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'errno'=yes'
 else
@@ -2348,13 +2351,13 @@
 # It's possible (for near-UNIX clones) that the data doesn't exist
 
 echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
-echo "configure:2352: checking if external errno exists" >&5
+echo "configure:2355: checking if external errno exists" >&5
 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 2358 "configure"
+#line 2361 "configure"
 #include "confdefs.h"
 
 #undef errno
@@ -2364,7 +2367,7 @@
 errno = 2
 ; return 0; }
 EOF
-if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2371: \"$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
@@ -2396,7 +2399,7 @@
 
 
 echo $ac_n "checking for tty group name""... $ac_c" 1>&6
-echo "configure:2400: checking for tty group name" >&5
+echo "configure:2403: checking for tty group name" >&5
 if eval "test \"`echo '$''{'cf_cv_tty_group_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2454,7 +2457,7 @@
 
 
 echo $ac_n "checking if we may use tty group""... $ac_c" 1>&6
-echo "configure:2458: checking if we may use tty group" >&5
+echo "configure:2461: checking if we may use tty group" >&5
 if eval "test \"`echo '$''{'cf_cv_tty_group'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2463,7 +2466,7 @@
   cf_cv_tty_group=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
+#line 2470 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -2488,7 +2491,7 @@
 }
        
 EOF
-if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   cf_cv_tty_group=yes
 else
@@ -2513,7 +2516,7 @@
 ###    checks for compiler characteristics
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:2517: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:2520: 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
@@ -2537,7 +2540,7 @@
 do
        CFLAGS="$cf_save_CFLAGS $cf_arg"
        cat > conftest.$ac_ext <<EOF
-#line 2541 "configure"
+#line 2544 "configure"
 #include "confdefs.h"
 
 #ifndef CC_HAS_PROTOS
@@ -2553,7 +2556,7 @@
        struct s2 {int (*f) (double a);};
 ; return 0; }
 EOF
-if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2580,12 +2583,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2584: checking for working const" >&5
+echo "configure:2587: 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 2589 "configure"
+#line 2592 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2634,7 +2637,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2658,12 +2661,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:2662: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2665: 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 2667 "configure"
+#line 2670 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2679,7 +2682,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2702,13 +2705,13 @@
 
 
 echo $ac_n "checking for POSIX wait functions""... $ac_c" 1>&6
-echo "configure:2706: checking for POSIX wait functions" >&5
+echo "configure:2709: checking for POSIX wait functions" >&5
 if eval "test \"`echo '$''{'cf_cv_posix_wait'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
+#line 2715 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2726,7 +2729,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_posix_wait=yes
 else
@@ -2747,13 +2750,13 @@
 
 
 echo $ac_n "checking if this platform has SYSV flavor""... $ac_c" 1>&6
-echo "configure:2751: checking if this platform has SYSV flavor" >&5
+echo "configure:2754: checking if this platform has SYSV flavor" >&5
 if eval "test \"`echo '$''{'cf_cv_sysv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 2757 "configure"
+#line 2760 "configure"
 #include "confdefs.h"
 
 #include <curses.h>
@@ -2778,7 +2781,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_sysv=yes
 else
@@ -2799,7 +2802,7 @@
 
 
 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
-echo "configure:2803: checking for elf_begin in -lelf" >&5
+echo "configure:2806: checking for elf_begin in -lelf" >&5
 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2807,7 +2810,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lelf  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
+#line 2814 "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
@@ -2818,7 +2821,7 @@
 elf_begin()
 ; return 0; }
 EOF
-if { (eval echo configure:2822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2825: \"$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
@@ -2835,13 +2838,13 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking if this is an SVR4 system""... $ac_c" 1>&6
-echo "configure:2839: checking if this is an SVR4 system" >&5
+echo "configure:2842: checking if this is an SVR4 system" >&5
 if eval "test \"`echo '$''{'cf_cv_svr4'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 2845 "configure"
+#line 2848 "configure"
 #include "confdefs.h"
 
 #include <elf.h>
@@ -2862,7 +2865,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_svr4=yes
 else
@@ -2888,13 +2891,13 @@
 
 
 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
-echo "configure:2892: checking if we must define _GNU_SOURCE" >&5
+echo "configure:2895: checking if we must define _GNU_SOURCE" >&5
 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 2898 "configure"
+#line 2901 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
@@ -2904,17 +2907,17 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_gnu_source=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  cf_save="$CFLAGS"
-        CFLAGS="$CFLAGS -D_GNU_SOURCE"
+  cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
         cat > conftest.$ac_ext <<EOF
-#line 2918 "configure"
+#line 2921 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
@@ -2924,7 +2927,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_gnu_source=no
 else
@@ -2934,7 +2937,7 @@
   cf_cv_gnu_source=yes
 fi
 rm -f conftest*
-       CFLAGS="$cf_save"
+       CPPFLAGS="$cf_save"
        
 fi
 rm -f conftest*
@@ -2942,14 +2945,14 @@
 fi
 
 echo "$ac_t""$cf_cv_gnu_source" 1>&6
-test "$cf_cv_gnu_source" = yes && CFLAGS="$CFLAGS -D_GNU_SOURCE"
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 
 # If we find X, set shell vars x_includes and x_libraries to the
 # paths, otherwise set no_x=yes.
 # 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:2953: checking for X" >&5
+echo "configure:2956: checking for X" >&5
 
 
 # Check whether --with-x or --without-x was given.
@@ -3012,12 +3015,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3016 "configure"
+#line 3019 "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:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3024: \"$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*
@@ -3086,14 +3089,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3090 "configure"
+#line 3093 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3100: \"$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.
@@ -3193,7 +3196,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:3197: checking for open in -lc_s" >&5
+echo "configure:3200: 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
@@ -3201,7 +3204,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3205 "configure"
+#line 3208 "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
@@ -3212,7 +3215,7 @@
 open()
 ; return 0; }
 EOF
-if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3219: \"$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
@@ -3229,7 +3232,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:3233: checking for gethostname in -lbsd" >&5
+echo "configure:3236: 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
@@ -3237,7 +3240,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3241 "configure"
+#line 3244 "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
@@ -3248,7 +3251,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3255: \"$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
@@ -3265,7 +3268,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:3269: checking for gethostname in -lnsl_s" >&5
+echo "configure:3272: 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
@@ -3273,7 +3276,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3277 "configure"
+#line 3280 "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
@@ -3284,7 +3287,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3291: \"$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
@@ -3301,7 +3304,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:3305: checking for XOpenDisplay in -lX11_s" >&5
+echo "configure:3308: 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
@@ -3309,7 +3312,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lX11_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3313 "configure"
+#line 3316 "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
@@ -3320,7 +3323,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3327: \"$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
@@ -3337,7 +3340,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:3341: checking for XtAppInitialize in -lXt_s" >&5
+echo "configure:3344: 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
@@ -3345,7 +3348,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXt_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3349 "configure"
+#line 3352 "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
@@ -3356,7 +3359,7 @@
 XtAppInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3363: \"$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
@@ -3397,7 +3400,7 @@
        ;;
 *)
        echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:3401: checking for socket in -lsocket" >&5
+echo "configure:3404: 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
@@ -3405,7 +3408,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3409 "configure"
+#line 3412 "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
@@ -3416,7 +3419,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3423: \"$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
@@ -3444,7 +3447,7 @@
 fi
 
        echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:3448: checking for gethostname in -lnsl" >&5
+echo "configure:3451: 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
@@ -3452,7 +3455,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3456 "configure"
+#line 3459 "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
@@ -3463,7 +3466,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3470: \"$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
@@ -3514,17 +3517,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:3518: checking whether -R must be followed by a space" >&5
+echo "configure:3521: 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 3521 "configure"
+#line 3524 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3540,14 +3543,14 @@
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 3544 "configure"
+#line 3547 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3579,7 +3582,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:3583: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3586: 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
@@ -3587,7 +3590,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3591 "configure"
+#line 3594 "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
@@ -3598,7 +3601,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3605: \"$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
@@ -3620,7 +3623,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:3624: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3627: 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
@@ -3628,7 +3631,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+#line 3635 "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
@@ -3639,7 +3642,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3646: \"$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
@@ -3668,12 +3671,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:3672: checking for gethostbyname" >&5
+echo "configure:3675: 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 3677 "configure"
+#line 3680 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3696,7 +3699,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3703: \"$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
@@ -3717,7 +3720,7 @@
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3721: checking for gethostbyname in -lnsl" >&5
+echo "configure:3724: 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
@@ -3725,7 +3728,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3729 "configure"
+#line 3732 "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
@@ -3736,7 +3739,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3743: \"$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
@@ -3766,12 +3769,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:3770: checking for connect" >&5
+echo "configure:3773: 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 3775 "configure"
+#line 3778 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3794,7 +3797,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3801: \"$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
@@ -3815,7 +3818,7 @@
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3819: checking for connect in -lsocket" >&5
+echo "configure:3822: 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
@@ -3823,7 +3826,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3827 "configure"
+#line 3830 "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
@@ -3834,7 +3837,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3841: \"$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
@@ -3858,12 +3861,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:3862: checking for remove" >&5
+echo "configure:3865: 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 3867 "configure"
+#line 3870 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3886,7 +3889,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3893: \"$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
@@ -3907,7 +3910,7 @@
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3911: checking for remove in -lposix" >&5
+echo "configure:3914: 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
@@ -3915,7 +3918,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3919 "configure"
+#line 3922 "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
@@ -3926,7 +3929,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3933: \"$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
@@ -3950,12 +3953,12 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3954: checking for shmat" >&5
+echo "configure:3957: 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 3959 "configure"
+#line 3962 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3978,7 +3981,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3985: \"$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
@@ -3999,7 +4002,7 @@
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4003: checking for shmat in -lipc" >&5
+echo "configure:4006: 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
@@ -4007,7 +4010,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4011 "configure"
+#line 4014 "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
@@ -4018,7 +4021,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4025: \"$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
@@ -4051,7 +4054,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:4055: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4058: 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
@@ -4059,7 +4062,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4063 "configure"
+#line 4066 "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
@@ -4070,7 +4073,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4077: \"$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
@@ -4097,7 +4100,7 @@
        LDFLAGS="$LDFLAGS $X_LIBS"
        CFLAGS="$CFLAGS $X_CFLAGS"
        echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:4101: checking for XOpenDisplay in -lX11" >&5
+echo "configure:4104: 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
@@ -4105,7 +4108,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4109 "configure"
+#line 4112 "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
@@ -4116,7 +4119,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4123: \"$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
@@ -4137,7 +4140,7 @@
 fi
 
        echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
-echo "configure:4141: checking for XtAppInitialize in -lXt" >&5
+echo "configure:4144: 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
@@ -4145,7 +4148,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
+#line 4152 "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
@@ -4156,7 +4159,7 @@
 XtAppInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4163: \"$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
@@ -4213,17 +4216,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4217: checking for $ac_hdr" >&5
+echo "configure:4220: 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 4222 "configure"
+#line 4225 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4230: \"$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*
@@ -4271,7 +4274,7 @@
 
 
 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
-echo "configure:4275: checking for XextCreateExtension in -lXext" >&5
+echo "configure:4278: 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
@@ -4279,7 +4282,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXext  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4283 "configure"
+#line 4286 "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
@@ -4290,7 +4293,7 @@
 XextCreateExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4297: \"$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
@@ -4322,18 +4325,18 @@
 do
 
        if test -z "$cf_x_athena_include" ; then
-               cf_save="$CFLAGS"
+               cf_save="$CPPFLAGS"
                cf_test=X11/$cf_x_athena/SimpleMenu.h
                if test $cf_path != default ; then
-                       CFLAGS="-I$cf_path/include $cf_save"
+                       CPPFLAGS="-I$cf_path/include $cf_save"
                        echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
-echo "configure:4331: checking for $cf_test in $cf_path" >&5
+echo "configure:4334: checking for $cf_test in $cf_path" >&5
                else
                        echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
-echo "configure:4334: checking for $cf_test" >&5
+echo "configure:4337: checking for $cf_test" >&5
                fi
                cat > conftest.$ac_ext <<EOF
-#line 4337 "configure"
+#line 4340 "configure"
 #include "confdefs.h"
 
 #include <X11/Intrinsic.h>
@@ -4342,7 +4345,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -4356,7 +4359,7 @@
                if test "$cf_result" = yes ; then
                        cf_x_athena_include=$cf_path
                else
-                       CFLAGS="$cf_save"
+                       CPPFLAGS="$cf_save"
                fi
        fi
 
@@ -4368,21 +4371,21 @@
                        if test $cf_path != default ; then
                                LIBS="-L$cf_path/lib $cf_lib $LIBS"
                                echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
-echo "configure:4372: checking for $cf_lib in $cf_path" >&5
+echo "configure:4375: checking for $cf_lib in $cf_path" >&5
                        else
                                LIBS="$cf_lib $LIBS"
                                echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
-echo "configure:4376: checking for $cf_test in $cf_lib" >&5
+echo "configure:4379: checking for $cf_test in $cf_lib" >&5
                        fi
                        cat > conftest.$ac_ext <<EOF
-#line 4379 "configure"
+#line 4382 "configure"
 #include "confdefs.h"
 
 int main() {
 $cf_test()
 ; return 0; }
 EOF
-if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -4420,13 +4423,13 @@
 
 
 echo $ac_n "checking for declaration of fd_set""... $ac_c" 1>&6
-echo "configure:4424: checking for declaration of fd_set" >&5
+echo "configure:4427: 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
   echo "trying sys/types alone" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4430 "configure"
+#line 4433 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4434,7 +4437,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_fd_set=sys/types.h
 else
@@ -4443,7 +4446,7 @@
   rm -rf conftest*
   echo "trying X11/Xpoll.h" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4447 "configure"
+#line 4450 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_X11_XPOLL_H
@@ -4453,7 +4456,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_fd_set=X11/Xpoll.h
 else
@@ -4462,7 +4465,7 @@
   rm -rf conftest*
   echo "trying sys/select.h" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4466 "configure"
+#line 4469 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4471,7 +4474,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_fd_set=sys/select.h
 else
@@ -4497,13 +4500,13 @@
 
 
 echo $ac_n "checking for IRIX 6.5 baud-rate redefinitions""... $ac_c" 1>&6
-echo "configure:4501: checking for IRIX 6.5 baud-rate redefinitions" >&5
+echo "configure:4504: checking for IRIX 6.5 baud-rate redefinitions" >&5
 if eval "test \"`echo '$''{'cf_cv_termio_c_ispeed'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 4507 "configure"
+#line 4510 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4516,7 +4519,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_termio_c_ispeed=yes
 
@@ -4546,12 +4549,12 @@
 for ac_func in grantpt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4550: checking for $ac_func" >&5
+echo "configure:4553: 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 4555 "configure"
+#line 4558 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4574,7 +4577,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4581: \"$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
@@ -4596,7 +4599,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:4600: checking for openpty in -lutil" >&5
+echo "configure:4603: checking for openpty in -lutil" >&5
 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4604,7 +4607,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4608 "configure"
+#line 4611 "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
@@ -4615,7 +4618,7 @@
 openpty()
 ; return 0; }
 EOF
-if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4622: \"$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
@@ -4649,7 +4652,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:4653: checking for $ac_word" >&5
+echo "configure:4656: 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
@@ -4687,12 +4690,12 @@
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4691: checking for $ac_func" >&5
+echo "configure:4694: 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 4696 "configure"
+#line 4699 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4715,7 +4718,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4722: \"$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
@@ -4741,7 +4744,7 @@
 
 
 echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6
-echo "configure:4745: checking if we should use imake to help" >&5
+echo "configure:4748: 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
@@ -4766,7 +4769,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:4770: checking for $ac_word" >&5
+echo "configure:4773: 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
@@ -4905,7 +4908,7 @@
 
 
 echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6
-echo "configure:4909: checking for default terminal-id" >&5
+echo "configure:4912: 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
@@ -4926,7 +4929,7 @@
 
 
 echo $ac_n "checking for default terminal-type""... $ac_c" 1>&6
-echo "configure:4930: checking for default terminal-type" >&5
+echo "configure:4933: 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
@@ -4943,7 +4946,7 @@
 
 
 echo $ac_n "checking for private terminfo-directory""... $ac_c" 1>&6
-echo "configure:4947: checking for private terminfo-directory" >&5
+echo "configure:4950: 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
@@ -4980,9 +4983,11 @@
 
 
 
-###    checks for optional features
+###############################################################################
+
+
 echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6
-echo "configure:4986: checking if you want active-icons" >&5
+echo "configure:4991: 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
@@ -5008,7 +5013,7 @@
 fi
 
 echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6
-echo "configure:5012: checking if you want ANSI color" >&5
+echo "configure:5017: 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
@@ -5034,7 +5039,7 @@
 if test $enable_ansi_color = yes ; then
 
        echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6
-echo "configure:5038: checking if you want 16 colors like aixterm" >&5
+echo "configure:5043: 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
@@ -5058,7 +5063,7 @@
 
 
        echo $ac_n "checking if you want 256 colors""... $ac_c" 1>&6
-echo "configure:5062: checking if you want 256 colors" >&5
+echo "configure:5067: checking if you want 256 colors" >&5
        
 # Check whether --enable-256-color or --disable-256-color was given.
 if test "${enable_256_color+set}" = set; then
@@ -5085,7 +5090,7 @@
 
        else
        echo $ac_n "checking if you want 88 colors""... $ac_c" 1>&6
-echo "configure:5089: checking if you want 88 colors" >&5
+echo "configure:5094: checking if you want 88 colors" >&5
        
 # Check whether --enable-88-color or --disable-88-color was given.
 if test "${enable_88_color+set}" = set; then
@@ -5116,7 +5121,7 @@
 fi
 
 echo $ac_n "checking if you want blinking cursor""... $ac_c" 1>&6
-echo "configure:5120: checking if you want blinking cursor" >&5
+echo "configure:5125: checking if you want blinking cursor" >&5
 
 # Check whether --enable-blink-cursor or --disable-blink-cursor was given.
 if test "${enable_blink_cursor+set}" = set; then
@@ -5142,7 +5147,7 @@
 if test $enable_ansi_color = yes ; then
 
        echo $ac_n "checking if you want bold colors mapped like IBM PC""... $ac_c" 1>&6
-echo "configure:5146: checking if you want bold colors mapped like IBM PC" >&5
+echo "configure:5151: 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
@@ -5166,7 +5171,7 @@
 
 
        echo $ac_n "checking if you want color-mode enabled by default""... $ac_c" 1>&6
-echo "configure:5170: checking if you want color-mode enabled by default" >&5
+echo "configure:5175: 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
@@ -5192,7 +5197,7 @@
 fi
 
 echo $ac_n "checking if you want support for color highlighting""... $ac_c" 1>&6
-echo "configure:5196: checking if you want support for color highlighting" >&5
+echo "configure:5201: 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
@@ -5216,7 +5221,7 @@
 
 
 echo $ac_n "checking if you want support for doublesize characters""... $ac_c" 1>&6
-echo "configure:5220: checking if you want support for doublesize characters" >&5
+echo "configure:5225: 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
@@ -5240,7 +5245,7 @@
 
 
 echo $ac_n "checking if you want fallback-support for box characters""... $ac_c" 1>&6
-echo "configure:5244: checking if you want fallback-support for box characters" >&5
+echo "configure:5249: 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
@@ -5264,7 +5269,7 @@
 
 
 echo $ac_n "checking if you want support for HP-style function keys""... $ac_c" 1>&6
-echo "configure:5268: checking if you want support for HP-style function keys" >&5
+echo "configure:5273: 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
@@ -5290,7 +5295,7 @@
 fi
 
 echo $ac_n "checking if you want support for SCO-style function keys""... $ac_c" 1>&6
-echo "configure:5294: checking if you want support for SCO-style function keys" >&5
+echo "configure:5299: checking if you want support for SCO-style function keys" >&5
 
 # Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
 if test "${enable_sco_fkeys+set}" = set; then
@@ -5316,7 +5321,7 @@
 fi
 
 echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
-echo "configure:5320: checking if you want support for internationalization" >&5
+echo "configure:5325: checking if you want support for internationalization" >&5
 
 # Check whether --enable-i18n or --disable-i18n was given.
 if test "${enable_i18n+set}" = set; then
@@ -5342,7 +5347,7 @@
 fi
 
 echo $ac_n "checking if you want support for initial-erase setup""... $ac_c" 1>&6
-echo "configure:5346: checking if you want support for initial-erase setup" >&5
+echo "configure:5351: checking if you want support for initial-erase setup" >&5
 
 # Check whether --enable-initial-erase or --disable-initial-erase was given.
 if test "${enable_initial_erase+set}" = set; then
@@ -5368,7 +5373,7 @@
 fi
 
 echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
-echo "configure:5372: checking if you want support for input-method" >&5
+echo "configure:5377: 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
@@ -5388,13 +5393,13 @@
 echo "$ac_t""$enable_ximp" 1>&6
 
 echo $ac_n "checking if X libraries support input-method""... $ac_c" 1>&6
-echo "configure:5392: checking if X libraries support input-method" >&5
+echo "configure:5397: checking if X libraries support input-method" >&5
 if eval "test \"`echo '$''{'cf_cv_input_method'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 5398 "configure"
+#line 5403 "configure"
 #include "confdefs.h"
 
 #include <X11/IntrinsicP.h>
@@ -5421,7 +5426,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_input_method=yes
 else
@@ -5444,7 +5449,7 @@
 fi
 
 echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6
-echo "configure:5448: checking if you want support for logging" >&5
+echo "configure:5453: checking if you want support for logging" >&5
 
 # Check whether --enable-logging or --disable-logging was given.
 if test "${enable_logging+set}" = set; then
@@ -5468,7 +5473,7 @@
 EOF
 
        echo $ac_n "checking if you want to allow logging via a pipe""... $ac_c" 1>&6
-echo "configure:5472: checking if you want to allow logging via a pipe" >&5
+echo "configure:5477: 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
@@ -5495,7 +5500,7 @@
 fi
 
 echo $ac_n "checking if you want support for iconify/maximize translations""... $ac_c" 1>&6
-echo "configure:5499: checking if you want support for iconify/maximize translations" >&5
+echo "configure:5504: 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
@@ -5519,7 +5524,7 @@
 
 
 echo $ac_n "checking if you want NumLock to override keyboard tables""... $ac_c" 1>&6
-echo "configure:5523: checking if you want NumLock to override keyboard tables" >&5
+echo "configure:5528: 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
@@ -5543,7 +5548,7 @@
 
 
 echo $ac_n "checking if you want support for right-scrollbar""... $ac_c" 1>&6
-echo "configure:5547: checking if you want support for right-scrollbar" >&5
+echo "configure:5552: 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
@@ -5569,7 +5574,7 @@
 fi
 
 echo $ac_n "checking if you want check for redundant name-change""... $ac_c" 1>&6
-echo "configure:5573: checking if you want check for redundant name-change" >&5
+echo "configure:5578: 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
@@ -5592,8 +5597,32 @@
 EOF
 
 
+echo $ac_n "checking if you want to use termcap-query/report""... $ac_c" 1>&6
+echo "configure:5602: checking if you want to use termcap-query/report" >&5
+
+# Check whether --enable-tcap-query or --disable-tcap-query was given.
+if test "${enable_tcap_query+set}" = set; then
+  enableval="$enable_tcap_query"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    enable_tcap_query=yes 
+  else
+    enable_tcap_query=no
+  fi
+else
+  enableval=no 
+  enable_tcap_query=no
+  
+fi
+
+echo "$ac_t""$enable_tcap_query" 1>&6
+test $enable_tcap_query = yes && cat >> confdefs.h <<\EOF
+#define OPT_TCAP_QUERY 1
+EOF
+
+
 echo $ac_n "checking if you want support for tek4014""... $ac_c" 1>&6
-echo "configure:5597: checking if you want support for tek4014" >&5
+echo "configure:5626: checking if you want support for tek4014" >&5
 
 # Check whether --enable-tek4014 or --disable-tek4014 was given.
 if test "${enable_tek4014+set}" = set; then
@@ -5623,7 +5652,7 @@
 fi
 
 echo $ac_n "checking if you want pulldown menus with a toolbar""... $ac_c" 1>&6
-echo "configure:5627: checking if you want pulldown menus with a toolbar" >&5
+echo "configure:5656: checking if you want pulldown menus with a toolbar" >&5
 
 # Check whether --enable-toolbar or --disable-toolbar was given.
 if test "${enable_toolbar+set}" = set; then
@@ -5647,7 +5676,7 @@
 
 
 echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6
-echo "configure:5651: checking if you want VT52 emulation" >&5
+echo "configure:5680: checking if you want VT52 emulation" >&5
 
 # Check whether --enable-vt52 or --disable-vt52 was given.
 if test "${enable_vt52+set}" = set; then
@@ -5671,7 +5700,7 @@
 
 
 echo $ac_n "checking if you want wide-character support""... $ac_c" 1>&6
-echo "configure:5675: checking if you want wide-character support" >&5
+echo "configure:5704: 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
@@ -5700,7 +5729,7 @@
 fi
 
 echo $ac_n "checking if you want DECterm Locator support""... $ac_c" 1>&6
-echo "configure:5704: checking if you want DECterm Locator support" >&5
+echo "configure:5733: checking if you want DECterm Locator support" >&5
 
 # Check whether --enable-dec-locator or --disable-dec-locator was given.
 if test "${enable_dec_locator+set}" = set; then
@@ -5726,7 +5755,7 @@
 fi
 
 echo $ac_n "checking if you want -ziconbeep option""... $ac_c" 1>&6
-echo "configure:5730: checking if you want -ziconbeep option" >&5
+echo "configure:5759: checking if you want -ziconbeep option" >&5
 
 # Check whether --enable-ziconbeep or --disable-ziconbeep was given.
 if test "${enable_ziconbeep+set}" = set; then
@@ -5749,9 +5778,11 @@
 EOF
 
 
-# development/testing aids
+###############################################################################
+
+
 echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6
-echo "configure:5755: checking if you want debugging traces" >&5
+echo "configure:5786: checking if you want debugging traces" >&5
 
 # Check whether --enable-trace or --disable-trace was given.
 if test "${enable_trace+set}" = set; then
@@ -5780,7 +5811,7 @@
 
 
 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:5784: checking if you want to see long compiling messages" >&5
+echo "configure:5815: 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
@@ -5820,7 +5851,7 @@
 
 
 echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6
-echo "configure:5824: checking if you want magic cookie emulation" >&5
+echo "configure:5855: 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
@@ -5849,7 +5880,7 @@
 
 if test -n "$GCC" ; then
 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:5853: checking if you want to turn on gcc warnings" >&5
+echo "configure:5884: 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
@@ -5889,9 +5920,9 @@
 if test "$GCC" = yes
 then
        echo "checking for $CC __attribute__ directives" 1>&6
-echo "configure:5893: checking for $CC __attribute__ directives" >&5
+echo "configure:5924: checking for $CC __attribute__ directives" >&5
        cat > conftest.$ac_ext <<EOF
-#line 5895 "configure"
+#line 5926 "configure"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -5929,7 +5960,7 @@
 EOF
                        ;;
                esac
-               if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+               if { (eval echo configure:5964: \"$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
@@ -5946,11 +5977,11 @@
 if test "$GCC" = yes
 then
                cat > conftest.$ac_ext <<EOF
-#line 5950 "configure"
+#line 5981 "configure"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
                echo "checking for $CC warning options" 1>&6
-echo "configure:5954: checking for $CC warning options" >&5
+echo "configure:5985: checking for $CC warning options" >&5
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-W -Wall"
        cf_warn_CONST=""
@@ -5968,7 +5999,7 @@
                Wstrict-prototypes $cf_warn_CONST
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo configure:5972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+               if { (eval echo configure:6003: \"$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-147+/configure.in     Fri Oct 27 21:21:05 2000
+++ xterm-148/configure.in      Mon Oct 30 05:25:39 2000
@@ -199,7 +199,9 @@
 AC_SUBST(TERMINFO_DIR)
 AC_SUBST(SET_TERMINFO)
 
-###    checks for optional features
+###############################################################################
+CF_HELP_MESSAGE(Optional Features:)
+
 AC_MSG_CHECKING(if you want active-icons)
 CF_ARG_DISABLE(active-icon,
        [  --disable-active-icon   disable X11R6.3 active-icon feature],
@@ -411,6 +413,14 @@
 AC_MSG_RESULT($enable_samename)
 test $enable_samename = no && AC_DEFINE(OPT_SAME_NAME,0)
 
+AC_MSG_CHECKING(if you want to use termcap-query/report)
+CF_ARG_ENABLE(tcap-query,
+       [  --enable-tcap-query     compile-in termcap-query support],
+       [enable_tcap_query=yes],
+       [enable_tcap_query=no])
+AC_MSG_RESULT($enable_tcap_query)
+test $enable_tcap_query = yes && AC_DEFINE(OPT_TCAP_QUERY,1)
+
 AC_MSG_CHECKING(if you want support for tek4014)
 CF_ARG_DISABLE(tek4014,
        [  --disable-tek4014       disable tek4014 emulation],
@@ -472,7 +482,9 @@
 AC_MSG_RESULT($enable_ziconbeep)
 test $enable_ziconbeep = no && AC_DEFINE(OPT_ZICONBEEP,0)
 
-# development/testing aids
+###############################################################################
+CF_HELP_MESSAGE(Testing/development Options:)
+
 AC_MSG_CHECKING(if you want debugging traces)
 CF_ARG_ENABLE(trace,
        [  --enable-trace          test: set to enable debugging traces],
Index: fontutils.c
--- xterm-147+/fontutils.c      Fri Oct 27 21:21:05 2000
+++ xterm-148/fontutils.c       Tue Oct 31 05:01:59 2000
@@ -473,15 +473,17 @@
           &&   fs->min_bounds.width == fs->min_bounds.width);
 }
 
-#define EmptyFont(fs) ((fs)->ascent + (fs)->descent == 0 \
-                  ||  (fs)->max_bounds.width == 0)
+#define EmptyFont(fs) (fs != 0 \
+                  && ((fs)->ascent + (fs)->descent == 0 \
+                   || (fs)->max_bounds.width == 0))
+
 #define FontSize(fs) (((fs)->ascent + (fs)->descent) \
                    *  (fs)->max_bounds.width)
 
 int
 xtermLoadFont (
        TScreen *screen,
-       VT_FONTSET(char *nfontname, char *bfontname, char *wfontname),
+       VT_FONTSET(char *nfontname, char *bfontname, char *wfontname, char *wbfontname),
        Bool doresize,
        int fontnum)
 {
@@ -489,7 +491,10 @@
        FontNameProperties *fp;
        XFontStruct *nfs = NULL;
        XFontStruct *bfs = NULL;
+#if OPT_WIDE_CHARS
        XFontStruct *wfs = NULL;
+       XFontStruct *wbfs = NULL;
+#endif
        XGCValues xgcv;
        unsigned long mask;
        GC new_normalGC      = NULL;
@@ -544,10 +549,10 @@
                TRACE(("...cannot load bold font %s\n", bfontname));
        }
 
-       /* if there is no widefont specified, fake it by doubling
-        * AVERAGE_WIDTH of normal fonts XLFD, and asking for it.
-        * This plucks out 18x18ja and 12x13ja as the corresponding
-        * fonts for 9x18 and 6x13.
+       /*
+        * If there is no widefont specified, fake it by doubling AVERAGE_WIDTH
+        * of normal fonts XLFD, and asking for it.  This plucks out 18x18ja
+        * and 12x13ja as the corresponding fonts for 9x18 and 6x13.
         */
        if_OPT_WIDE_CHARS(screen, {
                if (wfontname == 0) {
@@ -558,16 +563,25 @@
                        }
                }
                if (wfontname
-                && (wfs = XLoadQueryFont( screen->display, wfontname)) == 0) {
+                && (wfs = XLoadQueryFont(screen->display, wfontname)) == 0) {
+               }
+               if (wbfontname) {
+                       wbfs = XLoadQueryFont(screen->display, wbfontname);
+               } else {
+                       wbfs = wfs;
+                       TRACE(("...cannot load wide bold font %s\n", wbfontname));
                }
+               if (EmptyFont(wbfs))
+                       goto bad;       /* can't use a 0-sized font */
        })
 
-       /* Most of the time this call to load the font will succeed, even if there is
-        * no wide font : the X server doubles the width of the normal font, or similar.
+       /*
+        * Most of the time this call to load the font will succeed, even if
+        * there is no wide font :  the X server doubles the width of the
+        * normal font, or similar.
         *
         * But if it did fail for some reason, then nevermind.
         */
-
        if (EmptyFont(bfs))
                goto bad;               /* can't use a 0-sized font */
 
@@ -587,12 +601,31 @@
                        return xtermLoadFont (screen,
                                              VT_FONTSET(nfontname,
                                              NULL,     /* throw it away! */
-                                             wfontname),
+                                             wfontname,
+                                             wbfontname),
                                              doresize,
                                              fontnum);
                }
        }
 
+       if_OPT_WIDE_CHARS(screen, {
+         if (!same_font_size(wfs, wbfs)
+             && (is_fixed_font(wfs) && is_fixed_font(wbfs))) {
+           XFreeFont(screen->display, wbfs);
+           wbfs = wfs;
+           TRACE(("...fixing mismatched normal/bold wide fonts\n"));
+           if (bfontname != 0) {
+             return xtermLoadFont (screen,
+                                   VT_FONTSET(nfontname,
+                                              bfontname,
+                                              wfontname,
+                                              NULL),
+                                   doresize,
+                                   fontnum);
+           }
+         }
+       })
+
        /*
         * Normal/bold fonts should be the same width.  Also, the min/max
         * values should be the same.
@@ -608,6 +641,19 @@
                proportional = True;
        }
 
+       if_OPT_WIDE_CHARS(screen, {
+         if (!is_fixed_font(wfs)
+             || !is_fixed_font(wbfs)
+             || wfs->max_bounds.width != wbfs->max_bounds.width) {
+           TRACE(("Proportional font! wide %d/%d, wide bold %d/%d\n",
+                  wfs->min_bounds.width,
+                  wfs->max_bounds.width,
+                  wbfs->min_bounds.width,
+                  wbfs->max_bounds.width));
+           proportional = True;
+         }
+       })
+
        /* TODO : enforce that the width of the wide font is 2* the width
           of the narrow font */
 
@@ -674,7 +720,10 @@
 
        screen->fnt_norm = nfs;
        screen->fnt_bold = bfs;
+#if OPT_WIDE_CHARS
        screen->fnt_dwd = wfs;
+       screen->fnt_dwdb = wbfs;
+#endif
        screen->fnt_prop = proportional;
        screen->fnt_boxes = True;
 
@@ -742,6 +791,12 @@
                XFreeFont (screen->display, nfs);
        if (bfs && nfs != bfs)
                XFreeFont (screen->display, bfs);
+#if OPT_WIDE_CHARS
+       if (wfs)
+               XFreeFont (screen->display, wfs);
+       if (wbfs && wbfs != wfs)
+               XFreeFont (screen->display, wbfs);
+#endif
        return 0;
 }
 
@@ -768,7 +823,7 @@
 void
 xtermComputeFontInfo (TScreen *screen, struct _vtwin *win, XFontStruct *font, int sbwidth)
 {
-       int i, j, width, height;
+    int i, j, width, height;
 
 #ifdef XRENDERFONT
     Display                        *dpy = screen->display;
@@ -803,17 +858,17 @@
     {
        win->f_width  = (font->max_bounds.width);
        win->f_height = (font->ascent + font->descent);
-        win->f_ascent = font->ascent;
+       win->f_ascent = font->ascent;
        win->f_descent = font->descent;
     }
-       i = 2 * screen->border + sbwidth;
-       j = 2 * screen->border;
-       width  = (screen->max_col + 1) * win->f_width + i;
-       height = (screen->max_row + 1) * win->f_height + j;
-       win->fullwidth  = width;
-       win->fullheight = height;
-       win->width  = width - i;
-       win->height = height - j;
+    i = 2 * screen->border + sbwidth;
+    j = 2 * screen->border;
+    width  = (screen->max_col + 1) * win->f_width + i;
+    height = (screen->max_row + 1) * win->f_height + j;
+    win->fullwidth  = width;
+    win->fullheight = height;
+    win->width  = width - i;
+    win->height = height - j;
 }
 
 
@@ -1202,7 +1257,7 @@
                        m = n;
        }
        if (m >= 0) {
-               SetVTFont (m, TRUE, VT_FONTSET(NULL, NULL, NULL));
+               SetVTFont (m, TRUE, VT_FONTSET(NULL, NULL, NULL, NULL));
        } else {
                Bell(XkbBI_MinorError,0);
        }
@@ -1228,7 +1283,7 @@
                        m = n;
        }
        if (m >= 0) {
-               SetVTFont (m, TRUE, VT_FONTSET(NULL, NULL, NULL));
+               SetVTFont (m, TRUE, VT_FONTSET(NULL, NULL, NULL, NULL));
        } else {
                Bell(XkbBI_MinorError,0);
        }
@@ -1244,7 +1299,7 @@
        Cardinal *param_count)
 {
     int fontnum;
-    char *name1 = NULL, *name2 = NULL, *name3 = NULL;
+    char *name1 = NULL, *name2 = NULL, *name3 = NULL, *name4 = NULL;
 
     if (*param_count == 0) {
        fontnum = fontMenu_fontdefault;
@@ -1267,7 +1322,7 @@
          case '6':
            fontnum = fontMenu_font6; break;
          case 'e': case 'E':
-           fontnum = fontMenu_fontescape; maxparams = 4; break;
+           fontnum = fontMenu_fontescape; maxparams = 5; break;
          case 's': case 'S':
            fontnum = fontMenu_fontsel; maxparams = 2; break;
          default:
@@ -1279,6 +1334,9 @@
            return;
        }
        switch (*param_count) {         /* assign 'em */
+         case 5:
+           name4 = params[4];
+           /* FALLTHRU */
          case 4:
            name3 = params[3];
            /* FALLTHRU */
@@ -1291,13 +1349,13 @@
        }
     }
 
-    SetVTFont (fontnum, True, VT_FONTSET(name1, name2, name3));
+    SetVTFont (fontnum, True, VT_FONTSET(name1, name2, name3, name4));
 }
 
 void SetVTFont (
        int i,
        Bool doresize,
-       VT_FONTSET(char *name1, char *name2, char *name3))
+       VT_FONTSET(char *name1, char *name2, char *name3, char *name4))
 {
     TScreen *screen = &term->screen;
 
@@ -1312,7 +1370,7 @@
        } else {
            if (name1 == 0)
                name1 = screen->menu_font_names[i];
-           if (xtermLoadFont(screen, VT_FONTSET(name1, name2, name3), doresize, i)) {
+           if (xtermLoadFont(screen, VT_FONTSET(name1, name2, name3, name4), doresize, i)) {
                return;
            }
        }
Index: fontutils.h
--- xterm-147+/fontutils.h      Mon Aug 28 14:56:36 2000
+++ xterm-148/fontutils.h       Sun Oct 29 19:58:11 2000
@@ -41,16 +41,16 @@
 #include <proto.h>
 
 #if OPT_WIDE_CHARS
-#define VT_FONTSET(n,b,w) n, b, w
+#define VT_FONTSET(n,b,w,wb) n, b, w, wb
 #else
-#define VT_FONTSET(n,b,w) n, b
+#define VT_FONTSET(n,b,w,wb) n, b
 #endif
 
 extern int xtermLoadFont (TScreen *screen,
-                         VT_FONTSET(char *nfontname, char *bfontname, char *wfontname),
+                         VT_FONTSET(char *nfontname, char *bfontname, char *wfontname, char *wbfontname),
                          Bool doresize, int fontnum);
 extern void HandleSetFont PROTO_XT_ACTIONS_ARGS;
-extern void SetVTFont (int i, Bool doresize, VT_FONTSET(char *name1, char *name2, char *name3));
+extern void SetVTFont (int i, Bool doresize, VT_FONTSET(char *name1, char *name2, char *name3, char *name4));
 extern void xtermComputeFontInfo (TScreen *screen, struct _vtwin *win, XFontStruct *font, int sbwidth);
 extern void xtermSaveFontInfo (TScreen *screen, XFontStruct *font);
 extern void xtermSetCursorBox (TScreen *screen);
Index: input.c
--- xterm-147+/input.c  Mon Aug 28 14:56:36 2000
+++ xterm-148/input.c   Sun Oct 29 21:50:50 2000
@@ -1003,7 +1003,7 @@
                    if ((state != 0
                      || !isalnum(prv))
                     && ((keyword[++state] == 0)
-                     && !isalnum(*p))) {
+                     && !isalnum(CharOf(*p)))) {
                        result = True;
                        break;
                    }
@@ -1171,6 +1171,10 @@
                DATA(   "kl",   "kcub1",        XK_Left,        0),
                DATA(   "kr",   "kcuf1",        XK_Right,       0),
                DATA(   "ku",   "kcuu1",        XK_Up,          0),
+# if OPT_ISO_COLORS
+               /* XK_COLORS is a fake code. */
+               DATA(   "Co",   "colors",       XK_COLORS,      0),
+# endif
        };
        Cardinal n;
        unsigned len = 0;
Index: main.c
--- xterm-147+/main.c   Fri Oct 27 21:21:05 2000
+++ xterm-148/main.c    Mon Oct 30 21:32:23 2000
@@ -911,6 +911,7 @@
 #endif
 #if OPT_WIDE_CHARS
 {"-fw",                "*wideFont",    XrmoptionSepArg,        (caddr_t) NULL},
+{"-fwb",       "*wideBoldFont", XrmoptionSepArg,       (caddr_t) NULL},
 #endif
 #if OPT_HIGHLIGHT_COLOR
 {"-hc",                "*highlightColor", XrmoptionSepArg,     (caddr_t) NULL},
@@ -1027,6 +1028,7 @@
 { "-fb fontname",          "bold text font" },
 #if OPT_WIDE_CHARS
 { "-fw fontname",          "doublewidth text font" },
+{ "-fwb fontname",         "doublewidth bold text font" },
 #endif
 { "-iconic",               "start iconic" },
 { "-name string",          "client instance, icon, and title strings" },
@@ -1126,12 +1128,12 @@
 #else
 { "-C",                    "intercept console messages (not supported)" },
 #endif
-{ "-Sxxd",                 "slave mode on \"ttyxx\", file descriptor \"d\"" },
+{ "-Sccn",                 "slave mode on \"ttycc\", file descriptor \"n\"" },
 #if OPT_ZICONBEEP
 { "-ziconbeep percent",    "beep and flag icon of window having hidden output" },
 #endif
 #if OPT_SAME_NAME
-{"-/+sameName",           "turn on/off the no-flicker option for title and icon name" },
+{"-/+samename",            "turn on/off the no-flicker option for title and icon name" },
 #endif
 { NULL, NULL }};
 
@@ -2429,7 +2431,7 @@
  * temporary hack to get xterm working on att ptys
  */
 static void
-HsSysError(int pf, int error)
+HsSysError(int pf GCC_UNUSED, int error)
 {
     fprintf(stderr, "%s: fatal pty error %d (errno=%d) on tty %s\n",
            xterm_name, error, errno, ttydev);
@@ -2471,12 +2473,12 @@
        register TScreen *screen = &term->screen;
 #ifdef USE_HANDSHAKE
        handshake_t handshake;
+       int done;
 #endif
 #if OPT_INITIAL_ERASE
        int initial_erase = VAL_INITIAL_ERASE;
 #endif
        int tty = -1;
-       int done;
 #ifdef USE_SYSV_TERMIO
        struct termio tio;
 #ifdef TIOCLSET
@@ -4505,7 +4507,7 @@
        } else if (*buf == ':') {
            first = buf;
            count = 0;
-       } else if (!isspace(*buf)) {
+       } else if (!isspace(CharOf(*buf))) {
            count++;
        }
        if (*buf != 0)
@@ -4529,7 +4531,7 @@
     int count = 0;
 
     while (1) {
-       while (*s && isascii(*s) && isspace(*s)) s++;
+       while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s))) s++;
        if (!*s) return count;
 
        for (mp = modelist; mp->name; mp++) {
@@ -4538,7 +4540,7 @@
        if (!mp->name) return -1;
 
        s += mp->len;
-       while (*s && isascii(*s) && isspace(*s)) s++;
+       while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s))) s++;
        if (!*s) return -1;
 
        if (*s == '^') {
Index: main.h
--- xterm-147+/main.h   Fri Oct 27 21:21:05 2000
+++ xterm-148/main.h    Sun Oct 29 19:58:11 2000
@@ -26,10 +26,11 @@
  * SOFTWARE.
  */
 
-#define        DEFCLASS                "XTerm"
-#define        DEFFONT                 "fixed"
-#define DEFWIDEFONT            NULL    /* grab one which is 2x as wide */
-#define        DEFBOLDFONT             NULL    /* no bold font uses overstriking */
-#define        DEFBORDER               2
+#define DEFCLASS               "XTerm"
+#define DEFFONT                        "fixed"
+#define DEFWIDEFONT            NULL    /* grab one which is 2x as wide */
+#define DEFWIDEBOLDFONT                NULL
+#define DEFBOLDFONT            NULL    /* no bold font uses overstriking */
+#define DEFBORDER              2
 #define DEFFACENAME            NULL
 #define DEFFACESIZE            14
Index: menu.c
--- xterm-147+/menu.c   Fri Oct 27 21:21:05 2000
+++ xterm-148/menu.c    Sun Oct 29 19:58:11 2000
@@ -1193,7 +1193,7 @@
 
     for (i = 0; i < NMENUFONTS; i++) {
        if (strcmp (entryname, fontMenuEntries[i].name) == 0) {
-           SetVTFont (i, True, VT_FONTSET(NULL, NULL, NULL));
+           SetVTFont (i, True, VT_FONTSET(NULL, NULL, NULL, NULL));
            return;
        }
     }
Index: misc.c
--- xterm-147+/misc.c   Fri Oct 27 21:21:05 2000
+++ xterm-148/misc.c    Sun Oct 29 21:50:50 2000
@@ -273,7 +273,8 @@
     if (*nparams != 1) return;
 
     if ((*params)[0] == '0' && (*params)[1] == 'x' && (*params)[2] != '\0') {
-       char c, *p, hexval[2];
+       Char c, *p;
+       char hexval[2];
        hexval[0] = hexval[1] = 0;
        for (p = *params+2; (c = *p); p++) {
            hexval[0] *= 16;
@@ -1310,7 +1311,7 @@
                            buf++;
                        }
 
-                       if (isdigit(*buf)) {
+                       if (isdigit(CharOf(*buf))) {
                            int val = atoi(buf);
                            if (rel > 0)
                                num += val;
@@ -1331,7 +1332,7 @@
                            break;
                        }
                    }
-                   SetVTFont (fontMenu_fontescape, True, VT_FONTSET(buf, NULL, NULL));
+                   SetVTFont (fontMenu_fontescape, True, VT_FONTSET(buf, NULL, NULL, NULL));
                }
                break;
        case 51:
@@ -1512,13 +1513,31 @@
                                for (tmp = cp; *tmp;) {
                                        screen->tc_query = -1;
                                        if ((code = xtermcapKeycode(&tmp, &state)) >= 0) {
-                                               XKeyEvent event;
-                                               event.state = state;
                                                if (count++)
                                                        unparseputc(';', screen->respond);
                                                screen->tc_query = code;
-                                               Input (&(term->keyboard),
-                                                       screen, &event, False);
+                                               /* XK_COLORS is a fake code for the "Co" entry (maximum
+                                                * number of colors) */
+                                               if (code == XK_COLORS) {
+# if OPT_256_COLORS
+                                                       unparseputc('2', screen->respond);
+                                                       unparseputc('5', screen->respond);
+                                                       unparseputc('6', screen->respond);
+# elif OPT_88_COLORS
+                                                       unparseputc('8', screen->respond);
+                                                       unparseputc('8', screen->respond);
+# else
+                                                       unparseputc('1', screen->respond);
+                                                       unparseputc('6', screen->respond);
+# endif
+
+                                               }
+                                               else {
+                                                       XKeyEvent event;
+                                                       event.state = state;
+                                                       Input (&(term->keyboard),
+                                                                       screen, &event, False);
+                                               }
                                                screen->tc_query = -1;
                                        }
                                }
@@ -1528,7 +1547,7 @@
                break;
 #endif
        default:
-               if (isdigit(*cp)) { /* digits are DECUDK, otherwise ignore */
+               if (isdigit(CharOf(*cp))) { /* digits are DECUDK, otherwise ignore */
                        clear_all = True;
                        lock_keys = True;
 
@@ -1562,7 +1581,7 @@
                                unsigned key = 0;
                                int len = 0;
 
-                               while (isdigit(*cp))
+                               while (isdigit(CharOf(*cp)))
                                        key = (key * 10) + (*cp++ - '0');
                                if (*cp == '/') {
                                        cp++;
Index: os2main.c
--- xterm-147+/os2main.c        Fri Oct 27 21:21:05 2000
+++ xterm-148/os2main.c Mon Oct 30 21:32:14 2000
@@ -551,12 +551,12 @@
 { "-T string",             "title name for window" },
 { "-n string",             "icon name for window" },
 { "-C",                    "intercept console messages" },
-{ "-Sxxd",                 "slave mode on \"ttyxx\", file descriptor \"d\"" },
+{ "-Sccn",                 "slave mode on \"ttycc\", file descriptor \"n\"" },
 #if OPT_ZICONBEEP
 { "-ziconbeep percent",    "beep and flag icon of window having hidden output" },
 #endif
 #if OPT_SAME_NAME
-{"-/+sameName",           "Turn on/off the no flicker option for title and icon name" },
+{"-/+samename",                   "turn on/off the no flicker option for title and icon name" },
 #endif
 { NULL, NULL }};
 
@@ -1792,7 +1792,7 @@
     int count = 0;
 
     while (1) {
-       while (*s && isascii(*s) && isspace(*s)) s++;
+       while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s))) s++;
        if (!*s) return count;
 
        for (mp = modelist; mp->name; mp++) {
@@ -1801,7 +1801,7 @@
        if (!mp->name) return -1;
 
        s += mp->len;
-       while (*s && isascii(*s) && isspace(*s)) s++;
+       while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s))) s++;
        if (!*s) return -1;
 
        if (*s == '^') {
Index: precompose.c
--- xterm-147+/precompose.c     Mon Aug 28 14:56:36 2000
+++ xterm-148/precompose.c      Sun Oct 29 21:37:51 2000
@@ -6,7 +6,7 @@
  */
 /* $XFree86: xc/programs/xterm/precompose.c,v 1.1 2000/08/26 04:33:54 dawes Exp $ */
 
-#include "precompose.h"
+#include <precompose.h>
 
 struct {
   int replacement;
@@ -1007,12 +1007,12 @@
   int min = 0;
   int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1;
   int mid;
-  int sought = (base << 16) | comb, that;
+  unsigned int sought = ((unsigned)base << 16) | (unsigned)comb, that;
 
   /* binary search */
   while (max >= min) {
     mid = (min + max) / 2;
-    that = (precompositions[mid].base << 16) | (precompositions[mid].comb);
+    that = ((unsigned)precompositions[mid].base << 16) | ((unsigned)precompositions[mid].comb);
     if (that < sought) {
       min = mid + 1;
     } else if (that > sought) {
Index: ptyx.h
--- xterm-147+/ptyx.h   Fri Oct 27 21:21:05 2000
+++ xterm-148/ptyx.h    Sun Oct 29 21:50:50 2000
@@ -247,7 +247,7 @@
 typedef unsigned char Char;            /* to support 8 bit chars */
 typedef Char **ScrnBuf;
 
-#define CharOf(n) ((n) & 0xff)
+#define CharOf(n) ((unsigned char)(n))
 
 /*
  * ANSI emulation, special character codes
@@ -386,6 +386,10 @@
        {RES_NAME(name), XtCForeground, XtRPixel, sizeof(Pixel), \
         RES_OFFSET(offset), XtRString, value}
 
+#define Dres(name,offset,value) \
+       {RES_NAME(name), XtCBackground, XtRPixel, sizeof(Pixel), \
+        RES_OFFSET(offset), XtRString, value}
+
 #define Ires(name,class,offset,value) \
        {RES_NAME(name), RES_CLASS(class), XtRInt, sizeof(int), \
         RES_OFFSET(offset), XtRImmediate, (XtPointer) value}
@@ -624,6 +628,12 @@
                      (( (flags & INVERSE) && !hilite) || \
                       (!(flags & INVERSE) &&  hilite)) ))
 
+/* Define a fake XK code, we need it for the fake color response in
+ * xtermcapKeycode(). */
+#ifdef OPT_TCAP_QUERY
+# define XK_COLORS 0x0003
+#endif
+
 #else  /* !OPT_ISO_COLORS */
 
 #define if_OPT_ISO_COLORS(screen, code) /* nothing */
@@ -1066,7 +1076,10 @@
        Dimension       fnt_high;
        XFontStruct     *fnt_norm;      /* normal font of terminal      */
        XFontStruct     *fnt_bold;      /* bold font of terminal        */
+#if OPT_WIDE_CHARS
        XFontStruct     *fnt_dwd;       /* wide font of terminal        */
+       XFontStruct     *fnt_dwdb;      /* wide bold font of terminal   */
+#endif
 #ifndef NO_ACTIVE_ICON
        XFontStruct     *fnt_icon;      /* icon font */
 #endif /* NO_ACTIVE_ICON */
@@ -1270,7 +1283,10 @@
     char *T_geometry;
     char *f_n;
     char *f_b;
+#if OPT_WIDE_CHARS
     char *f_w;
+    char *f_wb;
+#endif
     int limit_resize;
 #ifdef ALLOWLOGGING
     Boolean log_on;
Index: resize.c
--- xterm-147+/resize.c Fri Oct 27 21:21:05 2000
+++ xterm-148/resize.c  Sun Oct 29 15:58:50 2000
@@ -161,7 +161,7 @@
 #ifdef USE_SYSV_TERMIO
 #ifdef X_NOT_POSIX
 #if !defined(SYSV) && !defined(i386)
-extern struct passwd *getpwuid();      /* does ANYBODY need this? */
+extern struct passwd *getpwuid();      /* does ANYBODY need this? */
 #endif /* SYSV && i386 */
 #endif /* X_NOT_POSIX */
 #define        bzero(s, n)     memset(s, 0, n)
@@ -192,6 +192,8 @@
 #define ESC(string) "\033" string
 #endif
 
+#define CharOf(ch) ((unsigned char)(ch))
+
 #define        EMULATIONS      2
 #define        SUN             1
 #define        VT100           0
@@ -440,7 +442,7 @@
        tio.c_cc[VMIN] = 6;
        tio.c_cc[VTIME] = 1;
 #else  /* not USE_TERMIOS */
-       ioctl (tty, TIOCGETP, &sgorig);
+       ioctl (tty, TIOCGETP, &sgorig);
        sg = sgorig;
        sg.sg_flags |= RAW;
        sg.sg_flags &= ~ECHO;
@@ -583,7 +585,7 @@
 checkdigits(register char *str)
 {
        while(*str) {
-               if(!isdigit(*str))
+               if(!isdigit(CharOf(*str)))
                        return(0);
                str++;
        }
Index: termcap
--- xterm-147+/termcap  Fri Oct 27 21:21:05 2000
+++ xterm-148/termcap   Sun Oct 29 17:56:01 2000
@@ -59,9 +59,7 @@
        :so=\E[7m:us=\E[1m:tc=xterm:
 vb|xterm-boldso|xterm with bold for standout:\
        :se=\E[m:so=\E[1m:tc=xterm:
-vm|xtermm|monochrome xterm:\
-       :F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
-       :F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
+vm|xterm-mono|monochrome xterm:\
        :kn#20:\
        :st@:ut@:Co@:NC@:op@:AB@:AF@:pa@:Sf@:Sb@:tc=xterm:
 #
@@ -83,7 +81,6 @@
 x1|xterm-16color|xterm alias:tc=xterm-xfree86:
 x2|xterm-88color|xterm alias:tc=xterm-256color:
 x3|xterm-256color|xterm alias:tc=xterm-xfree86:
-xm|xterm-mono|xterm alias:tc=xtermm:
 xn|xterm-nrc|xterm alias:tc=xterm:
 xr|xterm-rep|xterm alias:tc=xterm:
 xx|xterm-xmc|xterm alias:sg#1:tc=xterm:
@@ -98,7 +95,7 @@
        :cd=\233J:ce=\233K:cl=\233H\2332J:cm=\233%i%d;%dH:cr=^M:\
        :cs=\233%i%d;%dr:ct=\2333g:dc=\233P:dl=\233M:do=^J:up=\233A:nd=\233C:\
        :ei=\2334l:ho=\233H:im=\2334h:\
-       :is=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>:\
+       :is=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8:\
        :k1=\23311~:k2=\23312~:k3=\23313~:k4=\23314~:k5=\23315~:\
        :k6=\23317~:k7=\23318~:k8=\23319~:k9=\23320~:kD=\2333~:\
        :kI=\2332~:kN=\2336~:kP=\2335~:kb=^H:kd=\217B:\
@@ -145,8 +142,8 @@
 #
 # Compatible with the X11R6.3 xterm
 r6|xterm-r6|xterm-old|X11R6 xterm:\
-       :is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
-       :rs=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
+       :is=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\
+       :rs=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\
        :AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:DO=\E[%dB:UP=\E[%dA:\
        :LE=\E[%dD:RI=\E[%dC:al=\E[L:am:bl=^G:\
        :bs:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:\
Index: terminfo
--- xterm-147+/terminfo Fri Oct 27 21:21:05 2000
+++ xterm-148/terminfo  Sun Oct 29 17:32:56 2000
@@ -77,6 +77,8 @@
 # keycodes.  To get a VMS-bias, make these substitutions:
 #      1. change khome to kfnd
 #      2. change kend to kslt
+# The original xterm-r6 entry does in fact have a VMS bias.
+#
 # Some legacy applications using the termcap emulation may expect kll where
 # we have specified kend.
 #
@@ -413,14 +415,6 @@
        kcuu1=\E[A,
        kend=\E[F,
        kf1=\E[M,
-       kf2=\E[N,
-       kf3=\E[O,
-       kf4=\E[P,
-       kf5=\E[Q,
-       kf6=\E[R,
-       kf7=\E[S,
-       kf8=\E[T,
-       kf9=\E[U,
        kf10=\E[V,
        kf11=\E[W,
        kf12=\E[X,
@@ -430,6 +424,7 @@
        kf17=\E[c,
        kf18=\E[d,
        kf19=\E[e,
+       kf2=\E[N,
        kf20=\E[f,
        kf21=\E[g,
        kf22=\E[h,
@@ -440,12 +435,19 @@
        kf27=\E[m,
        kf28=\E[n,
        kf29=\E[o,
+       kf3=\E[O,
        kf30=\E[p,
        kf31=\E[q,
        kf32=\E[r,
        kf33=\E[s,
        kf34=\E[t,
        kf35=\E[u,
+       kf4=\E[P,
+       kf5=\E[Q,
+       kf6=\E[R,
+       kf7=\E[S,
+       kf8=\E[T,
+       kf9=\E[U,
        khome=\E[H,
        kich1=\E[L,
        knp=\E[G,
@@ -467,9 +469,9 @@
        rmso=\E[m,
        smso=\E[1m,
        use=xterm,
-xtermm|monochrome xterm,
-       colors@,
+xterm-mono|monochrome xterm,
        bce@,
+       colors@,
        ncv@,
        pairs@,
        op@,
@@ -479,8 +481,6 @@
        setf@,
        sgr@,
        use=xterm,
-xterm-mono|monochrome xterm (X Window System),
-       use=xtermm,
 #
 # VTxxx terminals are usually set up so that full-screen applications will use
 # the cursor application mode strings.  This is good for full-screen
@@ -551,14 +551,14 @@
 # to ncurses).
 xterm-xmc|xterm with magic-cookie glitch,
        xmc#1,
-       use=xterm,
+       use=xterm-xfree86,
 #
 # This one also is primarily for testing ncurses; while the ISO 6429 defines
 # the REP control, none of the DEC VTxxx terminals (VT52 through VT420) support
 # it.
 xterm-rep|xterm with repeat-character control,
        rep=%p1%c\E[%p2%{1}%-%db,
-       use=xterm,
+       use=xterm-xfree86,
 #
 # This is mainly for testing xterm; the real VT220 will not let you switch
 # character sets without first altering the keyboard language in the setup
@@ -568,7 +568,7 @@
 xterm-nrc|xterm with VT220 national replacement character sets,
        csnm=%?%p1%{1}%=%tNorth American%e%p1%{2}%=%tBritish%e%p1%{3}%=%tFlemish%e%p1%{4}%=%tFrench Canadian%e%p1%{5}%=%tDanish%e%p1%{6}%=%tFinnish%e%p1%{7}%=%tGerman%e%p1%{8}%=%tDutch%e%p1%{9}%=%tItalian%e%p1%{10}%=%tSwiss (French)%e%p1%{11}%=%tSwiss (German)%e%p1%{12}%=%tSwedish%e%p1%{13}%=%tNorwegian%e%p1%{14}%=%tFrench/Belgian%e%p1%{15}%=%tSpanish%;,
        scs=%?%p1%{1}%=%t\E(B%e%p1%{2}%=%t\E(A%e%p1%{3}%=%t\E(R%e%p1%{4}%=%t\E(9%e%p1%{5}%=%t\E(E%e%p1%{6}%=%t\E(5%e%p1%{7}%=%t\E(K%e%p1%{8}%=%t\E(4%e%p1%{9}%=%t\E(Y%e%p1%{10}%=%t\E(=%e%p1%{11}%=%t\E(=%e%p1%{12}%=%t\E(7%e%p1%{13}%=%t\E(E%e%p1%{14}%=%t\E(R%e%p1%{15}%=%t\E(Z%;,
-       use=xterm,
+       use=xterm-xfree86,
 #
 # Foreground 0-15 maps (with toggles) into 30-37 & 90-97
 # Background 0-15 maps (with toggles) into 40-47 & 100-107
@@ -670,7 +670,7 @@
        il1=\233L,
        ind=^J,
        invis=\2338m,
-       is2=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>,
+       is2=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8,
        ka1=\217w,
        ka3=\217u,
        kb2=\217y,
@@ -728,7 +728,7 @@
        rmso=\23327m,
        rmul=\23324m,
        rs1=\Ec,
-       rs2=\E7\E[62"p\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>,
+       rs2=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8,
        sc=\E7,
        setab=\2334%p1%dm,
        setaf=\2333%p1%dm,
@@ -755,7 +755,7 @@
 #        alternate character set)
 #      + added u6, u7, u8, u9 strings for Daniel Weaver's tack program.
 #      + added kmous string for ncurses.
-#      + added khome/kend strings.
+#      + added khome/kend strings (which conflict with kfnd/kslt, see note).
 xterm-r6|xterm-old|xterm X11R6 version,
        am,
        km,
@@ -793,7 +793,7 @@
        il=\E[%p1%dL,
        il1=\E[L,
        ind=^J,
-       is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
+       is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8,
        kbs=^H,
        kcub1=\EOD,
        kcud1=\EOB,
@@ -837,7 +837,7 @@
        rmkx=\E[?1l\E>,
        rmso=\E[m,
        rmul=\E[m,
-       rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
+       rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8,
        sc=\E7,
        sgr0=\E[m,
        smacs=^N,
@@ -862,6 +862,8 @@
 #      + make khome consistent with other entries.
 #      + use rmul/smul, rmir/smir from termcap, but not rmcup/smcup because
 #        not everyone wants the alternate screen.
+#      + added u6, u7, u8, u9 strings for Daniel Weaver's tack program.
+#      + added kmous string for ncurses.
 xterm-r5|xterm R5 version,
        am,
        km,
@@ -924,6 +926,7 @@
        khome=\E[1~,
        kich1=\E[2~,
        kil1=\E[30~,
+       kmous=\E[M,
        knp=\E[6~,
        kpp=\E[5~,
        rc=\E8,
@@ -942,6 +945,10 @@
        smso=\E[7m,
        smul=\E[4m,
        tbc=\E[3g,
+       u6=\E[%i%d;%dR,
+       u7=\E[6n,
+       u8=\E[?1;2c,
+       u9=\E[c,
 #
 # This is the only entry which you should have to customize, since "xterm"
 # is widely used for a variety of incompatible terminal emulations including
Index: unicode/README
--- xterm-147+/unicode/README   Mon Aug 28 14:56:36 2000
+++ xterm-148/unicode/README    Sun Oct 29 21:09:10 2000
@@ -13,7 +13,7 @@
 
 convmap.pl is used to generate ../keysym2ucs.c, e.g.,
 
-       ./convmap.plp >../keysym2ucs.c
+       ./convmap.pl >../keysym2ucs.c
 
 keysym.map is input data for convmap.pl
 
Index: unicode/precompose.c.tail
--- xterm-147+/unicode/precompose.c.tail        Fri Aug 11 06:09:25 2000
+++ xterm-148/unicode/precompose.c.tail Sun Oct 29 19:58:11 2000
@@ -4,12 +4,12 @@
   int min = 0;
   int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1;
   int mid;
-  int sought = (base << 16) | comb, that;
+  unsigned int sought = ((unsigned)base << 16) | (unsigned)comb, that;
 
   /* binary search */
   while (max >= min) {
     mid = (min + max) / 2;
-    that = (precompositions[mid].base << 16) | (precompositions[mid].comb);
+    that = ((unsigned)precompositions[mid].base << 16) | ((unsigned)precompositions[mid].comb);
     if (that < sought) {
       min = mid + 1;
     } else if (that > sought) {
Index: util.c
--- xterm-147+/util.c   Fri Oct 27 21:21:05 2000
+++ xterm-148/util.c    Sun Oct 29 20:08:11 2000
@@ -1463,7 +1463,9 @@
        Cardinal len,
        int on_wide)
 {
-       int real_length = len;
+    int real_length = len;
+    int draw_len;
+
 #ifdef XRENDERFONT
     if (screen->renderFont)
     {
@@ -1717,10 +1719,17 @@
                                }
                        }
                        /* This is probably wrong. But it works. */
-                       if (wideness && screen->fnt_dwd->fid) {
-                               real_length = len * 2;
-                               XSetFont(screen->display, gc, screen->fnt_dwd->fid);
-                               ascent_adjust = screen->fnt_dwd->ascent - screen->fnt_norm->ascent;
+                       draw_len = len;
+                       if (wideness && (screen->fnt_dwd->fid || screen->fnt_dwdb->fid)) {
+                               draw_len = real_length = len * 2;
+                               if (flags & (BOLD|BLINK) && screen->fnt_dwdb->fid) {
+                                 XSetFont(screen->display, gc, screen->fnt_dwdb->fid);
+                                 ascent_adjust = screen->fnt_dwdb->ascent - screen->fnt_norm->ascent;
+                               }
+                               else {
+                                 XSetFont(screen->display, gc, screen->fnt_dwd->fid);
+                                 ascent_adjust = screen->fnt_dwd->ascent - screen->fnt_norm->ascent;
+                               }
                                /* fix ascent */
                        }
                        else if (flags & (BOLD|BLINK) && screen->fnt_bold->fid)
@@ -1744,6 +1753,7 @@
                {
                XDrawImageString(screen->display, VWindow(screen), gc,
                        x, y,  (char *)text, len);
+               draw_len = len;
 #if !OPT_WIDE_CHARS
                /* FIXME: This is rather broken with wide chars. It should
                 * use XDrawString16 where appropriate.
@@ -1781,7 +1791,7 @@
                        if (FontDescent(screen) > 1)
                                y++;
                        XDrawLine(screen->display, VWindow(screen), gc,
-                               x, y, x + len * screen->fnt_wide - 1, y);
+                               x, y, x + draw_len * screen->fnt_wide - 1, y);
                }
 #if OPT_BOX_CHARS
 #define DrawX(col) x + (col * (screen->fnt_wide))
Index: version.h
--- xterm-147+/version.h        Fri Oct 27 21:21:05 2000
+++ xterm-148/version.h Sun Oct 29 16:17:16 2000
@@ -6,5 +6,5 @@
  * XFree86 to which this version of xterm has been built.  The number in
  * parentheses is my patch number (T.Dickey).
  */
-#define XTERM_PATCH   147
-#define XFREE86_VERSION "XFree86 4.0.1c"
+#define XTERM_PATCH   148
+#define XFREE86_VERSION "XFree86 4.0.1d"
Index: xterm.h
--- xterm-147+/xterm.h  Fri Oct 27 21:21:05 2000
+++ xterm-148/xterm.h   Sun Oct 29 19:58:11 2000
@@ -331,6 +331,7 @@
 #define XtNvisualBell          "visualBell"
 #define XtNwideChars           "wideChars"
 #define XtNwideFont            "wideFont"
+#define XtNwideBoldFont                "wideBoldFont"
 #define XtNxmcAttributes       "xmcAttributes"
 #define XtNxmcGlitch           "xmcGlitch"
 #define XtNxmcInline           "xmcInline"
@@ -413,6 +414,7 @@
 #define XtCVisualBell          "VisualBell"
 #define XtCWideChars           "WideChars"
 #define XtCWideFont            "WideFont"
+#define XtCWideBoldFont                "WideBoldFont"
 #define XtCXmcAttributes       "XmcAttributes"
 #define XtCXmcGlitch           "XmcGlitch"
 #define XtCXmcInline           "XmcInline"
Index: xterm.log.html
--- xterm-147+/xterm.log.html   Fri Oct 27 21:21:05 2000
+++ xterm-148/xterm.log.html    Mon Oct 30 21:37:36 2000
@@ -42,6 +42,7 @@
 xc/programs/Xserver/hw/xfree86).
 
 <UL>
+<LI><A HREF="#xterm_148">Patch #148 - 2000/10/31 - XFree86 4.0.1d</A>
 <LI><A HREF="#xterm_147">Patch #147 - 2000/10/26 - XFree86 4.0.1c</A>
 <LI><A HREF="#xterm_146">Patch #146 - 2000/9/12 - XFree86 4.0.1c</A>
 <LI><A HREF="#xterm_145">Patch #145 - 2000/9/11 - XFree86 4.0.1c</A>
@@ -191,6 +192,55 @@
 <LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
 <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
 </UL>
+
+<H1><A NAME="xterm_148">Patch #148 - 2000/10/31 - XFree86 4.0.1d</A></H1>
+<ul>
+       <li>document logfile options in man-page.
+
+       <li>correct spelling of <code>-samename</code> option in help message.
+
+       <li>add configure script option <code>--enable-tcap-query</code>
+         (request by Bram Moolenaar).
+
+       <li>patch by Bram Moolenaar to add a
+         "Co" or "colors" entry to the OPT_TCAP_QUERY feature.
+       <li>patch by Kiyokazu SUTO &lt;suto@ks-and-ks.ne.jp&gt;:
+       <ul>
+         <li>add support for bold font for double width characters.
+            The font name may be specified with the command line option
+            <code>-fwb</code> or with resource
+            <code>wideBoldFont</code> (class <code>WideBoldFont</code>).
+         <li>correct underlining of double width character string, which
+            was drawn only half width.
+         <li>correct binary search of precomposed character table, which
+            may return wrong result when <code>int</code> is just 32 bits.
+         </ul>
+
+       <li>some changes to align terminfo with ncurses 5.2:
+       <ul>
+         <li>remove xtermm description, retaining xterm-mono since the former
+           conflicts with ncurses.
+         <li>modify initialization and reset strings to avoid putting the
+           save/restore cursor operations bracketing changes to video
+           attributes, since the changes could be lost when the cursor is
+           restored.  This affects xterm-r6 and xterm-8bit (the xterm-xfree86
+           entry uses the soft-reset feature which resets scrolling margins
+           and origin mode without requiring us to save/restore the cursor
+           position).
+         <li>make a few entries explicitly inherit from xterm-xfree86 rather
+           than xterm: xterm-rep, xterm-xmc, xterm-nrc
+       </ul>
+
+       <li>ensure that sign-extension does not affect <code>ctype</code>
+         macros by using <code>CharOf()</code> macro to coerce the parameter
+         to an unsigned char.
+
+       <li>resync with XFree86 4.0.1d:
+       <ul>
+         <li>Add primitive support in xterm for Xft based fonts (Keith Packard).
+           The changes are ifdef'd with <code>-DXRENDERFONT</code>.
+       </ul>
+</ul>
 
 <H1><A NAME="xterm_147">Patch #147 - 2000/10/26 - XFree86 4.0.1c</A></H1>
 <ul>
Index: xterm.man
--- xterm-147+/xterm.man        Fri Oct 27 21:21:05 2000
+++ xterm-148/xterm.man Mon Oct 30 21:35:42 2000
@@ -345,9 +345,19 @@
 The default is to do overstriking of the normal font.
 .TP 8
 .B \-fw \fIfont\fP
-This option specifies the font to be used for displaying wide text.  By default,
+This option specifies the font to be used for displaying wide text.
+By default,
 it will attempt to use a font twice as wide as the font that will be used to
-draw normal text.  If no doublewidth font is found, it will improvise, by stretching 
+draw normal text.
+If no doublewidth font is found, it will improvise, by stretching 
+the normal font.
+.TP 8
+.B \-fwb \fIfont\fP
+This option specifies the font to be used for displaying bold wide text.
+By default,
+it will attempt to use a font twice as wide as the font that will be used to
+draw normal text.
+If no doublewidth font is found, it will improvise, by stretching 
 the normal font.
 .TP 8
 .B \-fi
@@ -405,10 +415,22 @@
 .B \+j
 This option indicates that \fIxterm\fP should not do jump scrolling.
 .TP 8
+.B \-l
+Turn logging on.
+Normally logging is not supported, due to security concerns.
+Some versions of \fIxterm\fP may have logging enabled.
+.TP 8
+.B \+l
+Turn logging off.
+.TP 8
 .B \-leftbar
 Force scrollbar to the left side of VT100 screen.
 This is the default, unless you have set the rightScrollBar resource.
 .TP 8
+.BI \-lf " filename
+Specify the log-filename.
+See the \fB\-l\fP option.
+.TP 8
 .B \-ls
 This option indicates that the shell that is started in the \fIxterm\fP window
 will be a login shell (i.e., the first character of argv[0] will be a dash,
@@ -738,6 +760,10 @@
 .B \-rv
 This option indicates that reverse video should be simulated by swapping
 the foreground and background colors.
+.TP 8
+.B \+rv
+Disable the simulation of reverse video by swapping foreground and background
+colors.
 .TP 8
 .B \-title \fIstring\fP
 This option specifies the window title string, which may be displayed by