diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST index 1351cab2d..a51ffbf28 100644 --- a/app/xterm/MANIFEST +++ b/app/xterm/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-233, version xterm-233 +MANIFEST for xterm-236, version xterm-236 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c index 0666f0819..bf38747b6 100644 --- a/app/xterm/Tekproc.c +++ b/app/xterm/Tekproc.c @@ -1,4 +1,4 @@ -/* $XTermId: Tekproc.c,v 1.159 2008/02/21 20:21:51 tom Exp $ */ +/* $XTermId: Tekproc.c,v 1.160 2008/06/03 20:55:56 tom Exp $ */ /* * Warning, there be crufty dragons here. @@ -1493,11 +1493,9 @@ TekRealize(Widget gw, else tw->hints.flags |= PSize; - TRACE(("make resize request %dx%d\n", height, width)); - (void) XtMakeResizeRequest((Widget) tw, - width, height, - &tw->core.width, &tw->core.height); - TRACE(("...made resize request %dx%d\n", tw->core.height, tw->core.width)); + (void) REQ_RESIZE((Widget) tw, + width, height, + &tw->core.width, &tw->core.height); /* XXX This is bogus. We are parsing geometries too late. This * is information that the shell widget ought to have before we get diff --git a/app/xterm/VTPrsTbl.c b/app/xterm/VTPrsTbl.c index 47a244109..370ae0e1f 100644 --- a/app/xterm/VTPrsTbl.c +++ b/app/xterm/VTPrsTbl.c @@ -1,4 +1,4 @@ -/* $XTermId: VTPrsTbl.c,v 1.49 2008/01/27 17:41:05 tom Exp $ */ +/* $XTermId: VTPrsTbl.c,v 1.50 2008/05/26 22:38:23 tom Exp $ */ /* * @@ -4352,9 +4352,9 @@ CASE_SCS2_STATE, CASE_SCS3_STATE, /* , - . / */ CASE_ESC_IGNORE, -CASE_ESC_IGNORE, -CASE_ESC_IGNORE, -CASE_ESC_IGNORE, +CASE_SCS1A_STATE, +CASE_SCS2A_STATE, +CASE_SCS3A_STATE, /* 0 1 2 3 */ CASE_GROUND_STATE, CASE_GROUND_STATE, @@ -4512,9 +4512,9 @@ CASE_SCS2_STATE, CASE_SCS3_STATE, /* notsign hyphen registered macron */ CASE_ESC_IGNORE, -CASE_ESC_IGNORE, -CASE_ESC_IGNORE, -CASE_ESC_IGNORE, +CASE_SCS1A_STATE, +CASE_SCS2A_STATE, +CASE_SCS3A_STATE, /* degree plusminus twosuperior threesuperior */ CASE_GROUND_STATE, CASE_GROUND_STATE, @@ -5589,6 +5589,330 @@ CASE_GROUND_STATE, CASE_IGNORE, }; +Const PARSE_T scs96table[] = /* ESC - etc. */ +{ +/* NUL SOH STX ETX */ +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +/* EOT ENQ ACK BEL */ +CASE_IGNORE, +CASE_ENQ, +CASE_IGNORE, +CASE_BELL, +/* BS HT NL VT */ +CASE_BS, +CASE_TAB, +CASE_VMOT, +CASE_VMOT, +/* NP CR SO SI */ +CASE_VMOT, +CASE_CR, +CASE_SO, +CASE_SI, +/* DLE DC1 DC2 DC3 */ +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +/* DC4 NAK SYN ETB */ +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +/* CAN EM SUB ESC */ +CASE_GROUND_STATE, +CASE_IGNORE, +CASE_GROUND_STATE, +CASE_ESC, +/* FS GS RS US */ +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +CASE_IGNORE, +/* SP ! " # */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* $ % & ' */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* ( ) * + */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* , - . / */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* 0 1 2 3 */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 4 5 6 7 */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 8 9 : ; */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* < = > ? */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* @ A B C */ +CASE_GROUND_STATE, +CASE_GSETS, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* D E F G */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* H I J K */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* L M N O */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* P Q R S */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* T U V W */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* X Y Z [ */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* \ ] ^ _ */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* ` a b c */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* d e f g */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* h i j k */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* l m n o */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* p q r s */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* t u v w */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* x y z { */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* | } ~ DEL */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_IGNORE, +/* 0x80 0x81 0x82 0x83 */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 0x84 0x85 0x86 0x87 */ +CASE_IND, +CASE_NEL, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 0x88 0x89 0x8a 0x8b */ +CASE_HTS, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 0x8c 0x8d 0x8e 0x8f */ +CASE_GROUND_STATE, +CASE_RI, +CASE_SS2, +CASE_SS3, +/* 0x90 0x91 0x92 0x93 */ +CASE_DCS, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* 0x94 0x95 0x96 0x97 */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_SPA, +CASE_EPA, +/* 0x98 0x99 0x9a 0x9b */ +CASE_SOS, +CASE_GROUND_STATE, +CASE_DECID, +CASE_CSI_STATE, +/* 0x9c 0x9d 0x9e 0x9f */ +CASE_ST, +CASE_OSC, +CASE_PM, +CASE_APC, +/* nobreakspace exclamdown cent sterling */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* currency yen brokenbar section */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* diaeresis copyright ordfeminine guillemotleft */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* notsign hyphen registered macron */ +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +CASE_ESC_IGNORE, +/* degree plusminus twosuperior threesuperior */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* acute mu paragraph periodcentered */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* cedilla onesuperior masculine guillemotright */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* onequarter onehalf threequarters questiondown */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Agrave Aacute Acircumflex Atilde */ +CASE_GROUND_STATE, +CASE_GSETS, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Adiaeresis Aring AE Ccedilla */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Egrave Eacute Ecircumflex Ediaeresis */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Igrave Iacute Icircumflex Idiaeresis */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Eth Ntilde Ograve Oacute */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Ocircumflex Otilde Odiaeresis multiply */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Ooblique Ugrave Uacute Ucircumflex */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* Udiaeresis Yacute Thorn ssharp */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* agrave aacute acircumflex atilde */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* adiaeresis aring ae ccedilla */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* egrave eacute ecircumflex ediaeresis */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* igrave iacute icircumflex idiaeresis */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* eth ntilde ograve oacute */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* ocircumflex otilde odiaeresis division */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* oslash ugrave uacute ucircumflex */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* udiaeresis yacute thorn ydiaeresis */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_IGNORE, +}; + /* * This table is treated specially. The CASE_IGNORE entries correspond to the * characters that can be accumulated for the string function (e.g., OSC). diff --git a/app/xterm/VTparse.def b/app/xterm/VTparse.def index 6c8751da0..c1438db3b 100644 --- a/app/xterm/VTparse.def +++ b/app/xterm/VTparse.def @@ -1,4 +1,4 @@ -# $XTermId: VTparse.def,v 1.31 2008/01/27 17:08:54 tom Exp $ +# $XTermId: VTparse.def,v 1.32 2008/05/26 21:30:10 tom Exp $ # # vile:confmode rs=lf # @@ -141,3 +141,6 @@ CASE_CSI_STAR_STATE CASE_SET_MOD_FKEYS CASE_SET_MOD_FKEYS0 CASE_HIDE_POINTER +CASE_SCS1A_STATE +CASE_SCS2A_STATE +CASE_SCS3A_STATE diff --git a/app/xterm/VTparse.h b/app/xterm/VTparse.h index db2fd07de..cdc781507 100644 --- a/app/xterm/VTparse.h +++ b/app/xterm/VTparse.h @@ -1,4 +1,4 @@ -/* $XTermId: VTparse.h,v 1.43 2008/01/27 17:11:37 tom Exp $ */ +/* $XTermId: VTparse.h,v 1.45 2008/05/28 21:11:23 tom Exp $ */ /* * Copyright 2002-2006,2008 by Thomas E. Dickey @@ -75,6 +75,7 @@ extern Const PARSE_T eigtable[]; extern Const PARSE_T esc_sp_table[]; extern Const PARSE_T esc_table[]; extern Const PARSE_T scrtable[]; +extern Const PARSE_T scs96table[]; extern Const PARSE_T scstable[]; extern Const PARSE_T sos_table[]; @@ -242,5 +243,8 @@ extern Const PARSE_T esc_pct_table[]; #define CASE_SET_MOD_FKEYS 131 #define CASE_SET_MOD_FKEYS0 132 #define CASE_HIDE_POINTER 133 +#define CASE_SCS1A_STATE 134 +#define CASE_SCS2A_STATE 135 +#define CASE_SCS3A_STATE 136 #endif /* included_VTparse_h */ diff --git a/app/xterm/aclocal.m4 b/app/xterm/aclocal.m4 index 7bee0f2e0..e4152999f 100644 --- a/app/xterm/aclocal.m4 +++ b/app/xterm/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $XTermId: aclocal.m4,v 1.247 2008/02/24 19:30:23 tom Exp $ +dnl $XTermId: aclocal.m4,v 1.253 2008/07/27 15:28:15 tom Exp $ dnl dnl $XFree86: xc/programs/xterm/aclocal.m4,v 3.65 2006/06/19 00:36:50 dickey Exp $ dnl @@ -219,7 +219,7 @@ ifelse($3,,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_CACHE version: 10 updated: 2004/05/23 13:03:31 +dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59 dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. @@ -250,7 +250,7 @@ test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name if test ".$system_name" != ".$cf_cv_system_name" ; then AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) - AC_ERROR("Please remove config.cache and try again.") + AC_MSG_ERROR("Please remove config.cache and try again.") fi ])dnl dnl --------------------------------------------------------------------------- @@ -635,7 +635,7 @@ if test "$GCC" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_WARNINGS version: 22 updated: 2007/07/29 09:55:12 +dnl CF_GCC_WARNINGS version: 23 updated: 2008/07/26 17:54:02 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: @@ -730,7 +730,7 @@ then ;; Winline) #(vi case $GCC_VERSION in - 3.3*) + [[34]].*) CF_VERBOSE(feature is broken in gcc $GCC_VERSION) continue;; esac @@ -783,7 +783,7 @@ AC_DEFUN([CF_HELP_MESSAGE], [AC_DIVERT_HELP([$1])dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_IMAKE_CFLAGS version: 29 updated: 2007/05/24 20:53:19 +dnl CF_IMAKE_CFLAGS version: 30 updated: 2008/03/23 15:04:54 dnl --------------- dnl Use imake to obtain compiler flags. We could, in principle, write tests to dnl get these, but if imake is properly configured there is no point in doing @@ -864,14 +864,14 @@ CF_EOF esac done if test -z "$cf_config" ; then - AC_WARN(Could not find imake config-directory) + AC_MSG_WARN(Could not find imake config-directory) else cf_imake_opts="$cf_imake_opts -I$cf_config" if ( $IMAKE -v $cf_imake_opts 2>&AC_FD_CC) then CF_VERBOSE(Using $IMAKE $cf_config) else - AC_WARN(Cannot run $IMAKE) + AC_MSG_WARN(Cannot run $IMAKE) fi fi fi @@ -1093,7 +1093,7 @@ if test -n "$cf_path_prog" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PATH_SYNTAX version: 11 updated: 2006/09/02 08:55:46 +dnl CF_PATH_SYNTAX version: 12 updated: 2008/03/23 14:45:59 dnl -------------- dnl Check the argument to see that it looks like a pathname. Rewrite it if it dnl begins with one of the prefix/exec_prefix variables, and then again if the @@ -1125,7 +1125,7 @@ case ".[$]$1" in #(vi $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%` ;; *) - ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2) + ifelse($2,,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2) ;; esac ])dnl @@ -1809,7 +1809,36 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TYPE_FD_SET version: 3 updated: 1999/10/16 13:49:00 +dnl CF_TYPE_FD_MASK version: 2 updated: 2008/03/25 20:59:57 +dnl --------------- +dnl Check for the declaration of fd_mask, which is like fd_set, associated +dnl with select(). The check for fd_set should have pulled in this as well, +dnl but there is a special case for Mac OS X, possibly other BSD-derived +dnl platforms. +AC_DEFUN([CF_TYPE_FD_MASK], +[ +AC_REQUIRE([CF_TYPE_FD_SET]) + +AC_CACHE_CHECK(for declaration of fd_mask,cf_cv_type_fd_mask,[ + if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then + AC_TRY_COMPILE([ +#include ],[fd_mask x],, + [CF_MSG_LOG(if we must define CSRG_BASED) +# Xosdefs.h on Mac OS X may not define this (but it should). + AC_TRY_COMPILE([ +#define CSRG_BASED +#include ],[fd_mask x], + cf_cv_type_fd_mask=CSRG_BASED)]) + else + cf_cv_type_fd_mask=$cf_cv_type_fd_set + fi +]) +if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then + AC_DEFINE(CSRG_BASED) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_TYPE_FD_SET version: 4 updated: 2008/03/25 20:56:03 dnl -------------- dnl Check for the declaration of fd_set. Some platforms declare it in dnl , and some in , which requires . @@ -1817,20 +1846,22 @@ dnl Finally, if we are using this for an X application, Xpoll.h may include dnl , so we don't want to do it twice. AC_DEFUN([CF_TYPE_FD_SET], [ +AC_CHECK_HEADERS(X11/Xpoll.h) + AC_CACHE_CHECK(for declaration of fd_set,cf_cv_type_fd_set, - [echo "trying sys/types alone" 1>&AC_FD_CC + [CF_MSG_LOG(sys/types alone) AC_TRY_COMPILE([ #include ], [fd_set x], [cf_cv_type_fd_set=sys/types.h], - [echo "trying X11/Xpoll.h" 1>&AC_FD_CC + [CF_MSG_LOG(X11/Xpoll.h) AC_TRY_COMPILE([ #ifdef HAVE_X11_XPOLL_H #include #endif], [fd_set x], [cf_cv_type_fd_set=X11/Xpoll.h], - [echo "trying sys/select.h" 1>&AC_FD_CC + [CF_MSG_LOG(sys/select.h) AC_TRY_COMPILE([ #include #include ], @@ -2289,7 +2320,7 @@ int x = XkbBI_Info test "$cf_cv_xkb_bell_ext" = yes && AC_DEFINE(HAVE_XKB_BELL_EXT) ]) dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38 +dnl CF_XOPEN_SOURCE version: 26 updated: 2008/07/27 11:26:57 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -2309,7 +2340,7 @@ case $host_os in #(vi aix[[45]]*) #(vi CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE" ;; -freebsd*) #(vi +freebsd*|dragonfly*) #(vi # 5.x headers associate # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L @@ -2475,7 +2506,7 @@ elif test "$cf_x_athena_include" != default ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA_LIBS version: 6 updated: 2006/11/30 17:57:11 +dnl CF_X_ATHENA_LIBS version: 7 updated: 2008/03/23 14:46:03 dnl ---------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. @@ -2519,7 +2550,7 @@ do done if test -z "$cf_x_athena_lib" ; then - AC_ERROR( + AC_MSG_ERROR( [Unable to successfully link Athena library (-l$cf_x_athena_root) with test program]) fi @@ -2644,7 +2675,7 @@ AC_SUBST(HAVE_TYPE_FCCHAR32) AC_SUBST(HAVE_TYPE_XFTCHARSPEC) ]) dnl --------------------------------------------------------------------------- -dnl CF_X_TOOLKIT version: 11 updated: 2006/11/29 19:05:14 +dnl CF_X_TOOLKIT version: 12 updated: 2008/03/23 15:04:54 dnl ------------ dnl Check for X Toolkit libraries dnl @@ -2673,7 +2704,7 @@ AC_CHECK_LIB(Xt, XtAppInitialize, [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])]) if test $cf_have_X_LIBS = no ; then - AC_WARN( + AC_MSG_WARN( [Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile.]) diff --git a/app/xterm/button.c b/app/xterm/button.c index 66ea199e2..3cc179860 100644 --- a/app/xterm/button.c +++ b/app/xterm/button.c @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.285 2008/02/24 19:42:02 tom Exp $ */ +/* $XTermId: button.c,v 1.288 2008/07/27 19:36:37 tom Exp $ */ /* * Copyright 1999-2007,2008 by Thomas E. Dickey @@ -270,7 +270,7 @@ SendLocatorPosition(XtermWidget xw, XEvent * event) } /* get button # */ - button = event->xbutton.button - 1; + button = (int) event->xbutton.button - 1; LocatorCoords(row, col, event->xbutton.x, event->xbutton.y, oor); @@ -368,7 +368,7 @@ SendLocatorPosition(XtermWidget xw, XEvent * event) * Button1 (left) and Button3 (right) are swapped in the mask relative to X. */ #define ButtonState(state, mask) \ -{ (state) = ((mask) & (Button1Mask | Button2Mask | Button3Mask | Button4Mask)) >> 8; \ +{ (state) = (int) (((mask) & (Button1Mask | Button2Mask | Button3Mask | Button4Mask)) >> 8); \ /* swap Button1 & Button3 */ \ (state) = ((state) & ~(4|1)) | (((state)&1)?4:0) | (((state)&4)?1:0); \ } @@ -632,10 +632,10 @@ isClick1_clean(TScreen * screen, XEvent * event) delta = screen->multiClickTime + 1; } else if (event->xbutton.time > lastButtonDownTime) { /* most of the time */ - delta = event->xbutton.time - lastButtonDownTime; + delta = (int) (event->xbutton.time - lastButtonDownTime); } else { /* time has rolled over since lastButtonUpTime */ - delta = (((Time) ~ 0) - lastButtonDownTime) + event->xbutton.time; + delta = (int) ((((Time) ~ 0) - lastButtonDownTime) + event->xbutton.time); } return delta <= screen->multiClickTime; @@ -658,10 +658,10 @@ isDoubleClick3(TScreen * screen, XEvent * event) delta = screen->multiClickTime + 1; } else if (event->xbutton.time > lastButton3DoubleDownTime) { /* most of the time */ - delta = event->xbutton.time - lastButton3DoubleDownTime; + delta = (int) (event->xbutton.time - lastButton3DoubleDownTime); } else { /* time has rolled over since lastButton3DoubleDownTime */ - delta = (((Time) ~ 0) - lastButton3DoubleDownTime) + event->xbutton.time; + delta = (int) ((((Time) ~ 0) - lastButton3DoubleDownTime) + event->xbutton.time); } if (delta <= screen->multiClickTime) { /* Double click */ @@ -697,10 +697,10 @@ CheckSecondPress3(TScreen * screen, XEvent * event) delta = screen->multiClickTime + 1; } else if (event->xbutton.time > lastButton3UpTime) { /* most of the time */ - delta = event->xbutton.time - lastButton3UpTime; + delta = (int) (event->xbutton.time - lastButton3UpTime); } else { /* time has rolled over since lastButton3UpTime */ - delta = (((Time) ~ 0) - lastButton3UpTime) + event->xbutton.time; + delta = (int) ((((Time) ~ 0) - lastButton3UpTime) + event->xbutton.time); } if (delta <= screen->multiClickTime) { CELL cell; @@ -772,7 +772,7 @@ ReadLineMovePoint(TScreen * screen, int col, int ldelta) line[count++] = ANSI_ESC; line[count++] = '['; /* XXX maybe sometimes O is better? */ } - line[count++] = (col > 0 ? 'C' : 'D'); + line[count++] = CharOf(col > 0 ? 'C' : 'D'); if (col < 0) col = -col; while (col--) @@ -813,8 +813,8 @@ DiredButton(Widget w, Line[0] = CONTROL('X'); Line[1] = ANSI_ESC; Line[2] = 'G'; - Line[3] = ' ' + col; - Line[4] = ' ' + line; + Line[3] = CharOf(' ' + col); + Line[4] = CharOf(' ' + line); v_write(screen->respond, Line, 5); } } @@ -844,10 +844,10 @@ ReadLineButton(Widget w, delta = screen->multiClickTime + 1; } else if (event->xbutton.time > lastButtonDownTime) { /* most of the time */ - delta = event->xbutton.time - lastButtonDownTime; + delta = (int) (event->xbutton.time - lastButtonDownTime); } else { /* time has rolled over since lastButtonUpTime */ - delta = (((Time) ~ 0) - lastButtonDownTime) + event->xbutton.time; + delta = (int) ((((Time) ~ 0) - lastButtonDownTime) + event->xbutton.time); } if (delta > screen->multiClickTime) goto finish; /* All this work for this... */ @@ -876,7 +876,7 @@ ReadLineButton(Widget w, Line[0] = ANSI_ESC; /* XXX: sometimes it is better to send '['? */ Line[1] = 'O'; - Line[2] = (col > 0 ? 'C' : 'D'); + Line[2] = CharOf(col > 0 ? 'C' : 'D'); if (col < 0) col = -col; while (col--) @@ -1042,8 +1042,8 @@ static unsigned DECtoASCII(unsigned ch) { if (xtermIsDecGraphic(ch)) { - ch = "###########+++++##-##++++|######"[ch]; - /* 01234567890123456789012345678901 */ + ch = CharOf("###########+++++##-##++++|######"[ch]); + /* 01234567890123456789012345678901 */ } return ch; } @@ -1076,7 +1076,7 @@ UTF8toLatin1(Char * s, unsigned len, unsigned long *result) if (value == UCS_REPL) { *q++ = '#'; } else if (value < 256) { - *q++ = value; + *q++ = CharOf(value); } else { unsigned eqv = ucs2dec(value); if (xtermIsDecGraphic(eqv)) { @@ -1406,11 +1406,11 @@ base64_flush(TScreen * screen) case 0: break; case 2: - x = base64_code[screen->base64_accu << 4]; + x = CharOf(base64_code[screen->base64_accu << 4]); tty_vwrite(screen->respond, &x, 1); break; case 4: - x = base64_code[screen->base64_accu << 2]; + x = CharOf(base64_code[screen->base64_accu << 2]); tty_vwrite(screen->respond, &x, 1); break; } @@ -1436,20 +1436,20 @@ _qWriteSelectionData(TScreen * screen, Char * lag, unsigned length) while (length--) { switch (screen->base64_count) { case 0: - buf[x++] = base64_code[*p >> 2]; + buf[x++] = CharOf(base64_code[*p >> 2]); screen->base64_accu = (*p & 0x3); screen->base64_count = 2; ++p; break; case 2: - buf[x++] = base64_code[(screen->base64_accu << 4) + (*p >> 4)]; + buf[x++] = CharOf(base64_code[(screen->base64_accu << 4) + (*p >> 4)]); screen->base64_accu = (*p & 0xF); screen->base64_count = 4; ++p; break; case 4: - buf[x++] = base64_code[(screen->base64_accu << 2) + (*p >> 6)]; - buf[x++] = base64_code[*p & 0x3F]; + buf[x++] = CharOf(base64_code[(screen->base64_accu << 2) + (*p >> 6)]); + buf[x++] = CharOf(base64_code[*p & 0x3F]); screen->base64_accu = 0; screen->base64_count = 0; ++p; @@ -1617,15 +1617,35 @@ SelectionReceived(Widget w, if (text_list != NULL && text_list_count != 0) { int i; Char *data; - unsigned long size; + char **new_text_list, *tmp; + unsigned long size, new_size; + /* XLib StringList actually uses only two + * pointers, one for the list itself, and one for + * the data. Pointer to the data is the first + * element of the list, the rest (if any) list + * elements point to the same memory block as the + * first element + */ + new_size = 0; for (i = 0; i < text_list_count; ++i) { data = (Char *) text_list[i]; - size = strlen(text_list[i]); + size = strlen(text_list[i]) + 1; data = UTF8toLatin1(data, size, &size); - XFree(text_list[i]); - text_list[i] = XtMalloc(size + 1); - memcpy(text_list[i], data, size + 1); + new_size += size + 1; } + new_text_list = + (char **) XtMalloc(sizeof(char *) * text_list_count); + new_text_list[0] = tmp = XtMalloc(new_size); + for (i = 0; i < text_list_count; ++i) { + data = (Char *) text_list[i]; + size = strlen(text_list[i]) + 1; + data = UTF8toLatin1(data, size, &size); + memcpy(tmp, data, size + 1); + new_text_list[i] = tmp; + tmp += size + 1; + } + XFreeStringList(text_list); + text_list = new_text_list; } } else #endif @@ -1737,10 +1757,10 @@ EvalSelectUnit(TScreen * screen, delta = screen->multiClickTime + 1; } else if (buttonDownTime > screen->lastButtonUpTime) { /* most of the time */ - delta = buttonDownTime - screen->lastButtonUpTime; + delta = (int) (buttonDownTime - screen->lastButtonUpTime); } else { /* time has rolled over since lastButtonUpTime */ - delta = (((Time) ~ 0) - screen->lastButtonUpTime) + buttonDownTime; + delta = (int) ((((Time) ~ 0) - screen->lastButtonUpTime) + buttonDownTime); } if (delta > screen->multiClickTime) { @@ -1923,17 +1943,17 @@ EndExtend(XtermWidget xw, && isSameCELL(&cell, &(screen->endSel))) { /* Use short-form emacs select */ line[count++] = 't'; - line[count++] = ' ' + screen->endSel.col + 1; - line[count++] = ' ' + screen->endSel.row + 1; + line[count++] = CharOf(' ' + screen->endSel.col + 1); + line[count++] = CharOf(' ' + screen->endSel.row + 1); } else { /* long-form, specify everything */ line[count++] = 'T'; - line[count++] = ' ' + screen->startSel.col + 1; - line[count++] = ' ' + screen->startSel.row + 1; - line[count++] = ' ' + screen->endSel.col + 1; - line[count++] = ' ' + screen->endSel.row + 1; - line[count++] = ' ' + cell.col + 1; - line[count++] = ' ' + cell.row + 1; + line[count++] = CharOf(' ' + screen->startSel.col + 1); + line[count++] = CharOf(' ' + screen->startSel.row + 1); + line[count++] = CharOf(' ' + screen->endSel.col + 1); + line[count++] = CharOf(' ' + screen->endSel.row + 1); + line[count++] = CharOf(' ' + cell.col + 1); + line[count++] = CharOf(' ' + cell.row + 1); } v_write(screen->respond, line, count); TrackText(xw, &zeroCELL, &zeroCELL); @@ -2361,7 +2381,7 @@ class_of(TScreen * screen, CELL * cell) } #endif - value = XTERM_CELL(temp.row, temp.col); + value = (int) XTERM_CELL(temp.row, temp.col); if_OPT_WIDE_CHARS(screen, { return CharacterClass(value); }); @@ -2442,7 +2462,7 @@ lengthOfLines(TScreen * screen, int firstRow, int lastRow) for (n = firstRow; n <= lastRow; ++n) { int value = LastTextCol(screen, n); if (value >= 0) - length += (value + 1); + length += (unsigned) (value + 1); } return length; } @@ -2463,7 +2483,7 @@ make_indexed_text(TScreen * screen, int row, unsigned length, int *indexed) * string were UTF-8. */ if_OPT_WIDE_CHARS(screen, { - need *= (MAX_PTRS * 6); + need *= (unsigned) (MAX_PTRS * 6); }); if ((result = TypeCallocN(Char, need + 1)) != 0) { @@ -3086,20 +3106,20 @@ AppendToSelectionBuffer(TScreen * screen, unsigned c) break; case 2: - ch = (screen->base64_accu << 6) + six; + ch = CharOf((screen->base64_accu << 6) + six); screen->base64_count = 0; AppendStrToSelectionBuffer(screen, &ch, 1); break; case 4: - ch = (screen->base64_accu << 4) + (six >> 2); + ch = CharOf((screen->base64_accu << 4) + (six >> 2)); screen->base64_accu = (six & 0x3); screen->base64_count = 2; AppendStrToSelectionBuffer(screen, &ch, 1); break; case 6: - ch = (screen->base64_accu << 2) + (six >> 4); + ch = CharOf((screen->base64_accu << 2) + (six >> 4)); screen->base64_accu = (six & 0xF); screen->base64_count = 4; AppendStrToSelectionBuffer(screen, &ch, 1); @@ -3573,7 +3593,7 @@ SaveText(TScreen * screen, } else if (c == 0x7f) { c = 0x5f; } - *lp++ = A2E(c); + *lp++ = CharOf(A2E(c)); } if (c != E2A(' ')) result = lp; @@ -3601,7 +3621,7 @@ SaveText(TScreen * screen, /* Position: 32 - 255. */ -static int +static Char BtnCode(XButtonEvent * event, int button) { int result = 32 + (KeyState(event->state) << 2); @@ -3615,7 +3635,7 @@ BtnCode(XButtonEvent * event, int button) result += 32; result += button; } - return result; + return CharOf(result); } #define MOUSE_LIMIT (255 - 32) @@ -3675,7 +3695,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event) /* Add event code to key sequence */ if (screen->send_mouse_pos == X10_MOUSE) { - line[count++] = ' ' + button; + line[count++] = CharOf(' ' + button); } else { /* Button-Motion events */ switch (event->type) { @@ -3714,8 +3734,8 @@ EditorButton(XtermWidget xw, XButtonEvent * event) screen->mouse_col = col; /* Add pointer position to key sequence */ - line[count++] = ' ' + col + 1; - line[count++] = ' ' + row + 1; + line[count++] = CharOf(' ' + col + 1); + line[count++] = CharOf(' ' + row + 1); TRACE(("mouse at %d,%d button+mask = %#x\n", row, col, (screen->control_eight_bits) ? line[2] : line[3])); @@ -3743,7 +3763,7 @@ SendFocusButton(XtermWidget xw, XFocusChangeEvent * event) reply.a_pintro = '>'; } #endif - reply.a_final = (event->type == FocusIn) ? 'I' : 'O'; + reply.a_final = CharOf((event->type == FocusIn) ? 'I' : 'O'); unparseseq(xw, &reply); } return; diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c index 54d6dca7e..1426b14c6 100644 --- a/app/xterm/charproc.c +++ b/app/xterm/charproc.c @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.836 2008/02/29 01:55:13 tom Exp $ */ +/* $XTermId: charproc.c,v 1.848 2008/07/27 19:00:21 tom Exp $ */ /* @@ -614,6 +614,8 @@ static XtResource resources[] = keyboard.modify_1st.other_keys, 0), Ires(XtNmodifyStringKeys, XtCModifyStringKeys, keyboard.modify_1st.string_keys, 0), + Ires(XtNformatOtherKeys, XtCFormatOtherKeys, + keyboard.format_keys, 0), #endif #if OPT_NUM_LOCK @@ -1080,10 +1082,21 @@ which_table(Const PARSE_T * table) char *result = "?"; /* *INDENT-OFF* */ WHICH_TABLE (ansi_table); - else WHICH_TABLE (csi_table); + else WHICH_TABLE (cigtable); else WHICH_TABLE (csi2_table); else WHICH_TABLE (csi_ex_table); else WHICH_TABLE (csi_quo_table); + else WHICH_TABLE (csi_table); + else WHICH_TABLE (dec2_table); + else WHICH_TABLE (dec3_table); + else WHICH_TABLE (dec_table); + else WHICH_TABLE (eigtable); + else WHICH_TABLE (esc_sp_table); + else WHICH_TABLE (esc_table); + else WHICH_TABLE (scrtable); + else WHICH_TABLE (scs96table); + else WHICH_TABLE (scstable); + else WHICH_TABLE (sos_table); #if OPT_DEC_LOCATOR else WHICH_TABLE (csi_tick_table); #endif @@ -1091,16 +1104,6 @@ which_table(Const PARSE_T * table) else WHICH_TABLE (csi_dollar_table); else WHICH_TABLE (csi_star_table); #endif - else WHICH_TABLE (dec_table); - else WHICH_TABLE (dec2_table); - else WHICH_TABLE (dec3_table); - else WHICH_TABLE (cigtable); - else WHICH_TABLE (eigtable); - else WHICH_TABLE (esc_table); - else WHICH_TABLE (esc_sp_table); - else WHICH_TABLE (scrtable); - else WHICH_TABLE (scstable); - else WHICH_TABLE (sos_table); #if OPT_WIDE_CHARS else WHICH_TABLE (esc_pct_table); #endif @@ -1157,6 +1160,7 @@ struct ParseState { Const PARSE_T *groundtable; Const PARSE_T *parsestate; int scstype; + int scssize; Bool private_function; /* distinguish private-mode from standard */ int string_mode; /* nonzero iff we're processing a string */ int lastchar; /* positive iff we had a graphic character */ @@ -1168,6 +1172,32 @@ struct ParseState { static struct ParseState myState; +static void +init_groundtable(TScreen * screen, struct ParseState *sp) +{ +#if OPT_VT52_MODE + if (!(screen->vtXX_level)) { + sp->groundtable = vt52_table; + } else if (screen->terminal_id >= 100) +#endif + { + sp->groundtable = ansi_table; + } +} + +static void +select_charset(struct ParseState *sp, int type, int size) +{ + TRACE(("select_charset %#x %d\n", type, size)); + sp->scstype = type; + sp->scssize = size; + if (size == 94) { + sp->parsestate = scstable; + } else { + sp->parsestate = scs96table; + } +} + static Boolean doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) { @@ -1264,14 +1294,25 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) } #endif - /* - * The parsing tables all have 256 entries. If we're supporting - * wide characters, we handle them by treating them the same as - * printing characters. - */ laststate = sp->nextstate; + if (c == ANSI_DEL + && sp->parsestate == sp->groundtable + && sp->scssize == 96 + && sp->scstype != 0) { + /* + * Handle special case of shifts for 96-character sets by checking + * if we have a DEL. The other special case for SPACE will always + * be printable. + */ + sp->nextstate = CASE_PRINT; + } else #if OPT_WIDE_CHARS if (c > 255) { + /* + * The parsing tables all have 256 entries. If we're supporting + * wide characters, we handle them by treating them the same as + * printing characters. + */ if (sp->parsestate == sp->groundtable) { sp->nextstate = CASE_PRINT; } else if (sp->parsestate == sos_table) { @@ -1589,26 +1630,37 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_SCS0_STATE: /* enter scs state 0 */ - sp->scstype = 0; - sp->parsestate = scstable; + select_charset(sp, 0, 94); break; case CASE_SCS1_STATE: /* enter scs state 1 */ - sp->scstype = 1; - sp->parsestate = scstable; + select_charset(sp, 1, 94); break; case CASE_SCS2_STATE: /* enter scs state 2 */ - sp->scstype = 2; - sp->parsestate = scstable; + select_charset(sp, 2, 94); break; case CASE_SCS3_STATE: /* enter scs state 3 */ - sp->scstype = 3; - sp->parsestate = scstable; + select_charset(sp, 3, 94); + break; + + case CASE_SCS1A_STATE: + /* enter scs state 1 */ + select_charset(sp, 1, 96); + break; + + case CASE_SCS2A_STATE: + /* enter scs state 2 */ + select_charset(sp, 2, 96); + break; + + case CASE_SCS3A_STATE: + /* enter scs state 3 */ + select_charset(sp, 3, 96); break; case CASE_ESC_IGNORE: @@ -2257,12 +2309,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_DECRST: /* DECRST */ dpmodes(xw, bitclr); -#if OPT_VT52_MODE - if (screen->vtXX_level == 0) - sp->groundtable = vt52_table; - else if (screen->terminal_id >= 100) - sp->groundtable = ansi_table; -#endif + init_groundtable(screen, sp); sp->parsestate = sp->groundtable; break; @@ -2875,19 +2922,15 @@ VTparse(XtermWidget xw) (void) setjmp(vtjmpbuf); screen = &xw->screen; memset(&myState, 0, sizeof(myState)); -#if OPT_VT52_MODE - myState.groundtable = screen->vtXX_level ? ansi_table : vt52_table; -#else - myState.groundtable = ansi_table; -#endif - myState.parsestate = myState.groundtable; + myState.scssize = 94; /* number of printable/nonspace ASCII */ myState.lastchar = -1; /* not a legal IChar */ myState.nextstate = -1; /* not a legal state */ - for (;;) { - if (!doparsing(xw, doinput(), &myState)) - return; - } + init_groundtable(screen, &myState); + myState.parsestate = myState.groundtable; + + do { + } while (doparsing(xw, doinput(), &myState)); } static Char *v_buffer; /* pointer to physical buffer */ @@ -3087,15 +3130,15 @@ in_put(XtermWidget xw) if (tt_changed) { tt_changed = False; - stat = XtMakeResizeRequest((Widget) xw, - ((Dimension) FontWidth(screen) - * (tt_width) - + 2 * screen->border - + screen->fullVwin.sb_info.width), - ((Dimension) FontHeight(screen) - * (tt_length) - + 2 * screen->border), - &replyWidth, &replyHeight); + stat = REQ_RESIZE((Widget) xw, + ((Dimension) FontWidth(screen) + * (tt_width) + + 2 * screen->border + + screen->fullVwin.sb_info.width), + ((Dimension) FontHeight(screen) + * (tt_length) + + 2 * screen->border), + &replyWidth, &replyHeight); if (stat == XtGeometryYes || stat == XtGeometryDone) { xw->core.width = replyWidth; @@ -3380,10 +3423,9 @@ dotext(XtermWidget xw, * for line-drawing characters. */ if ((screen->utf8_mode == uFalse) - || (screen->vt100_graphics && charset == '0')) + || (screen->vt100_graphics)) #endif - - if (!xtermCharSetOut(buf, buf + len, charset)) + if (!xtermCharSetOut(xw, buf, buf + len, charset)) return; if_OPT_XMC_GLITCH(screen, { @@ -3560,7 +3602,8 @@ HandleStructNotify(Widget w GCC_UNUSED, { {XtNiconName, (XtArgVal) & icon_name} }; - TScreen *screen = TScreenOf(term); + XtermWidget xw = term; + TScreen *screen = TScreenOf(xw); switch (event->type) { case MapNotify: @@ -3590,14 +3633,30 @@ HandleStructNotify(Widget w GCC_UNUSED, break; case ConfigureNotify: if (event->xconfigure.window == XtWindow(toplevel)) { + int height, width; + + /* + * Some window managers modify the configuration during + * initialization. Skip notification events that we know are + * obsolete because there is already another in the queue. + */ + do { + height = event->xconfigure.height; + width = event->xconfigure.width; + TRACE(("HandleStructNotify(ConfigureNotify) %d,%d %dx%d\n", + event->xconfigure.y, event->xconfigure.x, + event->xconfigure.height, event->xconfigure.width)); + + } while (XCheckTypedWindowEvent(XtDisplay(xw), + event->xconfigure.window, + ConfigureNotify, event)); #if OPT_TOOLBAR - TRACE(("HandleStructNotify(ConfigureNotify)\n")); /* * The notification is for the top-level widget, but we care about * vt100 (ignore the tek4014 window). */ - if (term->screen.Vshow) { - VTwin *Vwin = WhichVWin(&(term->screen)); + if (xw->screen.Vshow) { + VTwin *Vwin = WhichVWin(&(xw->screen)); TbInfo *info = &(Vwin->tb_info); TbInfo save = *info; @@ -3620,36 +3679,19 @@ HandleStructNotify(Widget w GCC_UNUSED, * FIXME: Window manager still may be using the old * values. Try to fool it. */ - XtMakeResizeRequest((Widget) term, - screen->fullVwin.fullwidth, - info->menu_height - - save.menu_height - + screen->fullVwin.fullheight, - NULL, NULL); + REQ_RESIZE((Widget) xw, + screen->fullVwin.fullwidth, + info->menu_height + - save.menu_height + + screen->fullVwin.fullheight, + NULL, NULL); repairSizeHints(); } } } #else - int height, width; - - /* - * Some window managers modify the configuration during - * initialization. Skip notification events that we know are - * obsolete because there is already another in the queue. - */ - do { - height = event->xconfigure.height; - width = event->xconfigure.width; - TRACE(("HandleStructNotify(ConfigureNotify) %dx%d\n", - event->xconfigure.height, event->xconfigure.width)); - - } while (XCheckTypedWindowEvent(XtDisplay(term), - event->xconfigure.window, - ConfigureNotify, event)); - - if (height != term->hints.height || width != term->hints.width) - RequestResize(term, height, width, False); + if (height != xw->hints.height || width != xw->hints.width) + RequestResize(xw, height, width, False); #endif /* OPT_TOOLBAR */ } break; @@ -4003,6 +4045,28 @@ dpmodes(XtermWidget xw, set_bool_mode(screen->delete_is_del); update_delete_del(); break; +#if OPT_NUM_LOCK + case 1039: + set_bool_mode(screen->alt_sends_esc); + update_alt_esc(); + break; +#endif + case 1040: + set_bool_mode(screen->keepSelection); + update_keepSelection(); + break; + case 1041: + set_bool_mode(screen->selectToClipboard); + update_selectToClipboard(); + break; + case 1042: + set_bool_mode(screen->bellIsUrgent); + update_bellIsUrgent(); + break; + case 1043: + set_bool_mode(screen->poponbell); + update_poponbell(); + break; case 1048: if (!xw->misc.titeInhibit) { if (IsSM()) @@ -4760,6 +4824,13 @@ SwitchBufs(XtermWidget xw) ScrnUpdate(xw, 0, 0, rows, MaxCols(screen), False); } +Bool +CheckBufPtrs(TScreen * screen) +{ + return (screen->visbuf != 0 + && screen->altbuf != 0); +} + /* * Swap buffer line pointers between alternate and regular screens. * visbuf contains pointers from allbuf or altbuf for the visible screen, @@ -4770,11 +4841,13 @@ SwitchBufs(XtermWidget xw) void SwitchBufPtrs(TScreen * screen) { - size_t len = ScrnPointers(screen, (unsigned) MaxRows(screen)); + if (CheckBufPtrs(screen)) { + size_t len = ScrnPointers(screen, (unsigned) MaxRows(screen)); - memcpy((char *) screen->save_ptr, (char *) screen->visbuf, len); - memcpy((char *) screen->visbuf, (char *) screen->altbuf, len); - memcpy((char *) screen->altbuf, (char *) screen->save_ptr, len); + memcpy((char *) screen->save_ptr, (char *) screen->visbuf, len); + memcpy((char *) screen->visbuf, (char *) screen->altbuf, len); + memcpy((char *) screen->altbuf, (char *) screen->save_ptr, len); + } } void @@ -4808,11 +4881,13 @@ VTRun(void) Tpushb = Tpushback; } #endif + screen->is_running = True; if (!setjmp(VTend)) VTparse(term); StopBlinking(screen); HideCursor(); screen->cursor_set = OFF; + TRACE(("... VTRun\n")); } /*ARGSUSED*/ @@ -4948,13 +5023,9 @@ RequestResize(XtermWidget xw, int rows, int cols, Bool text) getXtermSizeHints(xw); #endif - status = XtMakeResizeRequest((Widget) xw, - askedWidth, askedHeight, - &replyWidth, &replyHeight); - TRACE(("...RequestResize XtMakeResizeRequest %dx%d -> %dx%d (status %d)\n", - askedHeight, askedWidth, - replyHeight, replyWidth, - status)); + status = REQ_RESIZE((Widget) xw, + askedWidth, askedHeight, + &replyWidth, &replyHeight); if (status == XtGeometryYes || status == XtGeometryDone) { @@ -5892,6 +5963,7 @@ VTInitialize(Widget wrequest, init_Ires(keyboard.modify_1st.keypad_keys); init_Ires(keyboard.modify_1st.other_keys); init_Ires(keyboard.modify_1st.string_keys); + init_Ires(keyboard.format_keys); wnew->keyboard.modify_now = wnew->keyboard.modify_1st; #endif @@ -5992,6 +6064,12 @@ VTDestroy(Widget w GCC_UNUSED) #ifndef NO_ACTIVE_ICON releaseWindowGCs(xw, &(screen->iconVwin)); #endif + XtUninstallTranslations((Widget)xw); + XtUninstallTranslations(screen->scrollWidget); +#if OPT_TOOLBAR + XtUninstallTranslations((Widget)XtParent(xw)); +#endif + XtUninstallTranslations((Widget)SHELL_OF(xw)); if (screen->hidden_cursor) XFreeCursor(screen->display, screen->hidden_cursor); @@ -6189,11 +6267,9 @@ VTRealize(Widget w, * Note that the size-hints are for the shell, while the resize-request * is for the vt100 widget. They are not the same size. */ - TRACE(("make resize request %dx%d\n", height, width)); - (void) XtMakeResizeRequest((Widget) xw, - (Dimension) width, (Dimension) height, - &xw->core.width, &xw->core.height); - TRACE(("...made resize request %dx%d\n", xw->core.height, xw->core.width)); + (void) REQ_RESIZE((Widget) xw, + (Dimension) width, (Dimension) height, + &xw->core.width, &xw->core.height); /* XXX This is bogus. We are parsing geometries too late. This * is information that the shell widget ought to have before we get @@ -6338,14 +6414,18 @@ VTRealize(Widget w, screen->savedlines = 0; - if (xw->misc.scrollbar) { - screen->fullVwin.sb_info.width = 0; - ScrollBarOn(xw, False, True); - } for (i = 0; i < 2; ++i) { screen->alternate = !screen->alternate; CursorSave(xw); } + + /* + * Do this last, since it may change the layout via a resize. + */ + if (xw->misc.scrollbar) { + screen->fullVwin.sb_info.width = 0; + ScrollBarOn(xw, False, True); + } return; } @@ -7273,11 +7353,10 @@ VTReset(XtermWidget xw, Bool full, Bool saved) TRACE(("Making resize-request to restore 80-columns %dx%d\n", reqHeight, reqWidth)); - XtMakeResizeRequest((Widget) xw, - reqWidth, - reqHeight, - &replyWidth, &replyHeight); - TRACE(("...result %dx%d\n", replyHeight, replyWidth)); + REQ_RESIZE((Widget) xw, + reqWidth, + reqHeight, + &replyWidth, &replyHeight); repairSizeHints(); XSync(screen->display, False); /* synchronize */ if (XtAppPending(app_con)) diff --git a/app/xterm/charsets.c b/app/xterm/charsets.c index a9e482cb8..d3bd79f07 100644 --- a/app/xterm/charsets.c +++ b/app/xterm/charsets.c @@ -1,12 +1,8 @@ -/* $XTermId: charsets.c,v 1.36 2007/03/19 23:47:00 tom Exp $ */ - -/* - * $XFree86: xc/programs/xterm/charsets.c,v 1.12 2005/01/14 01:50:02 dickey Exp $ - */ +/* $XTermId: charsets.c,v 1.40 2008/05/26 22:49:57 tom Exp $ */ /************************************************************ -Copyright 1998-2006,2007 by Thomas E. Dickey +Copyright 1998-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -63,400 +59,428 @@ authorization. /* * Translate an input keysym to the corresponding NRC keysym. */ -unsigned xtermCharSetIn(unsigned code, int charset) +unsigned +xtermCharSetIn(unsigned code, int charset) { - if (code >= 128 && code < 256) { - switch (charset) { - case 'A': /* United Kingdom set (or Latin 1) */ - if (code == XK_sterling) - code = 0x23; - code &= 0x7f; - break; +#define MAP(to, from) case from: code = to; break + + if (code >= 128 && code < 256) { + switch (charset) { + case 'A': /* United Kingdom set (or Latin 1) */ + if (code == XK_sterling) + code = 0x23; + code &= 0x7f; + break; #if OPT_XMC_GLITCH - case '?': + case '?': #endif - case '1': /* Alternate Character ROM standard characters */ - case '2': /* Alternate Character ROM special graphics */ - case 'B': /* ASCII set */ - break; + case '1': /* Alternate Character ROM standard characters */ + case '2': /* Alternate Character ROM special graphics */ + case 'B': /* ASCII set */ + break; - case '0': /* special graphics (line drawing) */ - break; + case '0': /* special graphics (line drawing) */ + break; - case '4': /* Dutch */ - switch (code) { - case XK_sterling: code = 0x23; break; - case XK_threequarters: code = 0x40; break; - case XK_ydiaeresis: code = 0x5b; break; - case XK_onehalf: code = 0x5c; break; - /* N/A case XK_bar: code = 0x5d; break; */ - case XK_diaeresis: code = 0x7b; break; - /* N/A case XK_f: code = 0x7c; break; */ - case XK_onequarter: code = 0x7d; break; - case XK_acute: code = 0x7e; break; - } - break; + case '4': /* Dutch */ + switch (code) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_threequarters); + MAP(0x5b, XK_ydiaeresis); + MAP(0x5c, XK_onehalf); + MAP(0x5d, XK_bar); /* glyph is not ISO-8859-1 */ + MAP(0x7b, XK_diaeresis); + MAP(0x7c, XK_f); /* glyph is not ISO-8859-1 */ + MAP(0x7d, XK_onequarter); + MAP(0x7e, XK_acute); + } + break; - case 'C': - case '5': /* Finnish */ - switch (code) { - case XK_Adiaeresis: code = 0x5b; break; - case XK_Odiaeresis: code = 0x5c; break; - case XK_Aring: code = 0x5d; break; - case XK_Udiaeresis: code = 0x5e; break; - case XK_eacute: code = 0x60; break; - case XK_adiaeresis: code = 0x7b; break; - case XK_odiaeresis: code = 0x7c; break; - case XK_aring: code = 0x7d; break; - case XK_udiaeresis: code = 0x7e; break; - } - break; + case 'C': + case '5': /* Finnish */ + switch (code) { + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_eacute); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case 'R': /* French */ - switch (code) { - case XK_sterling: code = 0x23; break; - case XK_agrave: code = 0x40; break; - case XK_degree: code = 0x5b; break; - case XK_ccedilla: code = 0x5c; break; - case XK_section: code = 0x5d; break; - case XK_eacute: code = 0x7b; break; - case XK_ugrave: code = 0x7c; break; - case XK_egrave: code = 0x7d; break; - case XK_diaeresis: code = 0x7e; break; - } - break; + case 'R': /* French */ + switch (code) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_agrave); + MAP(0x5b, XK_degree); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_section); + MAP(0x7b, XK_eacute); + MAP(0x7c, XK_ugrave); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_diaeresis); + } + break; - case 'Q': /* French Canadian */ - switch (code) { - case XK_agrave: code = 0x40; break; - case XK_acircumflex: code = 0x5b; break; - case XK_ccedilla: code = 0x5c; break; - case XK_ecircumflex: code = 0x5d; break; - case XK_icircumflex: code = 0x5e; break; - case XK_ocircumflex: code = 0x60; break; - case XK_eacute: code = 0x7b; break; - case XK_ugrave: code = 0x7c; break; - case XK_egrave: code = 0x7d; break; - case XK_ucircumflex: code = 0x7e; break; - } - break; + case 'Q': /* French Canadian */ + switch (code) { + MAP(0x40, XK_agrave); + MAP(0x5b, XK_acircumflex); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_ecircumflex); + MAP(0x5e, XK_icircumflex); + MAP(0x60, XK_ocircumflex); + MAP(0x7b, XK_eacute); + MAP(0x7c, XK_ugrave); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_ucircumflex); + } + break; - case 'K': /* German */ - switch (code) { - case XK_section: code = 0x40; break; - case XK_Adiaeresis: code = 0x5b; break; - case XK_Odiaeresis: code = 0x5c; break; - case XK_Udiaeresis: code = 0x5d; break; - case XK_adiaeresis: code = 0x7b; break; - case XK_odiaeresis: code = 0x7c; break; - case XK_udiaeresis: code = 0x7d; break; - case XK_ssharp: code = 0x7e; break; - } - break; + case 'K': /* German */ + switch (code) { + MAP(0x40, XK_section); + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Udiaeresis); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_udiaeresis); + MAP(0x7e, XK_ssharp); + } + break; - case 'Y': /* Italian */ - switch (code) { - case XK_sterling: code = 0x23; break; - case XK_section: code = 0x40; break; - case XK_degree: code = 0x5b; break; - case XK_ccedilla: code = 0x5c; break; - case XK_eacute: code = 0x5d; break; - case XK_ugrave: code = 0x60; break; - case XK_agrave: code = 0x7b; break; - case XK_ograve: code = 0x7c; break; - case XK_egrave: code = 0x7d; break; - case XK_igrave: code = 0x7e; break; - } - break; + case 'Y': /* Italian */ + switch (code) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_section); + MAP(0x5b, XK_degree); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_eacute); + MAP(0x60, XK_ugrave); + MAP(0x7b, XK_agrave); + MAP(0x7c, XK_ograve); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_igrave); + } + break; - case 'E': - case '6': /* Norwegian/Danish */ - switch (code) { - case XK_Adiaeresis: code = 0x40; break; - case XK_AE: code = 0x5b; break; - case XK_Ooblique: code = 0x5c; break; - case XK_Aring: code = 0x5d; break; - case XK_Udiaeresis: code = 0x5e; break; - case XK_adiaeresis: code = 0x60; break; - case XK_ae: code = 0x7b; break; - case XK_oslash: code = 0x7c; break; - case XK_aring: code = 0x7d; break; - case XK_udiaeresis: code = 0x7e; break; - } - break; + case 'E': + case '6': /* Norwegian/Danish */ + switch (code) { + MAP(0x40, XK_Adiaeresis); + MAP(0x5b, XK_AE); + MAP(0x5c, XK_Ooblique); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_adiaeresis); + MAP(0x7b, XK_ae); + MAP(0x7c, XK_oslash); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case 'Z': /* Spanish */ - switch (code) { - case XK_sterling: code = 0x23; break; - case XK_section: code = 0x40; break; - case XK_exclamdown: code = 0x5b; break; - case XK_Ntilde: code = 0x5c; break; - case XK_questiondown: code = 0x5d; break; - case XK_degree: code = 0x7b; break; - case XK_ntilde: code = 0x7c; break; - case XK_ccedilla: code = 0x7d; break; - } - break; + case 'Z': /* Spanish */ + switch (code) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_section); + MAP(0x5b, XK_exclamdown); + MAP(0x5c, XK_Ntilde); + MAP(0x5d, XK_questiondown); + MAP(0x7b, XK_degree); + MAP(0x7c, XK_ntilde); + MAP(0x7d, XK_ccedilla); + } + break; - case 'H': - case '7': /* Swedish */ - switch (code) { - case XK_Eacute: code = 0x40; break; - case XK_Adiaeresis: code = 0x5b; break; - case XK_Odiaeresis: code = 0x5c; break; - case XK_Aring: code = 0x5d; break; - case XK_Udiaeresis: code = 0x5e; break; - case XK_eacute: code = 0x60; break; - case XK_adiaeresis: code = 0x7b; break; - case XK_odiaeresis: code = 0x7c; break; - case XK_aring: code = 0x7d; break; - case XK_udiaeresis: code = 0x7e; break; - } - break; + case 'H': + case '7': /* Swedish */ + switch (code) { + MAP(0x40, XK_Eacute); + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_eacute); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case '=': /* Swiss */ - switch (code) { - case XK_ugrave: code = 0x23; break; - case XK_agrave: code = 0x40; break; - case XK_eacute: code = 0x5b; break; - case XK_ccedilla: code = 0x5c; break; - case XK_ecircumflex: code = 0x5d; break; - case XK_icircumflex: code = 0x5e; break; - case XK_egrave: code = 0x5f; break; - case XK_ocircumflex: code = 0x60; break; - case XK_adiaeresis: code = 0x7b; break; - case XK_odiaeresis: code = 0x7c; break; - case XK_udiaeresis: code = 0x7d; break; - case XK_ucircumflex: code = 0x7e; break; - } - break; + case '=': /* Swiss */ + switch (code) { + MAP(0x23, XK_ugrave); + MAP(0x40, XK_agrave); + MAP(0x5b, XK_eacute); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_ecircumflex); + MAP(0x5e, XK_icircumflex); + MAP(0x5f, XK_egrave); + MAP(0x60, XK_ocircumflex); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_udiaeresis); + MAP(0x7e, XK_ucircumflex); + } + break; - default: /* any character sets we don't recognize*/ - break; - } - code &= 0x7f; /* NRC in any case is 7-bit */ + default: /* any character sets we don't recognize */ + break; } - return code; + code &= 0x7f; /* NRC in any case is 7-bit */ + } + return code; +#undef MAP } /* * Translate a string to the display form. This assumes the font has the * DEC graphic characters in cells 0-31, and otherwise is ISO-8859-1. */ -int xtermCharSetOut(IChar *buf, IChar *ptr, int leftset) +int +xtermCharSetOut(XtermWidget xw, IChar * buf, IChar * ptr, int leftset) { - IChar *s; - register TScreen *screen = TScreenOf(term); - int count = 0; - int rightset = screen->gsets[(int)(screen->curgr)]; + IChar *s; + TScreen *screen = TScreenOf(xw); + int count = 0; + int rightset = screen->gsets[(int) (screen->curgr)]; - TRACE(("CHARSET GL=%c(G%d) GR=%c(G%d) SS%d:%s\n", - leftset, screen->curgl, - rightset, screen->curgr, - screen->curss, - visibleIChar(buf, (unsigned)(ptr - buf)))); +#define MAP(from, to) case from: chr = to; break - for (s = buf; s < ptr; ++s) { - int eight = CharOf(E2A(*s)); - int seven = eight & 0x7f; - int cs = (eight >= 128) ? rightset : leftset; - int chr = eight; + TRACE(("CHARSET GL=%c(G%d) GR=%c(G%d) SS%d\n\t%s\n", + leftset, screen->curgl, + rightset, screen->curgr, + screen->curss, + visibleIChar(buf, (unsigned) (ptr - buf)))); - count++; - switch (cs) { - case 'A': /* United Kingdom set (or Latin 1) */ - if ((term->flags & NATIONAL) - || (screen->vtXX_level <= 1)) { - if (chr == 0x23) { - chr = XTERM_POUND; /* UK pound sign*/ - } - } else { - chr = (seven | 0x80); - } - break; + for (s = buf; s < ptr; ++s) { + int eight = CharOf(E2A(*s)); + int seven = eight & 0x7f; + int cs = (eight >= 128) ? rightset : leftset; + int chr = eight; + + count++; +#if OPT_WIDE_CHARS + /* + * This is only partly right - prevent inadvertant remapping of + * the replacement character and other non-8bit codes into bogus + * 8bit codes. + */ + if (screen->utf8_mode) { + if (*s > 255) + continue; + } +#endif + switch (cs) { + case 'A': /* United Kingdom set (or Latin 1) */ + if ((xw->flags & NATIONAL) + || (screen->vtXX_level <= 1)) { + if (chr == 0x23) { +#if OPT_WIDE_CHARS + chr = (screen->utf8_mode + ? 0xa3 + : XTERM_POUND); +#else + chr = XTERM_POUND; +#endif + } + } else { + chr = (seven | 0x80); + } + break; #if OPT_XMC_GLITCH - case '?': + case '?': #endif - case '1': /* Alternate Character ROM standard characters */ - case '2': /* Alternate Character ROM special graphics */ - case 'B': /* ASCII set */ - break; + case '1': /* Alternate Character ROM standard characters */ + case '2': /* Alternate Character ROM special graphics */ + case 'B': /* ASCII set */ + break; - case '0': /* special graphics (line drawing) */ - if (seven > 0x5f && seven <= 0x7e) { + case '0': /* special graphics (line drawing) */ + if (seven > 0x5f && seven <= 0x7e) { #if OPT_WIDE_CHARS - if (screen->utf8_mode) - chr = dec2ucs((unsigned)(seven - 0x5f)); - else + if (screen->utf8_mode) + chr = dec2ucs((unsigned) (seven - 0x5f)); + else #endif - chr = seven - 0x5f; - } else { - chr = seven; - } - break; + chr = seven - 0x5f; + } else { + chr = seven; + } + break; - case '4': /* Dutch */ - switch (chr = seven) { - case 0x23: chr = XK_sterling; break; - case 0x40: chr = XK_threequarters; break; - case 0x5b: chr = XK_ydiaeresis; break; - case 0x5c: chr = XK_onehalf; break; - case 0x5d: chr = XK_bar; break; - case 0x7b: chr = XK_diaeresis; break; - case 0x7c: chr = XK_f; break; - case 0x7d: chr = XK_onequarter; break; - case 0x7e: chr = XK_acute; break; - } - break; + case '4': /* Dutch */ + switch (chr = seven) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_threequarters); + MAP(0x5b, XK_ydiaeresis); + MAP(0x5c, XK_onehalf); + MAP(0x5d, XK_bar); + MAP(0x7b, XK_diaeresis); + MAP(0x7c, XK_f); + MAP(0x7d, XK_onequarter); + MAP(0x7e, XK_acute); + } + break; - case 'C': - case '5': /* Finnish */ - switch (chr = seven) { - case 0x5b: chr = XK_Adiaeresis; break; - case 0x5c: chr = XK_Odiaeresis; break; - case 0x5d: chr = XK_Aring; break; - case 0x5e: chr = XK_Udiaeresis; break; - case 0x60: chr = XK_eacute; break; - case 0x7b: chr = XK_adiaeresis; break; - case 0x7c: chr = XK_odiaeresis; break; - case 0x7d: chr = XK_aring; break; - case 0x7e: chr = XK_udiaeresis; break; - } - break; + case 'C': + case '5': /* Finnish */ + switch (chr = seven) { + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_eacute); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case 'R': /* French */ - switch (chr = seven) { - case 0x23: chr = XK_sterling; break; - case 0x40: chr = XK_agrave; break; - case 0x5b: chr = XK_degree; break; - case 0x5c: chr = XK_ccedilla; break; - case 0x5d: chr = XK_section; break; - case 0x7b: chr = XK_eacute; break; - case 0x7c: chr = XK_ugrave; break; - case 0x7d: chr = XK_egrave; break; - case 0x7e: chr = XK_diaeresis; break; - } - break; + case 'R': /* French */ + switch (chr = seven) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_agrave); + MAP(0x5b, XK_degree); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_section); + MAP(0x7b, XK_eacute); + MAP(0x7c, XK_ugrave); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_diaeresis); + } + break; - case 'Q': /* French Canadian */ - switch (chr = seven) { - case 0x40: chr = XK_agrave; break; - case 0x5b: chr = XK_acircumflex; break; - case 0x5c: chr = XK_ccedilla; break; - case 0x5d: chr = XK_ecircumflex; break; - case 0x5e: chr = XK_icircumflex; break; - case 0x60: chr = XK_ocircumflex; break; - case 0x7b: chr = XK_eacute; break; - case 0x7c: chr = XK_ugrave; break; - case 0x7d: chr = XK_egrave; break; - case 0x7e: chr = XK_ucircumflex; break; - } - break; + case 'Q': /* French Canadian */ + switch (chr = seven) { + MAP(0x40, XK_agrave); + MAP(0x5b, XK_acircumflex); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_ecircumflex); + MAP(0x5e, XK_icircumflex); + MAP(0x60, XK_ocircumflex); + MAP(0x7b, XK_eacute); + MAP(0x7c, XK_ugrave); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_ucircumflex); + } + break; - case 'K': /* German */ - switch (chr = seven) { - case 0x40: chr = XK_section; break; - case 0x5b: chr = XK_Adiaeresis; break; - case 0x5c: chr = XK_Odiaeresis; break; - case 0x5d: chr = XK_Udiaeresis; break; - case 0x7b: chr = XK_adiaeresis; break; - case 0x7c: chr = XK_odiaeresis; break; - case 0x7d: chr = XK_udiaeresis; break; - case 0x7e: chr = XK_ssharp; break; - } - break; + case 'K': /* German */ + switch (chr = seven) { + MAP(0x40, XK_section); + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Udiaeresis); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_udiaeresis); + MAP(0x7e, XK_ssharp); + } + break; - case 'Y': /* Italian */ - switch (chr = seven) { - case 0x23: chr = XK_sterling; break; - case 0x40: chr = XK_section; break; - case 0x5b: chr = XK_degree; break; - case 0x5c: chr = XK_ccedilla; break; - case 0x5d: chr = XK_eacute; break; - case 0x60: chr = XK_ugrave; break; - case 0x7b: chr = XK_agrave; break; - case 0x7c: chr = XK_ograve; break; - case 0x7d: chr = XK_egrave; break; - case 0x7e: chr = XK_igrave; break; - } - break; + case 'Y': /* Italian */ + switch (chr = seven) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_section); + MAP(0x5b, XK_degree); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_eacute); + MAP(0x60, XK_ugrave); + MAP(0x7b, XK_agrave); + MAP(0x7c, XK_ograve); + MAP(0x7d, XK_egrave); + MAP(0x7e, XK_igrave); + } + break; - case 'E': - case '6': /* Norwegian/Danish */ - switch (chr = seven) { - case 0x40: chr = XK_Adiaeresis; break; - case 0x5b: chr = XK_AE; break; - case 0x5c: chr = XK_Ooblique; break; - case 0x5d: chr = XK_Aring; break; - case 0x5e: chr = XK_Udiaeresis; break; - case 0x60: chr = XK_adiaeresis; break; - case 0x7b: chr = XK_ae; break; - case 0x7c: chr = XK_oslash; break; - case 0x7d: chr = XK_aring; break; - case 0x7e: chr = XK_udiaeresis; break; - } - break; + case 'E': + case '6': /* Norwegian/Danish */ + switch (chr = seven) { + MAP(0x40, XK_Adiaeresis); + MAP(0x5b, XK_AE); + MAP(0x5c, XK_Ooblique); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_adiaeresis); + MAP(0x7b, XK_ae); + MAP(0x7c, XK_oslash); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case 'Z': /* Spanish */ - switch (chr = seven) { - case 0x23: chr = XK_sterling; break; - case 0x40: chr = XK_section; break; - case 0x5b: chr = XK_exclamdown; break; - case 0x5c: chr = XK_Ntilde; break; - case 0x5d: chr = XK_questiondown; break; - case 0x7b: chr = XK_degree; break; - case 0x7c: chr = XK_ntilde; break; - case 0x7d: chr = XK_ccedilla; break; - } - break; + case 'Z': /* Spanish */ + switch (chr = seven) { + MAP(0x23, XK_sterling); + MAP(0x40, XK_section); + MAP(0x5b, XK_exclamdown); + MAP(0x5c, XK_Ntilde); + MAP(0x5d, XK_questiondown); + MAP(0x7b, XK_degree); + MAP(0x7c, XK_ntilde); + MAP(0x7d, XK_ccedilla); + } + break; - case 'H': - case '7': /* Swedish */ - switch (chr = seven) { - case 0x40: chr = XK_Eacute; break; - case 0x5b: chr = XK_Adiaeresis; break; - case 0x5c: chr = XK_Odiaeresis; break; - case 0x5d: chr = XK_Aring; break; - case 0x5e: chr = XK_Udiaeresis; break; - case 0x60: chr = XK_eacute; break; - case 0x7b: chr = XK_adiaeresis; break; - case 0x7c: chr = XK_odiaeresis; break; - case 0x7d: chr = XK_aring; break; - case 0x7e: chr = XK_udiaeresis; break; - } - break; + case 'H': + case '7': /* Swedish */ + switch (chr = seven) { + MAP(0x40, XK_Eacute); + MAP(0x5b, XK_Adiaeresis); + MAP(0x5c, XK_Odiaeresis); + MAP(0x5d, XK_Aring); + MAP(0x5e, XK_Udiaeresis); + MAP(0x60, XK_eacute); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_aring); + MAP(0x7e, XK_udiaeresis); + } + break; - case '=': /* Swiss */ - switch (chr = seven) { - case 0x23: chr = XK_ugrave; break; - case 0x40: chr = XK_agrave; break; - case 0x5b: chr = XK_eacute; break; - case 0x5c: chr = XK_ccedilla; break; - case 0x5d: chr = XK_ecircumflex; break; - case 0x5e: chr = XK_icircumflex; break; - case 0x5f: chr = XK_egrave; break; - case 0x60: chr = XK_ocircumflex; break; - case 0x7b: chr = XK_adiaeresis; break; - case 0x7c: chr = XK_odiaeresis; break; - case 0x7d: chr = XK_udiaeresis; break; - case 0x7e: chr = XK_ucircumflex; break; - } - break; + case '=': /* Swiss */ + switch (chr = seven) { + MAP(0x23, XK_ugrave); + MAP(0x40, XK_agrave); + MAP(0x5b, XK_eacute); + MAP(0x5c, XK_ccedilla); + MAP(0x5d, XK_ecircumflex); + MAP(0x5e, XK_icircumflex); + MAP(0x5f, XK_egrave); + MAP(0x60, XK_ocircumflex); + MAP(0x7b, XK_adiaeresis); + MAP(0x7c, XK_odiaeresis); + MAP(0x7d, XK_udiaeresis); + MAP(0x7e, XK_ucircumflex); + } + break; - default: /* any character sets we don't recognize*/ - count --; - break; - } - /* - * The state machine already treated DEL as a nonprinting and - * nonspacing character. If we have DEL now, simply render - * it as a blank. - */ - if (chr == ANSI_DEL) - chr = ' '; - *s = A2E(chr); + default: /* any character sets we don't recognize */ + count--; + break; } - return count; + /* + * The state machine already treated DEL as a nonprinting and + * nonspacing character. If we have DEL now, simply render + * it as a blank. + */ + if (chr == ANSI_DEL) + chr = ' '; + *s = A2E(chr); + } + TRACE(("%d\t%s\n", + count, + visibleIChar(buf, (unsigned) (ptr - buf)))); + return count; +#undef MAP } diff --git a/app/xterm/configure.in b/app/xterm/configure.in index f7bdb901d..620820b89 100644 --- a/app/xterm/configure.in +++ b/app/xterm/configure.in @@ -1,4 +1,4 @@ -dnl $XTermId: configure.in,v 1.241 2008/02/24 21:46:37 tom Exp $ +dnl $XTermId: configure.in,v 1.245 2008/07/27 15:03:56 tom Exp $ dnl dnl --------------------------------------------------------------------------- dnl @@ -46,7 +46,7 @@ esac AC_PROG_CC AC_PROG_CPP -AC_GCC_TRADITIONAL +AC_PROG_GCC_TRADITIONAL AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S @@ -59,7 +59,7 @@ AC_ISC_POSIX ### checks for compiler characteristics CF_ANSI_CC_CHECK -AC_CONST +AC_C_CONST CF_PROG_EXT CF_XOPEN_SOURCE CF_SIGWINCH @@ -277,7 +277,7 @@ AC_CHECK_HEADERS( \ ) CF_X_ATHENA -CF_TYPE_FD_SET +CF_TYPE_FD_MASK CF_TERMIO_C_ISPEED LIBS="$LIBS $X_EXTRA_LIBS" @@ -884,6 +884,11 @@ fi dnl FIXME - extra test needed to make tcap-fkeys work on HPUX AC_CHECK_FUNCS(tigetstr) +dnl only check for ncurses' use_extended_names if really not using termcap +if test -n "$cf_cv_lib_part_tgetent"; then + AC_CHECK_FUNCS(use_extended_names) +fi + if test -n "$GCC" ; then AC_MSG_CHECKING(if you want to turn on gcc warnings) CF_ARG_ENABLE(warnings, diff --git a/app/xterm/ctlseqs.ms b/app/xterm/ctlseqs.ms index 903e2512d..8520cefdc 100644 --- a/app/xterm/ctlseqs.ms +++ b/app/xterm/ctlseqs.ms @@ -1,6 +1,6 @@ .\"#! troff -ms $1 -*- Nroff -*- .\" "Xterm Control Sequences" document -.\" $XTermId: ctlseqs.ms,v 1.186 2008/01/27 17:39:00 tom Exp $ +.\" $XTermId: ctlseqs.ms,v 1.190 2008/05/26 22:24:56 tom Exp $ .\" .\" .\" Copyright 1996-2007,2008 by Thomas E. Dickey @@ -468,7 +468,7 @@ Designate G2 Character Set (ISO 2022) .IP \\*(Es\\*+\\*(Cc Designate G3 Character Set (ISO 2022) .br -Final character \*(Cc for designating character sets +Final character \*(Cc for designating 94-character sets (\*0, \*A and \*(cB apply to VT100 and up, the remainder to VT220 and up): \*(Cc = \*0 \(-> DEC Special Character and Line Drawing Set \*(Cc = \*A \(-> United Kingdom (UK) @@ -483,6 +483,24 @@ Final character \*(Cc for designating character sets \*(Cc = \*Z \(-> Spanish \*(Cc = \*H or \*7 \(-> Swedish \*(Cc = \*= \(-> Swiss +.\" VT3xx and VT5xx (see vttest) add more selections, not implemented here. +. +.IP \\*(Es\\*-\\*(Cc +Designate G1 Character Set (VT300) +. +.IP \\*(Es\\*.\\*(Cc +Designate G2 Character Set (VT300) +. +.IP \\*(Es\\*/\\*(Cc +Designate G3 Character Set (VT300) +.br +These work for 96-character sets only. + \*(Cc = \*A \(-> ISO Latin-1 Supplemental +.\" VT5xx would implement these: +.\" \*(Cc = \*F \(-> ISO Greek Supplemental +.\" \*(Cc = \*H \(-> ISO Hebrew Supplemental +.\" \*(Cc = \*M \(-> ISO Latin-5 Supplemental +.\" \*(Cc = \*L \(-> ISO Latin-Cyrillic . .IP \\*(Es\\*7 Save Cursor (DECSC) @@ -772,10 +790,21 @@ See the section \fBMouse Tracking\fP. \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt). \*(Ps = \*1\*0\*3\*4 \(-> Interpret "meta" key, sets eighth bit. (enables the \fBeightBitInput\fP resource). - \*(Ps = \*1\*0\*3\*5 \(-> Enable special modifiers for Alt and NumLock keys. + \*(Ps = \*1\*0\*3\*5 \(-> Enable special modifiers for Alt and NumLock keys +(enables the \fBnumLock\fP resource). \*(Ps = \*1\*0\*3\*6 \(-> Send ESC when Meta modifies a key (enables the \fBmetaSendsEscape\fP resource). \*(Ps = \*1\*0\*3\*7 \(-> Send DEL from the editing-keypad Delete key + \*(Ps = \*1\*0\*3\*9 \(-> Send ESC when Alt modifies a key +(enables the \fBaltSendsEscape\fP resource). + \*(Ps = \*1\*0\*4\*0 \(-> Keep selection even if not highlighted +(enables the \fBkeepSelection\fP resource). + \*(Ps = \*1\*0\*4\*1 \(-> Use the CLIPBOARD selection +(enables the \fBselectToClipboard\fP resource). + \*(Ps = \*1\*0\*4\*2 \(-> Enable Urgency window manager hint when Control-G is received +(enables the \fBbellIsUrgent\fP resource). + \*(Ps = \*1\*0\*4\*3 \(-> Enable raising of the window when Control-G is received +(enables the \fBpopOnBell\fP resource). \*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer (unless disabled by the \fBtiteInhibit\fP resource) \*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC (unless @@ -853,10 +882,21 @@ See the section \fBMouse Tracking\fP. \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt). \*(Ps = \*1\*0\*3\*4 \(-> Don't interpret "meta" key (disables the \fBeightBitInput\fP resource). - \*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for Alt and NumLock keys. + \*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for Alt and NumLock keys +(disables the \fBnumLock\fP resource). \*(Ps = \*1\*0\*3\*6 \(-> Don't send ESC when Meta modifies a key (disables the \fBmetaSendsEscape\fP resource). \*(Ps = \*1\*0\*3\*7 \(-> Send VT220 Remove from the editing-keypad Delete key + \*(Ps = \*1\*0\*3\*9 \(-> Don't send ESC when Alt modifies a key +(disables the \fBaltSendsEscape\fP resource). + \*(Ps = \*1\*0\*4\*0 \(-> Do not keep selection when not highlighted +(disables the \fBkeepSelection\fP resource). + \*(Ps = \*1\*0\*4\*1 \(-> Use the PRIMARY selection. +(disables the \fBselectToClipboard\fP resource). + \*(Ps = \*1\*0\*4\*2 \(-> Disable Urgency window manager hint when Control-G is received +(disables the \fBbellIsUrgent\fP resource). + \*(Ps = \*1\*0\*4\*3 \(-> Disable raising of the window when Control-G is received +(disables the \fBpopOnBell\fP resource). \*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, clearing screen first if in the Alternate Screen (unless disabled by the \fBtiteInhibit\fP resource) diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt index 624e19b28..b4e763668 100644 --- a/app/xterm/ctlseqs.txt +++ b/app/xterm/ctlseqs.txt @@ -129,8 +129,8 @@ ESC ( C Designate G0 Character Set (ISO 2022) ESC ) C Designate G1 Character Set (ISO 2022) ESC * C Designate G2 Character Set (ISO 2022) ESC + C Designate G3 Character Set (ISO 2022) - Final character C for designating character sets (0 , A and B - apply to VT100 and up, the remainder to VT220 and up): + Final character C for designating 94-character sets (0 , A + and B apply to VT100 and up, the remainder to VT220 and up): C = 0 -> DEC Special Character and Line Drawing Set C = A -> United Kingdom (UK) C = B -> United States (USASCII) @@ -144,6 +144,11 @@ ESC + C Designate G3 Character Set (ISO 2022) C = Z -> Spanish C = H or 7 -> Swedish C = = -> Swiss +ESC - C Designate G1 Character Set (VT300) +ESC . C Designate G2 Character Set (VT300) +ESC / C Designate G3 Character Set (VT300) + These work for 96-character sets only. + C = A -> ISO Latin-1 Supplemental ESC 7 Save Cursor (DECSC) ESC 8 Restore Cursor (DECRC) ESC = Application Keypad (DECPAM) @@ -331,10 +336,20 @@ CSI ? Pm h Ps = 1 0 3 4 -> Interpret "meta" key, sets eighth bit. (enables the eightBitInput resource). Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num- - Lock keys. + Lock keys (enables the numLock resource). Ps = 1 0 3 6 -> Send ESC when Meta modifies a key (enables the metaSendsEscape resource). Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete key + Ps = 1 0 3 9 -> Send ESC when Alt modifies a key (enables + the altSendsEscape resource). + Ps = 1 0 4 0 -> Keep selection even if not highlighted + (enables the keepSelection resource). + Ps = 1 0 4 1 -> Use the CLIPBOARD selection (enables the + selectToClipboard resource). + Ps = 1 0 4 2 -> Enable Urgency window manager hint when + Control-G is received (enables the bellIsUrgent resource). + Ps = 1 0 4 3 -> Enable raising of the window when Control-G + is received (enables the popOnBell resource). Ps = 1 0 4 7 -> Use Alternate Screen Buffer (unless dis- abled by the titeInhibit resource) Ps = 1 0 4 8 -> Save cursor as in DECSC (unless disabled by @@ -408,11 +423,21 @@ CSI ? Pm l Ps = 1 0 3 4 -> Don't interpret "meta" key (disables the eightBitInput resource). Ps = 1 0 3 5 -> Disable special modifiers for Alt and Num- - Lock keys. + Lock keys (disables the numLock resource). Ps = 1 0 3 6 -> Don't send ESC when Meta modifies a key (disables the metaSendsEscape resource). Ps = 1 0 3 7 -> Send VT220 Remove from the editing-keypad Delete key + Ps = 1 0 3 9 -> Don't send ESC when Alt modifies a key + (disables the altSendsEscape resource). + Ps = 1 0 4 0 -> Do not keep selection when not highlighted + (disables the keepSelection resource). + Ps = 1 0 4 1 -> Use the PRIMARY selection. (disables the + selectToClipboard resource). + Ps = 1 0 4 2 -> Disable Urgency window manager hint when + Control-G is received (disables the bellIsUrgent resource). + Ps = 1 0 4 3 -> Disable raising of the window when Control- + G is received (disables the popOnBell resource). Ps = 1 0 4 7 -> Use Normal Screen Buffer, clearing screen first if in the Alternate Screen (unless disabled by the titeInhibit resource) diff --git a/app/xterm/cursor.c b/app/xterm/cursor.c index 9e863d270..3a7ddb875 100644 --- a/app/xterm/cursor.c +++ b/app/xterm/cursor.c @@ -1,9 +1,9 @@ -/* $XTermId: cursor.c,v 1.43 2007/07/07 12:14:51 tom Exp $ */ +/* $XTermId: cursor.c,v 1.45 2008/04/20 21:06:22 tom Exp $ */ /* $XFree86: xc/programs/xterm/cursor.c,v 3.20 2006/02/13 01:14:58 dickey Exp $ */ /* - * Copyright 2002-2006,2007 by Thomas E. Dickey + * Copyright 2002-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -240,6 +240,26 @@ CarriageReturn(TScreen * screen) do_xevents(); } +/* + * When resizing the window, if we're showing the alternate screen, we still + * have to adjust the saved cursor from the normal screen to account for + * shifting of the saved-line region in/out of the viewable window. + */ +void +AdjustSavedCursor(XtermWidget xw, int adjust) +{ + TScreen *screen = &xw->screen; + + if (screen->alternate) { + SavedCursor *sc = &screen->sc[screen->alternate == False]; + + if (adjust > 0) { + TRACE(("AdjustSavedCursor %d -> %d\n", sc->row, sc->row - adjust)); + sc->row += adjust; + } + } +} + /* * Save Cursor and Attributes */ diff --git a/app/xterm/data.h b/app/xterm/data.h index 3421dbb60..2a87e90f9 100644 --- a/app/xterm/data.h +++ b/app/xterm/data.h @@ -111,7 +111,6 @@ extern int ice_fd; extern XtermWidget term; - extern SIG_ATOMIC_T need_cleanup; #if defined(HAVE_XKB_BELL_EXT) diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c index d66933b8e..d7dec3a47 100644 --- a/app/xterm/fontutils.c +++ b/app/xterm/fontutils.c @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.270 2008/02/29 00:25:16 Andrea.Odetti Exp $ */ +/* $XTermId: fontutils.c,v 1.272 2008/04/17 23:23:37 tom Exp $ */ /************************************************************ @@ -1204,6 +1204,11 @@ xtermLoadVTFonts(XtermWidget w, char *myName, char *myClass) w->misc.default_font = subresourceRec.default_font; COPY_MENU_FONTS(subresourceRec, w->screen); w->screen.MenuFontName(fontMenu_default) = w->misc.default_font.f_n; + w->screen.menu_font_names[0][fBold] = w->misc.default_font.f_b; +#if OPT_WIDE_CHARS + w->screen.menu_font_names[0][fWide] = w->misc.default_font.f_w; + w->screen.menu_font_names[0][fWBold] = w->misc.default_font.f_wb; +#endif } else { TRACE(("...no resources found\n")); status = False; @@ -1740,8 +1745,7 @@ xtermUpdateFontInfo(XtermWidget xw, Bool doresize) } TRACE(("xtermUpdateFontInfo {{\n")); DoResizeScreen(xw); /* set to the new natural size */ - if (screen->scrollWidget) - ResizeScrollBar(xw); + ResizeScrollBar(xw); Redraw(); TRACE(("... }} xtermUpdateFontInfo\n")); #ifdef SCROLLBAR_RIGHT diff --git a/app/xterm/input.c b/app/xterm/input.c index ec21892bf..c039ec378 100644 --- a/app/xterm/input.c +++ b/app/xterm/input.c @@ -1,7 +1,7 @@ -/* $XTermId: input.c,v 1.296 2007/12/31 21:11:19 tom Exp $ */ +/* $XTermId: input.c,v 1.299 2008/04/20 20:27:18 tom Exp $ */ /* - * Copyright 1999-2006,2007 by Thomas E. Dickey + * Copyright 1999-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -75,6 +75,7 @@ #endif #include +#include #include #include @@ -650,16 +651,22 @@ ModifyOtherKeys(XtermWidget xw, * for more information. */ static Bool -modifyOtherKey(ANSI * reply, int input_char, int modify_parm) +modifyOtherKey(ANSI * reply, int input_char, int modify_parm, int format_keys) { Bool result = False; if (input_char >= 0) { reply->a_type = ANSI_CSI; - APPEND_PARM(27); - APPEND_PARM(modify_parm); - APPEND_PARM(input_char); - reply->a_final = '~'; + if (format_keys) { + APPEND_PARM(input_char); + APPEND_PARM(modify_parm); + reply->a_final = 'u'; + } else { + APPEND_PARM(27); + APPEND_PARM(modify_parm); + APPEND_PARM(input_char); + reply->a_final = '~'; + } result = True; } @@ -1136,7 +1143,7 @@ Input(XtermWidget xw, #if OPT_MOD_FKEYS if (keyboard->modify_now.other_keys > 1 && computeMaskedModifier(xw, evt_state, ShiftMask) > 1) - modifyOtherKey(&reply, '\t', modify_parm); + modifyOtherKey(&reply, '\t', modify_parm, keyboard->format_keys); #endif } else #endif /* XK_ISO_Left_Tab */ @@ -1225,7 +1232,7 @@ Input(XtermWidget xw, : -1)); TRACE(("...modifyOtherKeys %d;%d\n", modify_parm, input_char)); - if (modifyOtherKey(&reply, input_char, modify_parm)) { + if (modifyOtherKey(&reply, input_char, modify_parm, keyboard->format_keys)) { unparseseq(xw, &reply); } else { Bell(XkbBI_MinorError, 0); diff --git a/app/xterm/main.c b/app/xterm/main.c index 80e08a74f..4f801b4d9 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.586 2008/02/28 00:28:00 Matthieu.Herrb Exp $ */ +/* $XTermId: main.c,v 1.587 2008/05/26 18:25:54 Marius.Tolzmann Exp $ */ /* * W A R N I N G @@ -2241,7 +2241,7 @@ main(int argc, char *argv[]ENVP_ARG) c[1 + u] = "--"; command_to_exec_with_luit = c; } else { - static char *luit[4]; + static char *luit[6]; luit[0] = term->misc.localefilter; if (u) { luit[1] = "-encoding"; @@ -4326,7 +4326,7 @@ spawnXTerm(XtermWidget xw) * there, or refuses to run. In that case we will fall-through to * to command that the user gave anyway. */ - if (command_to_exec_with_luit) { + if (command_to_exec_with_luit && command_to_exec) { xtermSetenv("XTERM_SHELL", xtermFindShell(*command_to_exec_with_luit, False)); TRACE(("spawning command \"%s\"\n", *command_to_exec_with_luit)); @@ -4367,6 +4367,22 @@ spawnXTerm(XtermWidget xw) if (xw->misc.login_shell && pw && added_utmp_entry) execl(bin_login, "login", "-p", "-f", login_name, (void *) 0); #endif + +#if OPT_LUIT_PROG + if (command_to_exec_with_luit) { + if (xw->misc.login_shell) { + int u; + u = (term->misc.use_encoding ? 2 : 0); + command_to_exec_with_luit[u + 1] = "-argv0"; + command_to_exec_with_luit[u + 2] = shname_minus; + command_to_exec_with_luit[u + 3] = NULL; + } + execvp(*command_to_exec_with_luit, command_to_exec_with_luit); + /* Exec failed. */ + fprintf(stderr, "%s: Can't execvp %s: %s\n", ProgramName, + *command_to_exec_with_luit, strerror(errno)); + } +#endif execlp(ptr, (xw->misc.login_shell ? shname_minus : shname), (void *) 0); diff --git a/app/xterm/menu.c b/app/xterm/menu.c index ad0307def..257d8df5a 100644 --- a/app/xterm/menu.c +++ b/app/xterm/menu.c @@ -1,4 +1,4 @@ -/* $XTermId: menu.c,v 1.240 2008/01/20 15:16:43 tom Exp $ */ +/* $XTermId: menu.c,v 1.241 2008/06/03 20:05:49 tom Exp $ */ /* @@ -2487,7 +2487,6 @@ SetupMenus(Widget shell, Widget *forms, Widget *menus, Dimension * menu_high) #if OPT_TOOLBAR Dimension button_height = 0; Dimension toolbar_hSpace; - Dimension toolbar_border; Arg args[10]; #endif @@ -2533,7 +2532,6 @@ SetupMenus(Widget shell, Widget *forms, Widget *menus, Dimension * menu_high) */ XtVaGetValues(*menus, XtNhSpace, &toolbar_hSpace, - XtNborderWidth, &toolbar_border, (XtPointer) 0); if (shell == toplevel) { /* vt100 */ @@ -2553,9 +2551,9 @@ SetupMenus(Widget shell, Widget *forms, Widget *menus, Dimension * menu_high) * Tell the main program how high the toolbar is, to help with the initial * layout. */ - *menu_high = (button_height + 2 * (toolbar_hSpace + toolbar_border)); - TRACE(("...menuHeight:%d = (%d + 2 * (%d + %d))\n", - *menu_high, button_height, toolbar_hSpace, toolbar_border)); + *menu_high = (button_height + 2 * (toolbar_hSpace)); + TRACE(("...menuHeight:%d = (%d + 2 * %d)\n", + *menu_high, button_height, toolbar_hSpace)); #else /* !OPT_TOOLBAR */ *forms = shell; diff --git a/app/xterm/misc.c b/app/xterm/misc.c index 120fa66e2..63408aadc 100644 --- a/app/xterm/misc.c +++ b/app/xterm/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.382 2008/01/27 15:37:18 tom Exp $ */ +/* $XTermId: misc.c,v 1.384 2008/07/27 15:38:05 tom Exp $ */ /* * @@ -190,6 +190,11 @@ unselectwindow(TScreen * screen, int flag) { TRACE(("unselectwindow(%d) flag=%d\n", screen->select, flag)); + if (screen->hide_pointer) { + screen->hide_pointer = False; + xtermDisplayCursor(term); + } + if (!screen->always_highlight) { #if OPT_TEK4014 if (TEK4014_ACTIVE(term)) { @@ -3304,7 +3309,7 @@ xtermFindShell(char *leaf, Bool warning) if (*result != '\0' && strchr("+/-", *result) == 0) { /* find it in $PATH */ if ((s = x_getenv("PATH")) != 0) { - if ((tmp = TypeMallocN(char, strlen(leaf) + strlen(s) + 1)) != 0) { + if ((tmp = TypeMallocN(char, strlen(leaf) + strlen(s) + 2)) != 0) { Bool found = False; while (*s != '\0') { strcpy(tmp, s); diff --git a/app/xterm/ptydata.c b/app/xterm/ptydata.c index 055e51c82..2f6ebfa53 100644 --- a/app/xterm/ptydata.c +++ b/app/xterm/ptydata.c @@ -1,4 +1,4 @@ -/* $XTermId: ptydata.c,v 1.79 2008/02/21 22:19:03 tom Exp $ */ +/* $XTermId: ptydata.c,v 1.80 2008/04/20 22:41:25 tom Exp $ */ /* * $XFree86: xc/programs/xterm/ptydata.c,v 1.25 2006/02/13 01:14:59 dickey Exp $ @@ -6,7 +6,7 @@ /************************************************************ -Copyright 1999-2006,2007 by Thomas E. Dickey +Copyright 1999-2007,2008 by Thomas E. Dickey All Rights Reserved diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h index 692b0443c..717584d54 100644 --- a/app/xterm/ptyx.h +++ b/app/xterm/ptyx.h @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.513 2008/02/25 00:05:13 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.517 2008/07/27 19:38:00 tom Exp $ */ /* * Copyright 1999-2007,2008 by Thomas E. Dickey @@ -1380,7 +1380,7 @@ typedef struct { */ int base64_accu; int base64_count; - int base64_pad; + unsigned base64_pad; #endif #if OPT_READLINE unsigned click1_moves; @@ -1510,6 +1510,7 @@ typedef struct { ScrnBuf allbuf; /* screen buffer (may include lines scrolled off top) */ Char *sbuf_address; /* main screen memory address */ + Boolean is_running; /* true when buffers are legal */ /* * Data for the alternate buffer. */ @@ -1839,6 +1840,7 @@ typedef struct #if OPT_MOD_FKEYS TModify modify_now; /* current modifier value */ TModify modify_1st; /* original modifier value, for resets */ + int format_keys; /* format of modifyOtherKeys */ #endif } TKeyboard; @@ -2241,7 +2243,6 @@ typedef struct Tek_Link /***====================================================================***/ #if OPT_TRACE -#include #undef NDEBUG /* turn on assert's */ #else #ifndef NDEBUG @@ -2249,6 +2250,8 @@ typedef struct Tek_Link #endif #endif +#include + #ifndef TRACE #define TRACE(p) /*nothing*/ #endif diff --git a/app/xterm/screen.c b/app/xterm/screen.c index ca86df8d7..9c6714af7 100644 --- a/app/xterm/screen.c +++ b/app/xterm/screen.c @@ -1,7 +1,7 @@ -/* $XTermId: screen.c,v 1.234 2008/01/27 16:43:54 tom Exp $ */ +/* $XTermId: screen.c,v 1.241 2008/04/20 21:07:10 tom Exp $ */ /* - * Copyright 1999-2005,2006 by Thomas E. Dickey + * Copyright 1999-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -1418,7 +1418,7 @@ ScreenResize(XtermWidget xw, TScreen *screen = &(xw->screen); int code, rows, cols; int border = 2 * screen->border; - int move_down_by; + int move_down_by = 0; #ifdef TTYSIZE_STRUCT TTYSIZE_STRUCT ts; #endif @@ -1431,19 +1431,21 @@ ScreenResize(XtermWidget xw, assert(width > 0); assert(height > 0); - /* clear the right and bottom internal border because of NorthWest - gravity might have left junk on the right and bottom edges */ - if (width >= FullWidth(screen)) { - XClearArea(screen->display, tw, - FullWidth(screen), 0, /* right edge */ - 0, (unsigned) height, /* from top to bottom */ - False); - } - if (height >= FullHeight(screen)) { - XClearArea(screen->display, tw, - 0, FullHeight(screen), /* bottom */ - (unsigned) width, 0, /* all across the bottom */ - False); + if (screen->is_running) { + /* clear the right and bottom internal border because of NorthWest + gravity might have left junk on the right and bottom edges */ + if (width >= FullWidth(screen)) { + XClearArea(screen->display, tw, + FullWidth(screen), 0, /* right edge */ + 0, (unsigned) height, /* from top to bottom */ + False); + } + if (height >= FullHeight(screen)) { + XClearArea(screen->display, tw, + 0, FullHeight(screen), /* bottom */ + (unsigned) width, 0, /* all across the bottom */ + False); + } } TRACE(("...computing rows/cols: %.2f %.2f\n", @@ -1466,45 +1468,50 @@ ScreenResize(XtermWidget xw, TRACE(("...ScreenResize chars %dx%d\n", rows, cols)); - if (screen->cursor_state) - HideCursor(); - if (screen->alternate - && xw->misc.resizeGravity == SouthWestGravity) - /* swap buffer pointers back to make this work */ - SwitchBufPtrs(screen); - if (screen->altbuf) - (void) Reallocate(xw, - &screen->altbuf, - &screen->abuf_address, - rows, - cols, - MaxRows(screen), - MaxCols(screen)); - move_down_by = Reallocate(xw, - &screen->allbuf, - &screen->sbuf_address, - rows + savelines, cols, - MaxRows(screen) + savelines, + if (screen->is_running) { + if (screen->cursor_state) + HideCursor(); + if (screen->alternate + && xw->misc.resizeGravity == SouthWestGravity) + /* swap buffer pointers back to make this work */ + SwitchBufPtrs(screen); + if (screen->altbuf) + (void) Reallocate(xw, + &screen->altbuf, + &screen->abuf_address, + rows, + cols, + MaxRows(screen), MaxCols(screen)); - screen->visbuf = &screen->allbuf[MAX_PTRS * savelines]; + move_down_by = Reallocate(xw, + &screen->allbuf, + &screen->sbuf_address, + rows + savelines, cols, + MaxRows(screen) + savelines, + MaxCols(screen)); + screen->visbuf = &screen->allbuf[MAX_PTRS * savelines]; + } + AdjustSavedCursor(xw, move_down_by); set_max_row(screen, screen->max_row + delta_rows); set_max_col(screen, cols - 1); - if (xw->misc.resizeGravity == SouthWestGravity) { - screen->savedlines -= move_down_by; - if (screen->savedlines < 0) - screen->savedlines = 0; - if (screen->savedlines > screen->savelines) - screen->savedlines = screen->savelines; - if (screen->topline < -screen->savedlines) - screen->topline = -screen->savedlines; - set_cur_row(screen, screen->cur_row + move_down_by); - screen->cursorp.row += move_down_by; - ScrollSelection(screen, move_down_by, True); + if (screen->is_running) { + if (xw->misc.resizeGravity == SouthWestGravity) { + screen->savedlines -= move_down_by; + if (screen->savedlines < 0) + screen->savedlines = 0; + if (screen->savedlines > screen->savelines) + screen->savedlines = screen->savelines; + if (screen->topline < -screen->savedlines) + screen->topline = -screen->savedlines; + set_cur_row(screen, screen->cur_row + move_down_by); + screen->cursorp.row += move_down_by; + ScrollSelection(screen, move_down_by, True); - if (screen->alternate) - SwitchBufPtrs(screen); /* put the pointers back */ + if (screen->alternate) + SwitchBufPtrs(screen); /* put the pointers back */ + } } /* adjust scrolling region */ @@ -1525,9 +1532,7 @@ ScreenResize(XtermWidget xw, screen->fullVwin.fullheight = height; screen->fullVwin.fullwidth = width; - if (screen->scrollWidget) - ResizeScrollBar(xw); - + ResizeScrollBar(xw); ResizeSelection(screen, rows, cols); #ifndef NO_ACTIVE_ICON diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c index c82da89de..3f9ddad4c 100644 --- a/app/xterm/scrollbar.c +++ b/app/xterm/scrollbar.c @@ -1,4 +1,4 @@ -/* $XTermId: scrollbar.c,v 1.134 2008/02/28 01:07:30 tom Exp $ */ +/* $XTermId: scrollbar.c,v 1.136 2008/06/03 20:55:33 tom Exp $ */ /* $XFree86: xc/programs/xterm/scrollbar.c,v 3.48 2006/02/13 01:14:59 dickey Exp $ */ @@ -180,17 +180,13 @@ DoResizeScreen(XtermWidget xw) MaxCols(screen), reqHeight, reqWidth)); - geomreqresult = XtMakeResizeRequest((Widget) xw, reqWidth, reqHeight, - &repWidth, &repHeight); - TRACE(("scrollbar.c XtMakeResizeRequest %dx%d -> %dx%d (status %d)\n", - reqHeight, reqWidth, - repHeight, repWidth, - geomreqresult)); + geomreqresult = REQ_RESIZE((Widget) xw, reqWidth, reqHeight, + &repWidth, &repHeight); if (geomreqresult == XtGeometryAlmost) { TRACE(("...almost, retry screensize %dx%d\n", repHeight, repWidth)); - geomreqresult = XtMakeResizeRequest((Widget) xw, repWidth, - repHeight, NULL, NULL); + geomreqresult = REQ_RESIZE((Widget) xw, repWidth, + repHeight, NULL, NULL); } if (geomreqresult != XtGeometryYes) { @@ -327,29 +323,31 @@ ResizeScrollBar(XtermWidget xw) { TScreen *screen = &(xw->screen); - int height = screen->fullVwin.height + screen->border * 2; - int width = screen->scrollWidget->core.width; - int ypos = -ScrollBarBorder(xw); + if (screen->scrollWidget != 0) { + int height = screen->fullVwin.height + screen->border * 2; + int width = screen->scrollWidget->core.width; + int ypos = -ScrollBarBorder(xw); #ifdef SCROLLBAR_RIGHT - int xpos = ((xw->misc.useRight) - ? (screen->fullVwin.fullwidth - - screen->scrollWidget->core.width - - BorderWidth(screen->scrollWidget)) - : -ScrollBarBorder(xw)); + int xpos = ((xw->misc.useRight) + ? (screen->fullVwin.fullwidth - + screen->scrollWidget->core.width - + BorderWidth(screen->scrollWidget)) + : -ScrollBarBorder(xw)); #else - int xpos = -ScrollBarBorder(xw); + int xpos = -ScrollBarBorder(xw); #endif - TRACE(("ResizeScrollBar at %d,%d %dx%d\n", ypos, xpos, height, width)); + TRACE(("ResizeScrollBar at %d,%d %dx%d\n", ypos, xpos, height, width)); - XtConfigureWidget( - screen->scrollWidget, - xpos, - ypos, - width, - height, - BorderWidth(screen->scrollWidget)); - ScrollBarDrawThumb(screen->scrollWidget); + XtConfigureWidget( + screen->scrollWidget, + xpos, + ypos, + width, + height, + BorderWidth(screen->scrollWidget)); + ScrollBarDrawThumb(screen->scrollWidget); + } } void diff --git a/app/xterm/trace.c b/app/xterm/trace.c index da6d0f4f6..f77a9dcd6 100644 --- a/app/xterm/trace.c +++ b/app/xterm/trace.c @@ -1,8 +1,8 @@ -/* $XTermId: trace.c,v 1.83 2007/12/31 20:58:29 tom Exp $ */ +/* $XTermId: trace.c,v 1.85 2008/06/03 20:52:34 tom Exp $ */ /************************************************************ -Copyright 1997-2006,2007 by Thomas E. Dickey +Copyright 1997-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -438,6 +438,8 @@ TraceSizeHints(XSizeHints * hints) TRACE((" max %d,%d\n", hints->max_height, hints->max_width)); if (hints->flags & PResizeInc) TRACE((" inc %d,%d\n", hints->height_inc, hints->width_inc)); + else + TRACE((" inc NONE!\n")); if (hints->flags & PAspect) TRACE((" min aspect %d/%d\n", hints->min_aspect.y, hints->min_aspect.y)); if (hints->flags & PAspect) @@ -494,6 +496,24 @@ TraceTranslations(const char *name, Widget w) XSetErrorHandler(save); } +int +TraceResizeRequest(const char *fn, int ln, Widget w, + Dimension reqwide, + Dimension reqhigh, + Dimension * gotwide, + Dimension * gothigh) +{ + int rc; + + TRACE(("%s@%d ResizeRequest %dx%d\n", fn, ln, reqhigh, reqwide)); + rc = XtMakeResizeRequest((Widget) w, reqwide, reqhigh, gotwide, gothigh); + TRACE(("... ResizeRequest -> ")); + if (gothigh && gotwide) + TRACE(("%dx%d ", *gothigh, *gotwide)); + TRACE(("(%d)\n", rc)); + return rc; +} + #define XRES_S(name) Trace(#name " = %s\n", NonNull(resp->name)) #define XRES_B(name) Trace(#name " = %s\n", BtoS(resp->name)) #define XRES_I(name) Trace(#name " = %d\n", resp->name) diff --git a/app/xterm/trace.h b/app/xterm/trace.h index 10a6f7f34..9f2c3b9cd 100644 --- a/app/xterm/trace.h +++ b/app/xterm/trace.h @@ -1,8 +1,8 @@ -/* $XTermId: trace.h,v 1.42 2007/12/31 20:58:23 tom Exp $ */ +/* $XTermId: trace.h,v 1.44 2008/07/27 15:21:20 tom Exp $ */ /************************************************************ -Copyright 1997-2006,2007 by Thomas E. Dickey +Copyright 1997-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -61,10 +61,10 @@ extern char *trace_who; extern void TraceSizeHints(XSizeHints *); #define TRACE_HINTS(hints) TraceSizeHints(hints) -extern void TraceIds(const char *fname, int lnum); +extern void TraceIds(const char * /* fname */, int /* lnum */); #define TRACE_IDS TraceIds(__FILE__, __LINE__) -extern void TraceOptions(OptionHelp *options, XrmOptionDescRec *resources, Cardinal count); +extern void TraceOptions(OptionHelp * /* options */, XrmOptionDescRec * /* resources */, Cardinal /* count */); #define TRACE_OPTS(opts,ress,lens) TraceOptions(opts,ress,lens) extern void TraceTranslations(const char *, Widget); @@ -76,6 +76,17 @@ extern void TraceWMSizeHints(XtermWidget); extern void TraceXtermResources(void); #define TRACE_XRES() TraceXtermResources() +extern int TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w */, Dimension /* reqwide */, Dimension /* reqhigh */, Dimension * /* gotwide */, Dimension * /* gothigh */); +#define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \ + TraceResizeRequest(__FILE__, __LINE__, w, reqwide, reqhigh, gotwide, gothigh) + +#else + +#define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \ + XtMakeResizeRequest((Widget) (w), \ + (Dimension) (reqwide), (Dimension) (reqhigh), \ + (gotwide), (gothigh)) + #endif #endif /* included_trace_h */ diff --git a/app/xterm/version.h b/app/xterm/version.h index b74cf2be9..3056d53a9 100644 --- a/app/xterm/version.h +++ b/app/xterm/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.290 2008/02/28 00:17:03 tom Exp $ */ +/* $XTermId: version.h,v 1.292 2008/05/26 19:18:04 tom Exp $ */ /* * These definitions are used to build the string that's printed in response to @@ -6,7 +6,7 @@ * version of X to which this version of xterm has been built. The number in * parentheses is my patch number (Thomas E. Dickey). */ -#define XTERM_PATCH 234 +#define XTERM_PATCH 236 #ifndef __vendorversion__ #define __vendorversion__ "XTerm/OpenBSD" diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h index 4e92f18e4..478cec666 100644 --- a/app/xterm/xterm.h +++ b/app/xterm/xterm.h @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.498 2008/01/30 00:50:07 tom Exp $ */ +/* $XTermId: xterm.h,v 1.502 2008/05/26 19:23:05 tom Exp $ */ /************************************************************ @@ -397,6 +397,7 @@ extern char **environ; #define XtNfontDoublesize "fontDoublesize" #define XtNfontStyle "fontStyle" #define XtNforceBoxChars "forceBoxChars" +#define XtNformatOtherKeys "formatOtherKeys" #define XtNfreeBoldBox "freeBoldBox" #define XtNhighlightColor "highlightColor" #define XtNhighlightColorMode "highlightColorMode" @@ -435,9 +436,9 @@ extern char **environ; #define XtNnMarginBell "nMarginBell" #define XtNnumLock "numLock" #define XtNoldXtermFKeys "oldXtermFKeys" -#define XtNpointerMode "pointerMode" #define XtNpointerColor "pointerColor" #define XtNpointerColorBackground "pointerColorBackground" +#define XtNpointerMode "pointerMode" #define XtNpointerShape "pointerShape" #define XtNpopOnBell "popOnBell" #define XtNprintAttributes "printAttributes" @@ -545,6 +546,7 @@ extern char **environ; #define XtCFontDoublesize "FontDoublesize" #define XtCFontStyle "FontStyle" #define XtCForceBoxChars "ForceBoxChars" +#define XtCFormatOtherKeys "FormatOtherKeys" #define XtCFreeBoldBox "FreeBoldBox" #define XtCHighlightColorMode "HighlightColorMode" #define XtCHighlightReverse "HighlightReverse" @@ -749,6 +751,7 @@ extern void noleaks_cachedCgs (XtermWidget /* xw */); #endif /* charproc.c */ +extern Bool CheckBufPtrs (TScreen * /* screen */); extern int VTInit (void); extern int v_write (int /* f */, Char * /* d */, unsigned /* len */); extern void FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */); @@ -789,9 +792,10 @@ extern void noleaks_charproc (void); /* charsets.c */ extern unsigned xtermCharSetIn (unsigned /* code */, int /* charset */); -extern int xtermCharSetOut (IChar * /* buf */, IChar * /* ptr */, int /* charset */); +extern int xtermCharSetOut (XtermWidget /* xw */, IChar * /* buf */, IChar * /* ptr */, int /* charset */); /* cursor.c */ +extern void AdjustSavedCursor (XtermWidget /* xw */, int /* adjust */); extern void CarriageReturn (TScreen * /* screen */); extern void CursorBack (XtermWidget /* xw */, int /* n */); extern void CursorDown (TScreen * /* screen */, int /* n */); diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html index 0e10ac1b0..9cb1fc03d 100644 --- a/app/xterm/xterm.log.html +++ b/app/xterm/xterm.log.html @@ -20,7 +20,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.664 2008/03/02 23:32:51 tom Exp $ + $XTermId: xterm.log.html,v 1.685 2008/07/27 23:10:10 tom Exp $ --> @@ -45,7 +45,9 @@ Most of these are summarized in the XFree86 CHANGELOG is the latest version of this file. -

Patch #234 - 2008-03/02

+

Patch #236 - 2008/07/27

+
    +
  • correct memory reallocation when handling a paste of UTF-8 text + from patch #225 changes + (report/patch by Max Mikhanosha). + +
  • correct allocation of temporary buffer in + xtermFindShell in case the user's $PATH + contains no ":" (report/analysis by Victor Stinner, + Freedesktop.Org Bugzilla #16790). + +
  • modify CF_XOPEN_SOURCE to add case for DragonFly BSD, to fix + new compile problem exposed by fix for fd_mask (patch by + Hasso Tepper). + +
  • add configure-check for ncurses use_extended_names, + (report by Martin Mokrejs). + +
  • correct computation for toolbar height; layout manager already + takes into account borderWidth resource. + +
  • implement VT320-style SCS (select character set) for ISO Latin-1 + supplemental. + +
  • fixes for vt100-style character sets in UTF-8 mode (Ubuntu #230919). + +
  • fix to make luit work with xterm's -ls + option (report/patch by Marius Tolzmann). + +
  • update config.guess, config.sub +
+ +

Patch #235 - 2008/04/20

+
    +
  • add control sequences for some of the recent resource/menu + settings: +
      +
    • altSendsEscape (private mode 1039) +
    • keepSelection (private mode 1040) +
    • selectToClipboard (private mode 1041) +
    • bellIsUrgent (private mode 1042) +
    • popOnBell (private mode 1043) +
    + +
  • add resource formatOtherKeys to provide an alternate + escape sequence format for the modifyOtherKeys + resource (request by Paul LeoNerd Evans). + +
  • adjust saved-cursor position if the window is resized while + displaying the alternate screen (Novell #196880, Debian #383384). + +
  • improve pointer-checks to fix a bug exposed by resizing during + initialization under StumpWM window manager + (Fedora Bugzilla #437928). + +
  • modify unselectwindow() to ensure that the mouse + pointer is not hidden after xterm loses focus (report by Jeremy + Huddleston). + +
  • add special check for fd_mask on Mac OS X (report by Jeremy + Huddleston). + +
  • add dylib to autoconf's suffix list used for checking + the result from xmkmf, to work with Mac OS X (report + by Jeremy Huddleston). + +
  • correct initialization of bold- and wide-, wide-bold fonts which + may be set via the utf8Fonts subresource (Debian + #347790). +
+ +

Patch #234 - 2008/03/02

  • modify sinstall.sh to use POSIX locale to bypass GNU ls changes to date-format. diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man index e47a5c060..c2e540caa 100644 --- a/app/xterm/xterm.man +++ b/app/xterm/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.406 2008/02/24 19:09:31 Alan.Coopersmith Exp $ +.\" $XTermId: xterm.man,v 1.408 2008/04/20 21:16:40 tom Exp $ .\" .\" Copyright 1996-2007,2008 by Thomas E. Dickey .\" @@ -1833,9 +1833,15 @@ The default is ``false.'' .B "cursorColor (\fPclass\fB CursorColor)" Specifies the color to use for the text cursor. The default is ``XtDefaultForeground.'' -\fIXterm\fP attempts to keep this color from being the same as the background +By default, +\fIxterm\fP attempts to keep this color from being the same as the background color, since it draws the cursor by filling the background of a text cell. The same restriction applies to control sequences which may change this color. +.IP +Setting this resource overrides +most of \fIxterm\fP's adjustments to cursor color. +It will still use reverse-video to disallow some cases, such as a black +cursor on a black background. .TP 8 .B "cursorOffTime (\fPclass\fB CursorOffTime)" Specifies the duration of the "off" part of the cursor blink cycle-time @@ -2051,7 +2057,19 @@ that would normally appear in the text color change color. The default is ``XtDefaultForeground.'' .TP 8 -.B "freeBoldBox (\fPclass\fB freeBoldBox)" +.B "formatOtherKeys (\fPclass\fB FormatOtherKeys)" +Overrides the format of the escape sequence used to report modified keys +with the \fImodifyOtherKeys\fP resource. +.RS +.TP 3 +0 +send modified keys as parameters for function-key 27 (default). +.TP 3 +1 +send modified keys as parameters for CSI\ u. +.RE +.TP 8 +.B "freeBoldBox (\fPclass\fB FreeBoldBox)" Specifies whether \fIxterm\fP should assume the bounding boxes for normal and bold fonts are compatible. If ``false'', \fIxterm\fP compares them and will reject choices of diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c index 81f55cc93..e337b5dcd 100644 --- a/app/xterm/xtermcap.c +++ b/app/xterm/xtermcap.c @@ -1,4 +1,4 @@ -/* $XTermId: xtermcap.c,v 1.12 2007/12/31 17:27:42 tom Exp $ */ +/* $XTermId: xtermcap.c,v 1.13 2008/07/27 15:18:56 tom Exp $ */ /* * Copyright 2007 by Thomas E. Dickey @@ -48,6 +48,12 @@ #define USE_TERMINFO 0 #endif +#if USE_TERMINFO && defined(NCURSES_VERSION) && defined(HAVE_USE_EXTENDED_NAMES) +#define USE_EXTENDED_NAMES 1 +#else +#define USE_EXTENDED_NAMES 0 +#endif + #if OPT_TCAP_QUERY || OPT_TCAP_FKEYS typedef struct { @@ -164,7 +170,7 @@ static TCAPINFO table[] = { /* XK_COLORS is a fake code. */ DATA( "Co", "colors", XK_COLORS, 0 ), # endif -#if USE_TERMINFO && defined(NCURSES_VERSION) +#if USE_EXTENDED_NAMES #define DEXT(name, parm, code) DATA("", name, code, parm) #define D1ST(name, parm, code) DEXT("k" #name, parm, code) #define DMOD(name, parm, code) DEXT("k" #name #parm, parm, code) @@ -378,7 +384,7 @@ get_termcap(char *name, char *buffer) { *buffer = 0; /* initialize, in case we're using terminfo's tgetent */ -#if USE_TERMINFO && defined(NCURSES_VERSION) +#if USE_EXTENDED_NAMES use_extended_names(TRUE); #endif if (name != 0) { diff --git a/app/xterm/xtermcfg.hin b/app/xterm/xtermcfg.hin index 07317da85..c0395aeae 100644 --- a/app/xterm/xtermcfg.hin +++ b/app/xterm/xtermcfg.hin @@ -1,4 +1,4 @@ -/* $XTermId: xtermcfg.hin,v 1.169 2008/02/24 21:47:48 tom Exp $ */ +/* $XTermId: xtermcfg.hin,v 1.171 2008/07/27 15:17:07 tom Exp $ */ /* * $XFree86: xc/programs/xterm/xtermcfg.hin,v 3.61 2006/06/19 00:36:52 dickey Exp $ @@ -37,6 +37,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef ALLOWLOGFILEEXEC /* CF_ARG_ENABLE(enable-logfile-exec) */ #undef ALLOWLOGGING /* CF_ARG_ENABLE(enable-logging) */ #undef CC_HAS_PROTOS /* CF_ANSI_CC */ +#undef CSRG_BASED /* CF_TYPE_FD_MASK */ #undef DECL_ERRNO /* CF_ERRNO */ #undef DFT_COLORMODE /* AC_ARG_WITH(default-color-mode) */ #undef DFT_DECID /* AC_ARG_WITH(default-terminal-id) */ @@ -71,6 +72,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef HAVE_TERM_H /* AC_CHECK_HEADERS(term.h) */ #undef HAVE_TIGETSTR /* AC_CHECK_FUNCS(tigetstr) */ #undef HAVE_UNISTD_H /* AC_CHECK_HEADERS(unistd.h) */ +#undef HAVE_USE_EXTENDED_NAMES /* AC_CHECK_FUNCS(use_extended_names) */ #undef HAVE_UTMP /* CF_UTMP */ #undef HAVE_UTMP_UT_HOST /* CF_UTMP_UT_HOST */ #undef HAVE_UTMP_UT_SESSION /* CF_UTMP_UT_SESSION */