INSTALL | 50 +- MANIFEST | 2 THANKS | 4 VTPrsTbl.c | 342 ++++++++++++++++++- VTparse.def | 6 VTparse.h | 7 button.c | 291 ++++++++++------ charproc.c | 297 +++++++++++++--- charsets.c | 825 +++++++++++++++++++++++++++++------------------ configure | 138 +++---- configure.in | 52 +- ctlseqs.ms | 28 + ctlseqs.txt | 29 + cursor.c | 4 debian/changelog | 2 doublechr.c | 6 fontutils.c | 68 +-- fontutils.h | 20 - graphics.c | 18 - input.c | 19 - misc.c | 87 ++-- package/debian/changelog | 6 package/freebsd/Makefile | 2 package/xterm.spec | 4 ptyx.h | 64 +++ screen.c | 12 trace.c | 110 +++--- trace.h | 9 util.c | 90 +++-- version.h | 6 xterm.h | 10 xterm.log.html | 97 +++++ xterm.man | 7 33 files changed, 1849 insertions(+), 863 deletions(-)
New commits: commit 435561933205edb946921568b56b3b287c79b308 Author: Sven Joachim <svenj...@gmx.de> Date: Wed Sep 11 17:40:18 2013 +0200 New upstream release diff --git a/debian/changelog b/debian/changelog index 5d24019..ce03567 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xterm (296-1) UNRELEASED; urgency=low +xterm (297-1) UNRELEASED; urgency=low * New upstream release. commit 109db94a827306c71c63fd8e3314e21509bde184 Author: Sven Joachim <svenj...@gmx.de> Date: Wed Sep 11 17:33:32 2013 +0200 Imported Upstream version 297 diff --git a/INSTALL b/INSTALL index 9d555fc..2554ca2 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ --- $XTermId: INSTALL,v 1.148 2013/06/23 20:22:46 tom Exp $ +-- $XTermId: INSTALL,v 1.149 2013/08/04 19:33:14 tom Exp $ ------------------------------------------------------------------------------- -- Copyright 1997-2012,2013 by Thomas E. Dickey -- @@ -30,23 +30,12 @@ ------------------------------------------------------------------------------- Xterm was originally built as part of the X Window System source tree, using -imake to generate a Makefile from Imakefile. You can also use the configure -script to generate a Makefile from Makefile.in: +imake to generate a Makefile from Imakefile. - + If you have imake (or xmkmf), then you can use those directly, - or use the configure script, which normally uses those tools - to obtain the special definitions needed to build xterm. +An example Imakefile is provided for legacy use. - Ultimately, imake will not be necessary, since it is possible - to add configure tests that derive the information that imake - would supply. - - + You need the Athena widgets (or a clone, such as Xaw3d or - neXtaw), to provide the popup menus. - -Even if you have imake, the configure script is still convenient because -it allows you to build different configurations more easily than with -imake, simply by specifying options to the configure script. +The preferred method uses the configure script to generate a Makefile from +Makefile.in Options: ------- @@ -221,6 +210,15 @@ The options (in alphabetic order): tool. Normally these chunks of memory are retained as long as xterm is running. + --disable-luit disable support for luit filter (Unicode translation) + + Luit is a filter that can be run between an arbitrary application and a + UTF-8 terminal emulator. It will convert application output from the + locale's encoding into UTF-8, and convert terminal input from UTF-8 + into the locale's encoding. + + This is normally enabled, relying upon "--enable-wide-chars". + --disable-maximize disable actions for iconify/deiconify/maximize/restore Do not compile-in code that implements runtime 'actions' for @@ -341,6 +339,12 @@ The options (in alphabetic order): A genuine vt100 emulates a vt52. + --disable-wide-chars disable wide-character support + + The wide-character code supports Unicode and UTF-8. + + This is normally enabled. + --disable-ziconbeep disable -ziconbeep option Do not compile-in code that modifies the icon's title and sounds a @@ -436,15 +440,6 @@ The options (in alphabetic order): Logging was disabled in X11R5 xterm because of security problems. They were addressed in X11R6, but the feature was not reinstated. - --enable-luit enable support for luit filter (Unicode translation) - - Luit is a filter that can be run between an arbitrary application and a - UTF-8 terminal emulator. It will convert application output from the - locale's encoding into UTF-8, and convert terminal input from UTF-8 - into the locale's encoding. - - This sets "--enable-wide-chars" as a side-effect. - --enable-meta-sends-esc set default metaSendsEscape resource (default: no) This sets the default resource value, which is shown in the manpage. @@ -523,11 +518,6 @@ The options (in alphabetic order): I use this option regularly, and correct all but a few (difficult) problems. - --enable-wide-chars enable wide-character support - - Compile-in code that supports 16-bit characters. Includes support - for UTF-8. - --enable-xmc-glitch test: enable xmc magic-cookie emulation Compile-in code that simulates the terminfo "magic cookie" glitch. diff --git a/MANIFEST b/MANIFEST index 5675bd8..08d673c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-296, version xterm-296 +MANIFEST for xterm-297, version xterm-297 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/THANKS b/THANKS index dbcc4af..a38ebf9 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ --- $XTermId: THANKS,v 1.9 2013/07/04 23:04:24 tom Exp $ +-- $XTermId: THANKS,v 1.11 2013/08/08 08:24:07 tom Exp $ -- vile:txtmode fk=8bit There's no AUTHORS file in this distribution; it would be redundant since I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996. @@ -81,6 +81,7 @@ H Merijn Brand Hasso Tepper Holger Veit Ilya Zakharevich +Iwamoto Kouichi James Armstrong Jason Bacon Jason Vas Dias @@ -149,6 +150,7 @@ Peter Berg Larsen Pierre Lombard Richard Braakman Richard Griswold +Richard Tollerton Rob Braun Robert Brady Robert Earl diff --git a/VTPrsTbl.c b/VTPrsTbl.c index 7414ee9..34accc3 100644 --- a/VTPrsTbl.c +++ b/VTPrsTbl.c @@ -1,4 +1,4 @@ -/* $XTermId: VTPrsTbl.c,v 1.69 2012/09/10 23:28:14 tom Exp $ */ +/* $XTermId: VTPrsTbl.c,v 1.72 2013/08/21 23:50:44 tom Exp $ */ /* * Copyright 1999-2011,2012 by Thomas E. Dickey @@ -5971,7 +5971,7 @@ CASE_ESC_IGNORE, CASE_ESC_IGNORE, /* $ % & ' */ CASE_ESC_IGNORE, -CASE_ESC_IGNORE, +CASE_SCS_PERCENT, CASE_ESC_IGNORE, CASE_ESC_IGNORE, /* ( ) * + */ @@ -6000,9 +6000,9 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, /* < = > ? */ -CASE_GROUND_STATE, CASE_GSETS, -CASE_GROUND_STATE, +CASE_GSETS, +CASE_GSETS, CASE_GROUND_STATE, /* @ A B C */ CASE_GROUND_STATE, @@ -6045,7 +6045,7 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, /* ` a b c */ -CASE_GROUND_STATE, +CASE_GSETS, CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, @@ -6131,7 +6131,7 @@ CASE_ESC_IGNORE, CASE_ESC_IGNORE, /* currency yen brokenbar section */ CASE_ESC_IGNORE, -CASE_ESC_IGNORE, +CASE_SCS_PERCENT, CASE_ESC_IGNORE, CASE_ESC_IGNORE, /* diaeresis copyright ordfeminine guillemotleft */ @@ -6160,9 +6160,9 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, /* onequarter onehalf threequarters questiondown */ -CASE_GROUND_STATE, CASE_GSETS, -CASE_GROUND_STATE, +CASE_GSETS, +CASE_GSETS, CASE_GROUND_STATE, /* Agrave Aacute Acircumflex Atilde */ CASE_GROUND_STATE, @@ -6205,7 +6205,7 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, /* agrave aacute acircumflex atilde */ -CASE_GROUND_STATE, +CASE_GSETS, CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_GROUND_STATE, @@ -7222,6 +7222,330 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, CASE_IGNORE, }; + +Const PARSE_T scs_pct_table[] = /* SCS % */ +{ +/* 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, +/* FF 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_GSETS_PERCENT, +CASE_GROUND_STATE, +CASE_GSETS_PERCENT, +CASE_GSETS_PERCENT, +/* 4 5 6 7 */ +CASE_GROUND_STATE, +CASE_GSETS_PERCENT, +CASE_GSETS_PERCENT, +CASE_GROUND_STATE, +/* 8 9 : ; */ +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +CASE_GROUND_STATE, +/* < = > ? */ +CASE_GROUND_STATE, +CASE_GSETS_PERCENT, +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, +/* \ ] ^ _ */ +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_GSETS_PERCENT, +CASE_GROUND_STATE, +CASE_GSETS_PERCENT, +CASE_GROUND_STATE, +/* Adiaeresis Aring AE Ccedilla */ +CASE_GROUND_STATE, +CASE_GSETS_PERCENT, +CASE_GSETS_PERCENT, +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_GSETS_PERCENT, +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, +}; #endif /* OPT_WIDE_CHARS */ #if OPT_VT52_MODE diff --git a/VTparse.def b/VTparse.def index 0c09173..820c6b4 100644 --- a/VTparse.def +++ b/VTparse.def @@ -1,10 +1,10 @@ -# $XTermId: VTparse.def,v 1.46 2012/09/10 23:26:44 tom Exp $ +# $XTermId: VTparse.def,v 1.47 2013/08/19 00:39:14 tom Exp $ # # vile:confmode rs=lf # ----------------------------------------------------------------------------- # this file is part of xterm # -# Copyright 1996-2011,2012 by Thomas E. Dickey +# Copyright 1996-2012,2013 by Thomas E. Dickey # # All Rights Reserved # @@ -197,3 +197,5 @@ CASE_VPR CASE_ANSI_SC CASE_ANSI_RC CASE_ESC_COLON +CASE_SCS_PERCENT +CASE_GSETS_PERCENT diff --git a/VTparse.h b/VTparse.h index 464c623..5ee7a8e 100644 --- a/VTparse.h +++ b/VTparse.h @@ -1,7 +1,7 @@ -/* $XTermId: VTparse.h,v 1.61 2013/06/23 21:12:13 tom Exp $ */ +/* $XTermId: VTparse.h,v 1.62 2013/08/19 00:39:54 tom Exp $ */ /* - * Copyright 2002-2011,2012 by Thomas E. Dickey + * Copyright 2002-2012,2013 by Thomas E. Dickey * * All Rights Reserved * @@ -106,6 +106,7 @@ extern Const PARSE_T vt52_ignore_table[]; #if OPT_WIDE_CHARS extern Const PARSE_T esc_pct_table[]; +extern Const PARSE_T scs_pct_table[]; #endif /* @@ -278,5 +279,7 @@ extern Const PARSE_T esc_pct_table[]; #define CASE_ANSI_SC 156 #define CASE_ANSI_RC 157 #define CASE_ESC_COLON 158 +#define CASE_SCS_PERCENT 159 +#define CASE_GSETS_PERCENT 160 #endif /* included_VTparse_h */ diff --git a/button.c b/button.c index 79ec8bd..a4b28a1 100644 --- a/button.c +++ b/button.c @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.458 2013/07/01 00:50:20 tom Exp $ */ +/* $XTermId: button.c,v 1.464 2013/09/10 17:27:38 tom Exp $ */ /* * Copyright 1999-2012,2013 by Thomas E. Dickey @@ -147,24 +147,24 @@ static Time lastButton3DoubleDownTime = 0; static CELL lastButton3; /* At the release time */ #endif /* OPT_READLINE */ -static Char *SaveText(TScreen * screen, int row, int scol, int ecol, - Char * lp, int *eol); -static int Length(TScreen * screen, int row, int scol, int ecol); -static void ComputeSelect(XtermWidget xw, CELL * startc, CELL * endc, Bool extend); +static Char *SaveText(TScreen *screen, int row, int scol, int ecol, + Char *lp, int *eol); +static int Length(TScreen *screen, int row, int scol, int ecol); +static void ComputeSelect(XtermWidget xw, CELL *startc, CELL *endc, Bool extend); static void EditorButton(XtermWidget xw, XButtonEvent * event); -static void EndExtend(XtermWidget w, XEvent * event, String * params, Cardinal +static void EndExtend(XtermWidget w, XEvent * event, String *params, Cardinal num_params, Bool use_cursor_loc); -static void ExtendExtend(XtermWidget xw, const CELL * cell); -static void PointToCELL(TScreen * screen, int y, int x, CELL * cell); -static void ReHiliteText(XtermWidget xw, CELL * first, CELL * last); -static void SaltTextAway(XtermWidget xw, CELL * cellc, CELL * cell); -static void SelectSet(XtermWidget xw, XEvent * event, String * params, Cardinal num_params); +static void ExtendExtend(XtermWidget xw, const CELL *cell); +static void PointToCELL(TScreen *screen, int y, int x, CELL *cell); +static void ReHiliteText(XtermWidget xw, CELL *first, CELL *last); +static void SaltTextAway(XtermWidget xw, CELL *cellc, CELL *cell); +static void SelectSet(XtermWidget xw, XEvent * event, String *params, Cardinal num_params); static void SelectionReceived PROTO_XT_SEL_CB_ARGS; -static void StartSelect(XtermWidget xw, const CELL * cell); +static void StartSelect(XtermWidget xw, const CELL *cell); static void TrackDown(XtermWidget xw, XButtonEvent * event); -static void TrackText(XtermWidget xw, const CELL * first, const CELL * last); -static void _OwnSelection(XtermWidget xw, String * selections, Cardinal count); -static void do_select_end(XtermWidget xw, XEvent * event, String * params, +static void TrackText(XtermWidget xw, const CELL *first, const CELL *last); +static void _OwnSelection(XtermWidget xw, String *selections, Cardinal count); +static void do_select_end(XtermWidget xw, XEvent * event, String *params, Cardinal *num_params, Bool use_cursor_loc); #define MOUSE_LIMIT (255 - 32) @@ -174,7 +174,7 @@ static void do_select_end(XtermWidget xw, XEvent * event, String * params, #define EXT_MOUSE_START (127 - 32) static int -MouseLimit(TScreen * screen) +MouseLimit(TScreen *screen) { int mouse_limit; @@ -194,7 +194,7 @@ MouseLimit(TScreen * screen) } static unsigned -EmitMousePosition(TScreen * screen, Char line[], unsigned count, int value) +EmitMousePosition(TScreen *screen, Char line[], unsigned count, int value) { int mouse_limit = MouseLimit(screen); @@ -237,7 +237,7 @@ EmitMousePosition(TScreen * screen, Char line[], unsigned count, int value) } static unsigned -EmitMousePositionSeparator(TScreen * screen, Char line[], unsigned count) +EmitMousePositionSeparator(TScreen *screen, Char line[], unsigned count) { switch (screen->extend_coords) { case SET_SGR_EXT_MODE_MOUSE: @@ -726,7 +726,7 @@ CheckLocatorPosition(XtermWidget xw, XButtonEvent * event) #if OPT_READLINE static int -isClick1_clean(TScreen * screen, XButtonEvent * event) +isClick1_clean(TScreen *screen, XButtonEvent * event) { int delta; @@ -755,7 +755,7 @@ isClick1_clean(TScreen * screen, XButtonEvent * event) } static int -isDoubleClick3(TScreen * screen, XButtonEvent * event) +isDoubleClick3(TScreen *screen, XButtonEvent * event) { int delta; @@ -794,7 +794,7 @@ isDoubleClick3(TScreen * screen, XButtonEvent * event) } static int -CheckSecondPress3(TScreen * screen, XEvent * event) +CheckSecondPress3(TScreen *screen, XEvent * event) { int delta; @@ -833,7 +833,7 @@ CheckSecondPress3(TScreen * screen, XEvent * event) } static int -rowOnCurrentLine(TScreen * screen, +rowOnCurrentLine(TScreen *screen, int line, int *deltap) /* must be XButtonEvent */ { @@ -863,13 +863,13 @@ rowOnCurrentLine(TScreen * screen, } static int -eventRow(TScreen * screen, XEvent * event) /* must be XButtonEvent */ +eventRow(TScreen *screen, XEvent * event) /* must be XButtonEvent */ { return (event->xbutton.y - screen->border) / FontHeight(screen); } static int -eventColBetween(TScreen * screen, XEvent * event) /* must be XButtonEvent */ +eventColBetween(TScreen *screen, XEvent * event) /* must be XButtonEvent */ { /* Correct by half a width - we are acting on a boundary, not on a cell. */ return ((event->xbutton.x - OriginX(screen) + (FontWidth(screen) - 1) / 2) @@ -877,7 +877,7 @@ eventColBetween(TScreen * screen, XEvent * event) /* must be XButtonEvent */ } static int -ReadLineMovePoint(TScreen * screen, int col, int ldelta) +ReadLineMovePoint(TScreen *screen, int col, int ldelta) { Char line[6]; unsigned count = 0; @@ -900,7 +900,7 @@ ReadLineMovePoint(TScreen * screen, int col, int ldelta) } static int -ReadLineDelete(TScreen * screen, CELL * cell1, CELL * cell2) +ReadLineDelete(TScreen *screen, CELL *cell1, CELL *cell2) { int del; @@ -913,7 +913,7 @@ ReadLineDelete(TScreen * screen, CELL * cell1, CELL * cell2) } static void -readlineExtend(TScreen * screen, XEvent * event) +readlineExtend(TScreen *screen, XEvent * event) { int ldelta1, ldelta2; @@ -940,7 +940,7 @@ readlineExtend(TScreen * screen, XEvent * event) void DiredButton(Widget w, XEvent * event, /* must be XButtonEvent */ - String * params GCC_UNUSED, /* selections */ + String *params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { XtermWidget xw; @@ -971,7 +971,7 @@ DiredButton(Widget w, void ReadLineButton(Widget w, XEvent * event, /* must be XButtonEvent */ - String * params GCC_UNUSED, /* selections */ + String *params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { XtermWidget xw; @@ -1028,7 +1028,7 @@ ReadLineButton(Widget w, void ViButton(Widget w, XEvent * event, /* must be XButtonEvent */ - String * params GCC_UNUSED, /* selections */ + String *params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { XtermWidget xw; @@ -1067,7 +1067,7 @@ ViButton(Widget w, void HandleSelectExtend(Widget w, XEvent * event, /* must be XMotionEvent */ - String * params GCC_UNUSED, + String *params GCC_UNUSED, Cardinal *num_params GCC_UNUSED) { XtermWidget xw; @@ -1076,7 +1076,7 @@ HandleSelectExtend(Widget w, TScreen *screen = TScreenOf(xw); CELL cell; - TRACE(("HandleSelectExtend\n")); + TRACE(("HandleSelectExtend @%ld\n", event->xmotion.time)); screen->selection_time = event->xmotion.time; switch (screen->eventMode) { @@ -1103,7 +1103,7 @@ HandleSelectExtend(Widget w, void HandleKeyboardSelectExtend(Widget w, XEvent * event GCC_UNUSED, /* must be XButtonEvent */ - String * params GCC_UNUSED, + String *params GCC_UNUSED, Cardinal *num_params GCC_UNUSED) { XtermWidget xw; @@ -1119,13 +1119,14 @@ HandleKeyboardSelectExtend(Widget w, static void do_select_end(XtermWidget xw, XEvent * event, /* must be XButtonEvent */ - String * params, /* selections */ + String *params, /* selections */ Cardinal *num_params, Bool use_cursor_loc) { TScreen *screen = TScreenOf(xw); screen->selection_time = event->xbutton.time; + TRACE(("do_select_end @%ld\n", screen->selection_time)); switch (screen->eventMode) { case NORMAL: (void) SendMousePosition(xw, event); @@ -1143,7 +1144,7 @@ do_select_end(XtermWidget xw, void HandleSelectEnd(Widget w, XEvent * event, /* must be XButtonEvent */ - String * params, /* selections */ + String *params, /* selections */ Cardinal *num_params) { XtermWidget xw; @@ -1157,7 +1158,7 @@ HandleSelectEnd(Widget w, void HandleKeyboardSelectEnd(Widget w, XEvent * event, /* must be XButtonEvent */ - String * params, /* selections */ + String *params, /* selections */ Cardinal *num_params) { XtermWidget xw; @@ -1174,7 +1175,7 @@ HandleKeyboardSelectEnd(Widget w, void HandleCopySelection(Widget w, XEvent * event, - String * params, /* list of targets */ + String *params, /* list of targets */ Cardinal *num_params) { XtermWidget xw; @@ -1204,7 +1205,7 @@ DECtoASCII(unsigned ch) #if OPT_WIDE_CHARS static Cardinal -addXtermChar(Char ** buffer, Cardinal *used, Cardinal offset, unsigned value) +addXtermChar(Char **buffer, Cardinal *used, Cardinal offset, unsigned value) { if (offset + 1 >= *used) { *used = 1 + (2 * (offset + 1)); @@ -1221,7 +1222,7 @@ addXtermChar(Char ** buffer, Cardinal *used, Cardinal offset, unsigned value) * or ASCII/Latin-1 equivalents for special cases. */ static Char * -UTF8toLatin1(TScreen * screen, Char * s, unsigned long len, unsigned long *result) +UTF8toLatin1(TScreen *screen, Char *s, unsigned long len, unsigned long *result) { static Char *buffer; static Cardinal used; @@ -1449,7 +1450,7 @@ overrideTargets(Widget w, String value, Atom ** resultp) #if OPT_WIDE_CHARS static Atom * -allocUtf8Targets(Widget w, TScreen * screen) +allocUtf8Targets(Widget w, TScreen *screen) { Atom **resultp = &(screen->selection_targets_utf8); @@ -1485,7 +1486,7 @@ allocUtf8Targets(Widget w, TScreen * screen) #endif static Atom * -alloc8bitTargets(Widget w, TScreen * screen) +alloc8bitTargets(Widget w, TScreen *screen) { Atom **resultp = &(screen->selection_targets_8bit); @@ -1569,7 +1570,7 @@ UnmapSelections(XtermWidget xw) * call to XmuInternStrings(). */ static String * -MapSelections(XtermWidget xw, String * params, Cardinal num_params) +MapSelections(XtermWidget xw, String *params, Cardinal num_params) { String *result = params; @@ -1676,7 +1677,7 @@ static void xtermGetSelection(Widget w, Time ev_time, - String * params, /* selections in precedence order */ + String *params, /* selections in precedence order */ Cardinal num_params, Atom * targets) { @@ -1691,7 +1692,7 @@ xtermGetSelection(Widget w, if ((xw = getXtermWidget(w)) == 0) return; - TRACE(("xtermGetSelection num_params %d\n", num_params)); + TRACE(("xtermGetSelection num_params %d @%ld\n", num_params, ev_time)); params = MapSelections(xw, params, num_params); XmuInternStrings(XtDisplay(w), params, (Cardinal) 1, &selection); @@ -1765,7 +1766,7 @@ xtermGetSelection(Widget w, #if OPT_TRACE && OPT_WIDE_CHARS static void -GettingSelection(Display * dpy, Atom type, Char * line, unsigned long len) +GettingSelection(Display *dpy, Atom type, Char *line, unsigned long len) { Char *cp; char *name; @@ -1799,7 +1800,7 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ\ abcdefghijklmnopqrstuvwxyz\ 0123456789+/"; static void -base64_flush(TScreen * screen) +base64_flush(TScreen *screen) { Char x; switch (screen->base64_count) { @@ -1824,11 +1825,75 @@ base64_flush(TScreen * screen) } #endif /* OPT_PASTE64 */ +/* + * Translate ISO-8859-1 or UTF-8 data to NRCS. + */ static void -_qWriteSelectionData(XtermWidget xw, Char * lag, unsigned length) +ToNational(TScreen *screen, Char *buffer, unsigned *length) +{ + int gsetL = screen->gsets[screen->curgl]; + int gsetR = screen->gsets[screen->curgr]; + unsigned chr, out, gl, gr; + Char *p; + +#if OPT_WIDE_CHARS + if ((screen->utf8_nrc_mode | screen->utf8_mode) != uFalse) { + PtyData *data = TypeXtMallocX(PtyData, *length); + + memset(data, 0, sizeof(*data)); + data->next = data->buffer; + data->last = data->buffer + *length; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1vjmf5-0002ch...@vasks.debian.org