Update to xterm 331
This commit is contained in:
parent
364ef0736d
commit
6e8ae15186
@ -1,4 +1,4 @@
|
||||
MANIFEST for xterm-330, version xterm-330
|
||||
MANIFEST for xterm-331, version xterm-331
|
||||
--------------------------------------------------------------------------------
|
||||
MANIFEST this file
|
||||
256colres.h resource-definitions for 256-color mode
|
||||
@ -202,3 +202,4 @@ vttests/resize.pl translated resize.sh to perl since it is easy to
|
||||
vttests/resize.sh script to demonstrate resizing
|
||||
vttests/tcapquery.pl script to test tcap-query option
|
||||
vttests/title.sh test-script to show title of xterm in action
|
||||
vttests/true-color.pl test script for true color
|
||||
|
149
app/xterm/NEWS
149
app/xterm/NEWS
@ -1,38 +1,121 @@
|
||||
The NEWS file was generated from xterm.log.html, which serves as the changelog
|
||||
for xterm.
|
||||
--------------------------------------------------------------------------------
|
||||
Patch #330 - 2017/06/20
|
||||
Patch #331 - 2017/12/30
|
||||
|
||||
* updates for ReGIS (Ross Combs):
|
||||
+ remove redundant text command error check which broke T(B) and
|
||||
T(E).
|
||||
+ retain the loading alphabet number across multiple “L”
|
||||
commands.
|
||||
+ add S(T) delay handler.
|
||||
+ fix some color handling error messages.
|
||||
+ add stubbed-out macrograph handling.
|
||||
+ use fragment_remaining() and fragment_consumed() instead of
|
||||
manually checking position / length in various places.
|
||||
+ rename some local variables in string / extent / option
|
||||
parsing
|
||||
+ wrap some long lines.
|
||||
+ move macrograph command handling out of the top-level.
|
||||
* add a summary of the italic fonts loaded to -report-fonts option.
|
||||
* modify the font-lookup for italics to allow for “-i-” if no match
|
||||
is found with slant “-o-” (prompted by patch by Ben Wong).
|
||||
* change default values for mkSamplePass and mkSampleSize to reflect
|
||||
generally-improved locale support in various operating systems
|
||||
(FreeBSD #219800).
|
||||
* modify wcwidth.c to return -1 for non-Unicode values, and adjust a
|
||||
couple of blocks to better match assumptions about ambiguous-width
|
||||
characters in other implementations. Also modify wcwidth.c to
|
||||
support configurable soft-hyphen, so there is no drawback to using
|
||||
this version rather than a system wcwidth.
|
||||
* amend change made in patch #328 for cursor-visibility to handle
|
||||
case where an application is updating the reverse-video state
|
||||
(FreeBSD #219800).
|
||||
* update tables of combining and ambiguous-width characters in
|
||||
wcwidth.c based on Unicode 10.0.0.
|
||||
* build-fix for --enable-sixel-graphics without
|
||||
--enable-regis-graphics (reports by Sven Joachim, FreeBSD #219945).
|
||||
* add workaround for improper grayscale adjustments made in FreeType
|
||||
library, exposed by changes to rounding in 2.8.1, which shows up as
|
||||
a gap in line-drawing characters (Debian #880407).
|
||||
* improve a special case where a non-Unicode font's line-drawing
|
||||
characters were not used, when specifying it via the utf8Fonts
|
||||
resource, e.g.,
|
||||
|
||||
-fs 15 \
|
||||
-xrm '*VT100.font:12x24' \
|
||||
-xrm '*VT100.boldFont:12x24' \
|
||||
-xrm '*VT100.utf8Fonts.font: 12x24' \
|
||||
-xrm '*VT100.utf8Fonts.boldFont: 12x24' \
|
||||
|
||||
* replace constant 10msec delay for next X event with new resource
|
||||
nextEventDelay, and reduce that to 1msec to accommodate faster
|
||||
machines than used when -hold was implemented in 1999 (Debian
|
||||
#877628).
|
||||
* add scroll-to action, which simplifies binding a key to scroll to
|
||||
the beginning or end of the saved-lines (Debian #880120).
|
||||
* add building blocks for alternate screen and/or title-stack
|
||||
features in the terminfo file.
|
||||
* improve calculations for cell-data size.
|
||||
* change configure script to enable XHTML/SVG screen dumps by
|
||||
default.
|
||||
* change configure script to enable 256-colors by default.
|
||||
* update config.guess, config.sub
|
||||
* change configure script option for --with-man2html to use improved
|
||||
script by default.
|
||||
* add case for private mode 1044 in DECRQM, to report the
|
||||
keepClipboard resource setting and corresponding menu entry.
|
||||
* fix an inconsistency between private mode 12 (the AT&T 610 cursor
|
||||
blink) and DECSCUSR: the former relied on having the cursorBlink
|
||||
resource set initially to enable the escape sequence, while the
|
||||
latter does not.
|
||||
* add private modes 13 and 14, as well as resource cursorBlinkXOR to
|
||||
allow better control over the cursor-blinking state (discussion
|
||||
with Bram Moolenaar).
|
||||
* modify the html and svg screen dumps to support direct color
|
||||
* modify media copy (screen-printing) to support the same SGR codes
|
||||
as DECRQSS, including 88/256 indexed color as well as direct color.
|
||||
* improve options-parsing for query-status.pl script.
|
||||
* modify parsing of SGR direct-color control making color space
|
||||
identitier optional. The corresponding DECRQSS reply always returns
|
||||
an empty (default) field for the identifier.
|
||||
* add wide-attributes to DECRQSS reply for SGR.
|
||||
* add private mode 1046 to help with scripting applications.
|
||||
* correct expression used for readline-flags in DECRQM; to test the
|
||||
current flag rather than information stacked within the same
|
||||
variable.
|
||||
* correct typo in ctlseqs.ms reference to ISO-8613-6 (patch by Mike
|
||||
Frysinger).
|
||||
* fix lintian warning for test-package.
|
||||
* fix typo in DECRQSS for SGR 48, which printed the foreground value
|
||||
for colors past 15. Also use colon delimiter for codes 38/48 in
|
||||
response (report by Paul LeoNerd Evans).
|
||||
* improve workaround for Debian #542434 by using the font's maximum
|
||||
width when no ISO-8859-1 glyphs are provided (Debian #879936).
|
||||
* work around a special case of Xft's mismanagement of its cached
|
||||
data by adding a check before the -report-fonts option to ensure
|
||||
that it does not use an XftPattern which may have been freed during
|
||||
a call to XftFontOpenPattern.
|
||||
* improve manual page description of regex option for onXClicks
|
||||
resources (report by Lukas Mai).
|
||||
* add directColor resource.
|
||||
* additional manpage macro cleanup (Brandon Robinson, Debian
|
||||
#880551).
|
||||
* add optional support for direct-colors (adapted from patch by
|
||||
anonymous “Nibby Nebbulous”).
|
||||
* improve legacy/NRC character set mapping (patch by Thomas Wolff):
|
||||
+ enable alternate NRC set designators for French and French
|
||||
Canadian, ‘9’ and ‘f’ respectively, as documented in ctlseqs.
|
||||
(‘9’ is documented for VT510, ‘f’ is a Kermit feature).
|
||||
+ correct the Unicode value in the DEC Technical table to show
|
||||
capital delta.
|
||||
+ referring to
|
||||
|
||||
http://vt100.net/docs/vt220-rm/table2-3b.html
|
||||
http://vt100.net/docs/vt320-uu/appendixe.html
|
||||
add entries for the DEC Supplemental Graphics table to display
|
||||
0x28/0xa8 as ¤ and 0x5d/0xdd as Ÿ.
|
||||
+ referring to
|
||||
|
||||
http://www.vt100.net/charsets/technical.html
|
||||
alter the Unicode values used for 0x2b through 0x2c to use
|
||||
curly braces to work with the “middle” parts displayed with
|
||||
0x2f and 0x30.
|
||||
+ modify the VT220 “Supplemental” table, giving a hint that it
|
||||
was probably meant to be “Supplemental Graphics” and is the
|
||||
same as VT320's table.
|
||||
* quiet a few font-warnings when a derived fontname cannot be opened,
|
||||
overlooked in refactoring of font resources in patch #328
|
||||
(initially reported on Cygwin mailing list, with followup).
|
||||
* correct error response for DECRQSS broken in cleanup of Coverity
|
||||
reports in patch #288 (reports by Bram Moolenaar and IWAMOTO
|
||||
Kouichi).
|
||||
* improve DECRPM responses by returning mode not recognized for modes
|
||||
which may not be settable due to the selected decTerminalID
|
||||
resource (report by IWAMOTO Kouichi).
|
||||
* correct logic for print-immediate action, and enable corresponding
|
||||
menu entry (patch by Lauri Tirkkonen).
|
||||
* add configure option --with-pcre2 (patch by David Michael).
|
||||
* fix a misspelled subsection title in ctlseqs.ms and add a note
|
||||
regarding blink which was rendered as bold in X11R6. Blinking text
|
||||
was implemented in Patch #60.
|
||||
* fix typos in xterm.man (patches by Sven Joachim, Larry Hynes).
|
||||
* fix typography in xterm.man (patch by Bjarni Ingi Gislason, Debian
|
||||
#869248).
|
||||
* fix typo in INSTALL (Larry Hynes).
|
||||
* add xterm-direct terminal description based on changes introduced
|
||||
in patch #277, and relying upon ncurses RGB extension.
|
||||
* modify xterm-new terminal description to use ECMA-48 REP,
|
||||
reflecting its use in xterm since patch #32 (1996).
|
||||
* clarify comment in ctlseqs.ms regarding blink: it has been part of
|
||||
xterm since patch #60 (1998).
|
||||
* update ftp URLs in documentation.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: VTPrsTbl.c,v 1.81 2015/02/16 01:51:51 tom Exp $ */
|
||||
/* $XTermId: VTPrsTbl.c,v 1.82 2017/11/07 23:03:12 Thomas.Wolff Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2014,2015 by Thomas E. Dickey
|
||||
* Copyright 1999-2015,2017 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -6000,7 +6000,7 @@ CASE_GSETS,
|
||||
CASE_GSETS,
|
||||
/* 8 9 : ; */
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GSETS,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
/* < = > ? */
|
||||
@ -6056,7 +6056,7 @@ CASE_GROUND_STATE,
|
||||
/* d e f g */
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GSETS,
|
||||
CASE_GROUND_STATE,
|
||||
/* h i j k */
|
||||
CASE_GROUND_STATE,
|
||||
@ -6160,7 +6160,7 @@ CASE_GSETS,
|
||||
CASE_GSETS,
|
||||
/* cedilla onesuperior masculine guillemotright */
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GSETS,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
/* onequarter onehalf threequarters questiondown */
|
||||
@ -6216,7 +6216,7 @@ CASE_GROUND_STATE,
|
||||
/* adiaeresis aring ae ccedilla */
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GSETS,
|
||||
CASE_GROUND_STATE,
|
||||
/* egrave eacute ecircumflex ediaeresis */
|
||||
CASE_GROUND_STATE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: button.c,v 1.524 2017/05/30 08:58:29 tom Exp $ */
|
||||
/* $XTermId: button.c,v 1.526 2017/12/01 00:47:35 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -79,6 +79,9 @@ button.c Handles button events in the terminal emulator.
|
||||
#include <xstrings.h>
|
||||
|
||||
#if OPT_SELECT_REGEX
|
||||
#ifdef HAVE_PCRE2POSIX_H
|
||||
#include <pcre2posix.h>
|
||||
#else
|
||||
#ifdef HAVE_PCREPOSIX_H
|
||||
#include <pcreposix.h>
|
||||
#else /* POSIX regex.h */
|
||||
@ -86,6 +89,7 @@ button.c Handles button events in the terminal emulator.
|
||||
#include <regex.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
#include <ctype.h>
|
||||
@ -5142,7 +5146,7 @@ formatVideoAttrs(XtermWidget xw, char *buffer, CELL *cell)
|
||||
}
|
||||
#if OPT_ISO_COLORS
|
||||
if (attribs & FG_COLOR) {
|
||||
unsigned fg = extract_fg(xw, ld->color[cell->col], attribs);
|
||||
Pixel fg = extract_fg(xw, ld->color[cell->col], attribs);
|
||||
if (fg < 8) {
|
||||
fg += 30;
|
||||
} else if (fg < 16) {
|
||||
@ -5151,11 +5155,11 @@ formatVideoAttrs(XtermWidget xw, char *buffer, CELL *cell)
|
||||
buffer += sprintf(buffer, "%s38;5", delim);
|
||||
delim = ";";
|
||||
}
|
||||
buffer += sprintf(buffer, "%s%u", delim, fg);
|
||||
buffer += sprintf(buffer, "%s%lu", delim, fg);
|
||||
delim = ";";
|
||||
}
|
||||
if (attribs & BG_COLOR) {
|
||||
unsigned bg = extract_bg(xw, ld->color[cell->col], attribs);
|
||||
Pixel bg = extract_bg(xw, ld->color[cell->col], attribs);
|
||||
if (bg < 8) {
|
||||
bg += 40;
|
||||
} else if (bg < 16) {
|
||||
@ -5164,7 +5168,7 @@ formatVideoAttrs(XtermWidget xw, char *buffer, CELL *cell)
|
||||
buffer += sprintf(buffer, "%s48;5", delim);
|
||||
delim = ";";
|
||||
}
|
||||
(void) sprintf(buffer, "%s%u", delim, bg);
|
||||
(void) sprintf(buffer, "%s%lu", delim, bg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: charproc.c,v 1.1492 2017/06/19 08:34:54 tom Exp $ */
|
||||
/* $XTermId: charproc.c,v 1.1517 2017/12/28 18:43:58 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -168,12 +168,14 @@ static void restoremodes(XtermWidget /* xw */ );
|
||||
static void savemodes(XtermWidget /* xw */ );
|
||||
static void window_ops(XtermWidget /* xw */ );
|
||||
|
||||
#define DoStartBlinking(s) ((s)->cursor_blink ^ (s)->cursor_blink_esc)
|
||||
|
||||
#if OPT_BLINK_CURS || OPT_BLINK_TEXT
|
||||
#define UpdateCursorBlink(screen) SetCursorBlink(screen, screen->cursor_blink)
|
||||
#define SettableCursorBlink(screen) \
|
||||
(((screen)->cursor_blink != cbAlways) && \
|
||||
((screen)->cursor_blink != cbNever))
|
||||
#define UpdateCursorBlink(screen) \
|
||||
SetCursorBlink(screen, screen->cursor_blink)
|
||||
static void SetCursorBlink(TScreen * /* screen */ ,
|
||||
Bool /* enable */ );
|
||||
BlinkOps /* enable */ );
|
||||
static void HandleBlinking(XtPointer /* closure */ ,
|
||||
XtIntervalId * /* id */ );
|
||||
static void StartBlinking(TScreen * /* screen */ );
|
||||
@ -260,6 +262,7 @@ static XtActionsRec actionsList[] = {
|
||||
{ "redraw", HandleRedraw },
|
||||
{ "scroll-back", HandleScrollBack },
|
||||
{ "scroll-forw", HandleScrollForward },
|
||||
{ "scroll-to", HandleScrollTo },
|
||||
{ "secure", HandleSecure },
|
||||
{ "select-cursor-end", HandleKeyboardSelectEnd },
|
||||
{ "select-cursor-extend", HandleKeyboardSelectExtend },
|
||||
@ -491,6 +494,7 @@ static XtResource xterm_resources[] =
|
||||
Ires(XtNprinterControlMode, XtCPrinterControlMode,
|
||||
SPS.printer_controlmode, 0),
|
||||
Ires(XtNtitleModes, XtCTitleModes, screen.title_modes, DEF_TITLE_MODES),
|
||||
Ires(XtNnextEventDelay, XtCNextEventDelay, screen.nextEventDelay, 1),
|
||||
Ires(XtNvisualBellDelay, XtCVisualBellDelay, screen.visualBellDelay, 100),
|
||||
Ires(XtNsaveLines, XtCSaveLines, screen.savelines, SAVELINES),
|
||||
Ires(XtNscrollBarBorder, XtCScrollBarBorder, screen.scrollBarBorder, 1),
|
||||
@ -556,7 +560,8 @@ static XtResource xterm_resources[] =
|
||||
#endif /* NO_ACTIVE_ICON */
|
||||
|
||||
#if OPT_BLINK_CURS
|
||||
Bres(XtNcursorBlink, XtCCursorBlink, screen.cursor_blink, False),
|
||||
Bres(XtNcursorBlinkXOR, XtCCursorBlinkXOR, screen.cursor_blink_xor, True),
|
||||
Sres(XtNcursorBlink, XtCCursorBlink, screen.cursor_blink_s, "false"),
|
||||
#endif
|
||||
Bres(XtNcursorUnderLine, XtCCursorUnderLine, screen.cursor_underline, False),
|
||||
|
||||
@ -626,6 +631,9 @@ static XtResource xterm_resources[] =
|
||||
#if OPT_WIDE_ATTRS
|
||||
Bres(XtNcolorITMode, XtCColorAttrMode, screen.colorITMode, False),
|
||||
#endif
|
||||
#if OPT_DIRECT_COLOR
|
||||
Bres(XtNdirectColor, XtCDirectColor, screen.direct_color, True),
|
||||
#endif
|
||||
|
||||
COLOR_RES("0", screen.Acolors[COLOR_0], DFT_COLOR("black")),
|
||||
COLOR_RES("1", screen.Acolors[COLOR_1], DFT_COLOR("red3")),
|
||||
@ -889,6 +897,7 @@ xtermAddInput(Widget w)
|
||||
{ "string", HandleStringEvent },
|
||||
{ "scroll-back", HandleScrollBack },
|
||||
{ "scroll-forw", HandleScrollForward },
|
||||
{ "scroll-to", HandleScrollTo },
|
||||
{ "select-cursor-end", HandleKeyboardSelectEnd },
|
||||
{ "select-cursor-extend", HandleKeyboardSelectExtend },
|
||||
{ "select-cursor-start", HandleKeyboardSelectStart },
|
||||
@ -990,7 +999,7 @@ SGR_Foreground(XtermWidget xw, int color)
|
||||
} else {
|
||||
UIntClr(xw->flags, FG_COLOR);
|
||||
}
|
||||
fg = getXtermForeground(xw, xw->flags, color);
|
||||
fg = getXtermFG(xw, xw->flags, color);
|
||||
xw->cur_foreground = color;
|
||||
|
||||
setCgsFore(xw, WhichVWin(screen), gcNorm, fg);
|
||||
@ -1035,7 +1044,7 @@ SGR_Background(XtermWidget xw, int color)
|
||||
} else {
|
||||
UIntClr(xw->flags, BG_COLOR);
|
||||
}
|
||||
bg = getXtermBackground(xw, xw->flags, color);
|
||||
bg = getXtermBG(xw, xw->flags, color);
|
||||
xw->cur_background = color;
|
||||
|
||||
setCgsBack(xw, WhichVWin(screen), gcNorm, bg);
|
||||
@ -1065,7 +1074,7 @@ setExtendedFG(XtermWidget xw)
|
||||
*/
|
||||
#if OPT_PC_COLORS /* XXXJTL should be settable at runtime (resource or OSC?) */
|
||||
if (TScreenOf(xw)->boldColors
|
||||
&& (!xw->sgr_extended)
|
||||
&& (!hasDirectFG(xw->flags))
|
||||
&& (fg >= 0)
|
||||
&& (fg < 8)
|
||||
&& (xw->flags & BOLD))
|
||||
@ -1096,7 +1105,7 @@ static void
|
||||
reset_SGR_Foreground(XtermWidget xw)
|
||||
{
|
||||
xw->sgr_foreground = -1;
|
||||
xw->sgr_extended = False;
|
||||
clrDirectFG(xw->flags);
|
||||
setExtendedFG(xw);
|
||||
}
|
||||
|
||||
@ -1104,6 +1113,7 @@ static void
|
||||
reset_SGR_Background(XtermWidget xw)
|
||||
{
|
||||
xw->sgr_background = -1;
|
||||
clrDirectBG(xw->flags);
|
||||
setExtendedBG(xw);
|
||||
}
|
||||
|
||||
@ -1657,7 +1667,7 @@ param_has_subparams(int item)
|
||||
if (parms.has_subparams) {
|
||||
int n = subparam_index(item, 0);
|
||||
if (n >= 0 && parms.is_sub[n]) {
|
||||
while (n++ < nparam && parms.is_sub[n - 1] < parms.is_sub[n]) {
|
||||
while (++n < nparam && parms.is_sub[n - 1] < parms.is_sub[n]) {
|
||||
result++;
|
||||
}
|
||||
}
|
||||
@ -1666,7 +1676,7 @@ param_has_subparams(int item)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if OPT_256_COLORS || OPT_88_COLORS || OPT_ISO_COLORS
|
||||
#if OPT_DIRECT_COLOR || OPT_256_COLORS || OPT_88_COLORS || OPT_ISO_COLORS
|
||||
/*
|
||||
* Given an index into the parameter array, return the corresponding parameter
|
||||
* number (starting from zero).
|
||||
@ -1731,13 +1741,28 @@ get_subparam(int p, int s)
|
||||
* This function accepts either format (per request by Paul Leonerd Evans).
|
||||
* It also accepts
|
||||
* CSI 38 : 5 : 1 m
|
||||
* according to Lars' original assumption.
|
||||
* according to Lars' original assumption. While implementing that, I added
|
||||
* support for Konsole's interpretation of "CSI 38 : 2" as a 24-bit RGB value.
|
||||
* ISO-8613-6 documents that as "direct color".
|
||||
*
|
||||
* By the way - all of the parameters are decimal integers.
|
||||
* At the time in 2012, no one noticed (or commented) regarding ISO-8613-6's
|
||||
* quirk in the description of direct color: it mentions a color space
|
||||
* identifier parameter which should follow the "2" (as parameter 1). In the
|
||||
* same section, ISO-8613-6 mentions a parameter 6 which can be ignored, as
|
||||
* well as parameters 7 and 8. Like parameter 1, parameters 7 and 8 are not
|
||||
* defined clearly in the standard, and a close reading indicates they are
|
||||
* optional, saying they "may be used". This implementation ignores parameters
|
||||
* 6 (and above), and provides for the color space identifier by checking the
|
||||
* number of parameters:
|
||||
* 3 after "2" (no color space identifier)
|
||||
* 4 or more after "2" (color space identifier)
|
||||
*
|
||||
* By the way - all of the parameters are decimal integers, and missing
|
||||
* parameters represent a default value. ISO-8613-6 is clear about that.
|
||||
*/
|
||||
#define extended_colors_limit(n) ((n) == 5 ? 1 : ((n) == 2 ? 3 : 0))
|
||||
static Boolean
|
||||
parse_extended_colors(XtermWidget xw, int *colorp, int *itemp)
|
||||
parse_extended_colors(XtermWidget xw, int *colorp, int *itemp, Boolean *extended)
|
||||
{
|
||||
Boolean result = False;
|
||||
int item = *itemp;
|
||||
@ -1761,7 +1786,7 @@ parse_extended_colors(XtermWidget xw, int *colorp, int *itemp)
|
||||
need = extended_colors_limit(code);
|
||||
next = item + have;
|
||||
for (n = 0; n < need && n < 3; ++n) {
|
||||
values[n] = get_subparam(base, 2 + n);
|
||||
values[n] = get_subparam(base, 2 + n + (have > 4));
|
||||
}
|
||||
} else if (++item < nparam) {
|
||||
++base;
|
||||
@ -1772,7 +1797,7 @@ parse_extended_colors(XtermWidget xw, int *colorp, int *itemp)
|
||||
need = extended_colors_limit(code);
|
||||
next = base + have;
|
||||
for (n = 0; n < need && n < 3; ++n) {
|
||||
values[n] = get_subparam(base, 1 + n);
|
||||
values[n] = get_subparam(base, 1 + n + (have > 3));
|
||||
}
|
||||
} else {
|
||||
/* accept CSI 38 ; 5 ; 1 m */
|
||||
@ -1787,13 +1812,24 @@ parse_extended_colors(XtermWidget xw, int *colorp, int *itemp)
|
||||
}
|
||||
item = next;
|
||||
|
||||
*extended = False;
|
||||
switch (code) {
|
||||
case 2:
|
||||
/* direct color in rgb space */
|
||||
if ((values[0] >= 0 && values[0] < 256) &&
|
||||
(values[1] >= 0 && values[1] < 256) &&
|
||||
(values[2] >= 0 && values[2] < 256)) {
|
||||
#if OPT_DIRECT_COLOR
|
||||
if (TScreenOf(xw)->direct_color && xw->has_rgb) {
|
||||
*colorp = getDirectColor(xw, values[0], values[1], values[2]);
|
||||
result = True;
|
||||
*extended = True;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
*colorp = xtermClosestColor(xw, values[0], values[1], values[2]);
|
||||
result = okIndexedColor(*colorp);
|
||||
}
|
||||
} else {
|
||||
*colorp = -1;
|
||||
}
|
||||
@ -1801,13 +1837,13 @@ parse_extended_colors(XtermWidget xw, int *colorp, int *itemp)
|
||||
case 5:
|
||||
/* indexed color */
|
||||
*colorp = values[0];
|
||||
result = okIndexedColor(*colorp);
|
||||
break;
|
||||
default:
|
||||
*colorp = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
result = (*colorp >= 0 && *colorp < NUM_ANSI_COLORS);
|
||||
TRACE(("...resulting color %d/%d %s\n",
|
||||
*colorp, NUM_ANSI_COLORS,
|
||||
result ? "OK" : "ERR"));
|
||||
@ -1929,6 +1965,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
int laststate;
|
||||
int thischar = -1;
|
||||
XTermRect myRect;
|
||||
Boolean extended;
|
||||
|
||||
do {
|
||||
#if OPT_WIDE_CHARS
|
||||
@ -3013,7 +3050,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
case 37:
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
xw->sgr_foreground = (op - 30);
|
||||
xw->sgr_extended = False;
|
||||
clrDirectFG(xw->flags);
|
||||
setExtendedFG(xw);
|
||||
});
|
||||
break;
|
||||
@ -3022,9 +3059,10 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
* properly eat all the parameters for unsupported modes.
|
||||
*/
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (parse_extended_colors(xw, &value, &item)) {
|
||||
if (parse_extended_colors(xw, &value, &item,
|
||||
&extended)) {
|
||||
xw->sgr_foreground = value;
|
||||
xw->sgr_extended = True;
|
||||
setDirectFG(xw->flags, extended);
|
||||
setExtendedFG(xw);
|
||||
}
|
||||
});
|
||||
@ -3051,13 +3089,16 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
case 47:
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
xw->sgr_background = (op - 40);
|
||||
clrDirectBG(xw->flags);
|
||||
setExtendedBG(xw);
|
||||
});
|
||||
break;
|
||||
case 48:
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (parse_extended_colors(xw, &value, &item)) {
|
||||
if (parse_extended_colors(xw, &value, &item,
|
||||
&extended)) {
|
||||
xw->sgr_background = value;
|
||||
setDirectBG(xw->flags, extended);
|
||||
setExtendedBG(xw);
|
||||
}
|
||||
});
|
||||
@ -3084,7 +3125,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
case 97:
|
||||
if_OPT_AIX_COLORS(screen, {
|
||||
xw->sgr_foreground = (op - 90 + 8);
|
||||
xw->sgr_extended = False;
|
||||
clrDirectFG(xw->flags);
|
||||
setExtendedFG(xw);
|
||||
});
|
||||
break;
|
||||
@ -3111,6 +3152,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
case 107:
|
||||
if_OPT_AIX_COLORS(screen, {
|
||||
xw->sgr_background = (op - 100 + 8);
|
||||
clrDirectBG(xw->flags);
|
||||
setExtendedBG(xw);
|
||||
});
|
||||
break;
|
||||
@ -3438,7 +3480,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
TRACE(("CASE_DECSCUSR\n"));
|
||||
{
|
||||
Boolean change = True;
|
||||
Boolean blinks = screen->cursor_blink_esc;
|
||||
int blinks = screen->cursor_blink_esc;
|
||||
|
||||
HideCursor();
|
||||
|
||||
@ -4132,13 +4174,13 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
|
||||
case CASE_RQM:
|
||||
TRACE(("CASE_RQM\n"));
|
||||
do_rpm(xw, ParamPair(0));
|
||||
do_ansi_rqm(xw, ParamPair(0));
|
||||
ResetState(sp);
|
||||
break;
|
||||
|
||||
case CASE_DECRQM:
|
||||
TRACE(("CASE_DECRQM\n"));
|
||||
do_decrpm(xw, ParamPair(0));
|
||||
do_dec_rqm(xw, ParamPair(0));
|
||||
ResetState(sp);
|
||||
break;
|
||||
|
||||
@ -4175,10 +4217,6 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
case CASE_S8C1T:
|
||||
TRACE(("CASE_S8C1T\n"));
|
||||
if (screen->vtXX_level >= 2) {
|
||||
#if OPT_VT52_MODE
|
||||
if (screen->vtXX_level <= 1)
|
||||
break;
|
||||
#endif
|
||||
show_8bit_control(True);
|
||||
ResetState(sp);
|
||||
}
|
||||
@ -5299,10 +5337,29 @@ HandleStructNotify(Widget w GCC_UNUSED,
|
||||
#endif /* HANDLE_STRUCT_NOTIFY */
|
||||
|
||||
#if OPT_BLINK_CURS
|
||||
static void
|
||||
SetCursorBlink(TScreen *screen, Bool enable)
|
||||
static int
|
||||
DoStartBlinking(TScreen *screen)
|
||||
{
|
||||
screen->cursor_blink = (Boolean) enable;
|
||||
int actual = ((screen->cursor_blink == cbTrue ||
|
||||
screen->cursor_blink == cbAlways)
|
||||
? 1
|
||||
: 0);
|
||||
int wanted = screen->cursor_blink_esc ? 1 : 0;
|
||||
int result;
|
||||
if (screen->cursor_blink_xor) {
|
||||
result = actual ^ wanted;
|
||||
} else {
|
||||
result = actual | wanted;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
SetCursorBlink(TScreen *screen, BlinkOps enable)
|
||||
{
|
||||
if (SettableCursorBlink(screen)) {
|
||||
screen->cursor_blink = enable;
|
||||
}
|
||||
if (DoStartBlinking(screen)) {
|
||||
StartBlinking(screen);
|
||||
} else {
|
||||
@ -5319,7 +5376,11 @@ SetCursorBlink(TScreen *screen, Bool enable)
|
||||
void
|
||||
ToggleCursorBlink(TScreen *screen)
|
||||
{
|
||||
SetCursorBlink(screen, (Bool) (!(screen->cursor_blink)));
|
||||
if (screen->cursor_blink == cbTrue) {
|
||||
SetCursorBlink(screen, cbFalse);
|
||||
} else if (screen->cursor_blink == cbFalse) {
|
||||
SetCursorBlink(screen, cbTrue);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -5479,12 +5540,18 @@ dpmodes(XtermWidget xw, BitFunc func)
|
||||
break;
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
case srm_ATT610_BLINK: /* att610: Start/stop blinking cursor */
|
||||
if (screen->cursor_blink_res) {
|
||||
case srm_ATT610_BLINK: /* AT&T 610: Start/stop blinking cursor */
|
||||
if (SettableCursorBlink(screen)) {
|
||||
set_bool_mode(screen->cursor_blink_esc);
|
||||
UpdateCursorBlink(screen);
|
||||
}
|
||||
break;
|
||||
case srm_CURSOR_BLINK_OPS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
case srm_XOR_CURSOR_BLINKS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
#endif
|
||||
case srm_DECPFF: /* print form feed */
|
||||
set_bool_mode(PrinterOf(screen).printer_formfeed);
|
||||
@ -5724,7 +5791,16 @@ dpmodes(XtermWidget xw, BitFunc func)
|
||||
set_bool_mode(screen->keepClipboard);
|
||||
update_keepClipboard();
|
||||
break;
|
||||
case srm_TITE_INHIBIT:
|
||||
case srm_ALLOW_ALTBUF:
|
||||
if (IsSM()) {
|
||||
xw->misc.titeInhibit = False;
|
||||
} else if (!xw->misc.titeInhibit) {
|
||||
xw->misc.titeInhibit = True;
|
||||
FromAlternate(xw);
|
||||
}
|
||||
update_titeInhibit();
|
||||
break;
|
||||
case srm_SAVE_CURSOR:
|
||||
if (!xw->misc.titeInhibit) {
|
||||
if (IsSM())
|
||||
CursorSave(xw);
|
||||
@ -5858,11 +5934,17 @@ savemodes(XtermWidget xw)
|
||||
break;
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
case srm_ATT610_BLINK: /* att610: Start/stop blinking cursor */
|
||||
if (screen->cursor_blink_res) {
|
||||
case srm_ATT610_BLINK: /* AT&T 610: Start/stop blinking cursor */
|
||||
if (SettableCursorBlink(screen)) {
|
||||
DoSM(DP_CRS_BLINK, screen->cursor_blink_esc);
|
||||
}
|
||||
break;
|
||||
case srm_CURSOR_BLINK_OPS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
case srm_XOR_CURSOR_BLINKS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
#endif
|
||||
case srm_DECPFF: /* print form feed */
|
||||
DoSM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed);
|
||||
@ -5913,7 +5995,7 @@ savemodes(XtermWidget xw)
|
||||
case srm_OPT_ALTBUF:
|
||||
/* FALLTHRU */
|
||||
case srm_ALTBUF: /* alternate buffer */
|
||||
DoSM(DP_X_ALTSCRN, screen->whichBuf);
|
||||
DoSM(DP_X_ALTBUF, screen->whichBuf);
|
||||
break;
|
||||
case srm_DECNKM:
|
||||
DoSM(DP_DECKPAM, xw->keyboard.flags & MODE_DECKPAM);
|
||||
@ -6020,7 +6102,10 @@ savemodes(XtermWidget xw)
|
||||
case srm_LEGACY_FKEYS:
|
||||
DoSM(DP_KEYBOARD_TYPE, xw->keyboard.type);
|
||||
break;
|
||||
case srm_TITE_INHIBIT:
|
||||
case srm_ALLOW_ALTBUF:
|
||||
DoSM(DP_ALLOW_ALTBUF, xw->misc.titeInhibit);
|
||||
break;
|
||||
case srm_SAVE_CURSOR:
|
||||
if (!xw->misc.titeInhibit) {
|
||||
CursorSave(xw);
|
||||
}
|
||||
@ -6143,11 +6228,17 @@ restoremodes(XtermWidget xw)
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
case srm_ATT610_BLINK: /* Start/stop blinking cursor */
|
||||
if (screen->cursor_blink_res) {
|
||||
if (SettableCursorBlink(screen)) {
|
||||
DoRM(DP_CRS_BLINK, screen->cursor_blink_esc);
|
||||
UpdateCursorBlink(screen);
|
||||
}
|
||||
break;
|
||||
case srm_CURSOR_BLINK_OPS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
case srm_XOR_CURSOR_BLINKS:
|
||||
/* intentionally ignored (this is user-preference) */
|
||||
break;
|
||||
#endif
|
||||
case srm_DECPFF: /* print form feed */
|
||||
DoRM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed);
|
||||
@ -6219,12 +6310,12 @@ restoremodes(XtermWidget xw)
|
||||
/* FALLTHRU */
|
||||
case srm_ALTBUF: /* alternate buffer */
|
||||
if (!xw->misc.titeInhibit) {
|
||||
if (screen->save_modes[DP_X_ALTSCRN])
|
||||
if (screen->save_modes[DP_X_ALTBUF])
|
||||
ToAlternate(xw, False);
|
||||
else
|
||||
FromAlternate(xw);
|
||||
/* update_altscreen done by ToAlt and FromAlt */
|
||||
} else if (screen->save_modes[DP_X_ALTSCRN]) {
|
||||
} else if (screen->save_modes[DP_X_ALTBUF]) {
|
||||
do_ti_xtra_scroll(xw);
|
||||
}
|
||||
break;
|
||||
@ -6277,7 +6368,13 @@ restoremodes(XtermWidget xw)
|
||||
case srm_URXVT_EXT_MODE_MOUSE:
|
||||
DoRM(DP_X_EXT_MOUSE, screen->extend_coords);
|
||||
break;
|
||||
case srm_TITE_INHIBIT:
|
||||
case srm_ALLOW_ALTBUF:
|
||||
DoRM(DP_ALLOW_ALTBUF, xw->misc.titeInhibit);
|
||||
if (xw->misc.titeInhibit)
|
||||
FromAlternate(xw);
|
||||
update_titeInhibit();
|
||||
break;
|
||||
case srm_SAVE_CURSOR:
|
||||
if (!xw->misc.titeInhibit) {
|
||||
CursorRestore(xw);
|
||||
}
|
||||
@ -7708,6 +7805,18 @@ VTInitialize(Widget wrequest,
|
||||
#define DftBg(name) isDefaultBackground(Kolor(name))
|
||||
|
||||
#define DATA_END { NULL, -1 }
|
||||
|
||||
#if OPT_BLINK_CURS
|
||||
#define DATA(name) { #name, cb##name }
|
||||
static const FlagList tblBlinkOps[] =
|
||||
{
|
||||
DATA(Always)
|
||||
,DATA(Never)
|
||||
,DATA_END
|
||||
};
|
||||
#undef DATA
|
||||
#endif
|
||||
|
||||
#define DATA(name) { #name, ec##name }
|
||||
static const FlagList tblColorOps[] =
|
||||
{
|
||||
@ -7946,18 +8055,21 @@ VTInitialize(Widget wrequest,
|
||||
init_Bres(screen.move_sgr_ok);
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
init_Bres(screen.cursor_blink);
|
||||
init_Sres(screen.cursor_blink_s);
|
||||
wnew->screen.cursor_blink =
|
||||
extendedBoolean(wnew->screen.cursor_blink_s,
|
||||
tblBlinkOps, cbLAST);
|
||||
init_Bres(screen.cursor_blink_xor);
|
||||
init_Ires(screen.blink_on);
|
||||
init_Ires(screen.blink_off);
|
||||
screen->cursor_blink_res = screen->cursor_blink;
|
||||
#endif
|
||||
init_Bres(screen.cursor_underline);
|
||||
/* resources allow for underline or block, not (yet) bar */
|
||||
InitCursorShape(screen, TScreenOf(request));
|
||||
#if OPT_BLINK_CURS
|
||||
TRACE(("cursor_shape:%d blinks:%s\n",
|
||||
TRACE(("cursor_shape:%d blinks:%d\n",
|
||||
screen->cursor_shape,
|
||||
BtoS(screen->cursor_blink)));
|
||||
screen->cursor_blink));
|
||||
#endif
|
||||
#if OPT_BLINK_TEXT
|
||||
init_Ires(screen.blink_as_bold);
|
||||
@ -8020,7 +8132,11 @@ VTInitialize(Widget wrequest,
|
||||
screen->vtXX_level = (screen->terminal_id / 100);
|
||||
|
||||
init_Ires(screen.title_modes);
|
||||
wnew->screen.title_modes0 = wnew->screen.title_modes;
|
||||
screen->title_modes0 = screen->title_modes;
|
||||
|
||||
init_Ires(screen.nextEventDelay);
|
||||
if (screen->nextEventDelay <= 0)
|
||||
screen->nextEventDelay = 1;
|
||||
|
||||
init_Bres(screen.visualbell);
|
||||
init_Bres(screen.flash_line);
|
||||
@ -8323,6 +8439,9 @@ VTInitialize(Widget wrequest,
|
||||
#if OPT_WIDE_ATTRS
|
||||
init_Bres(screen.colorITMode);
|
||||
#endif
|
||||
#if OPT_DIRECT_COLOR
|
||||
init_Bres(screen.direct_color);
|
||||
#endif
|
||||
|
||||
#if OPT_COLOR_RES2
|
||||
TRACE(("...will fake resources for color%d to color%d\n",
|
||||
@ -8399,7 +8518,8 @@ VTInitialize(Widget wrequest,
|
||||
}
|
||||
wnew->sgr_foreground = -1;
|
||||
wnew->sgr_background = -1;
|
||||
wnew->sgr_extended = False;
|
||||
clrDirectFG(wnew->flags);
|
||||
clrDirectFG(wnew->flags);
|
||||
#endif /* OPT_ISO_COLORS */
|
||||
|
||||
/*
|
||||
@ -8909,6 +9029,8 @@ cleanupInputMethod(XtermWidget xw)
|
||||
TRACE(("freed screen->xim\n"));
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define cleanupInputMethod(xw) /* nothing */
|
||||
#endif
|
||||
|
||||
static void
|
||||
@ -8937,7 +9059,9 @@ VTDestroy(Widget w GCC_UNUSED)
|
||||
free(last->windowName);
|
||||
free(last);
|
||||
}
|
||||
#ifndef NO_ACTIVE_ICON
|
||||
TRACE_FREE_LEAK(xw->misc.active_icon_s);
|
||||
#endif
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE_FREE_LEAK(screen->cmap_data);
|
||||
for (n = 0; n < MAXCOLORS; n++) {
|
||||
@ -9024,6 +9148,13 @@ VTDestroy(Widget w GCC_UNUSED)
|
||||
}
|
||||
if (screen->renderDraw)
|
||||
XftDrawDestroy(screen->renderDraw);
|
||||
{
|
||||
ListXftFonts *p;
|
||||
while ((p = screen->list_xft_fonts) != 0) {
|
||||
screen->list_xft_fonts = p->next;
|
||||
free(p);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* free things allocated via init_Sres or Init_Sres2 */
|
||||
@ -9066,7 +9197,9 @@ VTDestroy(Widget w GCC_UNUSED)
|
||||
|
||||
#if OPT_RENDERFONT
|
||||
TRACE_FREE_LEAK(xw->misc.default_xft.f_n);
|
||||
#if OPT_WIDE_CHARS
|
||||
TRACE_FREE_LEAK(xw->misc.default_xft.f_w);
|
||||
#endif
|
||||
TRACE_FREE_LEAK(xw->misc.render_font_s);
|
||||
#endif
|
||||
|
||||
@ -10100,6 +10233,7 @@ VTSetValues(Widget cur,
|
||||
* Given a font-slot and information about selection/reverse, find the
|
||||
* corresponding cached-GC slot.
|
||||
*/
|
||||
#if OPT_WIDE_ATTRS
|
||||
static int
|
||||
reverseCgs(XtermWidget xw, unsigned attr_flags, Bool hilite, int font)
|
||||
{
|
||||
@ -10159,6 +10293,7 @@ reverseCgs(XtermWidget xw, unsigned attr_flags, Bool hilite, int font)
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define setGC(code) set_at = __LINE__, currentCgs = code
|
||||
|
||||
@ -10180,7 +10315,7 @@ ShowCursor(void)
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
IChar base;
|
||||
unsigned flags;
|
||||
CellColor fg_bg = 0;
|
||||
CellColor fg_bg = initCColor;
|
||||
GC currentGC;
|
||||
GC outlineGC;
|
||||
CgsEnum currentCgs = gcMAX;
|
||||
@ -10284,8 +10419,8 @@ ShowCursor(void)
|
||||
fg_bg = ld->color[cursor_col];
|
||||
});
|
||||
|
||||
fg_pix = getXtermForeground(xw, flags, (int) extract_fg(xw, fg_bg, flags));
|
||||
bg_pix = getXtermBackground(xw, flags, (int) extract_bg(xw, fg_bg, flags));
|
||||
fg_pix = getXtermFG(xw, flags, (int) extract_fg(xw, fg_bg, flags));
|
||||
bg_pix = getXtermBG(xw, flags, (int) extract_bg(xw, fg_bg, flags));
|
||||
|
||||
/*
|
||||
* If we happen to have the same foreground/background colors, choose
|
||||
@ -10570,7 +10705,7 @@ HideCursor(void)
|
||||
int x, y;
|
||||
IChar base;
|
||||
unsigned flags;
|
||||
CellColor fg_bg = 0;
|
||||
CellColor fg_bg;
|
||||
Bool in_selection;
|
||||
#if OPT_WIDE_CHARS
|
||||
int my_col = 0;
|
||||
@ -10640,7 +10775,7 @@ HideCursor(void)
|
||||
#endif
|
||||
#endif
|
||||
#if OPT_ISO_COLORS
|
||||
fg_bg = 0;
|
||||
fg_bg = initCColor;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -10922,9 +11057,9 @@ ReallyReset(XtermWidget xw, Bool full, Bool saved)
|
||||
screen->cursor_set = ON;
|
||||
InitCursorShape(screen, screen);
|
||||
#if OPT_BLINK_CURS
|
||||
TRACE(("cursor_shape:%d blinks:%s\n",
|
||||
TRACE(("cursor_shape:%d blinks:%d\n",
|
||||
screen->cursor_shape,
|
||||
BtoS(screen->cursor_blink)));
|
||||
screen->cursor_blink));
|
||||
#endif
|
||||
|
||||
/* reset scrolling region */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: charsets.c,v 1.67 2013/12/01 16:38:13 tom Exp $ */
|
||||
/* $XTermId: charsets.c,v 1.71 2017/11/08 01:39:21 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2011,2013 by Thomas E. Dickey
|
||||
* Copyright 1998-2013,2017 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -212,40 +212,11 @@
|
||||
* argument to be made that these mappings "use" UTF-8, even though there is
|
||||
* a hidden step in the terminal emulator which relies upon UTF-8.
|
||||
*/
|
||||
#define map_SCS_DEC_Supp(code,dft) \
|
||||
switch (code) { \
|
||||
XXX(0x24, 0x2e2e); \
|
||||
XXX(0x26, 0x2e2e); \
|
||||
XXX(0x2c, 0x2e2e); \
|
||||
XXX(0x2d, 0x2e2e); \
|
||||
XXX(0x2e, 0x2e2e); \
|
||||
XXX(0x2f, 0x2e2e); \
|
||||
XXX(0x34, 0x2e2e); \
|
||||
XXX(0x38, 0x2e2e); \
|
||||
XXX(0x3e, 0x2e2e); \
|
||||
UNI(0x47, 0x2426); \
|
||||
MAP(0x48, 0xc7); \
|
||||
MAP(0x49, 0xc8); \
|
||||
MAP(0x4a, 0xc9); \
|
||||
MAP(0x4b, 0xca); \
|
||||
MAP(0x4c, 0xcb); \
|
||||
MAP(0x4d, 0xcc); \
|
||||
MAP(0x4e, 0xcd); \
|
||||
MAP(0x4f, 0xce); \
|
||||
XXX(0x50, 0x2e2e); \
|
||||
UNI(0x57, 0x0152); \
|
||||
XXX(0x5e, 0x2e2e); \
|
||||
XXX(0x70, 0x2e2e); \
|
||||
UNI(0x77, 0x0153); \
|
||||
MAP(0x7d, 0xff); \
|
||||
XXX(0x7e, 0x2e2e); \
|
||||
default: dft; break; \
|
||||
}
|
||||
|
||||
#define map_SCS_DEC_Supp_Graphic(code,dft) \
|
||||
switch (code) { \
|
||||
XXX(0x24, 0x2e2e); \
|
||||
XXX(0x26, 0x2e2e); \
|
||||
MAP(0x28, 0xa4); \
|
||||
XXX(0x2c, 0x2e2e); \
|
||||
XXX(0x2d, 0x2e2e); \
|
||||
XXX(0x2e, 0x2e2e); \
|
||||
@ -255,6 +226,7 @@
|
||||
XXX(0x3e, 0x2e2e); \
|
||||
XXX(0x50, 0x2e2e); \
|
||||
UNI(0x57, 0x0152); \
|
||||
MAP(0x5d, 0x0178); \
|
||||
XXX(0x5e, 0x2e2e); \
|
||||
XXX(0x70, 0x2e2e); \
|
||||
UNI(0x77, 0x0153); \
|
||||
@ -278,10 +250,10 @@
|
||||
UNI(0x28, 0x23a3); /* LEFT SQUARE BRACKET LOWER CORNER Joins vertically to 02/06, 02/07. Doesn't join to its right. */ \
|
||||
UNI(0x29, 0x23a4); /* RIGHT SQUARE BRACKET UPPER CORNER Joins vertically to 026, 02a. Doesn't join to its left. */ \
|
||||
UNI(0x2a, 0x23a6); /* RIGHT SQUARE BRACKET LOWER CORNER Joins vertically to 026, 029. Doesn't join to its left. */ \
|
||||
UNI(0x2b, 0x239b); /* LEFT PARENTHESIS UPPER HOOK Joins vertically to 026, 02c, 02/15. Doesn't join to its right. */ \
|
||||
UNI(0x2c, 0x239d); /* LEFT PARENTHESIS LOWER HOOK Joins vertically to 026, 02b, 02/15. Doesn't join to its right. */ \
|
||||
UNI(0x2d, 0x239e); /* RIGHT PARENTHESIS UPPER HOOK Joins vertically to 026, 02e, 03/00. Doesn't join to its left. */ \
|
||||
UNI(0x2e, 0x23a0); /* RIGHT PARENTHESIS LOWER HOOK Joins vertically to 026, 02d, 03/00. Doesn't join to its left. */ \
|
||||
UNI(0x2b, 0x23a7); /* LEFT CURLY BRACKET UPPER HOOK Joins vertically to 026, 02c, 02/15. Doesn't join to its right. */ \
|
||||
UNI(0x2c, 0x23a9); /* LEFT CURLY BRACKET LOWER HOOK Joins vertically to 026, 02b, 02/15. Doesn't join to its right. */ \
|
||||
UNI(0x2d, 0x23ab); /* RIGHT CURLY BRACKET UPPER HOOK Joins vertically to 026, 02e, 03/00. Doesn't join to its left. */ \
|
||||
UNI(0x2e, 0x23ad); /* RIGHT CURLY BRACKET LOWER HOOK Joins vertically to 026, 02d, 03/00. Doesn't join to its left. */ \
|
||||
UNI(0x2f, 0x23a8); /* LEFT CURLY BRACKET MIDDLE PIECE Joins vertically to 026, 02b, 02c. */ \
|
||||
UNI(0x30, 0x23ac); /* RIGHT CURLY BRACKET MIDDLE PIECE Joins vertically to 02/06, 02d, 02e. */ \
|
||||
XXX(0x31, 0x2426); /* Top Left Sigma. Joins to right with 02/03, 03/05. Joins diagonally below right with 03/03, 03/07. */ \
|
||||
@ -303,7 +275,7 @@
|
||||
UNI(0x41, 0x221d); /* PROPORTIONAL TO */ \
|
||||
UNI(0x42, 0x221e); /* INFINITY */ \
|
||||
UNI(0x43, 0x00f7); /* DIVISION SIGN */ \
|
||||
UNI(0x44, 0x039a); /* GREEK CAPITAL DELTA */ \
|
||||
UNI(0x44, 0x0394); /* GREEK CAPITAL DELTA */ \
|
||||
UNI(0x45, 0x2207); /* NABLA */ \
|
||||
UNI(0x46, 0x03a6); /* GREEK CAPITAL LETTER PHI */ \
|
||||
UNI(0x47, 0x0393); /* GREEK CAPITAL LETTER GAMMA */ \
|
||||
@ -408,7 +380,7 @@ xtermCharSetIn(TScreen *screen, unsigned code, int charset)
|
||||
break;
|
||||
|
||||
case nrc_DEC_Supp:
|
||||
map_SCS_DEC_Supp(code, code &= 0x7f);
|
||||
map_SCS_DEC_Supp_Graphic(code, code &= 0x7f);
|
||||
break;
|
||||
|
||||
case nrc_DEC_Supp_Graphic:
|
||||
@ -587,7 +559,7 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, int leftset)
|
||||
break;
|
||||
|
||||
case nrc_DEC_Supp:
|
||||
map_SCS_DEC_Supp(chr = seven, chr |= 0x80);
|
||||
map_SCS_DEC_Supp_Graphic(chr = seven, chr |= 0x80);
|
||||
break;
|
||||
|
||||
case nrc_DEC_Supp_Graphic:
|
||||
|
@ -1,4 +1,4 @@
|
||||
dnl $XTermId: configure.in,v 1.345 2017/05/31 08:38:47 tom Exp $
|
||||
dnl $XTermId: configure.in,v 1.353 2017/12/25 12:36:41 tom Exp $
|
||||
dnl
|
||||
dnl -----------------------------------------------------------------------------
|
||||
dnl this file is part of xterm
|
||||
@ -439,27 +439,42 @@ if test "$enable_ansi_color" = yes ; then
|
||||
test "$enable_16_color" = no && AC_DEFINE(OPT_AIX_COLORS,0,[Define to 0 to disable 16-color support])
|
||||
|
||||
AC_MSG_CHECKING(if you want 256 colors)
|
||||
CF_ARG_ENABLE(256-color,
|
||||
[ --enable-256-color enable 256-color support],
|
||||
[enable_256_color=yes],
|
||||
[enable_256_color=no])
|
||||
CF_ARG_DISABLE(256-color,
|
||||
[ --disable-256-color disable 256-color support],
|
||||
[enable_256_color=no],
|
||||
[enable_256_color=yes])
|
||||
AC_MSG_RESULT($enable_256_color)
|
||||
|
||||
if test "$enable_256_color" = yes ; then
|
||||
|
||||
CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
|
||||
EXTRAHDRS="$EXTRAHDRS 256colres.h"
|
||||
AC_DEFINE(OPT_256_COLORS,1,[Define to 1 to enable 256-color support])
|
||||
|
||||
AC_MSG_CHECKING(if you want direct-color support)
|
||||
CF_ARG_DISABLE(direct-color,
|
||||
[ --disable-direct-color disable direct-color support],
|
||||
[enable_direct_color=no],
|
||||
[enable_direct_color=yes])
|
||||
AC_MSG_RESULT($enable_direct_color)
|
||||
if test "$enable_direct_color" = yes ; then
|
||||
AC_DEFINE(OPT_DIRECT_COLOR,1,[Define to 1 to enable direct-color support])
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
AC_MSG_CHECKING(if you want 88 colors)
|
||||
CF_ARG_ENABLE(88-color,
|
||||
[ --enable-88-color enable 88-color support],
|
||||
[enable_88_color=yes],
|
||||
[enable_88_color=no])
|
||||
CF_ARG_DISABLE(88-color,
|
||||
[ --disable-88-color disable 88-color support],
|
||||
[enable_88_color=no],
|
||||
[enable_88_color=yes])
|
||||
AC_MSG_RESULT($enable_88_color)
|
||||
if test "$enable_88_color" = yes ; then
|
||||
CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
|
||||
EXTRAHDRS="$EXTRAHDRS 88colres.h"
|
||||
AC_DEFINE(OPT_88_COLORS,1,[Define to 1 to enable 88-color support])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
@ -774,11 +789,14 @@ CF_ARG_DISABLE(regex,
|
||||
[enable_regex=yes])
|
||||
AC_MSG_RESULT($enable_regex)
|
||||
if test "$enable_regex" = yes ; then
|
||||
CF_WITH_PCRE2
|
||||
if test "$with_pcre2" = no ; then
|
||||
CF_WITH_PCRE
|
||||
if test "$with_pcre" = no ; then
|
||||
CF_REGEX
|
||||
if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
|
||||
AC_MSG_ERROR(Only POSIX or PCRE regular expressions are supported)
|
||||
AC_MSG_ERROR([Only POSIX, PCRE, or PCRE2 regular expressions are supported])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(OPT_SELECT_REGEX,1,[Define to 1 to enable regular-expression selections])
|
||||
@ -873,6 +891,11 @@ CF_ARG_DISABLE(wide-attrs,
|
||||
[enable_wattr=yes])
|
||||
AC_MSG_RESULT($enable_wattr)
|
||||
|
||||
if test $enable_wattr = no && test $enable_direct_color = yes ; then
|
||||
AC_MSG_WARN(overriding wide-attributes to support direct color)
|
||||
enable_wattr=yes
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if you want wide-character support)
|
||||
CF_ARG_DISABLE(wide-chars,
|
||||
[ --disable-wide-chars disable wide-character support],
|
||||
@ -943,10 +966,10 @@ if test "$enable_dec_locator" = yes ; then
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if you want XHTML and SVG screen dump support)
|
||||
CF_ARG_ENABLE(screen-dumps,
|
||||
[ --enable-screen-dumps enable XHTML and SVG screen dumps],
|
||||
[enable_screen_dumps=yes],
|
||||
[enable_screen_dumps=no])
|
||||
CF_ARG_DISABLE(screen-dumps,
|
||||
[ --disable-screen-dumps disable XHTML and SVG screen dumps],
|
||||
[enable_screen_dumps=no],
|
||||
[enable_screen_dumps=yes])
|
||||
AC_MSG_RESULT($enable_screen_dumps)
|
||||
if test "$enable_screen_dumps" = yes ; then
|
||||
AC_DEFINE(OPT_SCREEN_DUMPS,1,[Define to 1 to enable XHTML and SVG screen dump support])
|
||||
@ -1054,7 +1077,7 @@ AC_MSG_RESULT($with_warnings)
|
||||
if test "$with_warnings" = yes
|
||||
then
|
||||
CF_GCC_ATTRIBUTES
|
||||
CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
|
||||
CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\"#! troff -ms $1 -*- Nroff -*-
|
||||
.\" "Xterm Control Sequences" document
|
||||
.\" $XTermId: ctlseqs.ms,v 1.345 2017/06/12 00:34:43 tom Exp $
|
||||
.\" $XTermId: ctlseqs.ms,v 1.366 2017/12/23 00:02:27 tom Exp $
|
||||
.\"
|
||||
.\"
|
||||
.\" Copyright 1996-2016,2017 by Thomas E. Dickey
|
||||
@ -69,8 +69,8 @@
|
||||
.\"
|
||||
.ds XT XTerm
|
||||
.ds xt xterm
|
||||
.ds LF Patch #329
|
||||
.ds RF 2017/06/11
|
||||
.ds LF Patch #331
|
||||
.ds RF 2017/12/22
|
||||
.\"
|
||||
.if n .pl 9999v \" no page breaks in nroff
|
||||
.ND
|
||||
@ -88,7 +88,8 @@
|
||||
..
|
||||
.\" Bulleted paragraph
|
||||
.de bP
|
||||
.IP \(bu 0.2i
|
||||
.ie n .IP \(bu 4
|
||||
.el .IP \(bu 2
|
||||
..
|
||||
.\" Normal leading paragraph
|
||||
.de lP
|
||||
@ -507,11 +508,11 @@ Line Feed or New Line (NL).
|
||||
(\*(Lf is Ctrl-J).
|
||||
.
|
||||
.IP \\*(Si
|
||||
Shift In (Ctrl-O) \(-> Switch to Standard Character Set. This invokes the
|
||||
Shift In (Ctrl-O) \(-> Switch to \fIStandard Character Set\fP. This invokes the
|
||||
G0 character set (the default).
|
||||
.
|
||||
.IP \\*(So
|
||||
Shift Out (Ctrl-N) \(-> Switch to Alternate Character Set. This invokes the
|
||||
Shift Out (Ctrl-N) \(-> Switch to \fIAlternate Character Set\fP. This invokes the
|
||||
G1 character set.
|
||||
.
|
||||
.IP \\*(Sp
|
||||
@ -988,7 +989,9 @@ and set VT100 mode.
|
||||
\*(Ps = \*9 \(-> Send Mouse X & Y on button press.
|
||||
See the section \fBMouse Tracking\fP. This is the X10 xterm mouse protocol.
|
||||
\*(Ps = \*1\*0 \(-> Show toolbar (rxvt).
|
||||
\*(Ps = \*1\*2 \(-> Start Blinking Cursor (att610).
|
||||
\*(Ps = \*1\*2 \(-> Start Blinking Cursor (AT&T 610).
|
||||
\*(Ps = \*1\*3 \(-> Start Blinking Cursor (set only via resource or menu).
|
||||
\*(Ps = \*1\*4 \(-> Enable XOR of Blinking Cursor control sequence and menu.
|
||||
\*(Ps = \*1\*8 \(-> Print form feed (DECPFF).
|
||||
\*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX).
|
||||
\*(Ps = \*2\*5 \(-> Show Cursor (DECTCEM).
|
||||
@ -996,13 +999,13 @@ See the section \fBMouse Tracking\fP. This is the X10 xterm mouse protocol.
|
||||
\*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt).
|
||||
\*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK).
|
||||
\*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode.
|
||||
\*(Ps = \*4\*1 \(-> \fImore\fP(1) fix (see \fBcurses\fP resource).
|
||||
\*(Ps = \*4\*1 \(-> \fBmore\fP(1) fix (see \fBcurses\fP(3) resource).
|
||||
\*(Ps = \*4\*2 \(-> Enable National Replacement Character sets (DECNRCM).
|
||||
\*(Ps = \*4\*4 \(-> Turn On Margin Bell.
|
||||
\*(Ps = \*4\*5 \(-> Reverse-wraparound Mode.
|
||||
\*(Ps = \*4\*6 \(-> Start Logging.
|
||||
This is normally disabled by a compile-time option.
|
||||
\*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer.
|
||||
\*(Ps = \*4\*7 \(-> Use \fIAlternate Screen Buffer\fP.
|
||||
(This may be disabled by the \fBtiteInhibit\fP resource).
|
||||
\*(Ps = \*6\*6 \(-> Application keypad (DECNKM).
|
||||
\*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM).
|
||||
@ -1016,7 +1019,7 @@ See the section \fBMouse Tracking\fP. This is the X11 xterm mouse protocol.
|
||||
\*(Ps = \*1\*0\*0\*4 \(-> Send FocusIn/FocusOut events.
|
||||
\*(Ps = \*1\*0\*0\*5 \(-> Enable UTF-8 Mouse Mode.
|
||||
\*(Ps = \*1\*0\*0\*6 \(-> Enable SGR Mouse Mode.
|
||||
\*(Ps = \*1\*0\*0\*7 \(-> Enable Alternate Scroll Mode, i.e., the \fBalternateScroll\fP resource.
|
||||
\*(Ps = \*1\*0\*0\*7 \(-> Enable \fIAlternate Scroll Mode\fP, i.e., the \fBalternateScroll\fP resource.
|
||||
\*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt).
|
||||
\*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt).
|
||||
\*(Ps = \*1\*0\*1\*5 \(-> Enable urxvt Mouse Mode.
|
||||
@ -1039,12 +1042,14 @@ See the section \fBMouse Tracking\fP. This is the X11 xterm mouse protocol.
|
||||
(enables the \fBpopOnBell\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*4 \(-> Reuse the most recent data copied to CLIPBOARD.
|
||||
(This enables the \fBkeepClipboard\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer. (This may be
|
||||
\*(Ps = \*1\*0\*4\*6 \(-> Enable switching to/from \fIAlternate Screen Buffer\fP.
|
||||
This works for terminfo-based systems, updating the \fBtiteInhibit\fP resource.
|
||||
\*(Ps = \*1\*0\*4\*7 \(-> Use \fIAlternate Screen Buffer\fP. (This may be
|
||||
disabled by the \fBtiteInhibit\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC. (This may be
|
||||
disabled by the \fBtiteInhibit\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*9 \(-> Save cursor as in DECSC
|
||||
and use Alternate Screen Buffer, clearing it first. (This may be
|
||||
and use \fIAlternate Screen Buffer\fP, clearing it first. (This may be
|
||||
disabled by the \fBtiteInhibit\fP resource).
|
||||
This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes.
|
||||
Use this with terminfo-based applications rather than the \*4\*7 mode.
|
||||
@ -1052,7 +1057,7 @@ Use this with terminfo-based applications rather than the \*4\*7 mode.
|
||||
\*(Ps = \*1\*0\*5\*1 \(-> Set Sun function-key mode.
|
||||
\*(Ps = \*1\*0\*5\*2 \(-> Set HP function-key mode.
|
||||
\*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode.
|
||||
\*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6).
|
||||
\*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (i.e, X11R6).
|
||||
\*(Ps = \*1\*0\*6\*1 \(-> Set VT220 keyboard emulation.
|
||||
\*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode.
|
||||
.
|
||||
@ -1091,14 +1096,16 @@ DEC Private Mode Reset (DECRST).
|
||||
\*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM).
|
||||
\*(Ps = \*9 \(-> Don't send Mouse X & Y on button press.
|
||||
\*(Ps = \*1\*0 \(-> Hide toolbar (rxvt).
|
||||
\*(Ps = \*1\*2 \(-> Stop Blinking Cursor (att610).
|
||||
\*(Ps = \*1\*2 \(-> Stop Blinking Cursor (AT&T 610).
|
||||
\*(Ps = \*1\*3 \(-> Disable Blinking Cursor (reset only via resource or menu).
|
||||
\*(Ps = \*1\*4 \(-> Disable XOR of Blinking Cursor control sequence and menu.
|
||||
\*(Ps = \*1\*8 \(-> Don't print form feed (DECPFF).
|
||||
\*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX).
|
||||
\*(Ps = \*2\*5 \(-> Hide Cursor (DECTCEM).
|
||||
\*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt).
|
||||
\*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt).
|
||||
\*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode.
|
||||
\*(Ps = \*4\*1 \(-> No \fImore\fP(1) fix (see \fBcurses\fP resource).
|
||||
\*(Ps = \*4\*1 \(-> No \fBmore\fP(1) fix (see \fBcurses\fP(3) resource).
|
||||
\*(Ps = \*4\*2 \(-> Disable National Replacement Character sets (DECNRCM).
|
||||
\*(Ps = \*4\*4 \(-> Turn Off Margin Bell.
|
||||
\*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode.
|
||||
@ -1118,7 +1125,7 @@ See the section \fBMouse Tracking\fP.
|
||||
\*(Ps = \*1\*0\*0\*4 \(-> Don't send FocusIn/FocusOut events.
|
||||
\*(Ps = \*1\*0\*0\*5 \(-> Disable UTF-8 Mouse Mode.
|
||||
\*(Ps = \*1\*0\*0\*6 \(-> Disable SGR Mouse Mode.
|
||||
\*(Ps = \*1\*0\*0\*7 \(-> Disable Alternate Scroll Mode, i.e., the \fBalternateScroll\fP resource.
|
||||
\*(Ps = \*1\*0\*0\*7 \(-> Disable \fIAlternate Scroll Mode\fP, i.e., the \fBalternateScroll\fP resource.
|
||||
\*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt).
|
||||
\*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt).
|
||||
\*(Ps = \*1\*0\*1\*5 \(-> Disable urxvt Mouse Mode.
|
||||
@ -1139,8 +1146,12 @@ See the section \fBMouse Tracking\fP.
|
||||
(This disables the \fBbellIsUrgent\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*3 \(-> Disable raising of the window when Control-G is received.
|
||||
(This disables the \fBpopOnBell\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*6 \(-> Disable switching to/from \fIAlternate Screen Buffer\fP.
|
||||
This works for terminfo-based systems, updating the \fBtiteInhibit\fP resource.
|
||||
If currently using the \fIAlternate Screen Buffer\fP,
|
||||
\fIxterm\fP switches to the Normal Screen Buffer.
|
||||
\*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, clearing screen
|
||||
first if in the Alternate Screen. (This may be
|
||||
first if in the \fIAlternate Screen Buffer\fP. (This may be
|
||||
disabled by the \fBtiteInhibit\fP resource).
|
||||
\*(Ps = \*1\*0\*4\*8 \(-> Restore cursor as in DECRC. (This may be
|
||||
disabled by the \fBtiteInhibit\fP resource).
|
||||
@ -1152,7 +1163,7 @@ Use this with terminfo-based applications rather than the \*4\*7 mode.
|
||||
\*(Ps = \*1\*0\*5\*1 \(-> Reset Sun function-key mode.
|
||||
\*(Ps = \*1\*0\*5\*2 \(-> Reset HP function-key mode.
|
||||
\*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode.
|
||||
\*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6).
|
||||
\*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (i.e, X11R6).
|
||||
\*(Ps = \*1\*0\*6\*1 \(-> Reset keyboard emulation to Sun/PC style.
|
||||
\*(Ps = \*2\*0\*0\*4 \(-> Reset bracketed paste mode.
|
||||
.
|
||||
@ -1163,7 +1174,7 @@ Character Attributes (SGR).
|
||||
\*(Ps = \*2 \(-> Faint, decreased intensity (ISO 6429).
|
||||
\*(Ps = \*3 \(-> Italicized (ISO 6429).
|
||||
\*(Ps = \*4 \(-> Underlined.
|
||||
\*(Ps = \*5 \(-> Blink (appears as Bold).
|
||||
\*(Ps = \*5 \(-> Blink (appears as Bold in X11R6 xterm).
|
||||
\*(Ps = \*7 \(-> Inverse.
|
||||
\*(Ps = \*8 \(-> Invisible, i.e., hidden (VT300).
|
||||
\*(Ps = \*9 \(-> Crossed-out characters (ISO 6429).
|
||||
@ -1227,17 +1238,29 @@ All parameters are decimal integers.
|
||||
.bP
|
||||
RGB values range from zero (0) to 255.
|
||||
.bP
|
||||
ISO-8613-3 can be interpreted in more than one way;
|
||||
\fIxterm\fP allows the semicolons in this control to be replaced by colons
|
||||
ISO-8613-6 has been interpreted in more than one way;
|
||||
\fIxterm\fP allows the semicolons separating the subparameters
|
||||
in this control to be replaced by colons
|
||||
(but after the first colon, colons must be used).
|
||||
.RE
|
||||
.sP
|
||||
These ISO-8613-3 controls are supported:
|
||||
\*(Pm = \*3\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set foreground color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
These ISO-8613-6 controls are supported:
|
||||
\*(Pm = \*3\*8\*;\*2\*;\*(Pi\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set foreground color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
The color space identifier \*(Pi is ignored.
|
||||
\*(Pm = \*3\*8\*;\*5\*;\*(Ps \(-> Set foreground color to \*(Ps.
|
||||
\*(Pm = \*4\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set background color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
\*(Pm = \*4\*8\*;\*2\*;\*(Pi\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set background color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
The color space identifier \*(Pi is ignored.
|
||||
\*(Pm = \*4\*8\*;\*5\*;\*(Ps \(-> Set background color to \*(Ps.
|
||||
.sp
|
||||
This variation on ISO-8613-6 is supported for compatibility with KDE konsole:
|
||||
\*(Pm = \*3\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set foreground color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
\*(Pm = \*4\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set background color to the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
|
||||
.sp
|
||||
If \fIxterm\fP is compiled with direct-color support,
|
||||
and the resource \fBdirectColor\fP is true, then
|
||||
rather than choosing the closest match,
|
||||
\fIxterm\fP asks the X server to directly render a given color.
|
||||
.sP
|
||||
.
|
||||
.IP \\*(Cs\\*>\\*(Ps\\*;\\*(Ps\\*s\\*m
|
||||
Set or reset resource-values used by \fIxterm\fP to decide whether to
|
||||
@ -1324,7 +1347,7 @@ The last two parameters apply to VT400 & up, and denote keyboard ready and LK01
|
||||
\*(Cs\*?\*5\*7\*;\*1\*n Mouse, if compiled-in, or
|
||||
\*(Cs\*?\*5\*7\*;\*0\*n Cannot identify, if not.
|
||||
\*(Ps = \*6\*2 \(-> Report macro space (DECMSR) as
|
||||
\*(Cs\*(Pn\*s\\*\*s\*{.
|
||||
\*(Cs\*(Pn\*s\**\*s\*{.
|
||||
\*(Ps = \*6\*3 \(-> Report memory checksum (DECCKSR) as
|
||||
\*(Dc\*(Pt\*s\*!x\*sx\*sx\*sx\*s\*(ST.
|
||||
.br
|
||||
@ -1369,7 +1392,7 @@ For VT300 and up, reply is
|
||||
.br
|
||||
\*(Cs\*(Ps\*;\*(Pm\*$\*y
|
||||
.br
|
||||
where \*(Ps is the mode number as in RM,
|
||||
where \*(Ps is the mode number as in SM/RM,
|
||||
and \*(Pm is the mode value:
|
||||
.br
|
||||
0 - not recognized
|
||||
@ -1384,8 +1407,12 @@ For VT300 and up, reply is
|
||||
.br
|
||||
\*(Cs\*?\*(Ps\*;\*(Pm\*$\*y
|
||||
.br
|
||||
where \*(Ps is the mode number as in DECSET,
|
||||
where \*(Ps is the mode number as in DECSET/DECSET,
|
||||
\*(Pm is the mode value as in the ANSI DECRQM.
|
||||
.br
|
||||
Two private modes are read-only (i.e., \*1\*3 and \*1\*4),
|
||||
provided only for reporting their values using this control sequence.
|
||||
They correspond to the resources \fBcursorBlink\fP and \fBcursorBlinkXOR\fP.
|
||||
.
|
||||
.IP \\*(Cs\\*(Ps\\*s\\*q
|
||||
Load LEDs (DECLL).
|
||||
@ -1428,7 +1455,7 @@ Change Attributes in Rectangular Area (DECCARA), VT400 and up.
|
||||
\*(Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
|
||||
.
|
||||
.IP \\*(Cs\\*(cs
|
||||
Save cursor (ANSI.SYS), available only when DECLRMM is disabled.
|
||||
Save cursor, available only when DECLRMM is disabled (SCOSC, also ANSI.SYS).
|
||||
.
|
||||
.IP \\*(Cs\\*(Pl\\*;\\*(Pr\\*s\\*(cs
|
||||
Set left and right margins (DECSLRM), available only when DECLRMM is enabled (VT420 and up).
|
||||
@ -1516,7 +1543,7 @@ Reverse Attributes in Rectangular Area (DECRARA), VT400 and up.
|
||||
\*(Ps denotes the attributes to reverse, i.e., 1, 4, 5, 7.
|
||||
.
|
||||
.IP \\*(Cs\\*u
|
||||
Restore cursor (ANSI.SYS).
|
||||
Restore cursor (SCORC, also ANSI.SYS).
|
||||
.
|
||||
.IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*u
|
||||
Set margin-bell volume (DECSMBV, VT520).
|
||||
@ -2234,11 +2261,11 @@ See the xterm-hp terminfo entry for details.
|
||||
.Sh "The Alternate Screen Buffer"
|
||||
.LP
|
||||
\fIXterm\fP maintains two screen buffers.
|
||||
The normal screen buffer allows you to scroll back to view saved lines
|
||||
The Normal Screen Buffer allows you to scroll back to view saved lines
|
||||
of output up to the maximum set by the \fBsaveLines\fP resource.
|
||||
The alternate screen buffer is exactly as large as the display,
|
||||
The \fIAlternate Screen Buffer\fP is exactly as large as the display,
|
||||
contains no additional saved lines.
|
||||
When the alternate screen buffer is active,
|
||||
When the \fIAlternate Screen Buffer\fP is active,
|
||||
you cannot scroll back to view saved lines.
|
||||
\fIXterm\fP provides control sequences and menu entries
|
||||
for switching between the two.
|
||||
@ -2254,12 +2281,12 @@ terminfo does not provide the whole text of the termcap data in one piece.
|
||||
It would not work for terminfo anyway, since terminfo data is not passed
|
||||
in environment variables;
|
||||
setting an environment variable in this manner would have no effect on
|
||||
the application's ability to switch between normal and alternate screen
|
||||
buffers.
|
||||
the application's ability to switch
|
||||
between \fINormal\fP and \fIAlternate Screen\fP buffers.
|
||||
Instead, the newer private mode controls
|
||||
(such as \*1\*0\*4\*9)
|
||||
for switching between normal
|
||||
and alternate screen buffers simply disable the switching.
|
||||
for switching between \fINormal\fP
|
||||
and \fIAlternate Screen\fP buffers simply disable the switching.
|
||||
They add other features such as clearing the display for the same reason:
|
||||
to make the details of switching independent of the application that
|
||||
requests the switch.
|
||||
@ -2371,7 +2398,7 @@ For example, \*! specifies the value 1.
|
||||
The upper left character position on the terminal is denoted as 1,1.
|
||||
This scheme dates back to X10,
|
||||
though the normal mouse-tracking (from X11) is more elaborate.
|
||||
.Ss X10 compatbility mode
|
||||
.Ss X10 compatibility mode
|
||||
.lP
|
||||
X10 compatibility mode sends an escape sequence only on button press,
|
||||
encoding the location and the mouse button pressed.
|
||||
@ -2401,7 +2428,7 @@ Note however that the shift and control bits are normally unavailable
|
||||
because \fIxterm\fP uses the control modifier with mouse for popup menus,
|
||||
and the shift modifier is used in the default translations for button events.
|
||||
The \fIMeta\fP modifier recognized by \fIxterm\fP is the \fImod1\fP mask,
|
||||
and is not necessarily the "Meta" key (see \fIxmodmap\fP).
|
||||
and is not necessarily the "Meta" key (see \fBxmodmap\fP(1)).
|
||||
.bP
|
||||
\*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
|
||||
in X10 mode.
|
||||
@ -2417,10 +2444,10 @@ the wheel mouse events are translated to \fIscroll-back\fP
|
||||
and \fIscroll-forw\fP actions.
|
||||
Those actions normally scroll the whole window,
|
||||
as if the scrollbar was used.
|
||||
However if Alternate Scroll mode is set,
|
||||
However if \fIAlternate Scroll\fP mode is set,
|
||||
then cursor up/down controls are sent when the terminal is displaying
|
||||
the alternate screen.
|
||||
The initial state of Alternate Scroll mode is set
|
||||
the \fIAlternate Screen Buffer\fP.
|
||||
The initial state of \fIAlternate Scroll\fP mode is set
|
||||
using the \fBalternateScroll\fP resource.
|
||||
.Ss Highlight tracking
|
||||
.lP
|
||||
|
@ -21,7 +21,7 @@
|
||||
Thomas Dickey
|
||||
XFree86 Project (1996-2006)
|
||||
invisible-island.net (2006-2017)
|
||||
updated for XTerm Patch #329 (2017/06/11)
|
||||
updated for XTerm Patch #331 (2017/12/22)
|
||||
|
||||
|
||||
|
||||
@ -55,15 +55,15 @@ o This means that a C1 control can be mistaken for badly-formed UTF-8
|
||||
continuation bytes of a UTF-8 encoded (multibyte) value.
|
||||
|
||||
o It is not possible to use a C1 control obtained from decoding the
|
||||
UTF-8 text, because that would require reprocessing the data. Conse-
|
||||
quently there is no ambiguity in the way this document uses the term
|
||||
"character" to refer to bytes in a control sequence.
|
||||
UTF-8 text, because that would require reprocessing the data. Con-
|
||||
sequently there is no ambiguity in the way this document uses the
|
||||
term "character" to refer to bytes in a control sequence.
|
||||
|
||||
The order of processing is a necessary consequence of the way ECMA-48 is
|
||||
designed:
|
||||
|
||||
o Each byte sent to the terminal can be unambiguously determined to fall
|
||||
into one of a few categories (C0, C1 and graphic characters).
|
||||
o Each byte sent to the terminal can be unambiguously determined to
|
||||
fall into one of a few categories (C0, C1 and graphic characters).
|
||||
|
||||
o ECMA-48 is modal; once it starts processing a control sequence, the
|
||||
terminal continues until the sequence is complete, or some byte is
|
||||
@ -73,15 +73,15 @@ o Intermediate, parameter and final bytes may use the same codes as
|
||||
graphic characters, but they are processed as part of a control
|
||||
sequence and are not actually graphic characters.
|
||||
|
||||
o Eight-bit controls can have intermediate, etc., bytes in the range 160
|
||||
to 255. Those can be treated as their counterparts in the range 32 to
|
||||
127.
|
||||
o Eight-bit controls can have intermediate, etc., bytes in the range
|
||||
160 to 255. Those can be treated as their counterparts in the range
|
||||
32 to 127.
|
||||
|
||||
o Single-byte controls can be handled separately from multi-byte control
|
||||
sequences because ECMA-48's rules are unambiguous.
|
||||
o Single-byte controls can be handled separately from multi-byte con-
|
||||
trol sequences because ECMA-48's rules are unambiguous.
|
||||
|
||||
As a special case, ECMA-48 (section 9) mentions that the control func-
|
||||
tions shift-in and shift-out are allowed to occur within a 7-bit
|
||||
As a special case, ECMA-48 (section 9) mentions that the control
|
||||
functions shift-in and shift-out are allowed to occur within a 7-bit
|
||||
multibyte control sequence because those cannot alter the meaning of
|
||||
the control sequence.
|
||||
|
||||
@ -89,9 +89,9 @@ o Some controls (such as OSC ) introduce a string mode, which is ended
|
||||
on a ST (string terminator).
|
||||
|
||||
Again, the terminal should accept single-byte controls within the
|
||||
string. However, xterm has a resource setting brokenLinuxOSC to allow
|
||||
recovery from applications which rely upon malformed palette sequences
|
||||
used by the Linux console.
|
||||
string. However, xterm has a resource setting brokenLinuxOSC to
|
||||
allow recovery from applications which rely upon malformed palette
|
||||
sequences used by the Linux console.
|
||||
|
||||
C1 (8-Bit) Control Characters
|
||||
|
||||
@ -362,12 +362,12 @@ CSI ? Pi; Pa; Pv S
|
||||
done once, using resource-values.
|
||||
o Graphics geometry is not necessarily the same as "window
|
||||
size" (see the dtterm window manipulation extensions). For
|
||||
example, xterm limits the maximum graphics geometry at com-
|
||||
pile time (1000x1000 as of version 328) although the window
|
||||
size can be larger.
|
||||
example, xterm limits the maximum graphics geometry at
|
||||
compile time (1000x1000 as of version 328) although the
|
||||
window size can be larger.
|
||||
o While resizing a window will always change the current
|
||||
graphics geometry, the reverse is not true. Setting graph-
|
||||
ics geometry does not affect the window size.
|
||||
graphics geometry, the reverse is not true. Setting
|
||||
graphics geometry does not affect the window size.
|
||||
CSI Ps T Scroll down Ps lines (default = 1) (SD).
|
||||
CSI Ps ; Ps ; Ps ; Ps ; Ps T
|
||||
Initiate highlight mouse tracking. Parameters are
|
||||
@ -465,7 +465,11 @@ CSI ? Pm h
|
||||
Ps = 9 -> Send Mouse X & Y on button press. See the sec-
|
||||
tion Mouse Tracking. This is the X10 xterm mouse protocol.
|
||||
Ps = 1 0 -> Show toolbar (rxvt).
|
||||
Ps = 1 2 -> Start Blinking Cursor (att610).
|
||||
Ps = 1 2 -> Start Blinking Cursor (AT&T 610).
|
||||
Ps = 1 3 -> Start Blinking Cursor (set only via resource or
|
||||
menu).
|
||||
Ps = 1 4 -> Enable XOR of Blinking Cursor control sequence
|
||||
and menu.
|
||||
Ps = 1 8 -> Print form feed (DECPFF).
|
||||
Ps = 1 9 -> Set print extent to full screen (DECPEX).
|
||||
Ps = 2 5 -> Show Cursor (DECTCEM).
|
||||
@ -473,7 +477,7 @@ CSI ? Pm h
|
||||
Ps = 3 5 -> Enable font-shifting functions (rxvt).
|
||||
Ps = 3 8 -> Enter Tektronix Mode (DECTEK).
|
||||
Ps = 4 0 -> Allow 80 -> 132 Mode.
|
||||
Ps = 4 1 -> more(1) fix (see curses resource).
|
||||
Ps = 4 1 -> more(1) fix (see curses(3) resource).
|
||||
Ps = 4 2 -> Enable National Replacement Character sets
|
||||
(DECNRCM).
|
||||
Ps = 4 4 -> Turn On Margin Bell.
|
||||
@ -523,6 +527,9 @@ CSI ? Pm h
|
||||
is received. (enables the popOnBell resource).
|
||||
Ps = 1 0 4 4 -> Reuse the most recent data copied to CLIP-
|
||||
BOARD. (This enables the keepClipboard resource).
|
||||
Ps = 1 0 4 6 -> Enable switching to/from Alternate Screen
|
||||
Buffer. This works for terminfo-based systems, updating the
|
||||
titeInhibit resource.
|
||||
Ps = 1 0 4 7 -> Use Alternate Screen Buffer. (This may be
|
||||
disabled by the titeInhibit resource).
|
||||
Ps = 1 0 4 8 -> Save cursor as in DECSC. (This may be dis-
|
||||
@ -536,7 +543,7 @@ CSI ? Pm h
|
||||
Ps = 1 0 5 1 -> Set Sun function-key mode.
|
||||
Ps = 1 0 5 2 -> Set HP function-key mode.
|
||||
Ps = 1 0 5 3 -> Set SCO function-key mode.
|
||||
Ps = 1 0 6 0 -> Set legacy keyboard emulation (X11R6).
|
||||
Ps = 1 0 6 0 -> Set legacy keyboard emulation (i.e, X11R6).
|
||||
Ps = 1 0 6 1 -> Set VT220 keyboard emulation.
|
||||
Ps = 2 0 0 4 -> Set bracketed paste mode.
|
||||
CSI Pm i Media Copy (MC).
|
||||
@ -569,14 +576,18 @@ CSI ? Pm l
|
||||
Ps = 8 -> No Auto-repeat Keys (DECARM).
|
||||
Ps = 9 -> Don't send Mouse X & Y on button press.
|
||||
Ps = 1 0 -> Hide toolbar (rxvt).
|
||||
Ps = 1 2 -> Stop Blinking Cursor (att610).
|
||||
Ps = 1 2 -> Stop Blinking Cursor (AT&T 610).
|
||||
Ps = 1 3 -> Disable Blinking Cursor (reset only via
|
||||
resource or menu).
|
||||
Ps = 1 4 -> Disable XOR of Blinking Cursor control sequence
|
||||
and menu.
|
||||
Ps = 1 8 -> Don't print form feed (DECPFF).
|
||||
Ps = 1 9 -> Limit print to scrolling region (DECPEX).
|
||||
Ps = 2 5 -> Hide Cursor (DECTCEM).
|
||||
Ps = 3 0 -> Don't show scrollbar (rxvt).
|
||||
Ps = 3 5 -> Disable font-shifting functions (rxvt).
|
||||
Ps = 4 0 -> Disallow 80 -> 132 Mode.
|
||||
Ps = 4 1 -> No more(1) fix (see curses resource).
|
||||
Ps = 4 1 -> No more(1) fix (see curses(3) resource).
|
||||
Ps = 4 2 -> Disable National Replacement Character sets
|
||||
(DECNRCM).
|
||||
Ps = 4 4 -> Turn Off Margin Bell.
|
||||
@ -623,9 +634,13 @@ CSI ? Pm l
|
||||
resource).
|
||||
Ps = 1 0 4 3 -> Disable raising of the window when Control-
|
||||
G is received. (This disables the popOnBell resource).
|
||||
Ps = 1 0 4 6 -> Disable switching to/from Alternate Screen
|
||||
Buffer. This works for terminfo-based systems, updating the
|
||||
titeInhibit resource. If currently using the Alternate Screen
|
||||
Buffer, xterm switches to the Normal Screen Buffer.
|
||||
Ps = 1 0 4 7 -> Use Normal Screen Buffer, clearing screen
|
||||
first if in the Alternate Screen. (This may be disabled by
|
||||
the titeInhibit resource).
|
||||
first if in the Alternate Screen Buffer. (This may be dis-
|
||||
abled by the titeInhibit resource).
|
||||
Ps = 1 0 4 8 -> Restore cursor as in DECRC. (This may be
|
||||
disabled by the titeInhibit resource).
|
||||
Ps = 1 0 4 9 -> Use Normal Screen Buffer and restore cursor
|
||||
@ -637,7 +652,8 @@ CSI ? Pm l
|
||||
Ps = 1 0 5 1 -> Reset Sun function-key mode.
|
||||
Ps = 1 0 5 2 -> Reset HP function-key mode.
|
||||
Ps = 1 0 5 3 -> Reset SCO function-key mode.
|
||||
Ps = 1 0 6 0 -> Reset legacy keyboard emulation (X11R6).
|
||||
Ps = 1 0 6 0 -> Reset legacy keyboard emulation (i.e,
|
||||
X11R6).
|
||||
Ps = 1 0 6 1 -> Reset keyboard emulation to Sun/PC style.
|
||||
Ps = 2 0 0 4 -> Reset bracketed paste mode.
|
||||
CSI Pm m Character Attributes (SGR).
|
||||
@ -646,7 +662,7 @@ CSI Pm m Character Attributes (SGR).
|
||||
Ps = 2 -> Faint, decreased intensity (ISO 6429).
|
||||
Ps = 3 -> Italicized (ISO 6429).
|
||||
Ps = 4 -> Underlined.
|
||||
Ps = 5 -> Blink (appears as Bold).
|
||||
Ps = 5 -> Blink (appears as Bold in X11R6 xterm).
|
||||
Ps = 7 -> Inverse.
|
||||
Ps = 8 -> Invisible, i.e., hidden (VT300).
|
||||
Ps = 9 -> Crossed-out characters (ISO 6429).
|
||||
@ -708,17 +724,32 @@ CSI Pm m Character Attributes (SGR).
|
||||
is compiled, the following apply:
|
||||
o All parameters are decimal integers.
|
||||
o RGB values range from zero (0) to 255.
|
||||
o ISO-8613-3 can be interpreted in more than one way; xterm
|
||||
allows the semicolons in this control to be replaced by
|
||||
colons (but after the first colon, colons must be used).
|
||||
o ISO-8613-6 has been interpreted in more than one way;
|
||||
xterm allows the semicolons separating the subparameters
|
||||
in this control to be replaced by colons (but after the
|
||||
first colon, colons must be used).
|
||||
|
||||
These ISO-8613-3 controls are supported:
|
||||
These ISO-8613-6 controls are supported:
|
||||
Pm = 3 8 ; 2 ; Pi; Pr; Pg; Pb -> Set foreground color to the
|
||||
closest match in xterm's palette for the given RGB Pr/Pg/Pb.
|
||||
The color space identifier Pi is ignored.
|
||||
Pm = 3 8 ; 5 ; Ps -> Set foreground color to Ps.
|
||||
Pm = 4 8 ; 2 ; Pi; Pr; Pg; Pb -> Set background color to the
|
||||
closest match in xterm's palette for the given RGB Pr/Pg/Pb.
|
||||
The color space identifier Pi is ignored.
|
||||
Pm = 4 8 ; 5 ; Ps -> Set background color to Ps.
|
||||
|
||||
This variation on ISO-8613-6 is supported for compatibility
|
||||
with KDE konsole:
|
||||
Pm = 3 8 ; 2 ; Pr; Pg; Pb -> Set foreground color to the
|
||||
closest match in xterm's palette for the given RGB Pr/Pg/Pb.
|
||||
Pm = 3 8 ; 5 ; Ps -> Set foreground color to Ps.
|
||||
Pm = 4 8 ; 2 ; Pr; Pg; Pb -> Set background color to the
|
||||
closest match in xterm's palette for the given RGB Pr/Pg/Pb.
|
||||
Pm = 4 8 ; 5 ; Ps -> Set background color to Ps.
|
||||
|
||||
If xterm is compiled with direct-color support, and the
|
||||
resource directColor is true, then rather than choosing the
|
||||
closest match, xterm asks the X server to directly render a
|
||||
given color.
|
||||
|
||||
CSI > Ps; Ps m
|
||||
Set or reset resource-values used by xterm to decide whether
|
||||
@ -784,7 +815,7 @@ CSI ? Ps n
|
||||
available, if compiled-in, or CSI ? 5 0 n No Locator, if not.
|
||||
Ps = 5 6 -> Report Locator type as CSI ? 5 7 ; 1 n Mouse,
|
||||
if compiled-in, or CSI ? 5 7 ; 0 n Cannot identify, if not.
|
||||
Ps = 6 2 -> Report macro space (DECMSR) as CSI Pn \* { .
|
||||
Ps = 6 2 -> Report macro space (DECMSR) as CSI Pn * { .
|
||||
Ps = 6 3 -> Report memory checksum (DECCKSR) as DCS Pt ! x
|
||||
x x x ST .
|
||||
Pt is the request id (from an optional parameter to the
|
||||
@ -819,7 +850,7 @@ CSI Ps ; Ps " p
|
||||
CSI Ps $ p
|
||||
Request ANSI mode (DECRQM). For VT300 and up, reply is
|
||||
CSI Ps; Pm$ y
|
||||
where Ps is the mode number as in RM, and Pm is the mode
|
||||
where Ps is the mode number as in SM/RM, and Pm is the mode
|
||||
value:
|
||||
0 - not recognized
|
||||
1 - set
|
||||
@ -829,8 +860,12 @@ CSI Ps $ p
|
||||
CSI ? Ps$ p
|
||||
Request DEC private mode (DECRQM). For VT300 and up, reply is
|
||||
CSI ? Ps; Pm$ y
|
||||
where Ps is the mode number as in DECSET, Pm is the mode value
|
||||
as in the ANSI DECRQM.
|
||||
where Ps is the mode number as in DECSET/DECSET, Pm is the
|
||||
mode value as in the ANSI DECRQM.
|
||||
Two private modes are read-only (i.e., 1 3 and 1 4 ), pro-
|
||||
vided only for reporting their values using this control
|
||||
sequence. They correspond to the resources cursorBlink and
|
||||
cursorBlinkXOR.
|
||||
CSI Ps q Load LEDs (DECLL).
|
||||
Ps = 0 -> Clear all LEDS (default).
|
||||
Ps = 1 -> Light Num Lock.
|
||||
@ -864,8 +899,8 @@ CSI Pt; Pl; Pb; Pr; Ps$ r
|
||||
Change Attributes in Rectangular Area (DECCARA), VT400 and up.
|
||||
Pt; Pl; Pb; Pr denotes the rectangle.
|
||||
Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
|
||||
CSI s Save cursor (ANSI.SYS), available only when DECLRMM is dis-
|
||||
abled.
|
||||
CSI s Save cursor, available only when DECLRMM is disabled (SCOSC,
|
||||
also ANSI.SYS).
|
||||
CSI Pl; Pr s
|
||||
Set left and right margins (DECSLRM), available only when
|
||||
DECLRMM is enabled (VT420 and up).
|
||||
@ -943,7 +978,7 @@ CSI Pt; Pl; Pb; Pr; Ps$ t
|
||||
up.
|
||||
Pt; Pl; Pb; Pr denotes the rectangle.
|
||||
Ps denotes the attributes to reverse, i.e., 1, 4, 5, 7.
|
||||
CSI u Restore cursor (ANSI.SYS).
|
||||
CSI u Restore cursor (SCORC, also ANSI.SYS).
|
||||
CSI Ps SP u
|
||||
Set margin-bell volume (DECSMBV, VT520).
|
||||
Ps = 1 -> off.
|
||||
@ -1526,11 +1561,11 @@ Similarly, xterm can be compiled to support HP keyboards. See the
|
||||
xterm-hp terminfo entry for details.
|
||||
|
||||
The Alternate Screen Buffer
|
||||
Xterm maintains two screen buffers. The normal screen buffer allows you
|
||||
Xterm maintains two screen buffers. The Normal Screen Buffer allows you
|
||||
to scroll back to view saved lines of output up to the maximum set by
|
||||
the saveLines resource. The alternate screen buffer is exactly as large
|
||||
as the display, contains no additional saved lines. When the alternate
|
||||
screen buffer is active, you cannot scroll back to view saved lines.
|
||||
the saveLines resource. The Alternate Screen Buffer is exactly as large
|
||||
as the display, contains no additional saved lines. When the Alternate
|
||||
Screen Buffer is active, you cannot scroll back to view saved lines.
|
||||
Xterm provides control sequences and menu entries for switching between
|
||||
the two.
|
||||
|
||||
@ -1543,9 +1578,9 @@ built with terminfo libraries because terminfo does not provide the
|
||||
whole text of the termcap data in one piece. It would not work for ter-
|
||||
minfo anyway, since terminfo data is not passed in environment vari-
|
||||
ables; setting an environment variable in this manner would have no
|
||||
effect on the application's ability to switch between normal and alter-
|
||||
nate screen buffers. Instead, the newer private mode controls (such as
|
||||
1 0 4 9 ) for switching between normal and alternate screen buffers sim-
|
||||
effect on the application's ability to switch between Normal and Alter-
|
||||
nate Screen buffers. Instead, the newer private mode controls (such as
|
||||
1 0 4 9 ) for switching between Normal and Alternate Screen buffers sim-
|
||||
ply disable the switching. They add other features such as clearing the
|
||||
display for the same reason: to make the details of switching indepen-
|
||||
dent of the application that requests the switch.
|
||||
@ -1629,30 +1664,31 @@ parameters in a single character as value+32. For example, ! specifies
|
||||
the value 1. The upper left character position on the terminal is
|
||||
denoted as 1,1. This scheme dates back to X10, though the normal mouse-
|
||||
tracking (from X11) is more elaborate.
|
||||
X10 compatbility mode
|
||||
X10 compatibility mode
|
||||
|
||||
X10 compatibility mode sends an escape sequence only on button press,
|
||||
encoding the location and the mouse button pressed. It is enabled by
|
||||
specifying parameter 9 to DECSET. On button press, xterm sends CSI M
|
||||
CbCxCy (6 characters).
|
||||
o Cb is button-1.
|
||||
o Cx and Cy are the x and y coordinates of the mouse when the button was
|
||||
pressed.
|
||||
o Cx and Cy are the x and y coordinates of the mouse when the button
|
||||
was pressed.
|
||||
Normal tracking mode
|
||||
|
||||
Normal tracking mode sends an escape sequence on both button press and
|
||||
release. Modifier key (shift, ctrl, meta) information is also sent. It
|
||||
is enabled by specifying parameter 1000 to DECSET. On button press or
|
||||
release, xterm sends CSI M CbCxCy.
|
||||
o The low two bits of Cb encode button information: 0=MB1 pressed, 1=MB2
|
||||
pressed, 2=MB3 pressed, 3=release.
|
||||
o The next three bits encode the modifiers which were down when the but-
|
||||
ton was pressed and are added together: 4=Shift, 8=Meta, 16=Control.
|
||||
Note however that the shift and control bits are normally unavailable
|
||||
because xterm uses the control modifier with mouse for popup menus,
|
||||
and the shift modifier is used in the default translations for button
|
||||
events. The Meta modifier recognized by xterm is the mod1 mask, and
|
||||
is not necessarily the "Meta" key (see xmodmap).
|
||||
o The low two bits of Cb encode button information: 0=MB1 pressed,
|
||||
1=MB2 pressed, 2=MB3 pressed, 3=release.
|
||||
o The next three bits encode the modifiers which were down when the
|
||||
button was pressed and are added together: 4=Shift, 8=Meta, 16=Con-
|
||||
trol. Note however that the shift and control bits are normally
|
||||
unavailable because xterm uses the control modifier with mouse for
|
||||
popup menus, and the shift modifier is used in the default transla-
|
||||
tions for button events. The Meta modifier recognized by xterm is
|
||||
the mod1 mask, and is not necessarily the "Meta" key (see
|
||||
xmodmap(1)).
|
||||
o Cx and Cy are the x and y coordinates of the mouse event, encoded as
|
||||
in X10 mode.
|
||||
Wheel mice
|
||||
@ -1664,8 +1700,8 @@ reported. By default, the wheel mouse events are translated to scroll-
|
||||
back and scroll-forw actions. Those actions normally scroll the whole
|
||||
window, as if the scrollbar was used. However if Alternate Scroll mode
|
||||
is set, then cursor up/down controls are sent when the terminal is dis-
|
||||
playing the alternate screen. The initial state of Alternate Scroll
|
||||
mode is set using the alternateScroll resource.
|
||||
playing the Alternate Screen Buffer. The initial state of Alternate
|
||||
Scroll mode is set using the alternateScroll resource.
|
||||
Highlight tracking
|
||||
|
||||
Mouse highlight tracking notifies a program of a button press, receives
|
||||
@ -1694,10 +1730,10 @@ o if the start and end coordinates are the same locations:
|
||||
o otherwise:
|
||||
CSI T CxCyCxCyCxCy.
|
||||
The parameters are startx, starty, endx, endy, mousex, and mousey.
|
||||
- startx, starty, endx, and endy give the starting and ending charac-
|
||||
ter positions of the region.
|
||||
- mousex and mousey give the location of the mouse at button up, which
|
||||
may not be over a character.
|
||||
- startx, starty, endx, and endy give the starting and ending char-
|
||||
acter positions of the region.
|
||||
- mousex and mousey give the location of the mouse at button up,
|
||||
which may not be over a character.
|
||||
Button-event tracking
|
||||
|
||||
Button-event tracking is essentially the same as normal tracking, but
|
||||
@ -1708,10 +1744,11 @@ release, xterm sends the same codes used by normal tracking mode.
|
||||
o On button-motion events, xterm adds 32 to the event code (the third
|
||||
character, Cb).
|
||||
o The other bits of the event code specify button and modifier keys as
|
||||
in normal mode. For example, motion into cell x,y with button 1 down
|
||||
is reported as CSI M @ CxCy. ( @ = 32 + 0 (button 1) + 32 (motion
|
||||
indicator) ). Similarly, motion with button 3 down is reported as CSI
|
||||
M B CxCy. ( B = 32 + 2 (button 3) + 32 (motion indicator) ).
|
||||
in normal mode. For example, motion into cell x,y with button 1
|
||||
down is reported as CSI M @ CxCy. ( @ = 32 + 0 (button 1) + 32
|
||||
(motion indicator) ). Similarly, motion with button 3 down is
|
||||
reported as CSI M B CxCy. ( B = 32 + 2 (button 3) + 32 (motion
|
||||
indicator) ).
|
||||
Any-event tracking
|
||||
|
||||
Any-event mode is the same as button-event mode, except that all motion
|
||||
@ -1749,9 +1786,10 @@ SGR (1006)
|
||||
semicolon-separated encoded button value, the Cx and Cy ordi-
|
||||
nates and a final character which is M for button press and m
|
||||
for button release.
|
||||
o The encoded button value in this case does not add 32 since
|
||||
that was useful only in the X10 scheme for ensuring that the
|
||||
byte containing the button value is a printable code.
|
||||
o The encoded button value in this case does not add 32
|
||||
since that was useful only in the X10 scheme for ensuring
|
||||
that the byte containing the button value is a printable
|
||||
code.
|
||||
o The modifiers are encoded in the same way.
|
||||
o A different final character is used for button release to
|
||||
resolve the X10 ambiguity regarding which button was
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: data.c,v 1.96 2016/06/01 09:14:11 tom Exp $ */
|
||||
/* $XTermId: data.c,v 1.98 2017/12/18 23:38:05 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002-2013,2016 by Thomas E. Dickey
|
||||
* Copyright 2002-2016,2017 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -119,3 +119,10 @@ int ice_fd = -1;
|
||||
#ifdef USE_IGNORE_RC
|
||||
int ignore_unused;
|
||||
#endif
|
||||
|
||||
#if OPT_DIRECT_COLOR
|
||||
CellColor initCColor =
|
||||
{0, 0};
|
||||
#else
|
||||
CellColor initCColor = 0;
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: data.h,v 1.130 2017/05/31 01:13:01 tom Exp $ */
|
||||
/* $XTermId: data.h,v 1.131 2017/11/09 01:22:18 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002-2016,2017 by Thomas E. Dickey
|
||||
@ -129,6 +129,8 @@ extern Arg ourTopLevelShellArgs[];
|
||||
extern Cardinal number_ourTopLevelShellArgs;
|
||||
extern Atom wm_delete_window;
|
||||
|
||||
extern CellColor initCColor;
|
||||
|
||||
#if HANDLE_STRUCT_NOTIFY
|
||||
/* Flag icon name with "*** " on window output when iconified.
|
||||
* I'd like to do something like reverse video, but I don't
|
||||
|
@ -1,6 +1,34 @@
|
||||
/* $XTermId: error.h,v 1.25 2012/10/05 00:17:51 tom Exp $ */
|
||||
/* $XTermId: error.h,v 1.26 2012/10/05 00:17:51 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name(s) of the above copyright
|
||||
* holders shall not be used in advertising or otherwise to promote the
|
||||
* sale, use or other dealings in this Software without prior written
|
||||
* authorization.
|
||||
*
|
||||
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
*
|
||||
* All Rights Reserved
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: fontutils.c,v 1.531 2017/06/20 09:10:19 tom Exp $ */
|
||||
/* $XTermId: fontutils.c,v 1.563 2017/12/30 15:04:01 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2016,2017 by Thomas E. Dickey
|
||||
@ -51,6 +51,8 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define NoFontWarning(data) (data)->warn = fwAlways
|
||||
|
||||
#define SetFontWidth(screen,dst,src) (dst)->f_width = (src)
|
||||
#define SetFontHeight(screen,dst,src) (dst)->f_height = dimRound((screen)->scale_height * (float) (src))
|
||||
|
||||
@ -475,11 +477,12 @@ open_italic_font(XtermWidget xw, int n, FontNameProperties *fp, XTermFonts * dat
|
||||
"o",
|
||||
"i"
|
||||
};
|
||||
char *name;
|
||||
Cardinal pass;
|
||||
Boolean result = False;
|
||||
|
||||
NoFontWarning(data);
|
||||
for (pass = 0; pass < XtNumber(slant); ++pass) {
|
||||
char *name;
|
||||
if ((name = italic_font_name(fp, slant[pass])) != 0) {
|
||||
TRACE(("open_italic_font %s %s\n",
|
||||
whichFontEnum((VTFontEnum) n), name));
|
||||
@ -902,7 +905,6 @@ cannotFont(XtermWidget xw, const char *who, const char *what, const char *where)
|
||||
case fwAlways:
|
||||
break;
|
||||
}
|
||||
TRACE(("OOPS: cannot %s%s%s font \"%s\"\n", who, *what ? " " : "", what, where));
|
||||
xtermWarning("cannot %s%s%s font \"%s\"\n", who, *what ? " " : "", what, where);
|
||||
}
|
||||
|
||||
@ -934,18 +936,17 @@ xtermOpenFont(XtermWidget xw,
|
||||
&& !UsingRenderFont(xw)
|
||||
#endif
|
||||
) {
|
||||
TRACE(("OOPS: cannot load font %s\n", name));
|
||||
cannotFont(xw, "load", "", name);
|
||||
} else {
|
||||
TRACE(("xtermOpenFont: cannot load font '%s'\n", name));
|
||||
}
|
||||
if (force) {
|
||||
result->warn = fwAlways;
|
||||
NoFontWarning(result);
|
||||
code = xtermOpenFont(xw, DEFFONT, result, True);
|
||||
}
|
||||
}
|
||||
}
|
||||
result->warn = fwAlways;
|
||||
NoFontWarning(result);
|
||||
return code;
|
||||
}
|
||||
|
||||
@ -1121,8 +1122,8 @@ xtermUpdateFontGCs(XtermWidget xw, Bool italic)
|
||||
MyGetFont myfunc = getNormalFont;
|
||||
#endif
|
||||
VTwin *win = WhichVWin(screen);
|
||||
Pixel new_normal = getXtermForeground(xw, xw->flags, xw->cur_foreground);
|
||||
Pixel new_revers = getXtermBackground(xw, xw->flags, xw->cur_background);
|
||||
Pixel new_normal = getXtermFG(xw, xw->flags, xw->cur_foreground);
|
||||
Pixel new_revers = getXtermBG(xw, xw->flags, xw->cur_background);
|
||||
|
||||
(void) italic;
|
||||
|
||||
@ -1226,6 +1227,7 @@ loadBoldFP(XtermWidget xw,
|
||||
|
||||
fp = get_font_name_props(screen->display, infoRef->fs, &normal);
|
||||
if (fp != 0) {
|
||||
NoFontWarning(infoOut);
|
||||
*nameOutP = bold_font_name(fp, fp->average_width);
|
||||
if (!xtermOpenFont(xw, *nameOutP, infoOut, False)) {
|
||||
free(*nameOutP);
|
||||
@ -1335,6 +1337,7 @@ loadWBoldFP(XtermWidget xw,
|
||||
if (fp != 0) {
|
||||
*nameOutP = widebold_font_name(fp);
|
||||
derived = True;
|
||||
NoFontWarning(infoOut);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1537,7 +1540,7 @@ xtermLoadFont(XtermWidget xw,
|
||||
setupPackedFonts(xw);
|
||||
#endif
|
||||
screen->fnt_prop = (Boolean) (proportional && !(screen->force_packed));
|
||||
screen->fnt_boxes = True;
|
||||
screen->fnt_boxes = 1;
|
||||
|
||||
#if OPT_BOX_CHARS
|
||||
/*
|
||||
@ -1550,7 +1553,7 @@ xtermLoadFont(XtermWidget xw,
|
||||
/*
|
||||
* FIXME: we shouldn't even be here if we're using Xft.
|
||||
*/
|
||||
screen->fnt_boxes = False;
|
||||
screen->fnt_boxes = 0;
|
||||
TRACE(("assume Xft missing line-drawing chars\n"));
|
||||
} else
|
||||
#endif
|
||||
@ -1567,29 +1570,43 @@ xtermLoadFont(XtermWidget xw,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for (ch = 1; ch < 32; ch++) {
|
||||
unsigned n = ch;
|
||||
#if OPT_WIDE_CHARS
|
||||
if (screen->utf8_mode || screen->unicode_font) {
|
||||
n = dec2ucs(ch);
|
||||
if (n == UCS_REPL)
|
||||
continue;
|
||||
UIntSet(screen->fnt_boxes, 2);
|
||||
for (ch = 1; ch < 32; ch++) {
|
||||
unsigned n = dec2ucs(ch);
|
||||
if ((n != UCS_REPL)
|
||||
&& (n != ch)
|
||||
&& (screen->fnt_boxes & 2)) {
|
||||
if (xtermMissingChar(n, &fnts[fNorm]) ||
|
||||
xtermMissingChar(n, &fnts[fBold])) {
|
||||
UIntClr(screen->fnt_boxes, 2);
|
||||
TRACE(("missing graphics character #%d, U+%04X\n",
|
||||
ch, n));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (IsXtermMissingChar(screen, n, &fnts[fNorm])) {
|
||||
TRACE(("missing normal char #%d\n", n));
|
||||
screen->fnt_boxes = False;
|
||||
|
||||
for (ch = 1; ch < 32; ch++) {
|
||||
if (xtermMissingChar(ch, &fnts[fNorm])) {
|
||||
TRACE(("missing normal char #%d\n", ch));
|
||||
UIntClr(screen->fnt_boxes, 1);
|
||||
break;
|
||||
}
|
||||
if (IsXtermMissingChar(screen, n, &fnts[fBold])) {
|
||||
TRACE(("missing bold char #%d\n", n));
|
||||
screen->fnt_boxes = False;
|
||||
if (xtermMissingChar(ch, &fnts[fBold])) {
|
||||
TRACE(("missing bold char #%d\n", ch));
|
||||
UIntClr(screen->fnt_boxes, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TRACE(("Will %suse internal line-drawing characters (mode %d)\n",
|
||||
screen->fnt_boxes ? "not " : "",
|
||||
screen->fnt_boxes));
|
||||
}
|
||||
TRACE(("Will %suse internal line-drawing characters\n",
|
||||
screen->fnt_boxes ? "not " : ""));
|
||||
#endif
|
||||
|
||||
if (screen->always_bold_mode) {
|
||||
@ -2179,7 +2196,7 @@ xtermSetCursorBox(TScreen *screen)
|
||||
}
|
||||
|
||||
#define CACHE_XFT(dst,src) if (src != 0) {\
|
||||
checkXft(xw, &(dst[fontnum]), src);\
|
||||
failed += checkXft(xw, &(dst[fontnum]), src);\
|
||||
TRACE(("Xft metrics %s[%d] = %d (%d,%d)%s advance %d, actual %d%s\n",\
|
||||
#dst,\
|
||||
fontnum,\
|
||||
@ -2279,11 +2296,12 @@ dumpXft(XtermWidget xw, XTermXftFonts *data)
|
||||
#define DUMP_XFT(xw, data) /* nothing */
|
||||
#endif
|
||||
|
||||
static void
|
||||
static int
|
||||
checkXft(XtermWidget xw, XTermXftFonts *data, XftFont *xft)
|
||||
{
|
||||
FcChar32 c;
|
||||
Dimension width = 0;
|
||||
int failed = 0;
|
||||
|
||||
data->font = xft;
|
||||
data->map.min_width = 0;
|
||||
@ -2308,8 +2326,19 @@ checkXft(XtermWidget xw, XTermXftFonts *data, XftFont *xft)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Sometimes someone uses a symbol font which has no useful ASCII or
|
||||
* Latin-1 characters. Allow that, in case they did it intentionally.
|
||||
*/
|
||||
if (width == 0) {
|
||||
failed = 1;
|
||||
if (xtermXftLastChar(xft) >= 256) {
|
||||
width = data->map.max_width;
|
||||
}
|
||||
}
|
||||
data->map.min_width = width;
|
||||
data->map.mixed = (data->map.max_width >= (data->map.min_width + 1));
|
||||
return failed;
|
||||
}
|
||||
|
||||
#if OPT_REPORT_FONTS
|
||||
@ -2353,6 +2382,38 @@ reportXftFonts(XtermWidget xw,
|
||||
#define reportXftFonts(xw, result, name, tag, match) /* empty */
|
||||
#endif /* OPT_REPORT_FONTS */
|
||||
|
||||
/*
|
||||
* Xft discards the pattern-match during open-pattern if the result happens to
|
||||
* match a currently-open file, but provides no clue to the caller when it does
|
||||
* this. That is, closing a font-file may leave the data in Xft's cache, while
|
||||
* opening a file may free the data used for the match.
|
||||
*
|
||||
* Because of this problem, we cannot reliably refer to the pattern-match data
|
||||
* if it may have been seen before.
|
||||
*/
|
||||
Boolean
|
||||
maybeXftCache(XtermWidget xw, XftFont *font)
|
||||
{
|
||||
Boolean result = False;
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
ListXftFonts *p;
|
||||
for (p = screen->list_xft_fonts; p != 0; p = p->next) {
|
||||
if (p->font == font) {
|
||||
result = True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
p = TypeXtMalloc(ListXftFonts);
|
||||
if (p != 0) {
|
||||
p->font = font;
|
||||
p->next = screen->list_xft_fonts;
|
||||
screen->list_xft_fonts = p;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static XftFont *
|
||||
xtermOpenXft(XtermWidget xw, const char *name, XftPattern *pat, const char *tag)
|
||||
{
|
||||
@ -2367,19 +2428,19 @@ xtermOpenXft(XtermWidget xw, const char *name, XftPattern *pat, const char *tag)
|
||||
result = XftFontOpenPattern(dpy, match);
|
||||
if (result != 0) {
|
||||
TRACE(("...matched %s font\n", tag));
|
||||
if (!maybeXftCache(xw, result)) {
|
||||
reportXftFonts(xw, result, name, tag, match);
|
||||
}
|
||||
} else {
|
||||
TRACE(("...could did not open %s font\n", tag));
|
||||
TRACE(("...could not open %s font\n", tag));
|
||||
XftPatternDestroy(match);
|
||||
if (xw->misc.fontWarnings >= fwAlways) {
|
||||
TRACE(("OOPS cannot open %s font \"%s\"\n", tag, name));
|
||||
cannotFont(xw, "open", tag, name);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TRACE(("...did not match %s font\n", tag));
|
||||
if (xw->misc.fontWarnings >= fwResource) {
|
||||
TRACE(("OOPS: cannot match %s font \"%s\"\n", tag, name));
|
||||
cannotFont(xw, "match", tag, name);
|
||||
}
|
||||
}
|
||||
@ -2414,29 +2475,268 @@ dimSquareRoot(double value)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
#define MY_UCS(code,high,wide,name) { code, high, wide, #name }
|
||||
static const struct {
|
||||
unsigned code, high, wide;
|
||||
const char *name;
|
||||
} unicode_boxes[] = {
|
||||
|
||||
MY_UCS(0x2500, 0, 1, box drawings light horizontal),
|
||||
MY_UCS(0x2502, 1, 0, box drawings light vertical),
|
||||
MY_UCS(0x250c, 2, 2, box drawings light down and right),
|
||||
MY_UCS(0x2510, 2, 2, box drawings light down and left),
|
||||
MY_UCS(0x2514, 2, 2, box drawings light up and right),
|
||||
MY_UCS(0x2518, 2, 2, box drawings light up and left),
|
||||
MY_UCS(0x251c, 1, 2, box drawings light vertical and right),
|
||||
MY_UCS(0x2524, 1, 2, box drawings light vertical and left),
|
||||
MY_UCS(0x252c, 2, 1, box drawings light down and horizontal),
|
||||
MY_UCS(0x2534, 2, 1, box drawings light up and horizontal),
|
||||
MY_UCS(0x253c, 1, 1, box drawings light vertical and horizontal),
|
||||
{
|
||||
0, 0, 0, NULL
|
||||
}
|
||||
};
|
||||
|
||||
#undef MY_UCS
|
||||
#endif /* OPT_WIDE_CHARS */
|
||||
|
||||
#ifdef DEBUG_XFT
|
||||
static void
|
||||
trace_xft_glyph(TScreen *screen, XftFont *font, FT_Face face, int code, const char *name)
|
||||
{
|
||||
if (!XftGlyphExists(screen->display, font, code)) {
|
||||
TRACE(("Xft glyph U+%04X missing :%s\n", code, name));
|
||||
} else if (FT_Load_Char(face, code, FT_LOAD_RENDER) == 0) {
|
||||
FT_GlyphSlot g = face->glyph;
|
||||
TRACE(("Xft glyph U+%04X size(%3d,%3d) at(%3d,%3d) :%s\n",
|
||||
code,
|
||||
g->bitmap.rows, g->bitmap.width,
|
||||
g->bitmap_top, g->bitmap_left,
|
||||
name));
|
||||
}
|
||||
}
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
static void
|
||||
trace_xft_line_drawing(TScreen *screen, XftFont *font, FT_Face face)
|
||||
{
|
||||
int n;
|
||||
for (n = 0; unicode_boxes[n].code != 0; ++n) {
|
||||
trace_xft_glyph(screen, font, face, unicode_boxes[n].code,
|
||||
unicode_boxes[n].name);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define trace_xft_line_drawing(screen, font, face) /* nothing */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void
|
||||
setBrokenBoxChars(XtermWidget xw, Bool state)
|
||||
{
|
||||
term->work.broken_box_chars = (Boolean) state;
|
||||
TScreenOf(xw)->broken_box_chars = (Boolean) state;
|
||||
update_font_boxchars();
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the line-drawing characters do not fill the bounding box. If so,
|
||||
* they're not useful.
|
||||
*/
|
||||
static void
|
||||
linedrawing_gaps(XtermWidget xw, XftFont *font)
|
||||
{
|
||||
Boolean broken;
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
int n;
|
||||
FT_Face face;
|
||||
face = XftLockFace(font);
|
||||
broken = False;
|
||||
for (n = 0; unicode_boxes[n].code; ++n) {
|
||||
unsigned code = unicode_boxes[n].code;
|
||||
|
||||
if (!XftGlyphExists(screen->display, font, code)) {
|
||||
TRACE(("Xft glyph U+%04X is missing\n", code));
|
||||
broken = True;
|
||||
break;
|
||||
}
|
||||
|
||||
if (FT_Load_Char(face, code, FT_LOAD_RENDER) == 0) {
|
||||
FT_GlyphSlot g = face->glyph;
|
||||
TRACE(("Xft glyph U+%04X size(%3d,%3d) at(%3d,%3d) :%s\n",
|
||||
code,
|
||||
g->bitmap.rows, g->bitmap.width,
|
||||
g->bitmap_top, g->bitmap_left,
|
||||
unicode_boxes[n].name));
|
||||
/*
|
||||
* While it is possible for badly-designed fonts to have line
|
||||
* drawing characters which do not meet, FreeType aggravates the
|
||||
* situation with its rounding. Check for an obvious case where
|
||||
* the weights at the ends of a vertical line do not add up. That
|
||||
* shows up as two under-weight rows at the beginning/end of the
|
||||
* bitmap.
|
||||
*/
|
||||
if (code == 0x2502) {
|
||||
unsigned r, c;
|
||||
unsigned mids = 0, ends = 0;
|
||||
unsigned char *data = g->bitmap.buffer;
|
||||
|
||||
switch (g->bitmap.pixel_mode) {
|
||||
case FT_PIXEL_MODE_MONO:
|
||||
/* FALLTHRU */
|
||||
case FT_PIXEL_MODE_GRAY:
|
||||
for (r = 0; r < (unsigned) g->bitmap.rows; ++r) {
|
||||
unsigned k = r * (unsigned) g->bitmap.pitch;
|
||||
unsigned sum = 0;
|
||||
for (c = 0; c < (unsigned) g->bitmap.width; ++c) {
|
||||
unsigned xx = 0;
|
||||
switch (g->bitmap.pixel_mode) {
|
||||
case FT_PIXEL_MODE_MONO:
|
||||
xx = (data[k + (c / 8)] >> (c % 8)) & 1;
|
||||
break;
|
||||
case FT_PIXEL_MODE_GRAY:
|
||||
xx = data[k + c];
|
||||
break;
|
||||
}
|
||||
sum += xx;
|
||||
TRACE2((" %2x", xx));
|
||||
}
|
||||
TRACE2((" = %u\n", sum));
|
||||
if (r > 0 && (r + 1) < (unsigned) g->bitmap.rows) {
|
||||
mids = sum;
|
||||
} else {
|
||||
ends += sum;
|
||||
}
|
||||
}
|
||||
TRACE(("...compare middle %u vs ends %u\n", mids, ends));
|
||||
if ((mids > ends) && (g->bitmap.rows < 16))
|
||||
broken = True;
|
||||
break;
|
||||
default:
|
||||
TRACE(("FIXME pixel_mode %d not handled\n",
|
||||
g->bitmap.pixel_mode));
|
||||
break;
|
||||
}
|
||||
if (broken)
|
||||
break;
|
||||
}
|
||||
switch (unicode_boxes[n].high) {
|
||||
case 1:
|
||||
if ((unsigned) g->bitmap.rows < (unsigned) FontHeight(screen)) {
|
||||
broken = True;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((unsigned) (g->bitmap.rows * 2) < (unsigned) FontHeight(screen)) {
|
||||
broken = True;
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch (unicode_boxes[n].wide) {
|
||||
case 1:
|
||||
if ((unsigned) g->bitmap.width < (unsigned) FontWidth(screen)) {
|
||||
broken = True;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((unsigned) (g->bitmap.width * 2) < (unsigned) FontWidth(screen)) {
|
||||
broken = True;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (broken)
|
||||
break;
|
||||
}
|
||||
}
|
||||
XftUnlockFace(font);
|
||||
#else
|
||||
broken = True;
|
||||
#endif
|
||||
|
||||
if (broken) {
|
||||
TRACE(("Xft line-drawing would leave gaps\n"));
|
||||
setBrokenBoxChars(xw, True);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Given the Xft font metrics, determine the actual font size. This is used
|
||||
* for each font to ensure that normal, bold and italic fonts follow the same
|
||||
* rule.
|
||||
*/
|
||||
static void
|
||||
setRenderFontsize(TScreen *screen, VTwin *win, XftFont *font, const char *tag)
|
||||
setRenderFontsize(XtermWidget xw, VTwin *win, XftFont *font, const char *tag)
|
||||
{
|
||||
if (font != 0) {
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
int width, height, ascent, descent;
|
||||
#ifdef DEBUG_XFT
|
||||
int n;
|
||||
FT_Face face;
|
||||
FT_Size size;
|
||||
FT_Size_Metrics metrics;
|
||||
Boolean scalable;
|
||||
Boolean is_fixed;
|
||||
Boolean debug_xft = False;
|
||||
|
||||
(void) screen;
|
||||
face = XftLockFace(font);
|
||||
size = face->size;
|
||||
metrics = size->metrics;
|
||||
is_fixed = FT_IS_FIXED_WIDTH(face);
|
||||
scalable = FT_IS_SCALABLE(face);
|
||||
trace_xft_line_drawing(screen, font, face);
|
||||
for (n = 32; n < 127; ++n) {
|
||||
char name[80];
|
||||
sprintf(name, "letter \"%c\"", n);
|
||||
trace_xft_glyph(screen, font, face, n, name);
|
||||
}
|
||||
XftUnlockFace(font);
|
||||
|
||||
/* freetype's inconsistent for this sign */
|
||||
metrics.descender = -metrics.descender;
|
||||
|
||||
#define TR_XFT "Xft metrics: "
|
||||
#define D_64(name) ((double)(metrics.name)/64.0)
|
||||
#define M_64(a,b) ((font->a * 64) != metrics.b)
|
||||
#define BOTH(a,b) D_64(b), M_64(a,b) ? "*" : ""
|
||||
|
||||
debug_xft = (M_64(ascent, ascender)
|
||||
|| M_64(descent, descender)
|
||||
|| M_64(height, height)
|
||||
|| M_64(max_advance_width, max_advance));
|
||||
|
||||
TRACE(("Xft font is %sscalable, %sfixed-width\n",
|
||||
is_fixed ? "" : "not ",
|
||||
scalable ? "" : "not "));
|
||||
|
||||
if (debug_xft) {
|
||||
TRACE(("Xft font size %d+%d vs %d by %d\n",
|
||||
font->ascent,
|
||||
font->descent,
|
||||
font->height,
|
||||
font->max_advance_width));
|
||||
TRACE((TR_XFT "ascender %6.2f%s\n", BOTH(ascent, ascender)));
|
||||
TRACE((TR_XFT "descender %6.2f%s\n", BOTH(descent, descender)));
|
||||
TRACE((TR_XFT "height %6.2f%s\n", BOTH(height, height)));
|
||||
TRACE((TR_XFT "max_advance %6.2f%s\n", BOTH(max_advance_width, max_advance)));
|
||||
} else {
|
||||
TRACE((TR_XFT "matches font\n"));
|
||||
}
|
||||
#endif
|
||||
|
||||
width = font->max_advance_width;
|
||||
height = font->height;
|
||||
ascent = font->ascent;
|
||||
descent = font->descent;
|
||||
if (height < ascent + descent) {
|
||||
TRACE(("...increase height from %d\n", height));
|
||||
TRACE(("...increase height from %d to %d\n", height, ascent + descent));
|
||||
height = ascent + descent;
|
||||
}
|
||||
if (is_double_width_font_xft(screen->display, font)) {
|
||||
TRACE(("...reduced width from %d\n", width));
|
||||
TRACE(("...reduce width from %d to %d\n", width, width >> 1));
|
||||
width >>= 1;
|
||||
}
|
||||
if (tag == 0) {
|
||||
@ -2462,15 +2762,19 @@ setRenderFontsize(TScreen *screen, VTwin *win, XftFont *font, const char *tag)
|
||||
} else {
|
||||
TRACE(("setRenderFontsize %s unchanged\n", tag));
|
||||
}
|
||||
if (!screen->broken_box_chars && (tag == 0)) {
|
||||
linedrawing_gaps(xw, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
checkFontInfo(int value, const char *tag)
|
||||
checkFontInfo(int value, const char *tag, int failed)
|
||||
{
|
||||
if (value == 0) {
|
||||
if (value == 0 || failed) {
|
||||
xtermWarning("Selected font has no non-zero %s for ISO-8859-1 encoding\n", tag);
|
||||
if (value == 0)
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@ -2542,6 +2846,7 @@ xtermComputeFontInfo(XtermWidget xw,
|
||||
#if OPT_RENDERFONT
|
||||
int fontnum = screen->menu_font_number;
|
||||
#endif
|
||||
int failed = 0;
|
||||
|
||||
#if OPT_RENDERFONT
|
||||
/*
|
||||
@ -2629,7 +2934,7 @@ xtermComputeFontInfo(XtermWidget xw,
|
||||
* graphics characters.
|
||||
*/
|
||||
if (screen->fnt_boxes) {
|
||||
screen->fnt_boxes = False;
|
||||
screen->fnt_boxes = 0;
|
||||
TRACE(("Xft opened - will %suse internal line-drawing characters\n",
|
||||
screen->fnt_boxes ? "not " : ""));
|
||||
}
|
||||
@ -2709,9 +3014,10 @@ xtermComputeFontInfo(XtermWidget xw,
|
||||
update_font_renderfont();
|
||||
/* now we will fall through into the bitmap fonts */
|
||||
} else {
|
||||
setRenderFontsize(screen, win, norm, NULL);
|
||||
setRenderFontsize(screen, win, bold, "bold");
|
||||
setRenderFontsize(screen, win, ital, "ital");
|
||||
setBrokenBoxChars(xw, False);
|
||||
setRenderFontsize(xw, win, norm, NULL);
|
||||
setRenderFontsize(xw, win, bold, "bold");
|
||||
setRenderFontsize(xw, win, ital, "ital");
|
||||
#if OPT_BOX_CHARS
|
||||
setupPackedFonts(xw);
|
||||
|
||||
@ -2762,8 +3068,8 @@ xtermComputeFontInfo(XtermWidget xw,
|
||||
win->f_ascent,
|
||||
win->f_descent));
|
||||
|
||||
checkFontInfo(win->f_height, "height");
|
||||
checkFontInfo(win->f_width, "width");
|
||||
checkFontInfo(win->f_height, "height", failed);
|
||||
checkFontInfo(win->f_width, "width", failed);
|
||||
}
|
||||
|
||||
/* save this information as a side-effect for double-sized characters */
|
||||
@ -3085,18 +3391,18 @@ xtermDrawBoxChar(XtermWidget xw,
|
||||
#endif
|
||||
&& (ch > 127)
|
||||
&& (ch != UCS_REPL)) {
|
||||
int which = (attr_flags & BOLD) ? fBold : fNorm;
|
||||
unsigned n;
|
||||
for (n = 1; n < 32; n++) {
|
||||
if (dec2ucs(n) == ch
|
||||
&& !((attr_flags & BOLD)
|
||||
? IsXtermMissingChar(screen, n, getNormalFont(screen, fBold))
|
||||
: IsXtermMissingChar(screen, n, getNormalFont(screen, fNorm)))) {
|
||||
TRACE(("...use xterm-style linedrawing\n"));
|
||||
if (xtermMissingChar(n, getNormalFont(screen, which)))
|
||||
continue;
|
||||
if (dec2ucs(n) != ch)
|
||||
continue;
|
||||
TRACE(("...use xterm-style linedrawing U+%04X ->%d\n", ch, n));
|
||||
ch = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE(("DRAW_BOX(%d) cell %dx%d at %d,%d%s\n",
|
||||
@ -4041,7 +4347,7 @@ save2FontList(XtermWidget xw,
|
||||
}
|
||||
if (success) {
|
||||
size_t limit = use_ttf ? MAX_XFT_FONTS : MAX_XLFD_FONTS;
|
||||
if (count > limit && !IsEmpty(value)) {
|
||||
if (count > limit && *x_skip_blanks(value)) {
|
||||
fprintf(stderr, "%s: too many fonts for %s, ignoring %s\n",
|
||||
ProgramName,
|
||||
whichFontEnum(which),
|
||||
@ -4074,7 +4380,7 @@ allocFontList(XtermWidget xw,
|
||||
char *blob;
|
||||
|
||||
blob = x_strdup(source);
|
||||
if (!IsEmpty(blob)) {
|
||||
if (blob != 0) {
|
||||
int n;
|
||||
int pass;
|
||||
char **list = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: fontutils.h,v 1.119 2017/06/19 08:31:10 tom Exp $ */
|
||||
/* $XTermId: fontutils.h,v 1.120 2017/12/14 01:28:08 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2016,2017 by Thomas E. Dickey
|
||||
@ -135,6 +135,7 @@ extern void xtermSaveVTFonts (XtermWidget /* xw */);
|
||||
#define xtermIsDecGraphic(ch) ((ch) > 0 && (ch) < 32)
|
||||
|
||||
#if OPT_RENDERFONT
|
||||
extern Boolean maybeXftCache(XtermWidget /* xw */, XftFont * /* font */);
|
||||
extern Bool xtermXftMissing (XtermWidget /* xw */, XftFont * /* font */, unsigned /* wc */);
|
||||
extern XTermXftFonts *getMyXftFont (XtermWidget /* xw */, int /* which */, int /* fontnum */);
|
||||
extern XftFont *getXftFont (XtermWidget /* xw */, VTFontEnum /* which */, int /* fontnum */);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: graphics_regis.c,v 1.96 2017/06/21 01:15:19 tom Exp $ */
|
||||
/* $XTermId: graphics_regis.c,v 1.101 2017/12/30 15:06:36 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2014-2016,2017 by Ross Combs
|
||||
@ -41,8 +41,7 @@
|
||||
#include <X11/extensions/Xdbe.h>
|
||||
#endif
|
||||
|
||||
#include <data.h>
|
||||
#include <VTparse.h>
|
||||
#include <fontutils.h>
|
||||
#include <ptyx.h>
|
||||
|
||||
#include <assert.h>
|
||||
@ -1742,11 +1741,14 @@ get_xft_glyph_dimensions(Display *display, XftFont *font, unsigned *w,
|
||||
* maxw and maxh without overstepping either dimension.
|
||||
*/
|
||||
static XftFont *
|
||||
find_best_xft_font_size(Display *display, Screen *screen, char const *fontname,
|
||||
find_best_xft_font_size(XtermWidget xw,
|
||||
char const *fontname,
|
||||
unsigned maxw, unsigned maxh, unsigned max_pixels,
|
||||
unsigned *w, unsigned *h,
|
||||
unsigned *xmin, unsigned *ymin)
|
||||
{
|
||||
Display *display = XtDisplay(xw);
|
||||
Screen *screen = XtScreen(xw);
|
||||
XftFont *font;
|
||||
unsigned targeth;
|
||||
unsigned ii, cacheindex;
|
||||
@ -1832,6 +1834,7 @@ find_best_xft_font_size(Display *display, Screen *screen, char const *fontname,
|
||||
XScreenNumberOfScreen(screen),
|
||||
pat, &status))) {
|
||||
font = XftFontOpenPattern(display, match);
|
||||
maybeXftCache(xw, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1977,12 +1980,12 @@ get_xft_bitmap_of_character(RegisGraphicsContext const *context,
|
||||
* - resuse the font where possible
|
||||
*/
|
||||
#ifdef XRENDERFONT
|
||||
Display *display = XtDisplay(context->destination_graphic->xw);
|
||||
Screen *screen = XtScreen(context->destination_graphic->xw);
|
||||
XtermWidget xw = context->destination_graphic->xw;
|
||||
Display *display = XtDisplay(xw);
|
||||
XftFont *font;
|
||||
unsigned xmin = 0U, ymin = 0U;
|
||||
|
||||
if (!(font = find_best_xft_font_size(display, screen, fontname, maxw, maxh,
|
||||
if (!(font = find_best_xft_font_size(xw, fontname, maxw, maxh,
|
||||
max_pixels, w, h, &xmin, &ymin))) {
|
||||
TRACE(("Unable to find suitable Xft font\n"));
|
||||
return 0;
|
||||
@ -5644,13 +5647,16 @@ parse_regis_option(RegisParseState *state, RegisGraphicsContext *context)
|
||||
/* FIXME: verify no leading char or button sequence */
|
||||
TRACE(("sending one-shot input report with %c at %d,%d\n",
|
||||
ch, x, y));
|
||||
#if 0 /* FIXME - dead code */
|
||||
if (ch == '\r') {
|
||||
/* Return only reports the location. */
|
||||
sprintf(reply, "[%d,%d]\r", x, y);
|
||||
} else if (ch == '\177') {
|
||||
/* DEL exits locator mode reporting nothing. */
|
||||
sprintf(reply, "\r");
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
sprintf(reply, "%c[%d,%d]\r", ch, x, y);
|
||||
}
|
||||
unparseputs(context->display_graphic->xw, reply);
|
||||
@ -6587,7 +6593,7 @@ parse_regis_option(RegisParseState *state, RegisGraphicsContext *context)
|
||||
TRACE(("found begin unbounded position stack \"%s\"\n",
|
||||
fragment_to_tempstr(&optionarg)));
|
||||
skip_regis_whitespace(&optionarg);
|
||||
if (!(fragment_consumed(&optionarg) > 0U)) {
|
||||
if (!fragment_consumed(&optionarg)) {
|
||||
TRACE(("DATA_ERROR: ignoring unexpected arguments to vector option '%c' arg \"%s\"\n",
|
||||
state->option, fragment_to_tempstr(&optionarg)));
|
||||
}
|
||||
@ -7182,7 +7188,6 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
|
||||
char temp[MAX_MACROGRAPH_LEN];
|
||||
char name;
|
||||
char prev = '\0';
|
||||
char next;
|
||||
int len = 0;
|
||||
|
||||
name = pop_fragment(input);
|
||||
@ -7195,7 +7200,7 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
|
||||
return 1;
|
||||
}
|
||||
for (;;) {
|
||||
next = peek_fragment(input);
|
||||
char next = peek_fragment(input);
|
||||
if (prev == '@' && next == ';') {
|
||||
/* FIXME: parse, handle :<name><definition>; */
|
||||
pop_fragment(input);
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* $XTermId: html.c,v 1.6 2017/05/30 09:14:55 tom Exp $ */
|
||||
/* $XTermId: html.c,v 1.11 2017/12/30 14:46:50 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2015 Jens Schweikhardt
|
||||
* Copyright 2015,2017 Jens Schweikhardt
|
||||
* Copyright 2017 Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -32,8 +33,13 @@
|
||||
#include <xterm.h>
|
||||
#include <version.h>
|
||||
|
||||
#define NO_COLOR ((unsigned)-1)
|
||||
#define RGBPCT(c) c.red / 655.35, c.green / 655.35, c.blue / 655.35
|
||||
#define MakeDim(color) \
|
||||
color = (unsigned short) ((2 * (unsigned) color) / 3)
|
||||
|
||||
#define RGBPCT(c) \
|
||||
((double)c.red / 655.35), \
|
||||
((double)c.green / 655.35), \
|
||||
((double)c.blue / 655.35)
|
||||
|
||||
#define DUMP_PREFIX "xterm"
|
||||
#define DUMP_SUFFIX ".xhtml"
|
||||
@ -176,11 +182,21 @@ dumpHtmlLine(XtermWidget xw, int row, FILE *fp)
|
||||
bgcolor.pixel = xw->old_background;
|
||||
#if OPT_ISO_COLORS
|
||||
if (ld->attribs[col] & FG_COLOR) {
|
||||
unsigned fg = extract_fg(xw, ld->color[col], ld->attribs[col]);
|
||||
Pixel fg = extract_fg(xw, ld->color[col], ld->attribs[col]);
|
||||
#if OPT_DIRECT_COLOR
|
||||
if (ld->attribs[col] & ATR_DIRECT_FG)
|
||||
fgcolor.pixel = fg;
|
||||
else
|
||||
#endif
|
||||
fgcolor.pixel = s->Acolors[fg].value;
|
||||
}
|
||||
if (ld->attribs[col] & BG_COLOR) {
|
||||
unsigned bg = extract_bg(xw, ld->color[col], ld->attribs[col]);
|
||||
Pixel bg = extract_bg(xw, ld->color[col], ld->attribs[col]);
|
||||
#if OPT_DIRECT_COLOR
|
||||
if (ld->attribs[col] & ATR_DIRECT_BG)
|
||||
bgcolor.pixel = bg;
|
||||
else
|
||||
#endif
|
||||
bgcolor.pixel = s->Acolors[bg].value;
|
||||
}
|
||||
#endif
|
||||
@ -195,9 +211,9 @@ dumpHtmlLine(XtermWidget xw, int row, FILE *fp)
|
||||
}
|
||||
#if OPT_WIDE_ATTRS
|
||||
if (ld->attribs[col] & ATR_FAINT) {
|
||||
fgcolor.red = (unsigned short) ((2 * fgcolor.red) / 3);
|
||||
fgcolor.green = (unsigned short) ((2 * fgcolor.green) / 3);
|
||||
fgcolor.blue = (unsigned short) ((2 * fgcolor.blue) / 3);
|
||||
MakeDim(fgcolor.red);
|
||||
MakeDim(fgcolor.green);
|
||||
MakeDim(fgcolor.blue);
|
||||
}
|
||||
#endif
|
||||
if (ld->attribs[col] & INVERSE) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: linedata.c,v 1.85 2014/11/13 01:17:59 tom Exp $ */
|
||||
/* $XTermId: linedata.c,v 1.90 2017/12/25 17:12:00 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2009-2013,2014 by Thomas E. Dickey
|
||||
* Copyright 2009-2014,2017 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <xterm.h>
|
||||
#include <data.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@ -61,18 +62,6 @@ getLineData(TScreen *screen, int row)
|
||||
}
|
||||
if (row >= 0 && row <= max_row) {
|
||||
result = (LineData *) scrnHeadAddr(screen, buffer, (unsigned) row);
|
||||
if (result != 0) {
|
||||
#if 1 /* FIXME - these should be done in setupLineData, etc. */
|
||||
result->lineSize = (Dimension) MaxCols(screen);
|
||||
#if OPT_WIDE_CHARS
|
||||
if (screen->wide_chars) {
|
||||
result->combSize = (Char) screen->max_combining;
|
||||
} else {
|
||||
result->combSize = 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* FIXME */
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -133,7 +122,7 @@ copyLineData(LineData *dst, CLineData *src)
|
||||
for (col = limit; col < dst->lineSize; ++col) {
|
||||
dst->attribs[col] = 0;
|
||||
#if OPT_ISO_COLORS
|
||||
dst->color[col] = 0;
|
||||
dst->color[col] = initCColor;
|
||||
#endif
|
||||
dst->charData[col] = 0;
|
||||
#if OPT_WIDE_CHARS
|
||||
@ -147,12 +136,25 @@ copyLineData(LineData *dst, CLineData *src)
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
#define initLineExtra(screen) \
|
||||
screen->lineExtra = ((size_t) (screen->max_combining) * sizeof(IChar *))
|
||||
screen->lineExtra = ((size_t) (screen->max_combining) * sizeof(IChar *)); \
|
||||
screen->cellExtra = ((size_t) (screen->max_combining) * sizeof(IChar))
|
||||
#else
|
||||
#define initLineExtra(screen) \
|
||||
screen->lineExtra = 0
|
||||
screen->lineExtra = 0; \
|
||||
screen->cellExtra = 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CellData size depends on the "combiningChars" resource.
|
||||
*/
|
||||
#define CellDataSize(screen) (SizeOfCellData + screen->cellExtra)
|
||||
|
||||
#define CellDataAddr(screen, data, cell) \
|
||||
( (CellData *)(void *) ((char *)data + (cell * CellDataSize(screen))) )
|
||||
#define ConstCellDataAddr(screen, data, cell) \
|
||||
( (const CellData *)(const void *) ( \
|
||||
(const char *)data + (cell * CellDataSize(screen))) )
|
||||
|
||||
void
|
||||
initLineData(XtermWidget xw)
|
||||
{
|
||||
@ -160,36 +162,49 @@ initLineData(XtermWidget xw)
|
||||
|
||||
initLineExtra(screen);
|
||||
|
||||
TRACE(("initLineData %lu\n", (unsigned long) screen->lineExtra));
|
||||
TRACE(("...sizeof(LineData) %lu\n", (unsigned long) sizeof(LineData)));
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE(("...sizeof(CellColor) %lu\n", (unsigned long) sizeof(CellColor)));
|
||||
#endif
|
||||
TRACE(("...sizeof(RowData) %lu\n", (unsigned long) sizeof(RowData)));
|
||||
TRACE(("...offset(lineSize) %lu\n", (unsigned long) offsetof(LineData, lineSize)));
|
||||
TRACE(("...offset(bufHead) %lu\n", (unsigned long) offsetof(LineData, bufHead)));
|
||||
#if OPT_WIDE_CHARS
|
||||
TRACE(("...offset(combSize) %lu\n", (unsigned long) offsetof(LineData, combSize)));
|
||||
#endif
|
||||
TRACE(("...offset(attribs) %lu\n", (unsigned long) offsetof(LineData, attribs)));
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE(("...offset(color) %lu\n", (unsigned long) offsetof(LineData, color)));
|
||||
#endif
|
||||
TRACE(("...offset(charData) %lu\n", (unsigned long) offsetof(LineData, charData)));
|
||||
TRACE(("...offset(combData) %lu\n", (unsigned long) offsetof(LineData, combData)));
|
||||
}
|
||||
TRACE(("initLineData %lu (%d combining chars)\n",
|
||||
(unsigned long) screen->lineExtra, screen->max_combining));
|
||||
|
||||
/*
|
||||
* CellData size depends on the "combiningChars" resource.
|
||||
* FIXME - revise this to reduce arithmetic...
|
||||
/*
|
||||
* Per-line size/offsets.
|
||||
*/
|
||||
#define CellDataSize(screen) (SizeOfCellData + screen->lineExtra)
|
||||
TRACE(("** sizeof(LineData) %lu\n", (unsigned long) sizeof(LineData)));
|
||||
TRACE((" offset(lineSize) %lu\n", (unsigned long) offsetof(LineData, lineSize)));
|
||||
TRACE((" offset(bufHead) %lu\n", (unsigned long) offsetof(LineData, bufHead)));
|
||||
#if OPT_WIDE_CHARS
|
||||
TRACE((" offset(combSize) %lu\n", (unsigned long) offsetof(LineData, combSize)));
|
||||
#endif
|
||||
TRACE((" offset(*attribs) %lu\n", (unsigned long) offsetof(LineData, attribs)));
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE((" offset(*color) %lu\n", (unsigned long) offsetof(LineData, color)));
|
||||
#endif
|
||||
TRACE((" offset(*charData) %lu\n", (unsigned long) offsetof(LineData, charData)));
|
||||
TRACE((" offset(*combData) %lu\n", (unsigned long) offsetof(LineData, combData)));
|
||||
|
||||
#define CellDataAddr(screen, data, cell) \
|
||||
( (CellData *)(void *) ((char *)data + (cell * CellDataSize(screen))) )
|
||||
#define ConstCellDataAddr(screen, data, cell) \
|
||||
( (const CellData *)(const void *) ( \
|
||||
(const char *)data + (cell * CellDataSize(screen))) )
|
||||
/*
|
||||
* Per-cell size/offsets.
|
||||
*/
|
||||
TRACE(("** sizeof(CellData) %lu\n", (unsigned long) CellDataSize(screen)));
|
||||
TRACE((" offset(attribs) %lu\n", (unsigned long) offsetof(CellData, attribs)));
|
||||
#if OPT_WIDE_CHARS
|
||||
TRACE((" offset(combSize) %lu\n", (unsigned long) offsetof(CellData, combSize)));
|
||||
#endif
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE((" offset(color) %lu\n", (unsigned long) offsetof(CellData, color)));
|
||||
#endif
|
||||
TRACE((" offset(charData) %lu\n", (unsigned long) offsetof(CellData, charData)));
|
||||
TRACE((" offset(combData) %lu\n", (unsigned long) offsetof(CellData, combData)));
|
||||
|
||||
/*
|
||||
* Data-type sizes.
|
||||
*/
|
||||
#if OPT_ISO_COLORS
|
||||
TRACE(("** sizeof(CellColor) %lu\n", (unsigned long) sizeof(CellColor)));
|
||||
#endif
|
||||
TRACE(("** sizeof(IAttr) %lu\n", (unsigned long) sizeof(IAttr)));
|
||||
TRACE(("** sizeof(IChar) %lu\n", (unsigned long) sizeof(IChar)));
|
||||
TRACE(("** sizeof(RowData) %lu\n", (unsigned long) sizeof(RowData)));
|
||||
}
|
||||
|
||||
CellData *
|
||||
newCellData(XtermWidget xw, Cardinal count)
|
||||
|
322
app/xterm/main.c
322
app/xterm/main.c
@ -1,4 +1,4 @@
|
||||
/* $XTermId: main.c,v 1.807 2017/06/20 22:59:13 tom Exp $ */
|
||||
/* $XTermId: main.c,v 1.809 2017/12/20 01:17:24 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002-2016,2017 by Thomas E. Dickey
|
||||
@ -928,215 +928,217 @@ static String fallback_resources[] =
|
||||
/* Command line options table. Only resources are entered here...there is a
|
||||
pass over the remaining options after XrmParseCommand is let loose. */
|
||||
/* *INDENT-OFF* */
|
||||
#define DATA(option,pattern,type,value) { (char *) option, (char *) pattern, type, (XPointer) value }
|
||||
static XrmOptionDescRec optionDescList[] = {
|
||||
{"-geometry", "*vt100.geometry",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-132", "*c132", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+132", "*c132", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-ah", "*alwaysHighlight", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+ah", "*alwaysHighlight", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-aw", "*autoWrap", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+aw", "*autoWrap", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-geometry", "*vt100.geometry",XrmoptionSepArg, NULL),
|
||||
DATA("-132", "*c132", XrmoptionNoArg, "on"),
|
||||
DATA("+132", "*c132", XrmoptionNoArg, "off"),
|
||||
DATA("-ah", "*alwaysHighlight", XrmoptionNoArg, "on"),
|
||||
DATA("+ah", "*alwaysHighlight", XrmoptionNoArg, "off"),
|
||||
DATA("-aw", "*autoWrap", XrmoptionNoArg, "on"),
|
||||
DATA("+aw", "*autoWrap", XrmoptionNoArg, "off"),
|
||||
#ifndef NO_ACTIVE_ICON
|
||||
{"-ai", "*activeIcon", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+ai", "*activeIcon", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-ai", "*activeIcon", XrmoptionNoArg, "off"),
|
||||
DATA("+ai", "*activeIcon", XrmoptionNoArg, "on"),
|
||||
#endif /* NO_ACTIVE_ICON */
|
||||
{"-b", "*internalBorder",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-bc", "*cursorBlink", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+bc", "*cursorBlink", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-bcf", "*cursorOffTime",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-bcn", "*cursorOnTime",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-bdc", "*colorBDMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+bdc", "*colorBDMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-cb", "*cutToBeginningOfLine", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+cb", "*cutToBeginningOfLine", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-cc", "*charClass", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-cm", "*colorMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+cm", "*colorMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-cn", "*cutNewline", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+cn", "*cutNewline", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-cr", "*cursorColor", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-cu", "*curses", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+cu", "*curses", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-dc", "*dynamicColors",XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+dc", "*dynamicColors",XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-fb", "*boldFont", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-fbb", "*freeBoldBox", XrmoptionNoArg, (XPointer)"off"},
|
||||
{"+fbb", "*freeBoldBox", XrmoptionNoArg, (XPointer)"on"},
|
||||
{"-fbx", "*forceBoxChars", XrmoptionNoArg, (XPointer)"off"},
|
||||
{"+fbx", "*forceBoxChars", XrmoptionNoArg, (XPointer)"on"},
|
||||
DATA("-b", "*internalBorder",XrmoptionSepArg, NULL),
|
||||
DATA("-bc", "*cursorBlink", XrmoptionNoArg, "on"),
|
||||
DATA("+bc", "*cursorBlink", XrmoptionNoArg, "off"),
|
||||
DATA("-bcf", "*cursorOffTime",XrmoptionSepArg, NULL),
|
||||
DATA("-bcn", "*cursorOnTime",XrmoptionSepArg, NULL),
|
||||
DATA("-bdc", "*colorBDMode", XrmoptionNoArg, "off"),
|
||||
DATA("+bdc", "*colorBDMode", XrmoptionNoArg, "on"),
|
||||
DATA("-cb", "*cutToBeginningOfLine", XrmoptionNoArg, "off"),
|
||||
DATA("+cb", "*cutToBeginningOfLine", XrmoptionNoArg, "on"),
|
||||
DATA("-cc", "*charClass", XrmoptionSepArg, NULL),
|
||||
DATA("-cm", "*colorMode", XrmoptionNoArg, "off"),
|
||||
DATA("+cm", "*colorMode", XrmoptionNoArg, "on"),
|
||||
DATA("-cn", "*cutNewline", XrmoptionNoArg, "off"),
|
||||
DATA("+cn", "*cutNewline", XrmoptionNoArg, "on"),
|
||||
DATA("-cr", "*cursorColor", XrmoptionSepArg, NULL),
|
||||
DATA("-cu", "*curses", XrmoptionNoArg, "on"),
|
||||
DATA("+cu", "*curses", XrmoptionNoArg, "off"),
|
||||
DATA("-dc", "*dynamicColors",XrmoptionNoArg, "off"),
|
||||
DATA("+dc", "*dynamicColors",XrmoptionNoArg, "on"),
|
||||
DATA("-fb", "*boldFont", XrmoptionSepArg, NULL),
|
||||
DATA("-fbb", "*freeBoldBox", XrmoptionNoArg, "off"),
|
||||
DATA("+fbb", "*freeBoldBox", XrmoptionNoArg, "on"),
|
||||
DATA("-fbx", "*forceBoxChars", XrmoptionNoArg, "off"),
|
||||
DATA("+fbx", "*forceBoxChars", XrmoptionNoArg, "on"),
|
||||
#ifndef NO_ACTIVE_ICON
|
||||
{"-fi", "*iconFont", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-fi", "*iconFont", XrmoptionSepArg, NULL),
|
||||
#endif /* NO_ACTIVE_ICON */
|
||||
#if OPT_RENDERFONT
|
||||
{"-fa", "*faceName", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-fd", "*faceNameDoublesize", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-fs", "*faceSize", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-fa", "*faceName", XrmoptionSepArg, NULL),
|
||||
DATA("-fd", "*faceNameDoublesize", XrmoptionSepArg, NULL),
|
||||
DATA("-fs", "*faceSize", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
#if OPT_WIDE_ATTRS && OPT_ISO_COLORS
|
||||
{"-itc", "*colorITMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+itc", "*colorITMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-itc", "*colorITMode", XrmoptionNoArg, "off"),
|
||||
DATA("+itc", "*colorITMode", XrmoptionNoArg, "on"),
|
||||
#endif
|
||||
#if OPT_WIDE_CHARS
|
||||
{"-fw", "*wideFont", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-fwb", "*wideBoldFont", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-fw", "*wideFont", XrmoptionSepArg, NULL),
|
||||
DATA("-fwb", "*wideBoldFont", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
#if OPT_INPUT_METHOD
|
||||
{"-fx", "*ximFont", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-fx", "*ximFont", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
#if OPT_HIGHLIGHT_COLOR
|
||||
{"-hc", "*highlightColor", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-hm", "*highlightColorMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+hm", "*highlightColorMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-selfg", "*highlightTextColor", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-selbg", "*highlightColor", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-hc", "*highlightColor", XrmoptionSepArg, NULL),
|
||||
DATA("-hm", "*highlightColorMode", XrmoptionNoArg, "on"),
|
||||
DATA("+hm", "*highlightColorMode", XrmoptionNoArg, "off"),
|
||||
DATA("-selfg", "*highlightTextColor", XrmoptionSepArg, NULL),
|
||||
DATA("-selbg", "*highlightColor", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
#if OPT_HP_FUNC_KEYS
|
||||
{"-hf", "*hpFunctionKeys",XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+hf", "*hpFunctionKeys",XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-hf", "*hpFunctionKeys",XrmoptionNoArg, "on"),
|
||||
DATA("+hf", "*hpFunctionKeys",XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
{"-hold", "*hold", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+hold", "*hold", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-hold", "*hold", XrmoptionNoArg, "on"),
|
||||
DATA("+hold", "*hold", XrmoptionNoArg, "off"),
|
||||
#if OPT_INITIAL_ERASE
|
||||
{"-ie", "*ptyInitialErase", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+ie", "*ptyInitialErase", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-ie", "*ptyInitialErase", XrmoptionNoArg, "on"),
|
||||
DATA("+ie", "*ptyInitialErase", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
{"-j", "*jumpScroll", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+j", "*jumpScroll", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-j", "*jumpScroll", XrmoptionNoArg, "on"),
|
||||
DATA("+j", "*jumpScroll", XrmoptionNoArg, "off"),
|
||||
#if OPT_C1_PRINT
|
||||
{"-k8", "*allowC1Printable", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+k8", "*allowC1Printable", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-k8", "*allowC1Printable", XrmoptionNoArg, "on"),
|
||||
DATA("+k8", "*allowC1Printable", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
{"-kt", "*keyboardType", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-kt", "*keyboardType", XrmoptionSepArg, NULL),
|
||||
/* parse logging options anyway for compatibility */
|
||||
{"-l", "*logging", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+l", "*logging", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-lf", "*logFile", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-ls", "*loginShell", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+ls", "*loginShell", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-mb", "*marginBell", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+mb", "*marginBell", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-mc", "*multiClickTime", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-mesg", "*messages", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+mesg", "*messages", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-ms", "*pointerColor",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-nb", "*nMarginBell", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-nul", "*underLine", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+nul", "*underLine", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-pc", "*boldColors", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+pc", "*boldColors", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-rw", "*reverseWrap", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+rw", "*reverseWrap", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-s", "*multiScroll", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+s", "*multiScroll", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-sb", "*scrollBar", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+sb", "*scrollBar", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-l", "*logging", XrmoptionNoArg, "on"),
|
||||
DATA("+l", "*logging", XrmoptionNoArg, "off"),
|
||||
DATA("-lf", "*logFile", XrmoptionSepArg, NULL),
|
||||
DATA("-ls", "*loginShell", XrmoptionNoArg, "on"),
|
||||
DATA("+ls", "*loginShell", XrmoptionNoArg, "off"),
|
||||
DATA("-mb", "*marginBell", XrmoptionNoArg, "on"),
|
||||
DATA("+mb", "*marginBell", XrmoptionNoArg, "off"),
|
||||
DATA("-mc", "*multiClickTime", XrmoptionSepArg, NULL),
|
||||
DATA("-mesg", "*messages", XrmoptionNoArg, "off"),
|
||||
DATA("+mesg", "*messages", XrmoptionNoArg, "on"),
|
||||
DATA("-ms", "*pointerColor",XrmoptionSepArg, NULL),
|
||||
DATA("-nb", "*nMarginBell", XrmoptionSepArg, NULL),
|
||||
DATA("-nul", "*underLine", XrmoptionNoArg, "off"),
|
||||
DATA("+nul", "*underLine", XrmoptionNoArg, "on"),
|
||||
DATA("-pc", "*boldColors", XrmoptionNoArg, "on"),
|
||||
DATA("+pc", "*boldColors", XrmoptionNoArg, "off"),
|
||||
DATA("-rw", "*reverseWrap", XrmoptionNoArg, "on"),
|
||||
DATA("+rw", "*reverseWrap", XrmoptionNoArg, "off"),
|
||||
DATA("-s", "*multiScroll", XrmoptionNoArg, "on"),
|
||||
DATA("+s", "*multiScroll", XrmoptionNoArg, "off"),
|
||||
DATA("-sb", "*scrollBar", XrmoptionNoArg, "on"),
|
||||
DATA("+sb", "*scrollBar", XrmoptionNoArg, "off"),
|
||||
#if OPT_REPORT_CCLASS
|
||||
{"-report-charclass","*reportCClass", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-report-charclass","*reportCClass", XrmoptionNoArg, "on"),
|
||||
#endif
|
||||
#if OPT_REPORT_COLORS
|
||||
{"-report-colors","*reportColors", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-report-colors", "*reportColors", XrmoptionNoArg, "on"),
|
||||
#endif
|
||||
#if OPT_REPORT_FONTS
|
||||
{"-report-fonts","*reportFonts", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-report-fonts", "*reportFonts", XrmoptionNoArg, "on"),
|
||||
#endif
|
||||
#ifdef SCROLLBAR_RIGHT
|
||||
{"-leftbar", "*rightScrollBar", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-rightbar", "*rightScrollBar", XrmoptionNoArg, (XPointer) "on"},
|
||||
DATA("-leftbar", "*rightScrollBar", XrmoptionNoArg, "off"),
|
||||
DATA("-rightbar", "*rightScrollBar", XrmoptionNoArg, "on"),
|
||||
#endif
|
||||
{"-rvc", "*colorRVMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+rvc", "*colorRVMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-sf", "*sunFunctionKeys", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+sf", "*sunFunctionKeys", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-sh", "*scaleHeight", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-si", "*scrollTtyOutput", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+si", "*scrollTtyOutput", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-sk", "*scrollKey", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+sk", "*scrollKey", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-sl", "*saveLines", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-rvc", "*colorRVMode", XrmoptionNoArg, "off"),
|
||||
DATA("+rvc", "*colorRVMode", XrmoptionNoArg, "on"),
|
||||
DATA("-sf", "*sunFunctionKeys", XrmoptionNoArg, "on"),
|
||||
DATA("+sf", "*sunFunctionKeys", XrmoptionNoArg, "off"),
|
||||
DATA("-sh", "*scaleHeight", XrmoptionSepArg, NULL),
|
||||
DATA("-si", "*scrollTtyOutput", XrmoptionNoArg, "off"),
|
||||
DATA("+si", "*scrollTtyOutput", XrmoptionNoArg, "on"),
|
||||
DATA("-sk", "*scrollKey", XrmoptionNoArg, "on"),
|
||||
DATA("+sk", "*scrollKey", XrmoptionNoArg, "off"),
|
||||
DATA("-sl", "*saveLines", XrmoptionSepArg, NULL),
|
||||
#if OPT_SUNPC_KBD
|
||||
{"-sp", "*sunKeyboard", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+sp", "*sunKeyboard", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-sp", "*sunKeyboard", XrmoptionNoArg, "on"),
|
||||
DATA("+sp", "*sunKeyboard", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
#if OPT_TEK4014
|
||||
{"-t", "*tekStartup", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+t", "*tekStartup", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-t", "*tekStartup", XrmoptionNoArg, "on"),
|
||||
DATA("+t", "*tekStartup", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
{"-ti", "*decTerminalID",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-tm", "*ttyModes", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-tn", "*termName", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-ti", "*decTerminalID",XrmoptionSepArg, NULL),
|
||||
DATA("-tm", "*ttyModes", XrmoptionSepArg, NULL),
|
||||
DATA("-tn", "*termName", XrmoptionSepArg, NULL),
|
||||
#if OPT_WIDE_CHARS
|
||||
{"-u8", "*utf8", XrmoptionNoArg, (XPointer) "2"},
|
||||
{"+u8", "*utf8", XrmoptionNoArg, (XPointer) "0"},
|
||||
DATA("-u8", "*utf8", XrmoptionNoArg, "2"),
|
||||
DATA("+u8", "*utf8", XrmoptionNoArg, "0"),
|
||||
#endif
|
||||
#if OPT_LUIT_PROG
|
||||
{"-lc", "*locale", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+lc", "*locale", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-lcc", "*localeFilter",XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-en", "*locale", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-lc", "*locale", XrmoptionNoArg, "on"),
|
||||
DATA("+lc", "*locale", XrmoptionNoArg, "off"),
|
||||
DATA("-lcc", "*localeFilter",XrmoptionSepArg, NULL),
|
||||
DATA("-en", "*locale", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
{"-uc", "*cursorUnderLine", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+uc", "*cursorUnderLine", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-ulc", "*colorULMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+ulc", "*colorULMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-ulit", "*italicULMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"+ulit", "*italicULMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"-ut", "*utmpInhibit", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+ut", "*utmpInhibit", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-im", "*useInsertMode", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+im", "*useInsertMode", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-vb", "*visualBell", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+vb", "*visualBell", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-pob", "*popOnBell", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+pob", "*popOnBell", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-uc", "*cursorUnderLine", XrmoptionNoArg, "on"),
|
||||
DATA("+uc", "*cursorUnderLine", XrmoptionNoArg, "off"),
|
||||
DATA("-ulc", "*colorULMode", XrmoptionNoArg, "off"),
|
||||
DATA("+ulc", "*colorULMode", XrmoptionNoArg, "on"),
|
||||
DATA("-ulit", "*italicULMode", XrmoptionNoArg, "off"),
|
||||
DATA("+ulit", "*italicULMode", XrmoptionNoArg, "on"),
|
||||
DATA("-ut", "*utmpInhibit", XrmoptionNoArg, "on"),
|
||||
DATA("+ut", "*utmpInhibit", XrmoptionNoArg, "off"),
|
||||
DATA("-im", "*useInsertMode", XrmoptionNoArg, "on"),
|
||||
DATA("+im", "*useInsertMode", XrmoptionNoArg, "off"),
|
||||
DATA("-vb", "*visualBell", XrmoptionNoArg, "on"),
|
||||
DATA("+vb", "*visualBell", XrmoptionNoArg, "off"),
|
||||
DATA("-pob", "*popOnBell", XrmoptionNoArg, "on"),
|
||||
DATA("+pob", "*popOnBell", XrmoptionNoArg, "off"),
|
||||
#if OPT_WIDE_CHARS
|
||||
{"-wc", "*wideChars", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+wc", "*wideChars", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-mk_width", "*mkWidth", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+mk_width", "*mkWidth", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-cjk_width", "*cjkWidth", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+cjk_width", "*cjkWidth", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-wc", "*wideChars", XrmoptionNoArg, "on"),
|
||||
DATA("+wc", "*wideChars", XrmoptionNoArg, "off"),
|
||||
DATA("-mk_width", "*mkWidth", XrmoptionNoArg, "on"),
|
||||
DATA("+mk_width", "*mkWidth", XrmoptionNoArg, "off"),
|
||||
DATA("-cjk_width", "*cjkWidth", XrmoptionNoArg, "on"),
|
||||
DATA("+cjk_width", "*cjkWidth", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
{"-wf", "*waitForMap", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+wf", "*waitForMap", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-wf", "*waitForMap", XrmoptionNoArg, "on"),
|
||||
DATA("+wf", "*waitForMap", XrmoptionNoArg, "off"),
|
||||
#if OPT_ZICONBEEP
|
||||
{"-ziconbeep", "*zIconBeep", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("-ziconbeep", "*zIconBeep", XrmoptionSepArg, NULL),
|
||||
#endif
|
||||
#if OPT_SAME_NAME
|
||||
{"-samename", "*sameName", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+samename", "*sameName", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-samename", "*sameName", XrmoptionNoArg, "on"),
|
||||
DATA("+samename", "*sameName", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
#if OPT_SESSION_MGT
|
||||
{"-sm", "*sessionMgt", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+sm", "*sessionMgt", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-sm", "*sessionMgt", XrmoptionNoArg, "on"),
|
||||
DATA("+sm", "*sessionMgt", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
#if OPT_TOOLBAR
|
||||
{"-tb", "*"XtNtoolBar, XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+tb", "*"XtNtoolBar, XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-tb", "*"XtNtoolBar, XrmoptionNoArg, "on"),
|
||||
DATA("+tb", "*"XtNtoolBar, XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
#if OPT_MAXIMIZE
|
||||
{"-maximized", "*maximized", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+maximized", "*maximized", XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-fullscreen", "*fullscreen", XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+fullscreen", "*fullscreen", XrmoptionNoArg, (XPointer) "off"},
|
||||
DATA("-maximized", "*maximized", XrmoptionNoArg, "on"),
|
||||
DATA("+maximized", "*maximized", XrmoptionNoArg, "off"),
|
||||
DATA("-fullscreen", "*fullscreen", XrmoptionNoArg, "on"),
|
||||
DATA("+fullscreen", "*fullscreen", XrmoptionNoArg, "off"),
|
||||
#endif
|
||||
/* options that we process ourselves */
|
||||
{"-help", NULL, XrmoptionSkipNArgs, (XPointer) NULL},
|
||||
{"-version", NULL, XrmoptionSkipNArgs, (XPointer) NULL},
|
||||
{"-baudrate", NULL, XrmoptionSkipArg, (XPointer) NULL},
|
||||
{"-class", NULL, XrmoptionSkipArg, (XPointer) NULL},
|
||||
{"-e", NULL, XrmoptionSkipLine, (XPointer) NULL},
|
||||
{"-into", NULL, XrmoptionSkipArg, (XPointer) NULL},
|
||||
DATA("-help", NULL, XrmoptionSkipNArgs, NULL),
|
||||
DATA("-version", NULL, XrmoptionSkipNArgs, NULL),
|
||||
DATA("-baudrate", NULL, XrmoptionSkipArg, NULL),
|
||||
DATA("-class", NULL, XrmoptionSkipArg, NULL),
|
||||
DATA("-e", NULL, XrmoptionSkipLine, NULL),
|
||||
DATA("-into", NULL, XrmoptionSkipArg, NULL),
|
||||
/* bogus old compatibility stuff for which there are
|
||||
standard XtOpenApplication options now */
|
||||
{"%", "*tekGeometry", XrmoptionStickyArg, (XPointer) NULL},
|
||||
{"#", ".iconGeometry",XrmoptionStickyArg, (XPointer) NULL},
|
||||
{"-T", ".title", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-n", "*iconName", XrmoptionSepArg, (XPointer) NULL},
|
||||
{"-r", "*reverseVideo",XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+r", "*reverseVideo",XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-rv", "*reverseVideo",XrmoptionNoArg, (XPointer) "on"},
|
||||
{"+rv", "*reverseVideo",XrmoptionNoArg, (XPointer) "off"},
|
||||
{"-w", ".borderWidth", XrmoptionSepArg, (XPointer) NULL},
|
||||
DATA("%", "*tekGeometry", XrmoptionStickyArg, NULL),
|
||||
DATA("#", ".iconGeometry",XrmoptionStickyArg, NULL),
|
||||
DATA("-T", ".title", XrmoptionSepArg, NULL),
|
||||
DATA("-n", "*iconName", XrmoptionSepArg, NULL),
|
||||
DATA("-r", "*reverseVideo",XrmoptionNoArg, "on"),
|
||||
DATA("+r", "*reverseVideo",XrmoptionNoArg, "off"),
|
||||
DATA("-rv", "*reverseVideo",XrmoptionNoArg, "on"),
|
||||
DATA("+rv", "*reverseVideo",XrmoptionNoArg, "off"),
|
||||
DATA("-w", ".borderWidth", XrmoptionSepArg, NULL),
|
||||
#undef DATA
|
||||
};
|
||||
|
||||
static OptionHelp xtermOptions[] = {
|
||||
@ -1449,7 +1451,7 @@ parseArg(int *num, char **argv, char **valuep)
|
||||
{
|
||||
/* table adapted from XtInitialize, used here to improve abbreviations */
|
||||
/* *INDENT-OFF* */
|
||||
#define DATA(option,kind) { option, NULL, kind, (XtPointer) NULL }
|
||||
#define DATA(option,kind) { (char *) option, NULL, kind, (XtPointer) NULL }
|
||||
static XrmOptionDescRec opTable[] = {
|
||||
DATA("+synchronous", XrmoptionNoArg),
|
||||
DATA("-background", XrmoptionSepArg),
|
||||
@ -2619,7 +2621,7 @@ main(int argc, char *argv[]ENVP_ARG)
|
||||
command_length_with_luit = x_countargv(command_to_exec_with_luit);
|
||||
if (count_exec) {
|
||||
static char *fixup_shell[] =
|
||||
{"sh", "-c", 0};
|
||||
{(char *) "sh", (char *) "-c", 0};
|
||||
char *delimiter[2];
|
||||
delimiter[0] = x_strdup("--");
|
||||
delimiter[1] = 0;
|
||||
@ -3205,7 +3207,7 @@ HsSysError(int error)
|
||||
handshake.status = PTY_FATALERROR;
|
||||
handshake.error = errno;
|
||||
handshake.fatal_error = error;
|
||||
strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer) - 1);
|
||||
|
||||
if (resource.ptyHandshake && (cp_pipe[1] >= 0)) {
|
||||
TRACE(("HsSysError errno=%d, error=%d device \"%s\"\n",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: menu.c,v 1.344 2017/01/02 23:46:03 tom Exp $ */
|
||||
/* $XTermId: menu.c,v 1.350 2017/12/29 20:54:09 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -476,15 +476,17 @@ typedef struct {
|
||||
} MenuHeader;
|
||||
|
||||
/* This table is ordered to correspond with MenuIndex */
|
||||
#define DATA(name) { (char *)#name, name ## Entries, XtNumber(name ## Entries ) }
|
||||
static const MenuHeader menu_names[] = {
|
||||
{ "mainMenu", mainMenuEntries, XtNumber(mainMenuEntries) },
|
||||
{ "vtMenu", vtMenuEntries, XtNumber(vtMenuEntries) },
|
||||
{ "fontMenu", fontMenuEntries, XtNumber(fontMenuEntries) },
|
||||
DATA( mainMenu),
|
||||
DATA( vtMenu),
|
||||
DATA( fontMenu),
|
||||
#if OPT_TEK4014
|
||||
{ "tekMenu", tekMenuEntries, XtNumber(tekMenuEntries) },
|
||||
DATA( tekMenu),
|
||||
#endif
|
||||
{ 0, 0, 0 },
|
||||
{ NULL, 0, 0 },
|
||||
};
|
||||
#undef DATA
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/*
|
||||
@ -788,7 +790,7 @@ domenu(Widget w,
|
||||
update_keyboard_type();
|
||||
#ifdef OPT_PRINT_ON_EXIT
|
||||
screen->write_error = !IsEmpty(resource.printFileOnXError);
|
||||
SetItemSensitivity(mainMenuEntries[mainMenu_write_now].widget, False);
|
||||
SetItemSensitivity(mainMenuEntries[mainMenu_write_now].widget, True);
|
||||
SetItemSensitivity(mainMenuEntries[mainMenu_write_error].widget, screen->write_error);
|
||||
#endif
|
||||
}
|
||||
@ -837,9 +839,6 @@ domenu(Widget w,
|
||||
update_menu_allowBoldFonts();
|
||||
#if OPT_BOX_CHARS
|
||||
update_font_boxchars();
|
||||
SetItemSensitivity(
|
||||
fontMenuEntries[fontMenu_font_boxchars].widget,
|
||||
True);
|
||||
update_font_packed();
|
||||
SetItemSensitivity(
|
||||
fontMenuEntries[fontMenu_font_packedfont].widget,
|
||||
@ -1600,8 +1599,7 @@ do_cursorblink(Widget gw GCC_UNUSED,
|
||||
XtPointer closure GCC_UNUSED,
|
||||
XtPointer data GCC_UNUSED)
|
||||
{
|
||||
TScreen *screen = TScreenOf(term);
|
||||
ToggleCursorBlink(screen);
|
||||
ToggleCursorBlink(TScreenOf(term));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2603,7 +2601,6 @@ HandleCursorBlink(Widget w,
|
||||
String *params,
|
||||
Cardinal *param_count)
|
||||
{
|
||||
/* eventually want to see if sensitive or not */
|
||||
handle_vt_toggle(do_cursorblink, TScreenOf(term)->cursor_blink,
|
||||
params, *param_count, w);
|
||||
}
|
||||
@ -3615,10 +3612,17 @@ update_marginbell(void)
|
||||
void
|
||||
update_cursorblink(void)
|
||||
{
|
||||
BlinkOps check = TScreenOf(term)->cursor_blink;
|
||||
|
||||
if (check == cbAlways ||
|
||||
check == cbNever) {
|
||||
SetItemSensitivity(vtMenuEntries[vtMenu_cursorblink].widget, False);
|
||||
}
|
||||
UpdateCheckbox("update_cursorblink",
|
||||
vtMenuEntries,
|
||||
vtMenu_cursorblink,
|
||||
TScreenOf(term)->cursor_blink);
|
||||
(check == cbTrue ||
|
||||
check == cbAlways));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3679,10 +3683,13 @@ update_font_doublesize(void)
|
||||
void
|
||||
update_font_boxchars(void)
|
||||
{
|
||||
SetItemSensitivity(fontMenuEntries[fontMenu_font_boxchars].widget,
|
||||
!TScreenOf(term)->broken_box_chars);
|
||||
UpdateCheckbox("update_font_boxchars",
|
||||
fontMenuEntries,
|
||||
fontMenu_font_boxchars,
|
||||
TScreenOf(term)->force_box_chars);
|
||||
TScreenOf(term)->force_box_chars ||
|
||||
TScreenOf(term)->broken_box_chars);
|
||||
}
|
||||
|
||||
void
|
||||
@ -3716,6 +3723,14 @@ update_font_renderfont(void)
|
||||
(term->work.render_font == True));
|
||||
SetItemSensitivity(fontMenuEntries[fontMenu_render_font].widget,
|
||||
!IsEmpty(CurrentXftFont(term)));
|
||||
|
||||
if (term->work.render_font) {
|
||||
TScreenOf(term)->broken_box_chars = term->work.broken_box_chars;
|
||||
} else {
|
||||
TScreenOf(term)->broken_box_chars = False;
|
||||
}
|
||||
update_font_boxchars();
|
||||
|
||||
update_fontmenu(term);
|
||||
}
|
||||
#endif
|
||||
|
300
app/xterm/misc.c
300
app/xterm/misc.c
@ -1,4 +1,4 @@
|
||||
/* $XTermId: misc.c,v 1.757 2017/06/20 08:52:18 tom Exp $ */
|
||||
/* $XTermId: misc.c,v 1.785 2017/12/26 11:42:24 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -126,6 +126,9 @@
|
||||
(event.xcrossing.window == XtWindow(XtParent(xw))))
|
||||
#endif
|
||||
|
||||
#define VB_DELAY screen->visualBellDelay
|
||||
#define EVENT_DELAY TScreenOf(term)->nextEventDelay
|
||||
|
||||
static Boolean xtermAllocColor(XtermWidget, XColor *, const char *);
|
||||
static Cursor make_hidden_cursor(XtermWidget);
|
||||
|
||||
@ -562,7 +565,7 @@ xtermAppPending(void)
|
||||
* this case, to avoid max'ing the CPU.
|
||||
*/
|
||||
if (hold_screen && caught_intr && !found) {
|
||||
Sleep(10);
|
||||
Sleep(EVENT_DELAY);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -613,7 +616,7 @@ xevents(void)
|
||||
* this function, e.g., those handled in in_put().
|
||||
*/
|
||||
if (screen->waitingForTrackInfo) {
|
||||
Sleep(10);
|
||||
Sleep(EVENT_DELAY);
|
||||
return;
|
||||
}
|
||||
XtAppNextEvent(app_con, &event);
|
||||
@ -1241,8 +1244,6 @@ Bell(XtermWidget xw, int which, int percent)
|
||||
}
|
||||
}
|
||||
|
||||
#define VB_DELAY screen->visualBellDelay
|
||||
|
||||
static void
|
||||
flashWindow(TScreen *screen, Window window, GC visualGC, unsigned width, unsigned height)
|
||||
{
|
||||
@ -1311,7 +1312,14 @@ xtermWarning(const char *fmt,...)
|
||||
va_list ap;
|
||||
|
||||
fflush(stdout);
|
||||
TRACE(("xtermWarning fmt='%s'\n", fmt));
|
||||
|
||||
#if OPT_TRACE
|
||||
va_start(ap, fmt);
|
||||
Trace("xtermWarning: ");
|
||||
TraceVA(fmt, ap);
|
||||
va_end(ap);
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "%s: ", ProgramName);
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
@ -1329,7 +1337,14 @@ xtermPerror(const char *fmt,...)
|
||||
va_list ap;
|
||||
|
||||
fflush(stdout);
|
||||
TRACE(("xtermPerror fmt='%s', msg='%s'\n", fmt, NonNull(msg)));
|
||||
|
||||
#if OPT_TRACE
|
||||
va_start(ap, fmt);
|
||||
Trace("xtermPerror: ");
|
||||
TraceVA(fmt, ap);
|
||||
va_end(ap);
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "%s: ", ProgramName);
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
@ -2195,6 +2210,19 @@ FlushLog(XtermWidget xw)
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
static unsigned
|
||||
maskToShift(unsigned long mask)
|
||||
{
|
||||
unsigned result = 0;
|
||||
if (mask != 0) {
|
||||
while ((mask & 1) == 0) {
|
||||
mask >>= 1;
|
||||
++result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
getVisualInfo(XtermWidget xw)
|
||||
{
|
||||
@ -2224,10 +2252,25 @@ rgb masks (%04lx/%04lx/%04lx)\n"
|
||||
|
||||
if ((xw->visInfo != 0) && (xw->numVisuals > 0)) {
|
||||
XVisualInfo *vi = xw->visInfo;
|
||||
xw->rgb_shifts[0] = maskToShift(vi->red_mask);
|
||||
xw->rgb_shifts[1] = maskToShift(vi->green_mask);
|
||||
xw->rgb_shifts[2] = maskToShift(vi->blue_mask);
|
||||
|
||||
xw->has_rgb = ((vi->red_mask != 0) &&
|
||||
(vi->green_mask != 0) &&
|
||||
(vi->blue_mask != 0) &&
|
||||
((vi->red_mask & vi->green_mask) == 0) &&
|
||||
((vi->green_mask & vi->blue_mask) == 0) &&
|
||||
((vi->blue_mask & vi->red_mask) == 0));
|
||||
|
||||
if (resource.reportColors) {
|
||||
printf(MYFMT, MYARG);
|
||||
}
|
||||
TRACE((MYFMT, MYARG));
|
||||
TRACE(("...shifts %u/%u/%u\n",
|
||||
xw->rgb_shifts[0],
|
||||
xw->rgb_shifts[1],
|
||||
xw->rgb_shifts[2]));
|
||||
}
|
||||
}
|
||||
return (xw->visInfo != 0) && (xw->numVisuals > 0);
|
||||
@ -2892,6 +2935,100 @@ xtermClosestColor(XtermWidget xw, int find_red, int find_green, int find_blue)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if OPT_DIRECT_COLOR
|
||||
int
|
||||
getDirectColor(XtermWidget xw, int red, int green, int blue)
|
||||
{
|
||||
#define nRGB(name,shift) \
|
||||
((unsigned long)(name << xw->rgb_shifts[shift]) \
|
||||
& xw->visInfo->name ##_mask)
|
||||
MyPixel result = (MyPixel) (nRGB(red, 0) | nRGB(green, 1) | nRGB(blue, 2));
|
||||
return (int) result;
|
||||
}
|
||||
|
||||
static void
|
||||
formatDirectColor(char *target, XtermWidget xw, unsigned value)
|
||||
{
|
||||
#define fRGB(name, shift) \
|
||||
(value & xw->visInfo->name ## _mask) >> xw->rgb_shifts[shift]
|
||||
sprintf(target, "%lu:%lu:%lu", fRGB(red, 0), fRGB(green, 1), fRGB(blue, 2));
|
||||
}
|
||||
#endif /* OPT_DIRECT_COLOR */
|
||||
|
||||
#define fg2SGR(n) \
|
||||
(n) >= 8 ? 9 : 3, \
|
||||
(n) >= 8 ? (n) - 8 : (n)
|
||||
#define bg2SGR(n) \
|
||||
(n) >= 8 ? 10 : 4, \
|
||||
(n) >= 8 ? (n) - 8 : (n)
|
||||
|
||||
#define EndOf(s) (s) + strlen(s)
|
||||
|
||||
char *
|
||||
xtermFormatSGR(XtermWidget xw, char *target, unsigned attr, int fg, int bg)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
char *msg = target;
|
||||
|
||||
strcpy(target, "0");
|
||||
if (attr & BOLD)
|
||||
strcat(msg, ";1");
|
||||
if (attr & UNDERLINE)
|
||||
strcat(msg, ";4");
|
||||
if (attr & BLINK)
|
||||
strcat(msg, ";5");
|
||||
if (attr & INVERSE)
|
||||
strcat(msg, ";7");
|
||||
if (attr & INVISIBLE)
|
||||
strcat(msg, ";8");
|
||||
#if OPT_WIDE_ATTRS
|
||||
if (attr & ATR_FAINT)
|
||||
strcat(msg, ";2");
|
||||
if (attr & ATR_ITALIC)
|
||||
strcat(msg, ";3");
|
||||
if (attr & ATR_STRIKEOUT)
|
||||
strcat(msg, ";9");
|
||||
if (attr & ATR_DBL_UNDER)
|
||||
strcat(msg, ";21");
|
||||
#endif
|
||||
#if OPT_256_COLORS || OPT_88_COLORS
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (attr & FG_COLOR) {
|
||||
if_OPT_DIRECT_COLOR2(screen, hasDirectFG(attr), {
|
||||
strcat(msg, ";38:2::");
|
||||
formatDirectColor(EndOf(msg), xw, (unsigned) fg);
|
||||
} else
|
||||
)if (fg >= 16) {
|
||||
sprintf(EndOf(msg), ";38:5:%d", fg);
|
||||
} else {
|
||||
sprintf(EndOf(msg), ";%d%d", fg2SGR(fg));
|
||||
}
|
||||
}
|
||||
if (attr & BG_COLOR) {
|
||||
if_OPT_DIRECT_COLOR2(screen, hasDirectBG(attr), {
|
||||
strcat(msg, ";48:2::");
|
||||
formatDirectColor(EndOf(msg), xw, (unsigned) bg);
|
||||
} else
|
||||
)if (bg >= 16) {
|
||||
sprintf(EndOf(msg), ";48:5:%d", bg);
|
||||
} else {
|
||||
sprintf(EndOf(msg), ";%d%d", bg2SGR(bg));
|
||||
}
|
||||
}
|
||||
});
|
||||
#elif OPT_ISO_COLORS
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (attr & FG_COLOR) {
|
||||
sprintf(EndOf(msg), ";%d%d", fg2SGR(fg));
|
||||
}
|
||||
if (attr & BG_COLOR) {
|
||||
sprintf(EndOf(msg), ";%d%d", bg2SGR(bg));
|
||||
}
|
||||
});
|
||||
#endif
|
||||
return target;
|
||||
}
|
||||
|
||||
#if OPT_PASTE64
|
||||
static void
|
||||
ManipulateSelectionData(XtermWidget xw, TScreen *screen, char *buf, int final)
|
||||
@ -4079,6 +4216,7 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
cp++;
|
||||
if (*cp++ == 'q') {
|
||||
if (!strcmp(cp, "\"q")) { /* DECSCA */
|
||||
TRACE(("DECRQSS -> DECSCA\n"));
|
||||
sprintf(reply, "%d%s",
|
||||
(screen->protected_mode == DEC_PROTECT)
|
||||
&& (xw->flags & PROTECTED) ? 1 : 0,
|
||||
@ -4088,6 +4226,7 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
/* actually none of DECRQSS is valid for vt100's */
|
||||
break;
|
||||
}
|
||||
TRACE(("DECRQSS -> DECSCL\n"));
|
||||
sprintf(reply, "%d%s%s",
|
||||
(screen->vtXX_level ?
|
||||
screen->vtXX_level : 1) + 60,
|
||||
@ -4097,11 +4236,13 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
: "",
|
||||
cp);
|
||||
} else if (!strcmp(cp, "r")) { /* DECSTBM */
|
||||
TRACE(("DECRQSS -> DECSTBM\n"));
|
||||
sprintf(reply, "%d;%dr",
|
||||
screen->top_marg + 1,
|
||||
screen->bot_marg + 1);
|
||||
} else if (!strcmp(cp, "s")) { /* DECSLRM */
|
||||
if (screen->vtXX_level >= 4) { /* VT420 */
|
||||
TRACE(("DECRQSS -> DECSLRM\n"));
|
||||
sprintf(reply, "%d;%ds",
|
||||
screen->lft_marg + 1,
|
||||
screen->rgt_marg + 1);
|
||||
@ -4109,62 +4250,8 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
okay = False;
|
||||
}
|
||||
} else if (!strcmp(cp, "m")) { /* SGR */
|
||||
strcpy(reply, "0");
|
||||
if (xw->flags & BOLD)
|
||||
strcat(reply, ";1");
|
||||
if (xw->flags & UNDERLINE)
|
||||
strcat(reply, ";4");
|
||||
if (xw->flags & BLINK)
|
||||
strcat(reply, ";5");
|
||||
if (xw->flags & INVERSE)
|
||||
strcat(reply, ";7");
|
||||
if (xw->flags & INVISIBLE)
|
||||
strcat(reply, ";8");
|
||||
#if OPT_256_COLORS || OPT_88_COLORS
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (xw->flags & FG_COLOR) {
|
||||
if (xw->cur_foreground >= 16)
|
||||
sprintf(reply + strlen(reply),
|
||||
";38;5;%d", xw->cur_foreground);
|
||||
else
|
||||
sprintf(reply + strlen(reply),
|
||||
";%d%d",
|
||||
xw->cur_foreground >= 8 ? 9 : 3,
|
||||
xw->cur_foreground >= 8 ?
|
||||
xw->cur_foreground - 8 :
|
||||
xw->cur_foreground);
|
||||
}
|
||||
if (xw->flags & BG_COLOR) {
|
||||
if (xw->cur_background >= 16)
|
||||
sprintf(reply + strlen(reply),
|
||||
";48;5;%d", xw->cur_foreground);
|
||||
else
|
||||
sprintf(reply + strlen(reply),
|
||||
";%d%d",
|
||||
xw->cur_background >= 8 ? 10 : 4,
|
||||
xw->cur_background >= 8 ?
|
||||
xw->cur_background - 8 :
|
||||
xw->cur_background);
|
||||
}
|
||||
});
|
||||
#elif OPT_ISO_COLORS
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (xw->flags & FG_COLOR)
|
||||
sprintf(reply + strlen(reply),
|
||||
";%d%d",
|
||||
xw->cur_foreground >= 8 ? 9 : 3,
|
||||
xw->cur_foreground >= 8 ?
|
||||
xw->cur_foreground - 8 :
|
||||
xw->cur_foreground);
|
||||
if (xw->flags & BG_COLOR)
|
||||
sprintf(reply + strlen(reply),
|
||||
";%d%d",
|
||||
xw->cur_background >= 8 ? 10 : 4,
|
||||
xw->cur_background >= 8 ?
|
||||
xw->cur_background - 8 :
|
||||
xw->cur_background);
|
||||
});
|
||||
#endif
|
||||
TRACE(("DECRQSS -> SGR\n"));
|
||||
xtermFormatSGR(xw, reply, xw->flags, xw->cur_foreground, xw->cur_background);
|
||||
strcat(reply, "m");
|
||||
} else if (!strcmp(cp, " q")) { /* DECSCUSR */
|
||||
int code = STEADY_BLOCK;
|
||||
@ -4176,13 +4263,14 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
if (screen->cursor_blink_esc != 0)
|
||||
code -= 1;
|
||||
#endif
|
||||
TRACE(("reply DECSCUSR\n"));
|
||||
sprintf(reply, "%d%s", code, cp);
|
||||
} else
|
||||
} else {
|
||||
okay = False;
|
||||
}
|
||||
|
||||
if (okay) {
|
||||
unparseputc1(xw, ANSI_DCS);
|
||||
unparseputc(xw, '1');
|
||||
unparseputc(xw, okay ? '1' : '0');
|
||||
unparseputc(xw, '$');
|
||||
unparseputc(xw, 'r');
|
||||
cp = reply;
|
||||
@ -4191,9 +4279,6 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
|
||||
} else {
|
||||
unparseputc(xw, ANSI_CAN);
|
||||
}
|
||||
} else {
|
||||
unparseputc(xw, ANSI_CAN);
|
||||
}
|
||||
break;
|
||||
#if OPT_TCAP_QUERY
|
||||
case '+':
|
||||
@ -4337,17 +4422,18 @@ enum {
|
||||
* Only one mode can be reported at a time.
|
||||
*/
|
||||
void
|
||||
do_rpm(XtermWidget xw, int nparams, int *params)
|
||||
do_ansi_rqm(XtermWidget xw, int nparams, int *params)
|
||||
{
|
||||
ANSI reply;
|
||||
int count = 0;
|
||||
|
||||
TRACE(("do_rpm %d:%d\n", nparams, params[0]));
|
||||
TRACE(("do_ansi_rqm %d:%d\n", nparams, params[0]));
|
||||
memset(&reply, 0, sizeof(reply));
|
||||
|
||||
if (nparams >= 1) {
|
||||
int result = 0;
|
||||
int result = mdUnknown;
|
||||
|
||||
/* DECRQM can only ask about one mode at a time */
|
||||
switch (params[0]) {
|
||||
case 1: /* GATM */
|
||||
result = mdAlwaysReset;
|
||||
@ -4394,19 +4480,20 @@ do_rpm(XtermWidget xw, int nparams, int *params)
|
||||
}
|
||||
|
||||
void
|
||||
do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
do_dec_rqm(XtermWidget xw, int nparams, int *params)
|
||||
{
|
||||
ANSI reply;
|
||||
int count = 0;
|
||||
|
||||
TRACE(("do_decrpm %d:%d\n", nparams, params[0]));
|
||||
TRACE(("do_dec_rqm %d:%d\n", nparams, params[0]));
|
||||
memset(&reply, 0, sizeof(reply));
|
||||
|
||||
if (nparams >= 1) {
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
int result = 0;
|
||||
int result = mdUnknown;
|
||||
|
||||
switch (params[0]) {
|
||||
/* DECRQM can only ask about one mode at a time */
|
||||
switch ((DECSET_codes) params[0]) {
|
||||
case srm_DECCKM:
|
||||
result = MdFlag(xw->keyboard.flags, MODE_DECCKM);
|
||||
break;
|
||||
@ -4444,8 +4531,31 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
break;
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
case srm_ATT610_BLINK: /* att610: Start/stop blinking cursor */
|
||||
result = MdBool(screen->cursor_blink_res);
|
||||
case srm_ATT610_BLINK: /* AT&T 610: Start/stop blinking cursor */
|
||||
result = MdBool(screen->cursor_blink_esc);
|
||||
break;
|
||||
case srm_CURSOR_BLINK_OPS:
|
||||
switch (screen->cursor_blink) {
|
||||
case cbTrue:
|
||||
result = mdMaybeSet;
|
||||
break;
|
||||
case cbFalse:
|
||||
result = mdMaybeReset;
|
||||
break;
|
||||
case cbAlways:
|
||||
result = mdAlwaysSet;
|
||||
break;
|
||||
case cbLAST:
|
||||
/* FALLTHRU */
|
||||
case cbNever:
|
||||
result = mdAlwaysReset;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case srm_XOR_CURSOR_BLINKS:
|
||||
result = (screen->cursor_blink_xor
|
||||
? mdAlwaysSet
|
||||
: mdAlwaysReset);
|
||||
break;
|
||||
#endif
|
||||
case srm_DECPFF: /* print form feed */
|
||||
@ -4477,7 +4587,11 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
result = MdBool(screen->curses);
|
||||
break;
|
||||
case srm_DECNRCM: /* national charset (VT220) */
|
||||
if (screen->vtXX_level >= 2) {
|
||||
result = MdFlag(xw->flags, NATIONAL);
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
break;
|
||||
case srm_MARGIN_BELL: /* margin bell */
|
||||
result = MdBool(screen->marginbell);
|
||||
@ -4506,7 +4620,11 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
result = MdFlag(xw->keyboard.flags, MODE_DECBKM);
|
||||
break;
|
||||
case srm_DECLRMM:
|
||||
if (screen->vtXX_level >= 4) { /* VT420 */
|
||||
result = MdFlag(xw->flags, LEFT_RIGHT);
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
break;
|
||||
#if OPT_SIXEL_GRAPHICS
|
||||
case srm_DECSDM:
|
||||
@ -4514,7 +4632,11 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
break;
|
||||
#endif
|
||||
case srm_DECNCSM:
|
||||
if (screen->vtXX_level >= 5) { /* VT510 */
|
||||
result = MdFlag(xw->flags, NOCLEAR_COLM);
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
break;
|
||||
case srm_VT200_MOUSE: /* xterm bogus sequence */
|
||||
result = MdBool(screen->send_mouse_pos == VT200_MOUSE);
|
||||
@ -4580,7 +4702,13 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
case srm_POP_ON_BELL:
|
||||
result = MdBool(screen->poponbell);
|
||||
break;
|
||||
case srm_TITE_INHIBIT:
|
||||
case srm_KEEP_CLIPBOARD:
|
||||
result = MdBool(screen->keepClipboard);
|
||||
break;
|
||||
case srm_ALLOW_ALTBUF:
|
||||
result = MdBool(xw->misc.titeInhibit);
|
||||
break;
|
||||
case srm_SAVE_CURSOR:
|
||||
result = MdBool(screen->sc[screen->whichBuf].saved);
|
||||
break;
|
||||
#if OPT_TCAP_FKEYS
|
||||
@ -4613,22 +4741,22 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
|
||||
#endif
|
||||
#if OPT_READLINE
|
||||
case srm_BUTTON1_MOVE_POINT:
|
||||
result = MdBool(screen->click1_moves);
|
||||
result = MdBool(SCREEN_FLAG(screen, click1_moves));
|
||||
break;
|
||||
case srm_BUTTON2_MOVE_POINT:
|
||||
result = MdBool(screen->paste_moves);
|
||||
result = MdBool(SCREEN_FLAG(screen, paste_moves));
|
||||
break;
|
||||
case srm_DBUTTON3_DELETE:
|
||||
result = MdBool(screen->dclick3_deletes);
|
||||
result = MdBool(SCREEN_FLAG(screen, dclick3_deletes));
|
||||
break;
|
||||
case srm_PASTE_IN_BRACKET:
|
||||
result = MdBool(screen->paste_brackets);
|
||||
result = MdBool(SCREEN_FLAG(screen, paste_brackets));
|
||||
break;
|
||||
case srm_PASTE_QUOTE:
|
||||
result = MdBool(screen->paste_quotes);
|
||||
result = MdBool(SCREEN_FLAG(screen, paste_quotes));
|
||||
break;
|
||||
case srm_PASTE_LITERAL_NL:
|
||||
result = MdBool(screen->paste_literal_nl);
|
||||
result = MdBool(SCREEN_FLAG(screen, paste_literal_nl));
|
||||
break;
|
||||
#endif /* OPT_READLINE */
|
||||
#if OPT_SIXEL_GRAPHICS
|
||||
@ -5262,7 +5390,7 @@ NormalExit(void)
|
||||
hold_screen = 2;
|
||||
while (hold_screen) {
|
||||
xevents();
|
||||
Sleep(10);
|
||||
Sleep(EVENT_DELAY);
|
||||
}
|
||||
}
|
||||
#if OPT_SESSION_MGT
|
||||
|
@ -4,6 +4,12 @@ xterm-dev (331) unstable; urgency=low
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 08 Aug 2017 19:08:43 -0400
|
||||
|
||||
xterm-dev (331) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 08 Aug 2017 19:08:43 -0400
|
||||
|
||||
xterm-dev (330) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
@ -5,9 +5,9 @@
|
||||
# and "make makesum".
|
||||
|
||||
PORTNAME= xterm
|
||||
PORTVERSION= 330
|
||||
PORTVERSION= 331
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ftp://invisible-island.net/xterm/ \
|
||||
MASTER_SITES= ftp://ftp.invisible-island.net/xterm/ \
|
||||
CRITICAL
|
||||
PKGNAMESUFFIX= -dev
|
||||
EXTRACT_SUFX= .tgz
|
||||
@ -29,7 +29,7 @@ LIBS+= -L${LOCALBASE}/lib
|
||||
|
||||
ICONVERSION= 1
|
||||
|
||||
OPTIONS_DEFINE= WCHAR LUIT DECTERM PCRE DABBREV 256COLOR SIXEL GNOME LOGGING TOOLBAR
|
||||
OPTIONS_DEFINE= WCHAR LUIT DECTERM PCRE PCRE2 DABBREV 256COLOR SIXEL GNOME LOGGING TOOLBAR
|
||||
OPTIONS_RADIO= 3D
|
||||
OPTIONS_RADIO_3D= XAW3D XAW3DXFT NEXTAW
|
||||
|
||||
@ -54,6 +54,8 @@ WCHAR_CONFIGURE_ENABLE= wide-chars
|
||||
DECTERM_CONFIGURE_ENABLE= dec-locator
|
||||
PCRE_CONFIGURE_WITH= pcre
|
||||
PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
|
||||
PCRE2_CONFIGURE_WITH= pcre2
|
||||
PCRE2_LIB_DEPENDS= libpcre2-8.so:${PORTSDIR}/devel/pcre2
|
||||
DABBREV_CONFIGURE_ENABLE= dabbrev
|
||||
SIXEL_CONFIGURE_ENABLE= sixel-graphics
|
||||
GNOME_USES= desktop-file-utils
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: print.c,v 1.161 2017/06/19 08:11:13 tom Exp $ */
|
||||
/* $XTermId: print.c,v 1.166 2017/12/19 23:47:15 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2016,2017 by Thomas E. Dickey
|
||||
@ -75,10 +75,14 @@ static void stringToPrinter(XtermWidget /* xw */ ,
|
||||
const char * /*str */ );
|
||||
|
||||
static void
|
||||
closePrinter(XtermWidget xw GCC_UNUSED)
|
||||
closePrinter(XtermWidget xw)
|
||||
{
|
||||
if (xtermHasPrinter(xw) != 0) {
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
if (SPS.fp != 0) {
|
||||
if (SPS.toFile) {
|
||||
fclose(SPS.fp);
|
||||
SPS.fp = 0;
|
||||
} else if (xtermHasPrinter(xw) != 0) {
|
||||
#ifdef VMS
|
||||
char pcommand[256];
|
||||
(void) sprintf(pcommand, "%s %s;",
|
||||
@ -86,7 +90,6 @@ closePrinter(XtermWidget xw GCC_UNUSED)
|
||||
VMS_TEMP_PRINT_FILE);
|
||||
#endif
|
||||
|
||||
if (SPS.fp != 0) {
|
||||
DEBUG_MSG("closePrinter\n");
|
||||
pclose(SPS.fp);
|
||||
TRACE(("closed printer, waiting...\n"));
|
||||
@ -116,8 +119,6 @@ printCursorLine(XtermWidget xw)
|
||||
printLine(xw, screen->cur_row, '\n', getPrinterFlags(xw, NULL, 0));
|
||||
}
|
||||
|
||||
#define NO_COLOR ((unsigned)-1)
|
||||
|
||||
/*
|
||||
* DEC's manual doesn't document whether trailing blanks are removed, or what
|
||||
* happens with a line that is entirely blank. This function prints the
|
||||
@ -133,11 +134,11 @@ printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags *p)
|
||||
#if OPT_ISO_COLORS && OPT_PRINT_COLORS
|
||||
#define ColorOf(ld,col) (ld->color[col])
|
||||
#endif
|
||||
unsigned fg = NO_COLOR;
|
||||
unsigned bg = NO_COLOR;
|
||||
Pixel fg = NO_COLOR;
|
||||
Pixel bg = NO_COLOR;
|
||||
#if OPT_PRINT_COLORS
|
||||
unsigned last_fg = NO_COLOR;
|
||||
unsigned last_bg = NO_COLOR;
|
||||
Pixel last_fg = NO_COLOR;
|
||||
Pixel last_bg = NO_COLOR;
|
||||
#endif
|
||||
|
||||
ld = getLineData(screen, inx);
|
||||
@ -179,19 +180,19 @@ printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags *p)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if ((((ld->attribs[col] & SGR_MASK) != attr)
|
||||
if ((((ld->attribs[col] & ATTRIBUTES) != attr)
|
||||
#if OPT_PRINT_COLORS
|
||||
|| (last_fg != fg) || (last_bg != bg)
|
||||
#endif
|
||||
)
|
||||
&& ch) {
|
||||
attr = ld->attribs[col] & SGR_MASK;
|
||||
attr = (IAttr) (ld->attribs[col] & ATTRIBUTES);
|
||||
#if OPT_PRINT_COLORS
|
||||
last_fg = fg;
|
||||
last_bg = bg;
|
||||
#endif
|
||||
if (p->print_attributes)
|
||||
send_SGR(xw, attr, fg, bg);
|
||||
send_SGR(xw, attr, (unsigned) fg, (unsigned) bg);
|
||||
}
|
||||
|
||||
if (ch == 0)
|
||||
@ -383,38 +384,16 @@ send_SGR(XtermWidget xw, unsigned attr, unsigned fg, unsigned bg)
|
||||
{
|
||||
char msg[80];
|
||||
|
||||
strcpy(msg, "\033[0");
|
||||
if (attr & BOLD)
|
||||
strcat(msg, ";1");
|
||||
#if OPT_WIDE_ATTRS
|
||||
if (attr & ATR_FAINT)
|
||||
strcat(msg, ";2");
|
||||
if (attr & ATR_ITALIC)
|
||||
strcat(msg, ";3");
|
||||
#endif
|
||||
if (attr & UNDERLINE)
|
||||
strcat(msg, ";4"); /* typo? DEC documents this as '2' */
|
||||
if (attr & BLINK)
|
||||
strcat(msg, ";5");
|
||||
if (attr & INVERSE) /* typo? DEC documents this as invisible */
|
||||
strcat(msg, ";7");
|
||||
#if OPT_PRINT_COLORS
|
||||
if (bg != NO_COLOR) {
|
||||
sprintf(msg + strlen(msg), ";%u", (bg < 8) ? (40 + bg) : (92 + bg));
|
||||
}
|
||||
if (fg != NO_COLOR) {
|
||||
#if OPT_PC_COLORS
|
||||
#if OPT_ISO_COLORS && OPT_PC_COLORS
|
||||
if ((attr & FG_COLOR) && (fg != NO_COLOR)) {
|
||||
if (TScreenOf(xw)->boldColors
|
||||
&& fg > 8
|
||||
&& (attr & BOLD) != 0)
|
||||
fg -= 8;
|
||||
#endif
|
||||
sprintf(msg + strlen(msg), ";%u", (fg < 8) ? (30 + fg) : (82 + fg));
|
||||
}
|
||||
#else
|
||||
(void) bg;
|
||||
(void) fg;
|
||||
#endif
|
||||
strcpy(msg, "\033[");
|
||||
xtermFormatSGR(xw, msg + strlen(msg), attr, (int) fg, (int) bg);
|
||||
strcat(msg, "m");
|
||||
stringToPrinter(xw, msg);
|
||||
}
|
||||
@ -427,7 +406,7 @@ charToPrinter(XtermWidget xw, unsigned chr)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
|
||||
if (!SPS.isOpen && xtermHasPrinter(xw)) {
|
||||
if (!SPS.isOpen && (SPS.toFile || xtermHasPrinter(xw))) {
|
||||
switch (SPS.toFile) {
|
||||
/*
|
||||
* write to a pipe.
|
||||
|
123
app/xterm/ptyx.h
123
app/xterm/ptyx.h
@ -1,4 +1,4 @@
|
||||
/* $XTermId: ptyx.h,v 1.854 2017/05/29 00:49:11 tom Exp $ */
|
||||
/* $XTermId: ptyx.h,v 1.879 2017/12/30 14:42:05 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#if defined(HAVE_STDINT_H) || !defined(HAVE_CONFIG_H)
|
||||
#include <stdint.h>
|
||||
#define DECONST(type,s) ((type *)(intptr_t)(const type *)(s))
|
||||
#else
|
||||
@ -615,6 +615,10 @@ typedef struct {
|
||||
#define OPT_ISO_COLORS 1 /* true if xterm is configured with ISO colors */
|
||||
#endif
|
||||
|
||||
#ifndef OPT_DIRECT_COLOR
|
||||
#define OPT_DIRECT_COLOR 0 /* true if xterm is configured with direct-colors */
|
||||
#endif
|
||||
|
||||
#ifndef OPT_256_COLORS
|
||||
#define OPT_256_COLORS 0 /* true if xterm is configured with 256 colors */
|
||||
#endif
|
||||
@ -1018,7 +1022,7 @@ typedef enum {
|
||||
|
||||
/*
|
||||
* Use this enumerated type to check consistency among dpmodes(), savemodes()
|
||||
* restoremodes() and do_decrpm().
|
||||
* restoremodes() and do_dec_rqm().
|
||||
*/
|
||||
typedef enum {
|
||||
srm_DECCKM = 1
|
||||
@ -1035,6 +1039,8 @@ typedef enum {
|
||||
#endif
|
||||
#if OPT_BLINK_CURS
|
||||
,srm_ATT610_BLINK = 12
|
||||
,srm_CURSOR_BLINK_OPS = 13
|
||||
,srm_XOR_CURSOR_BLINKS = 14
|
||||
#endif
|
||||
,srm_DECPFF = 18
|
||||
,srm_DECPEX = 19
|
||||
@ -1054,8 +1060,6 @@ typedef enum {
|
||||
#ifdef ALLOWLOGGING
|
||||
,srm_ALLOWLOGGING = 46
|
||||
#endif
|
||||
,srm_OPT_ALTBUF_CURSOR = 1049
|
||||
,srm_OPT_ALTBUF = 1047
|
||||
,srm_ALTBUF = 47
|
||||
,srm_DECNKM = 66
|
||||
,srm_DECBKM = 67
|
||||
@ -1091,7 +1095,10 @@ typedef enum {
|
||||
,srm_BELL_IS_URGENT = 1042
|
||||
,srm_POP_ON_BELL = 1043
|
||||
,srm_KEEP_CLIPBOARD = 1044
|
||||
,srm_TITE_INHIBIT = 1048
|
||||
,srm_ALLOW_ALTBUF = 1046
|
||||
,srm_OPT_ALTBUF = 1047
|
||||
,srm_SAVE_CURSOR = 1048
|
||||
,srm_OPT_ALTBUF_CURSOR = 1049
|
||||
#if OPT_TCAP_FKEYS
|
||||
,srm_TCAP_FKEYS = 1050
|
||||
#endif
|
||||
@ -1138,6 +1145,16 @@ typedef enum {
|
||||
,NSELECTUNITS
|
||||
} SelectUnit;
|
||||
|
||||
#if OPT_BLINK_CURS
|
||||
typedef enum {
|
||||
cbFalse = 0
|
||||
, cbTrue
|
||||
, cbAlways
|
||||
, cbNever
|
||||
, cbLAST
|
||||
} BlinkOps;
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
ecSetColor = 1
|
||||
, ecGetColor
|
||||
@ -1261,6 +1278,8 @@ typedef enum {
|
||||
# define NUM_ANSI_COLORS MIN_ANSI_COLORS
|
||||
#endif
|
||||
|
||||
#define okIndexedColor(n) ((n) >= 0 && (n) < NUM_ANSI_COLORS)
|
||||
|
||||
#if NUM_ANSI_COLORS > MIN_ANSI_COLORS
|
||||
# define OPT_EXT_COLORS 1
|
||||
#else
|
||||
@ -1322,6 +1341,14 @@ typedef enum {
|
||||
# define if_OPT_ISO_COLORS(screen, code) /* nothing */
|
||||
#endif
|
||||
|
||||
#if OPT_DIRECT_COLOR
|
||||
# define if_OPT_DIRECT_COLOR(screen, code) if (screen->direct_color) code
|
||||
# define if_OPT_DIRECT_COLOR2(screen, test, code) if (screen->direct_color && (test)) code
|
||||
#else
|
||||
# define if_OPT_DIRECT_COLOR(screen, code) /* nothing */
|
||||
# define if_OPT_DIRECT_COLOR2(screen, test, code) /* nothing */
|
||||
#endif
|
||||
|
||||
#define COLOR_RES_NAME(root) "color" root
|
||||
|
||||
#if OPT_COLOR_CLASS
|
||||
@ -1538,24 +1565,67 @@ typedef struct {
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
/*
|
||||
* Pixel (and its components) are declared as unsigned long, but even for RGB
|
||||
* we need no more than 32-bits.
|
||||
*/
|
||||
typedef uint32_t MyPixel;
|
||||
typedef int32_t MyColor;
|
||||
|
||||
#if OPT_ISO_COLORS
|
||||
#if OPT_256_COLORS || OPT_88_COLORS
|
||||
#if OPT_DIRECT_COLOR
|
||||
typedef struct {
|
||||
MyColor fg;
|
||||
MyColor bg;
|
||||
} CellColor;
|
||||
|
||||
#define isSameCColor(p,q) (!memcmp(&(p), &(q), sizeof(CellColor)))
|
||||
|
||||
#elif OPT_256_COLORS || OPT_88_COLORS
|
||||
|
||||
#define COLOR_BITS 8
|
||||
typedef unsigned short CellColor;
|
||||
|
||||
#else
|
||||
|
||||
#define COLOR_BITS 4
|
||||
typedef Char CellColor;
|
||||
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned CellColor;
|
||||
#endif
|
||||
|
||||
#define NO_COLOR ((unsigned)-1)
|
||||
|
||||
#ifndef isSameCColor
|
||||
#define isSameCColor(p,q) ((p) == (q))
|
||||
#endif
|
||||
|
||||
#define BITS2MASK(b) ((1 << b) - 1)
|
||||
|
||||
#define COLOR_MASK BITS2MASK(COLOR_BITS)
|
||||
|
||||
#define GetCellColorFG(src) ((src) & COLOR_MASK)
|
||||
#define GetCellColorBG(src) (((src) >> COLOR_BITS) & COLOR_MASK)
|
||||
#if OPT_DIRECT_COLOR
|
||||
#define clrDirectFG(flags) UIntClr(flags, ATR_DIRECT_FG)
|
||||
#define clrDirectBG(flags) UIntClr(flags, ATR_DIRECT_BG)
|
||||
#define GetCellColorFG(data) ((data).fg)
|
||||
#define GetCellColorBG(data) ((data).bg)
|
||||
#define hasDirectFG(flags) ((flags) & ATR_DIRECT_FG)
|
||||
#define hasDirectBG(flags) ((flags) & ATR_DIRECT_BG)
|
||||
#define setDirectFG(flags,test) if (test) UIntSet(flags, ATR_DIRECT_FG); else UIntClr(flags, ATR_DIRECT_BG)
|
||||
#define setDirectBG(flags,test) if (test) UIntSet(flags, ATR_DIRECT_BG); else UIntClr(flags, ATR_DIRECT_BG)
|
||||
#else
|
||||
#define clrDirectFG(flags) /* nothing */
|
||||
#define clrDirectBG(flags) /* nothing */
|
||||
#define GetCellColorFG(data) ((data) & COLOR_MASK)
|
||||
#define GetCellColorBG(data) (((data) >> COLOR_BITS) & COLOR_MASK)
|
||||
#define hasDirectFG(flags) 0
|
||||
#define hasDirectBG(flags) 0
|
||||
#define setDirectFG(flags,test) (void)(test)
|
||||
#define setDirectBG(flags,test) (void)(test)
|
||||
#endif
|
||||
extern CellColor blank_cell_color;
|
||||
|
||||
typedef Char RowData; /* wrap/blink, and DEC single-double chars */
|
||||
|
||||
@ -1676,6 +1746,11 @@ typedef struct {
|
||||
XftFont * font;
|
||||
FontMap map;
|
||||
} XTermXftFonts;
|
||||
|
||||
typedef struct _ListXftFonts {
|
||||
struct _ListXftFonts *next;
|
||||
XftFont * font;
|
||||
} ListXftFonts;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@ -1687,6 +1762,7 @@ typedef struct {
|
||||
|
||||
/* indices into save_modes[] */
|
||||
typedef enum {
|
||||
DP_ALLOW_ALTBUF,
|
||||
DP_ALTERNATE_SCROLL,
|
||||
DP_ALT_SENDS_ESC,
|
||||
DP_BELL_IS_URGENT,
|
||||
@ -1717,7 +1793,7 @@ typedef enum {
|
||||
DP_RXVT_SCROLL_TTY_KEYPRESS,
|
||||
DP_RXVT_SCROLL_TTY_OUTPUT,
|
||||
DP_SELECT_TO_CLIPBOARD,
|
||||
DP_X_ALTSCRN,
|
||||
DP_X_ALTBUF,
|
||||
DP_X_DECCOLM,
|
||||
DP_X_EXT_MOUSE,
|
||||
DP_X_LOGGING,
|
||||
@ -1835,7 +1911,6 @@ typedef struct {
|
||||
int cur_background; /* current background color */
|
||||
int sgr_foreground; /* current SGR foreground color */
|
||||
int sgr_background; /* current SGR background color */
|
||||
Boolean sgr_extended; /* SGR set with extended codes? */
|
||||
#endif
|
||||
} SavedCursor;
|
||||
|
||||
@ -1969,6 +2044,7 @@ typedef struct {
|
||||
Display *display; /* X display for screen */
|
||||
int respond; /* socket for responses
|
||||
(position report, etc.) */
|
||||
int nextEventDelay; /* msecs to delay for x-events */
|
||||
/* These parameters apply to VT100 window */
|
||||
IChar unparse_bfr[256];
|
||||
unsigned unparse_len;
|
||||
@ -2001,6 +2077,9 @@ typedef struct {
|
||||
#if OPT_WIDE_ATTRS
|
||||
Boolean colorITMode; /* use color for italics? */
|
||||
#endif
|
||||
#if OPT_DIRECT_COLOR
|
||||
Boolean direct_color; /* direct-color enabled? */
|
||||
#endif
|
||||
#endif
|
||||
#if OPT_DEC_CHRSET
|
||||
Boolean font_doublesize;/* enable font-scaling */
|
||||
@ -2164,10 +2243,11 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
Boolean fnt_prop; /* true if proportional fonts */
|
||||
Boolean fnt_boxes; /* true if font has box-chars */
|
||||
unsigned fnt_boxes; /* 0=no boxes, 1=old, 2=unicode */
|
||||
Boolean force_packed; /* true to override proportional */
|
||||
#if OPT_BOX_CHARS
|
||||
Boolean force_box_chars;/* true if we assume no boxchars */
|
||||
Boolean broken_box_chars;/* true if broken boxchars */
|
||||
Boolean force_all_chars;/* true to outline missing chars */
|
||||
Boolean assume_all_chars;/* true to allow missing chars */
|
||||
Boolean allow_packing; /* true to allow packed-fonts */
|
||||
@ -2195,9 +2275,10 @@ typedef struct {
|
||||
Boolean cursor_underline; /* true if cursor is in underline mode */
|
||||
XtCursorShape cursor_shape;
|
||||
#if OPT_BLINK_CURS
|
||||
Boolean cursor_blink; /* cursor blink enable */
|
||||
Boolean cursor_blink_res; /* initial cursor blink value */
|
||||
Boolean cursor_blink_esc; /* cursor blink escape-state */
|
||||
BlinkOps cursor_blink; /* cursor blink enable */
|
||||
char * cursor_blink_s; /* ...resource cursorBlink */
|
||||
int cursor_blink_esc; /* cursor blink escape-state */
|
||||
Boolean cursor_blink_xor; /* how to merge menu/escapes */
|
||||
#endif
|
||||
#if OPT_BLINK_TEXT
|
||||
Boolean blink_as_bold; /* text blink disable */
|
||||
@ -2237,6 +2318,7 @@ typedef struct {
|
||||
* Working variables for getLineData().
|
||||
*/
|
||||
size_t lineExtra; /* extra space for combining chars */
|
||||
size_t cellExtra; /* extra space for combining chars */
|
||||
/*
|
||||
* Pointer to the current visible buffer.
|
||||
*/
|
||||
@ -2485,6 +2567,7 @@ typedef struct {
|
||||
void * icon_cgs_cache;
|
||||
#endif
|
||||
#if OPT_RENDERFONT
|
||||
ListXftFonts *list_xft_fonts;
|
||||
XTermXftFonts renderFontNorm[NMENUFONTS];
|
||||
XTermXftFonts renderFontBold[NMENUFONTS];
|
||||
XTermXftFonts renderFontItal[NMENUFONTS];
|
||||
@ -2806,6 +2889,7 @@ typedef struct _Work {
|
||||
#endif
|
||||
ScrnColors *oldColors;
|
||||
Boolean palette_changed;
|
||||
Boolean broken_box_chars;
|
||||
} Work;
|
||||
|
||||
typedef struct {int foo;} XtermClassPart, TekClassPart;
|
||||
@ -2853,6 +2937,8 @@ typedef struct _XtermWidgetRec {
|
||||
XSizeHints hints;
|
||||
XVisualInfo *visInfo;
|
||||
int numVisuals;
|
||||
unsigned rgb_shifts[3];
|
||||
Bool has_rgb;
|
||||
Bool init_menu;
|
||||
TKeyboard keyboard; /* terminal keyboard */
|
||||
TScreen screen; /* terminal screen */
|
||||
@ -2866,7 +2952,6 @@ typedef struct _XtermWidgetRec {
|
||||
#if OPT_ISO_COLORS
|
||||
int sgr_foreground; /* current SGR foreground color */
|
||||
int sgr_background; /* current SGR background color */
|
||||
Boolean sgr_extended; /* SGR set with extended codes? */
|
||||
#endif
|
||||
IFlags initflags; /* initial mode flags */
|
||||
Tabs tabs; /* tabstops of the terminal */
|
||||
@ -2918,7 +3003,9 @@ typedef struct _TekWidgetRec {
|
||||
#define ATR_ITALIC AttrBIT(9)
|
||||
#define ATR_STRIKEOUT AttrBIT(10)
|
||||
#define ATR_DBL_UNDER AttrBIT(11)
|
||||
#define SGR_MASK2 (ATR_FAINT | ATR_ITALIC | ATR_STRIKEOUT | ATR_DBL_UNDER)
|
||||
#define ATR_DIRECT_FG AttrBIT(12)
|
||||
#define ATR_DIRECT_BG AttrBIT(13)
|
||||
#define SGR_MASK2 (ATR_FAINT | ATR_ITALIC | ATR_STRIKEOUT | ATR_DBL_UNDER | ATR_DIRECT_FG | ATR_DIRECT_BG)
|
||||
#else
|
||||
#define SGR_MASK2 0
|
||||
#endif
|
||||
@ -3051,7 +3138,7 @@ typedef struct _TekWidgetRec {
|
||||
#define WhichVWin(screen) (&((screen)->fullVwin))
|
||||
#define WhichTWin(screen) (&((screen)->fullTwin))
|
||||
|
||||
#define WhichVFont(screen,name) getNormalFont(screen, name)->fs
|
||||
#define WhichVFont(screen,name) getNormalFont(screen, (int)(name))->fs
|
||||
#define FontAscent(screen) WhichVWin(screen)->f_ascent
|
||||
#define FontDescent(screen) WhichVWin(screen)->f_descent
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" $XTermId: resize.man,v 1.32 2016/09/24 11:14:15 tom Exp $
|
||||
.\" $XTermId: resize.man,v 1.33 2017/11/13 00:58:17 tom Exp $
|
||||
.\"
|
||||
.\" Copyright 1998-2013,2016 by Thomas E. Dickey
|
||||
.\" Copyright 1998-2016,2017 by Thomas E. Dickey
|
||||
.\"
|
||||
.\" All Rights Reserved
|
||||
.\"
|
||||
@ -35,7 +35,8 @@
|
||||
.\"
|
||||
.\" Bulleted paragraph
|
||||
.de bP
|
||||
.IP \(bu 4
|
||||
.ie n .IP \(bu 4
|
||||
.el .IP \(bu 2
|
||||
..
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds AQ \(aq
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: screen.c,v 1.517 2017/05/29 19:59:05 tom Exp $ */
|
||||
/* $XTermId: screen.c,v 1.521 2017/12/19 23:48:26 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2015,2017 by Thomas E. Dickey
|
||||
@ -828,7 +828,7 @@ void
|
||||
ScrnWriteText(XtermWidget xw,
|
||||
IChar *str,
|
||||
unsigned flags,
|
||||
unsigned cur_fg_bg,
|
||||
CellColor cur_fg_bg,
|
||||
unsigned length)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
@ -936,7 +936,7 @@ ScrnWriteText(XtermWidget xw,
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
unsigned j;
|
||||
for (j = 0; j < real_width; ++j)
|
||||
ld->color[screen->cur_col + (int) j] = (CellColor) cur_fg_bg;
|
||||
ld->color[screen->cur_col + (int) j] = cur_fg_bg;
|
||||
});
|
||||
|
||||
#if OPT_WIDE_CHARS
|
||||
@ -1445,7 +1445,7 @@ ScrnRefresh(XtermWidget xw,
|
||||
for (row = toprow; row <= maxrow; y += FontHeight(screen), row++) {
|
||||
#if OPT_ISO_COLORS
|
||||
CellColor *fb = 0;
|
||||
#define ColorOf(col) (CellColor) (fb ? fb[col] : 0)
|
||||
#define ColorOf(col) (fb ? fb[col] : initCColor)
|
||||
#endif
|
||||
#if OPT_WIDE_CHARS
|
||||
int wideness = 0;
|
||||
@ -1459,8 +1459,8 @@ ScrnRefresh(XtermWidget xw,
|
||||
int lastind;
|
||||
unsigned flags;
|
||||
unsigned test;
|
||||
CellColor fg_bg = 0;
|
||||
unsigned fg = 0, bg = 0;
|
||||
CellColor fg_bg = initCColor;
|
||||
Pixel fg = 0, bg = 0;
|
||||
int x;
|
||||
GC gc;
|
||||
Bool hilite;
|
||||
@ -2404,13 +2404,11 @@ ScrnFillRectangle(XtermWidget xw,
|
||||
}
|
||||
temp = attrs | (temp & (FG_COLOR | BG_COLOR)) | CHARDRAWN;
|
||||
ld->attribs[col] = (IAttr) temp;
|
||||
#if OPT_ISO_COLORS
|
||||
if (attrs & (FG_COLOR | BG_COLOR)) {
|
||||
if_OPT_ISO_COLORS(screen, {
|
||||
if (attrs & (FG_COLOR | BG_COLOR)) {
|
||||
ld->color[col] = xtermColorPair(xw);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
for (col = (int) left; col < target->right; ++col)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: scrollbar.c,v 1.200 2016/05/22 16:43:12 tom Exp $ */
|
||||
/* $XTermId: scrollbar.c,v 1.202 2017/12/26 01:58:48 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000-2014,2016 by Thomas E. Dickey
|
||||
* Copyright 2000-2016,2017 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -727,6 +727,36 @@ AlternateScroll(Widget w, long amount)
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
HandleScrollTo(
|
||||
Widget w,
|
||||
XEvent *event GCC_UNUSED,
|
||||
String *params,
|
||||
Cardinal *nparams)
|
||||
{
|
||||
XtermWidget xw;
|
||||
TScreen *screen;
|
||||
|
||||
if ((xw = getXtermWidget(w)) != 0 &&
|
||||
(screen = TScreenOf(xw)) != 0 &&
|
||||
*nparams > 0) {
|
||||
long amount;
|
||||
int value;
|
||||
int to_top = (screen->topline - screen->savedlines);
|
||||
if (!x_strcasecmp(params[0], "begin")) {
|
||||
amount = to_top * FontHeight(screen);
|
||||
} else if (!x_strcasecmp(params[0], "end")) {
|
||||
amount = -to_top * FontHeight(screen);
|
||||
} else if ((value = atoi(params[0])) >= 0) {
|
||||
amount = (value + to_top) * FontHeight(screen);
|
||||
} else {
|
||||
amount = 0;
|
||||
}
|
||||
AlternateScroll(w, amount);
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
HandleScrollForward(
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* $XTermId: svg.c,v 1.6 2016/05/22 19:09:17 tom Exp $ */
|
||||
/* $XTermId: svg.c,v 1.11 2017/12/30 14:47:53 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2015,2016 Jens Schweikhardt
|
||||
* Copyright 2015-2016,2017 Jens Schweikhardt
|
||||
* Copyright 2017 Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -32,8 +33,14 @@
|
||||
#include <xterm.h>
|
||||
#include <version.h>
|
||||
|
||||
#define NO_COLOR ((unsigned)-1)
|
||||
#define RGBPCT(c) c.red / 655.35, c.green / 655.35, c.blue / 655.35
|
||||
#define MakeDim(color) \
|
||||
color = (unsigned short) ((2 * (unsigned) color) / 3)
|
||||
|
||||
#define RGBPCT(c) \
|
||||
((double)c.red / 655.35), \
|
||||
((double)c.green / 655.35), \
|
||||
((double)c.blue / 655.35)
|
||||
|
||||
#define CELLW 10
|
||||
#define CELLH 20
|
||||
|
||||
@ -156,7 +163,7 @@ dumpSvgLine(XtermWidget xw, int row, FILE *fp)
|
||||
/* Count how many consecutive cells have the same color & attributes. */
|
||||
for (sal = 1; col + sal < MaxCols(s); ++sal) {
|
||||
#if OPT_ISO_COLORS
|
||||
if (ld->color[col] != ld->color[col + sal])
|
||||
if (!isSameCColor(ld->color[col], ld->color[col + sal]))
|
||||
break;
|
||||
#endif
|
||||
if (ld->attribs[col] != ld->attribs[col + sal])
|
||||
@ -167,11 +174,21 @@ dumpSvgLine(XtermWidget xw, int row, FILE *fp)
|
||||
bgcolor.pixel = xw->old_background;
|
||||
#if OPT_ISO_COLORS
|
||||
if (ld->attribs[col] & FG_COLOR) {
|
||||
unsigned fg = extract_fg(xw, ld->color[col], ld->attribs[col]);
|
||||
Pixel fg = extract_fg(xw, ld->color[col], ld->attribs[col]);
|
||||
#if OPT_DIRECT_COLOR
|
||||
if (ld->attribs[col] & ATR_DIRECT_FG)
|
||||
fgcolor.pixel = fg;
|
||||
else
|
||||
#endif
|
||||
fgcolor.pixel = s->Acolors[fg].value;
|
||||
}
|
||||
if (ld->attribs[col] & BG_COLOR) {
|
||||
unsigned bg = extract_bg(xw, ld->color[col], ld->attribs[col]);
|
||||
Pixel bg = extract_bg(xw, ld->color[col], ld->attribs[col]);
|
||||
#if OPT_DIRECT_COLOR
|
||||
if (ld->attribs[col] & ATR_DIRECT_BG)
|
||||
bgcolor.pixel = bg;
|
||||
else
|
||||
#endif
|
||||
bgcolor.pixel = s->Acolors[bg].value;
|
||||
}
|
||||
#endif
|
||||
@ -186,9 +203,9 @@ dumpSvgLine(XtermWidget xw, int row, FILE *fp)
|
||||
}
|
||||
#if OPT_WIDE_ATTRS
|
||||
if (ld->attribs[col] & ATR_FAINT) {
|
||||
fgcolor.red = (unsigned short) ((2 * fgcolor.red) / 3);
|
||||
fgcolor.green = (unsigned short) ((2 * fgcolor.green) / 3);
|
||||
fgcolor.blue = (unsigned short) ((2 * fgcolor.blue) / 3);
|
||||
MakeDim(fgcolor.red);
|
||||
MakeDim(fgcolor.green);
|
||||
MakeDim(fgcolor.blue);
|
||||
}
|
||||
#endif
|
||||
if (ld->attribs[col] & INVERSE) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
# $XTermId: termcap,v 1.83 2016/07/09 18:40:00 tom Exp $
|
||||
# $XTermId: termcap,v 1.88 2017/12/25 21:24:41 tom Exp $
|
||||
#
|
||||
# These are termcap entries that correspond to xterm's terminfo file.
|
||||
# The file is formatted using ncurses' "tic -CNx", but is not mechanically
|
||||
# derived from the terminfo.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright 1996-2012,2016 by Thomas E. Dickey
|
||||
# Copyright 1996-2016,2017 by Thomas E. Dickey
|
||||
#
|
||||
# All Rights Reserved
|
||||
#
|
||||
@ -123,9 +123,13 @@ x2|xterm-88color|xterm alias:\
|
||||
:Co#88:pa#7744:tc=xterm-256color:
|
||||
|
||||
x3|xterm-256color|xterm alias:\
|
||||
:Co#256:pa#32767:\
|
||||
:Co#256:pa#65536:\
|
||||
:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=xterm-new:
|
||||
|
||||
# Termcap cannot do direct-colors, but users may expect this name.
|
||||
x4|xterm-direct|xterm alias:\
|
||||
:tc=xterm-256color:
|
||||
|
||||
xi|xterm-nrc|xterm alias:\
|
||||
:tc=xterm:
|
||||
xr|xterm-rep|xterm alias:\
|
||||
@ -241,3 +245,4 @@ v0|xterm|X11 terminal emulator:\
|
||||
# should send.
|
||||
xterm+kbs|fragment for backspace key:\
|
||||
:kb=^H:
|
||||
# :kb=\177:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $XTermId: terminfo,v 1.165 2017/05/07 22:54:33 tom Exp $
|
||||
# $XTermId: terminfo,v 1.177 2017/12/25 21:08:55 tom Exp $
|
||||
#
|
||||
# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
|
||||
# - Thomas E. Dickey
|
||||
@ -32,6 +32,8 @@
|
||||
# sale, use or other dealings in this Software without prior written
|
||||
# authorization.
|
||||
#------------------------------------------------------------------------------
|
||||
# format (ncurses 6.1): tic -W -1 -f -x terminfo
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Special Capabilities:
|
||||
# --------------------
|
||||
@ -134,11 +136,22 @@ xterm-new|modern xterm terminal emulator,
|
||||
kcbt=\E[Z,
|
||||
kent=\EOM,
|
||||
rin=\E[%p1%dT,
|
||||
use=ansi+rep,
|
||||
use=ecma+strikeout,
|
||||
use=xterm+pcfkeys,
|
||||
use=xterm+tmux,
|
||||
use=xterm-basic,
|
||||
#
|
||||
|
||||
# These "ansi+XXX" blocks were added in ncurses 5.0:
|
||||
ansi+rep,
|
||||
rep=%p1%c\E[%p2%{1}%-%db,
|
||||
|
||||
ansi+enq|ncurses extension for ANSI ENQ,
|
||||
u6=\E[%i%d;%dR,
|
||||
u7=\E[6n,
|
||||
u8=\E[?%[;0123456789]c,
|
||||
u9=\E[c,
|
||||
|
||||
# Encode modifiers using parameters (see "Xterm Control Sequences" ctlseqs.ms).
|
||||
# Note that this is unrelated to PCTERM.
|
||||
#
|
||||
@ -884,6 +897,7 @@ xterm+pce0|fragment with modifyCursorKeys:0,
|
||||
kPRV7=\E[5;7~,
|
||||
use=xterm+edit,
|
||||
|
||||
# This is an ncurses extension
|
||||
ecma+strikeout|ECMA-48 strikeout/crossed-out,
|
||||
rmxx=\E[29m,
|
||||
smxx=\E[9m,
|
||||
@ -959,7 +973,6 @@ xterm-basic|modern xterm terminal emulator - common,
|
||||
ritm=\E[23m,
|
||||
rmacs=\E(B,
|
||||
rmam=\E[?7l,
|
||||
rmcup=\E[?1049l,
|
||||
rmir=\E[4l,
|
||||
rmkx=\E[?1l\E>,
|
||||
rmm=\E[?1034l,
|
||||
@ -1041,19 +1054,16 @@ xterm-basic|modern xterm terminal emulator - common,
|
||||
sitm=\E[3m,
|
||||
smacs=\E(0,
|
||||
smam=\E[?7h,
|
||||
smcup=\E[?1049h,
|
||||
smir=\E[4h,
|
||||
smkx=\E[?1h\E=,
|
||||
smm=\E[?1034h,
|
||||
smso=\E[7m,
|
||||
smul=\E[4m,
|
||||
tbc=\E[3g,
|
||||
u6=\E[%i%d;%dR,
|
||||
u7=\E[6n,
|
||||
u8=\E[?%[;0123456789]c,
|
||||
u9=\E[c,
|
||||
vpa=\E[%i%p1%dd,
|
||||
E3=\E[3J,
|
||||
use=ansi+enq,
|
||||
use=xterm+alt+title,
|
||||
use=xterm+kbs,
|
||||
#
|
||||
# The xterm-new description has all of the features, but is not completely
|
||||
@ -1450,6 +1460,21 @@ xterm+vt+edit|fragment for vt220-style editing keypad,
|
||||
kfnd=\E[1~,
|
||||
kslt=\E[4~,
|
||||
|
||||
xterm+noalt|xterm without altscreen,
|
||||
rmcup@,
|
||||
smcup@,
|
||||
|
||||
xterm+alt1049|xterm 90 feature,
|
||||
rmcup=\E[?1049l,
|
||||
smcup=\E[?1049h,
|
||||
|
||||
xterm+titlestack|xterm 251 feature,
|
||||
rmcup=\E[23;0;0t,
|
||||
smcup=\E[22;0;0t,
|
||||
|
||||
xterm+alt+title|xterm 90 and 251 features combined,
|
||||
rmcup=\E[?1049l\E[23;0;0t,
|
||||
smcup=\E[?1049h\E[22;0;0t,
|
||||
#
|
||||
# This should work for the commonly used "color xterm" variations (XFree86
|
||||
# xterm, color_xterm, nxterm, rxvt). Note that it does not set 'bce', so for
|
||||
@ -1647,15 +1672,23 @@ xterm-16color|xterm with 16 colors,
|
||||
m,
|
||||
use=xterm+256color,
|
||||
use=xterm-new,
|
||||
|
||||
# "indexed color" is mentioned without definition in ISO 8613-6 (ITU T.416).
|
||||
#
|
||||
# This uses RGB values 0..1000
|
||||
# This implementation uses a 256-element color map where the first 16 entries
|
||||
# are shared with the aixterm-compatible colors (and in turn the first 8 are
|
||||
# shared with the ANSI colors). The three levels (256, 16, 8) account for the
|
||||
# use of a conditional expression in setaf/setab which reduces the number of
|
||||
# characters sent to the screen for typical applications.
|
||||
#
|
||||
# 256 colors should give 65536 pairs, but terminfo stores numbers in a signed
|
||||
# short. Most people will not notice problems with only 32767 pairs.
|
||||
# 256 colors should give 65536 pairs, but SVr4 (legacy) terminfo stores numbers
|
||||
# in a signed short. Most people will not notice problems with only 32767
|
||||
# pairs. With ncurses 6.1, numbers are stored in a signed integer (at least
|
||||
# 32-bits), and the inconsistency regarding pairs is eliminated.
|
||||
xterm+256color|xterm 256-color feature,
|
||||
ccc,
|
||||
colors#0x100,
|
||||
pairs#0x7fff,
|
||||
pairs#0x10000,
|
||||
initc=\E]4;
|
||||
%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
|
||||
oc=\E]104\007,
|
||||
@ -1691,6 +1724,46 @@ xterm-88color|xterm with 88 colors,
|
||||
colors#88,
|
||||
pairs#7744,
|
||||
use=xterm-256color,
|
||||
|
||||
# "direct color" is mentioned without definition in ISO 8613-6 (ITU T.416).
|
||||
#
|
||||
# This is a particular implementation which assume 8-bit values for red, green,
|
||||
# and blue. Other encodings are possible; none are addressed by that standard.
|
||||
#
|
||||
# The "RGB" flag is an ncurses 6.1 extension which tells the library how to
|
||||
# quickly compute the color-content for a given color value.
|
||||
#
|
||||
# Like xterm+256color, this uses a conditional expression. But it does that
|
||||
# for a different reason: to make it readily usable for applications which
|
||||
# print text but also use RGB colors, it uses a color map for the usual ANSI
|
||||
# colors (0-7) and RGB colors for the remaining range of the color value.
|
||||
xterm+direct|xterm with direct-color indexing,
|
||||
RGB,
|
||||
colors#0x1000000,
|
||||
pairs#0x10000,
|
||||
initc@,
|
||||
op=\E[39;49m,
|
||||
setab=\E[
|
||||
%?
|
||||
%p1%{8}%<
|
||||
%t4%p1%d
|
||||
%e48\:2\:\:
|
||||
%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
|
||||
%;
|
||||
m,
|
||||
setaf=\E[
|
||||
%?
|
||||
%p1%{8}%<
|
||||
%t3%p1%d
|
||||
%e38\:2\:\:
|
||||
%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
|
||||
%;
|
||||
m,
|
||||
setb@,
|
||||
setf@,
|
||||
xterm-direct|xterm with direct-color indexing,
|
||||
use=xterm+direct,
|
||||
use=xterm,
|
||||
#
|
||||
# This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color.
|
||||
# To use it, your decTerminalID resource must be set to 200 or above, and the
|
||||
@ -2040,7 +2113,6 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
|
||||
rin=\E[%p1%dT,
|
||||
rmacs=^O,
|
||||
rmam=\E[?7l,
|
||||
rmcup=\E[?1049l,
|
||||
rmir=\E[4l,
|
||||
rmkx=\E[?1l\E>,
|
||||
rmso=\E[27m,
|
||||
@ -2115,7 +2187,6 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
|
||||
sgr0=\E[m\017,
|
||||
smacs=^N,
|
||||
smam=\E[?7h,
|
||||
smcup=\E[?1049h,
|
||||
smir=\E[4h,
|
||||
smkx=\E[?1h\E=,
|
||||
smso=\E[7m,
|
||||
@ -2130,6 +2201,7 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
|
||||
kb1=\EOt,
|
||||
kb3=\EOv,
|
||||
kc2=\EOr,
|
||||
use=xterm+alt1049,
|
||||
use=xterm+kbs,
|
||||
xterm-xfree86|xterm terminal emulator (XFree86 4.4 Window System),
|
||||
use=xterm-xf86-v44,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: trace.c,v 1.171 2017/06/19 08:11:26 tom Exp $ */
|
||||
/* $XTermId: trace.c,v 1.172 2017/11/07 00:12:24 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2016,2017 by Thomas E. Dickey
|
||||
@ -48,7 +48,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
@ -74,11 +73,10 @@ const char *trace_who = "parent";
|
||||
|
||||
static FILE *trace_fp;
|
||||
|
||||
void
|
||||
Trace(const char *fmt,...)
|
||||
static FILE *
|
||||
TraceOpen(void)
|
||||
{
|
||||
static const char *trace_out;
|
||||
va_list ap;
|
||||
|
||||
if (trace_fp != 0
|
||||
&& trace_who != trace_out) {
|
||||
@ -129,13 +127,30 @@ Trace(const char *fmt,...)
|
||||
}
|
||||
(void) umask(oldmask);
|
||||
}
|
||||
return trace_fp;
|
||||
}
|
||||
|
||||
void
|
||||
Trace(const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
FILE *fp = TraceOpen();
|
||||
|
||||
va_start(ap, fmt);
|
||||
vfprintf(trace_fp, fmt, ap);
|
||||
(void) fflush(trace_fp);
|
||||
vfprintf(fp, fmt, ap);
|
||||
(void) fflush(fp);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
TraceVA(const char *fmt, va_list ap)
|
||||
{
|
||||
FILE *fp = TraceOpen();
|
||||
|
||||
vfprintf(fp, fmt, ap);
|
||||
(void) fflush(fp);
|
||||
}
|
||||
|
||||
void
|
||||
TraceClose(void)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: trace.h,v 1.80 2017/01/20 22:36:24 tom Exp $ */
|
||||
/* $XTermId: trace.h,v 1.81 2017/11/07 00:12:24 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2016,2017 by Thomas E. Dickey
|
||||
@ -41,11 +41,17 @@
|
||||
|
||||
#if OPT_TRACE
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
extern void Trace ( const char *, ... ) GCC_PRINTFLIKE(1,2);
|
||||
extern void TraceVA ( const char *fmt, va_list ap );
|
||||
|
||||
#undef TRACE
|
||||
#define TRACE(p) Trace p
|
||||
|
||||
#undef TRACE_VA
|
||||
#define TRACE_VA(p) TraceVA p
|
||||
|
||||
extern void TraceClose (void);
|
||||
|
||||
#undef TRACE_CLOSE
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: util.c,v 1.717 2017/06/19 08:11:47 tom Exp $ */
|
||||
/* $XTermId: util.c,v 1.728 2017/12/29 19:03:33 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -1023,7 +1023,7 @@ WriteText(XtermWidget xw, IChar *str, Cardinal len)
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
CLineData *ld = 0;
|
||||
unsigned attr_flags = xw->flags;
|
||||
CellColor fg_bg = makeColorPair(xw->cur_foreground, xw->cur_background);
|
||||
CellColor fg_bg = xtermColorPair(xw);
|
||||
unsigned cells = visual_width(str, len);
|
||||
GC currentGC;
|
||||
|
||||
@ -2163,7 +2163,7 @@ static void
|
||||
set_background(XtermWidget xw, int color GCC_UNUSED)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
Pixel c = getXtermBackground(xw, xw->flags, color);
|
||||
Pixel c = getXtermBG(xw, xw->flags, color);
|
||||
|
||||
TRACE(("set_background(%d) %#lx\n", color, c));
|
||||
XSetWindowBackground(screen->display, VShellWindow(xw), c);
|
||||
@ -3311,8 +3311,8 @@ fixupItalics(XtermWidget xw,
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SetMissing() \
|
||||
TRACE(("%s@%d: missing %d\n", __FILE__, __LINE__, missing)); \
|
||||
#define SetMissing(tag) \
|
||||
TRACE(("%s %s: missing %d\n", __FILE__, tag, missing)); \
|
||||
missing = 1
|
||||
|
||||
/*
|
||||
@ -3543,8 +3543,9 @@ drawXtermText(XtermWidget xw,
|
||||
* position. Failing that, use our own box-characters.
|
||||
*/
|
||||
if (screen->force_box_chars
|
||||
|| screen->broken_box_chars
|
||||
|| xtermXftMissing(xw, currFont, dec2ucs(ch))) {
|
||||
SetMissing();
|
||||
SetMissing("case 1");
|
||||
} else {
|
||||
ch = dec2ucs(ch);
|
||||
replace = True;
|
||||
@ -3559,9 +3560,10 @@ drawXtermText(XtermWidget xw,
|
||||
unsigned part = ucs2dec(ch);
|
||||
if (xtermIsDecGraphic(part)) {
|
||||
if (screen->force_box_chars
|
||||
|| screen->broken_box_chars
|
||||
|| xtermXftMissing(xw, currFont, ch)) {
|
||||
ch = part;
|
||||
SetMissing();
|
||||
SetMissing("case 2");
|
||||
}
|
||||
} else if (xtermXftMissing(xw, currFont, ch)) {
|
||||
XftFont *test = pickXftFont(needed, font0, wfont0);
|
||||
@ -3574,7 +3576,7 @@ drawXtermText(XtermWidget xw,
|
||||
ch = part;
|
||||
replace = True;
|
||||
} else if (ch != HIDDEN_CHAR) {
|
||||
SetMissing();
|
||||
SetMissing("case 3");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -3590,7 +3592,7 @@ drawXtermText(XtermWidget xw,
|
||||
* box-characters.
|
||||
*/
|
||||
if (xtermXftMissing(xw, currFont, ch)) {
|
||||
SetMissing();
|
||||
SetMissing("case 4");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -3920,6 +3922,14 @@ drawXtermText(XtermWidget xw,
|
||||
if (ch == HIDDEN_CHAR)
|
||||
continue;
|
||||
|
||||
#if OPT_BOX_CHARS
|
||||
if ((screen->fnt_boxes == 1) && (ch >= 256)) {
|
||||
unsigned part = ucs2dec(ch);
|
||||
if (part < 32)
|
||||
ch = (IChar) part;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!needWide
|
||||
&& !IsIcon(screen)
|
||||
&& ((on_wide || my_wcwidth((wchar_t) ch) > 1)
|
||||
@ -4243,15 +4253,16 @@ whichXtermCgs(XtermWidget xw, unsigned attr_flags, Bool hilite)
|
||||
* current screen foreground and background colors.
|
||||
*/
|
||||
GC
|
||||
updatedXtermGC(XtermWidget xw, unsigned attr_flags, unsigned fg_bg, Bool hilite)
|
||||
updatedXtermGC(XtermWidget xw, unsigned attr_flags, CellColor fg_bg,
|
||||
Bool hilite)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
VTwin *win = WhichVWin(screen);
|
||||
CgsEnum cgsId = whichXtermCgs(xw, attr_flags, hilite);
|
||||
unsigned my_fg = extract_fg(xw, fg_bg, attr_flags);
|
||||
unsigned my_bg = extract_bg(xw, fg_bg, attr_flags);
|
||||
Pixel fg_pix = getXtermForeground(xw, attr_flags, (int) my_fg);
|
||||
Pixel bg_pix = getXtermBackground(xw, attr_flags, (int) my_bg);
|
||||
Pixel my_fg = extract_fg(xw, fg_bg, attr_flags);
|
||||
Pixel my_bg = extract_bg(xw, fg_bg, attr_flags);
|
||||
Pixel fg_pix = getXtermFG(xw, attr_flags, (int) my_fg);
|
||||
Pixel bg_pix = getXtermBG(xw, attr_flags, (int) my_bg);
|
||||
Pixel xx_pix;
|
||||
#if OPT_HIGHLIGHT_COLOR
|
||||
Boolean reverse2 = ((attr_flags & INVERSE) && hilite);
|
||||
@ -4384,8 +4395,8 @@ resetXtermGC(XtermWidget xw, unsigned attr_flags, Bool hilite)
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
VTwin *win = WhichVWin(screen);
|
||||
CgsEnum cgsId = whichXtermCgs(xw, attr_flags, hilite);
|
||||
Pixel fg_pix = getXtermForeground(xw, attr_flags, xw->cur_foreground);
|
||||
Pixel bg_pix = getXtermBackground(xw, attr_flags, xw->cur_background);
|
||||
Pixel fg_pix = getXtermFG(xw, attr_flags, xw->cur_foreground);
|
||||
Pixel bg_pix = getXtermBG(xw, attr_flags, xw->cur_background);
|
||||
|
||||
checkVeryBoldColors(attr_flags, xw->cur_foreground);
|
||||
|
||||
@ -4403,8 +4414,8 @@ resetXtermGC(XtermWidget xw, unsigned attr_flags, Bool hilite)
|
||||
* Extract the foreground-color index from a color pair.
|
||||
* If we've got BOLD or UNDERLINE color-mode active, those will be used.
|
||||
*/
|
||||
unsigned
|
||||
extract_fg(XtermWidget xw, unsigned color, unsigned attr_flags)
|
||||
Pixel
|
||||
extract_fg(XtermWidget xw, CellColor color, unsigned attr_flags)
|
||||
{
|
||||
unsigned fg = ExtractForeground(color);
|
||||
|
||||
@ -4419,8 +4430,8 @@ extract_fg(XtermWidget xw, unsigned color, unsigned attr_flags)
|
||||
* Extract the background-color index from a color pair.
|
||||
* If we've got INVERSE color-mode active, that will be used.
|
||||
*/
|
||||
unsigned
|
||||
extract_bg(XtermWidget xw, unsigned color, unsigned attr_flags)
|
||||
Pixel
|
||||
extract_bg(XtermWidget xw, CellColor color, unsigned attr_flags)
|
||||
{
|
||||
unsigned bg = ExtractBackground(color);
|
||||
|
||||
@ -4442,12 +4453,23 @@ extract_bg(XtermWidget xw, unsigned color, unsigned attr_flags)
|
||||
* attribute colors.
|
||||
*/
|
||||
CellColor
|
||||
makeColorPair(int fg, int bg)
|
||||
makeColorPair(XtermWidget xw)
|
||||
{
|
||||
unsigned my_bg = (bg >= 0) && (bg < NUM_ANSI_COLORS) ? (unsigned) bg : 0;
|
||||
unsigned my_fg = (fg >= 0) && (fg < NUM_ANSI_COLORS) ? (unsigned) fg : my_bg;
|
||||
CellColor result;
|
||||
|
||||
return (CellColor) (my_fg | (my_bg << COLOR_BITS));
|
||||
#if OPT_DIRECT_COLOR
|
||||
result.fg = xw->cur_foreground;
|
||||
result.bg = xw->cur_background;
|
||||
#else
|
||||
int fg = xw->cur_foreground;
|
||||
int bg = xw->cur_background;
|
||||
unsigned my_bg = okIndexedColor(bg) ? (unsigned) bg : 0;
|
||||
unsigned my_fg = okIndexedColor(fg) ? (unsigned) fg : my_bg;
|
||||
|
||||
result = (CellColor) (my_fg | (my_bg << COLOR_BITS));
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4499,13 +4521,18 @@ getXtermBackground(XtermWidget xw, unsigned attr_flags, int color)
|
||||
{
|
||||
Pixel result = T_COLOR(TScreenOf(xw), TEXT_BG);
|
||||
|
||||
(void) attr_flags;
|
||||
(void) color;
|
||||
|
||||
#if OPT_ISO_COLORS
|
||||
if ((attr_flags & BG_COLOR) && (color >= 0 && color < MAXCOLORS)) {
|
||||
if_OPT_DIRECT_COLOR2(TScreenOf(xw), (attr_flags & ATR_DIRECT_BG), {
|
||||
result = (Pixel) color;
|
||||
} else
|
||||
)
|
||||
if ((attr_flags & BG_COLOR) &&
|
||||
(color >= 0 && color < MAXCOLORS)) {
|
||||
result = GET_COLOR_RES(xw, TScreenOf(xw)->Acolors[color]);
|
||||
}
|
||||
#else
|
||||
(void) attr_flags;
|
||||
(void) color;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
@ -4515,14 +4542,20 @@ getXtermForeground(XtermWidget xw, unsigned attr_flags, int color)
|
||||
{
|
||||
Pixel result = T_COLOR(TScreenOf(xw), TEXT_FG);
|
||||
|
||||
(void) attr_flags;
|
||||
(void) color;
|
||||
|
||||
#if OPT_ISO_COLORS
|
||||
if ((attr_flags & FG_COLOR) && (color >= 0 && color < MAXCOLORS)) {
|
||||
if_OPT_DIRECT_COLOR2(TScreenOf(xw), (attr_flags & ATR_DIRECT_FG), {
|
||||
result = (Pixel) color;
|
||||
} else
|
||||
)
|
||||
if ((attr_flags & FG_COLOR) &&
|
||||
(color >= 0 && color < MAXCOLORS)) {
|
||||
result = GET_COLOR_RES(xw, TScreenOf(xw)->Acolors[color]);
|
||||
}
|
||||
#else
|
||||
(void) attr_flags;
|
||||
(void) color;
|
||||
#endif
|
||||
|
||||
#if OPT_WIDE_ATTRS
|
||||
#define DIM_IT(n) work.n = (unsigned short) ((2 * (unsigned)work.n) / 3)
|
||||
if ((attr_flags & ATR_FAINT)) {
|
||||
@ -4828,7 +4861,7 @@ systemWcwidthOk(int samplesize, int samplepass)
|
||||
if ((system_code < 0 && intern_code >= 1)
|
||||
|| (system_code >= 0 && intern_code != system_code)) {
|
||||
TRACE((".. width(U+%04X) = %d, expected %d\n",
|
||||
n, system_code, intern_code));
|
||||
(unsigned) n, system_code, intern_code));
|
||||
if (++oops > samplepass)
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: version.h,v 1.437 2017/06/21 00:46:28 tom Exp $ */
|
||||
/* $XTermId: version.h,v 1.439 2017/12/30 19:26:00 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2016,2017 by Thomas E. Dickey
|
||||
@ -38,8 +38,8 @@
|
||||
* version of X to which this version of xterm has been built. The resulting
|
||||
* number in parentheses is my patch number (Thomas E. Dickey).
|
||||
*/
|
||||
#define XTERM_PATCH 330
|
||||
#define XTERM_DATE 2017-06-20
|
||||
#define XTERM_PATCH 331
|
||||
#define XTERM_DATE 2017-12-30
|
||||
|
||||
#ifndef __vendorversion__
|
||||
#define __vendorversion__ "XTerm/OpenBSD"
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* $XTermId: xcharmouse.h,v 1.17 2012/09/26 00:39:14 tom Exp $ */
|
||||
/* $XTermId: xcharmouse.h,v 1.18 2012/09/26 00:39:14 tom Exp $ */
|
||||
|
||||
/************************************************************
|
||||
|
||||
Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
Copyright 1998 by Jason Bacon <acadix@execpc.com>
|
||||
|
||||
All Rights Reserved
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: xstrings.c,v 1.70 2017/06/11 21:20:37 tom Exp $ */
|
||||
/* $XTermId: xstrings.c,v 1.71 2017/11/10 00:52:29 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000-2016,2017 by Thomas E. Dickey
|
||||
@ -195,7 +195,7 @@ login_alias(char *login_name, uid_t uid, struct passwd *in_out)
|
||||
char *
|
||||
x_getlogin(uid_t uid, struct passwd *in_out)
|
||||
{
|
||||
char *login_name = NULL;
|
||||
char *login_name;
|
||||
|
||||
login_name = login_alias(x_getenv("LOGNAME"), uid, in_out);
|
||||
if (IsEmpty(login_name)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: xterm.h,v 1.778 2017/05/29 23:19:51 tom Exp $ */
|
||||
/* $XTermId: xterm.h,v 1.789 2017/12/26 11:37:37 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2016,2017 by Thomas E. Dickey
|
||||
@ -430,6 +430,7 @@ extern char **environ;
|
||||
#define XtNctrlFKeys "ctrlFKeys"
|
||||
#define XtNcurses "curses"
|
||||
#define XtNcursorBlink "cursorBlink"
|
||||
#define XtNcursorBlinkXOR "cursorBlinkXOR"
|
||||
#define XtNcursorColor "cursorColor"
|
||||
#define XtNcursorOffTime "cursorOffTime"
|
||||
#define XtNcursorOnTime "cursorOnTime"
|
||||
@ -439,6 +440,7 @@ extern char **environ;
|
||||
#define XtNdecTerminalID "decTerminalID"
|
||||
#define XtNdefaultString "defaultString"
|
||||
#define XtNdeleteIsDEL "deleteIsDEL"
|
||||
#define XtNdirectColor "directColor"
|
||||
#define XtNdisallowedColorOps "disallowedColorOps"
|
||||
#define XtNdisallowedFontOps "disallowedFontOps"
|
||||
#define XtNdisallowedMouseOps "disallowedMouseOps"
|
||||
@ -491,8 +493,8 @@ extern char **environ;
|
||||
#define XtNlogging "logging"
|
||||
#define XtNloginShell "loginShell"
|
||||
#define XtNmarginBell "marginBell"
|
||||
#define XtNmaximized "maximized"
|
||||
#define XtNmaxGraphicSize "maxGraphicSize"
|
||||
#define XtNmaximized "maximized"
|
||||
#define XtNmenuBar "menuBar" /* internal */
|
||||
#define XtNmenuHeight "menuHeight"
|
||||
#define XtNmetaSendsEscape "metaSendsEscape"
|
||||
@ -508,6 +510,7 @@ extern char **environ;
|
||||
#define XtNmultiClickTime "multiClickTime"
|
||||
#define XtNmultiScroll "multiScroll"
|
||||
#define XtNnMarginBell "nMarginBell"
|
||||
#define XtNnextEventDelay "nextEventDelay"
|
||||
#define XtNnumColorRegisters "numColorRegisters"
|
||||
#define XtNnumLock "numLock"
|
||||
#define XtNoldXtermFKeys "oldXtermFKeys"
|
||||
@ -621,6 +624,7 @@ extern char **environ;
|
||||
#define XtCCtrlFKeys "CtrlFKeys"
|
||||
#define XtCCurses "Curses"
|
||||
#define XtCCursorBlink "CursorBlink"
|
||||
#define XtCCursorBlinkXOR "CursorBlinkXOR"
|
||||
#define XtCCursorOffTime "CursorOffTime"
|
||||
#define XtCCursorOnTime "CursorOnTime"
|
||||
#define XtCCursorUnderLine "CursorUnderLine"
|
||||
@ -629,6 +633,7 @@ extern char **environ;
|
||||
#define XtCDecTerminalID "DecTerminalID"
|
||||
#define XtCDefaultString "DefaultString"
|
||||
#define XtCDeleteIsDEL "DeleteIsDEL"
|
||||
#define XtCDirectColor "DirectColor"
|
||||
#define XtCDisallowedColorOps "DisallowedColorOps"
|
||||
#define XtCDisallowedFontOps "DisallowedFontOps"
|
||||
#define XtCDisallowedMouseOps "DisallowedMouseOps"
|
||||
@ -677,8 +682,8 @@ extern char **environ;
|
||||
#define XtCLogging "Logging"
|
||||
#define XtCLoginShell "LoginShell"
|
||||
#define XtCMarginBell "MarginBell"
|
||||
#define XtCMaximized "Maximized"
|
||||
#define XtCMaxGraphicSize "MaxGraphicSize"
|
||||
#define XtCMaximized "Maximized"
|
||||
#define XtCMenuBar "MenuBar" /* internal */
|
||||
#define XtCMenuHeight "MenuHeight"
|
||||
#define XtCMetaSendsEscape "MetaSendsEscape"
|
||||
@ -693,6 +698,7 @@ extern char **environ;
|
||||
#define XtCModifyStringKeys "ModifyStringKeys"
|
||||
#define XtCMultiClickTime "MultiClickTime"
|
||||
#define XtCMultiScroll "MultiScroll"
|
||||
#define XtCNextEventDelay "NextEventDelay"
|
||||
#define XtCNumColorRegisters "NumColorRegisters"
|
||||
#define XtCNumLock "NumLock"
|
||||
#define XtCOldXtermFKeys "OldXtermFKeys"
|
||||
@ -1052,6 +1058,7 @@ extern XtermWidget getXtermWidget (Widget /* w */);
|
||||
extern char *udk_lookup (XtermWidget /* xw */, int /* keycode */, int * /* len */);
|
||||
extern char *xtermEnvEncoding (void);
|
||||
extern char *xtermFindShell (char * /* leaf */, Bool /* warning */);
|
||||
extern char *xtermFormatSGR (XtermWidget /* xw */, char * /* target */, unsigned /* attrs */, int /* fg */, int /* bg */);
|
||||
extern const char *SysErrorMsg (int /* n */);
|
||||
extern const char *SysReasonMsg (int /* n */);
|
||||
extern Boolean allocateBestRGB(XtermWidget /* xw */, XColor * /* def */);
|
||||
@ -1088,10 +1095,10 @@ extern void ReverseOldColors (XtermWidget /* xw */);
|
||||
extern void SysError (int /* i */) GCC_NORETURN;
|
||||
extern void VisualBell (void);
|
||||
extern void cleanup_colored_cursor (void);
|
||||
extern void do_ansi_rqm (XtermWidget /* xw */, int /* nparam */, int * /* params */);
|
||||
extern void do_dcs (XtermWidget /* xw */, Char * /* buf */, size_t /* len */);
|
||||
extern void do_decrpm (XtermWidget /* xw */, int /* nparam */, int * /* params */);
|
||||
extern void do_dec_rqm (XtermWidget /* xw */, int /* nparam */, int * /* params */);
|
||||
extern void do_osc (XtermWidget /* xw */, Char * /* buf */, size_t /* len */, int /* final */);
|
||||
extern void do_rpm (XtermWidget /* xw */, int /* nparam */, int * /* params */);
|
||||
extern void do_xevents (void);
|
||||
extern void end_tek_mode (void);
|
||||
extern void end_vt_mode (void);
|
||||
@ -1124,6 +1131,10 @@ extern void xtermWarning (const char * /*fmt*/,...) GCC_PRINTFLIKE(1,2);
|
||||
extern void HandleDabbrevExpand PROTO_XT_ACTIONS_ARGS;
|
||||
#endif
|
||||
|
||||
#if OPT_DIRECT_COLOR
|
||||
extern int getDirectColor(XtermWidget /* xw */, int /* red */, int /* green */, int /* blue */);
|
||||
#endif /* OPT_DIRECT_COLOR */
|
||||
|
||||
#if OPT_EXEC_XTERM
|
||||
extern char *ProcGetCWD(pid_t /* pid */);
|
||||
#else
|
||||
@ -1271,7 +1282,7 @@ extern void ScrnInsertCol (XtermWidget /* xw */, unsigned /* n */);
|
||||
extern void ScrnInsertLine (XtermWidget /* xw */, ScrnBuf /* sb */, int /* last */, int /* where */, unsigned /* n */);
|
||||
extern void ScrnRefresh (XtermWidget /* xw */, int /* toprow */, int /* leftcol */, int /* nrows */, int /* ncols */, Bool /* force */);
|
||||
extern void ScrnUpdate (XtermWidget /* xw */, int /* toprow */, int /* leftcol */, int /* nrows */, int /* ncols */, Bool /* force */);
|
||||
extern void ScrnWriteText (XtermWidget /* xw */, IChar * /* str */, unsigned /* flags */, unsigned /* cur_fg_bg */, unsigned /* length */);
|
||||
extern void ScrnWriteText (XtermWidget /* xw */, IChar * /* str */, unsigned /* flags */, CellColor /* cur_fg_bg */, unsigned /* length */);
|
||||
extern void ShowWrapMarks (XtermWidget /* xw */, int /* row */, CLineData * /* ld */);
|
||||
extern void setupLineData (TScreen * /* screen */, ScrnBuf /* base */, Char * /* data */, unsigned /* nrow */, unsigned /* ncol */);
|
||||
extern void xtermParseRect (XtermWidget /* xw */, int, int *, XTermRect *);
|
||||
@ -1349,6 +1360,7 @@ extern void deleteScrollback (TScreen * /* screen */);
|
||||
extern void DoResizeScreen (XtermWidget /* xw */);
|
||||
extern void HandleScrollBack PROTO_XT_ACTIONS_ARGS;
|
||||
extern void HandleScrollForward PROTO_XT_ACTIONS_ARGS;
|
||||
extern void HandleScrollTo PROTO_XT_ACTIONS_ARGS;
|
||||
extern void ResizeScrollBar (XtermWidget /* xw */);
|
||||
extern void ScrollBarDrawThumb (Widget /* scrollWidget */);
|
||||
extern void ScrollBarOff (XtermWidget /* xw */);
|
||||
@ -1375,7 +1387,7 @@ extern void TabZonk (Tabs /* tabs */);
|
||||
extern Boolean isDefaultBackground(const char * /* name */);
|
||||
extern Boolean isDefaultForeground(const char * /* name */);
|
||||
extern CgsEnum whichXtermCgs(XtermWidget /* xw */, unsigned /* attr_flags */, Bool /* hilite */);
|
||||
extern GC updatedXtermGC (XtermWidget /* xw */, unsigned /* flags */, unsigned /* fg_bg */, Bool /* hilite */);
|
||||
extern GC updatedXtermGC (XtermWidget /* xw */, unsigned /* flags */, CellColor /* fg_bg */, Bool /* hilite */);
|
||||
extern Pixel getXtermBackground(XtermWidget /* xw */, unsigned /* flags */, int /* color */);
|
||||
extern Pixel getXtermForeground(XtermWidget /* xw */, unsigned /* flags */, int /* color */);
|
||||
extern int ClearInLine (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */);
|
||||
@ -1430,12 +1442,12 @@ extern int XParseXineramaGeometry(Display * /* display */, char * /* parsestring
|
||||
|
||||
#if OPT_ISO_COLORS
|
||||
|
||||
extern unsigned extract_fg (XtermWidget /* xw */, unsigned /* color */, unsigned /* flags */);
|
||||
extern unsigned extract_bg (XtermWidget /* xw */, unsigned /* color */, unsigned /* flags */);
|
||||
extern CellColor makeColorPair (int /* fg */, int /* bg */);
|
||||
extern Pixel extract_fg (XtermWidget /* xw */, CellColor /* color */, unsigned /* flags */);
|
||||
extern Pixel extract_bg (XtermWidget /* xw */, CellColor /* color */, unsigned /* flags */);
|
||||
extern CellColor makeColorPair (XtermWidget /* xw */);
|
||||
extern void ClearCurBackground (XtermWidget /* xw */, int /* top */, int /* left */, unsigned /* height */, unsigned /* width */, unsigned /* fw */);
|
||||
|
||||
#define xtermColorPair(xw) makeColorPair(xw->sgr_foreground, xw->sgr_background)
|
||||
#define xtermColorPair(xw) makeColorPair(xw)
|
||||
|
||||
#if OPT_COLOR_RES
|
||||
#define GET_COLOR_RES(xw, res) xtermGetColorRes(xw, &(res))
|
||||
@ -1510,13 +1522,15 @@ extern Pixel xtermGetColorRes(XtermWidget /* xw */, ColorRes * /* res */);
|
||||
|
||||
/* FIXME: Reverse-Video? */
|
||||
#define T_COLOR(v,n) (v)->Tcolors[n]
|
||||
#define makeColorPair(fg, bg) 0
|
||||
#define xtermColorPair(xw) 0
|
||||
|
||||
#define checkVeryBoldColors(flags, fg) /* nothing */
|
||||
|
||||
#endif /* OPT_ISO_COLORS */
|
||||
|
||||
#define getXtermFG(xw, flags, color) getXtermForeground(xw, flags, color)
|
||||
#define getXtermBG(xw, flags, color) getXtermBackground(xw, flags, color)
|
||||
|
||||
#if OPT_ZICONBEEP
|
||||
extern void initZIconBeep(void);
|
||||
extern void resetZIconBeep(XtermWidget /* xw */);
|
||||
|
@ -30,7 +30,7 @@
|
||||
* sale, use or other dealings in this Software without prior written *
|
||||
* authorization. *
|
||||
*****************************************************************************
|
||||
$XTermId: xterm.log.html,v 1.1765 2017/06/21 00:48:25 tom Exp $
|
||||
$XTermId: xterm.log.html,v 1.1815 2017/12/30 19:25:39 tom Exp $
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
<h1>Contents</h1>
|
||||
|
||||
<p><a href=
|
||||
"http://invisible-island.net/xterm/xterm.log.html">Here</a> is
|
||||
"https://invisible-island.net/xterm/xterm.log.html">Here</a> is
|
||||
the latest version of this file.</p>
|
||||
|
||||
<p>It began as a list of the changes that I made for xterm, using
|
||||
@ -72,6 +72,8 @@
|
||||
CHANGELOG</a>).</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#xterm_331">Patch #331 - 2017/12/30</a></li>
|
||||
|
||||
<li><a href="#xterm_330">Patch #330 - 2017/06/20</a></li>
|
||||
|
||||
<li><a href="#xterm_329">Patch #329 - 2017/06/12</a></li>
|
||||
@ -945,6 +947,226 @@
|
||||
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_331" id="xterm_331">Patch #331 -
|
||||
2017/12/30</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>add workaround for improper grayscale adjustments made in
|
||||
FreeType library, exposed by changes to rounding in 2.8.1,
|
||||
which shows up as a gap in line-drawing characters (Debian
|
||||
#880407).</li>
|
||||
|
||||
<li>improve a special case where a non-Unicode font's
|
||||
line-drawing characters were not used, when specifying it via
|
||||
the <code>utf8Fonts</code> resource, e.g.,
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
-fs 15 \
|
||||
-xrm '*VT100.font:12x24' \
|
||||
-xrm '*VT100.boldFont:12x24' \
|
||||
-xrm '*VT100.utf8Fonts.font: 12x24' \
|
||||
-xrm '*VT100.utf8Fonts.boldFont: 12x24' \
|
||||
</pre>
|
||||
</blockquote>
|
||||
</li>
|
||||
|
||||
<li>replace constant 10msec delay for next X event with new
|
||||
resource <code>nextEventDelay</code>, and reduce that to 1msec
|
||||
to accommodate faster machines than used when
|
||||
<code>-hold</code> was implemented in <a href=
|
||||
"#xterm_116">1999</a> (Debian #877628).</li>
|
||||
|
||||
<li>add <code>scroll-to</code> action, which simplifies binding
|
||||
a key to scroll to the beginning or end of the saved-lines
|
||||
(Debian #880120).</li>
|
||||
|
||||
<li>add building blocks for alternate screen and/or title-stack
|
||||
features in the <code>terminfo</code> file.</li>
|
||||
|
||||
<li>improve calculations for cell-data size.</li>
|
||||
|
||||
<li>change configure script to enable XHTML/SVG screen dumps by
|
||||
default.</li>
|
||||
|
||||
<li>change configure script to enable 256-colors by
|
||||
default.</li>
|
||||
|
||||
<li>update config.guess, config.sub</li>
|
||||
|
||||
<li>change configure script option for
|
||||
<code>--with-man2html</code> to use improved script by
|
||||
default.</li>
|
||||
|
||||
<li>add case for private mode 1044 in DECRQM, to report the
|
||||
keepClipboard resource setting and corresponding menu
|
||||
entry.</li>
|
||||
|
||||
<li>fix an inconsistency between private mode 12 (the AT&T
|
||||
610 cursor blink) and <code>DECSCUSR</code>: the former relied
|
||||
on having the <code>cursorBlink</code> resource set initially
|
||||
to enable the escape sequence, while the latter does not.</li>
|
||||
|
||||
<li>add private modes 13 and 14, as well as resource
|
||||
<code>cursorBlinkXOR</code> to allow better control over the
|
||||
cursor-blinking state (discussion with Bram Moolenaar).</li>
|
||||
|
||||
<li>modify the html and svg screen dumps to support direct
|
||||
color</li>
|
||||
|
||||
<li>modify media copy (screen-printing) to support the same SGR
|
||||
codes as <code>DECRQSS</code>, including 88/256 indexed color
|
||||
as well as direct color.</li>
|
||||
|
||||
<li>improve options-parsing for query-status.pl script.</li>
|
||||
|
||||
<li>modify parsing of <code>SGR</code> direct-color control
|
||||
making <em>color space identitier</em> optional. The
|
||||
corresponding <code>DECRQSS</code> reply always returns an
|
||||
empty (default) field for the identifier.</li>
|
||||
|
||||
<li>add wide-attributes to <code>DECRQSS</code> reply for
|
||||
<code>SGR</code>.</li>
|
||||
|
||||
<li>add private mode 1046 to help with scripting
|
||||
applications.</li>
|
||||
|
||||
<li>correct expression used for readline-flags in DECRQM; to
|
||||
test the current flag rather than information <em>stacked</em>
|
||||
within the same variable.</li>
|
||||
|
||||
<li>correct typo in <code>ctlseqs.ms</code> reference to
|
||||
ISO-8613-6 (patch by Mike Frysinger).</li>
|
||||
|
||||
<li>fix lintian warning for test-package.</li>
|
||||
|
||||
<li>fix typo in <code>DECRQSS</code> for <code>SGR</code> 48,
|
||||
which printed the foreground value for colors past 15. Also use
|
||||
colon delimiter for codes 38/48 in response (report by Paul
|
||||
LeoNerd Evans).</li>
|
||||
|
||||
<li>improve workaround for Debian #542434 by using the font's
|
||||
maximum width when no ISO-8859-1 glyphs are provided (Debian
|
||||
#879936).</li>
|
||||
|
||||
<li>work around a special case of <em>Xft</em>'s mismanagement
|
||||
of its cached data by adding a check before the
|
||||
<code>-report-fonts</code> option to ensure that it does not
|
||||
use an <code>XftPattern</code> which may have been freed during
|
||||
a call to <code>XftFontOpenPattern</code>.</li>
|
||||
|
||||
<li>improve manual page description of <code>regex</code>
|
||||
option for <code>on<em>X</em>Clicks</code> resources (report by
|
||||
Lukas Mai).</li>
|
||||
|
||||
<li>add <code>directColor</code> resource.</li>
|
||||
|
||||
<li>additional manpage macro cleanup (Brandon Robinson, Debian
|
||||
#880551).</li>
|
||||
|
||||
<li>add optional support for direct-colors (adapted from patch
|
||||
by anonymous “Nibby Nebbulous”).</li>
|
||||
|
||||
<li>improve legacy/NRC character set mapping (patch by Thomas
|
||||
Wolff):
|
||||
|
||||
<ul>
|
||||
<li>enable alternate NRC set designators for French and
|
||||
French Canadian, ‘9’ and ‘f’
|
||||
respectively, as documented in ctlseqs. (‘9’ is
|
||||
documented for VT510, ‘f’ is a Kermit
|
||||
feature).</li>
|
||||
|
||||
<li>correct the Unicode value in the <em>DEC Technical</em>
|
||||
table to show capital delta.</li>
|
||||
|
||||
<li>referring to
|
||||
|
||||
<blockquote>
|
||||
<p><a href=
|
||||
"http://vt100.net/docs/vt220-rm/table2-3b.html">http://vt100.net/docs/vt220-rm/table2-3b.html</a><br>
|
||||
|
||||
<a href=
|
||||
"http://vt100.net/docs/vt320-uu/appendixe.html">http://vt100.net/docs/vt320-uu/appendixe.html</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p>add entries for the <em>DEC Supplemental Graphics</em>
|
||||
table to display 0x28/0xa8 as ¤ and 0x5d/0xdd as
|
||||
Ÿ.</p>
|
||||
</li>
|
||||
|
||||
<li>referring to
|
||||
|
||||
<blockquote>
|
||||
<p><a href=
|
||||
"http://www.vt100.net/charsets/technical.html">http://www.vt100.net/charsets/technical.html</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p>alter the Unicode values used for 0x2b through 0x2c to
|
||||
use <em>curly braces</em> to work with the
|
||||
“middle” parts displayed with 0x2f and
|
||||
0x30.</p>
|
||||
</li>
|
||||
|
||||
<li>modify the VT220 “Supplemental” table,
|
||||
giving a hint that it was probably meant to be
|
||||
“Supplemental Graphics” and is the same as
|
||||
VT320's table.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>quiet a few font-warnings when a derived fontname cannot be
|
||||
opened, overlooked in refactoring of font resources in <a href=
|
||||
"#xterm_328">patch #328</a> (initially reported on <a href=
|
||||
"https://cygwin.com/ml/cygwin/2017-06/msg00255.html">Cygwin
|
||||
mailing list</a>, with <a href=
|
||||
"https://cygwin.com/ml/cygwin/2017-07/msg00216.html">followup</a>).</li>
|
||||
|
||||
<li>correct error response for <code>DECRQSS</code> broken in
|
||||
cleanup of Coverity reports in <a href="#xterm_288">patch
|
||||
#288</a> (reports by Bram Moolenaar and IWAMOTO Kouichi).</li>
|
||||
|
||||
<li>improve <code>DECRPM</code> responses by returning <em>mode
|
||||
not recognized</em> for modes which may not be settable due to
|
||||
the selected <code>decTerminalID</code> resource (report by
|
||||
IWAMOTO Kouichi).</li>
|
||||
|
||||
<li>correct logic for <code>print-immediate</code> action, and
|
||||
enable corresponding menu entry (patch by Lauri
|
||||
Tirkkonen).</li>
|
||||
|
||||
<li>add configure option <code>--with-pcre2</code> (patch by
|
||||
David Michael).</li>
|
||||
|
||||
<li>fix a misspelled subsection title in ctlseqs.ms and add a
|
||||
note regarding blink which was rendered as bold in X11R6.
|
||||
Blinking text was implemented in <a href="#xterm_60">Patch
|
||||
#60</a>.</li>
|
||||
|
||||
<li>fix typos in <code>xterm.man</code> (patches by Sven
|
||||
Joachim, Larry Hynes).</li>
|
||||
|
||||
<li>fix typography in <code>xterm.man</code> (patch by Bjarni
|
||||
Ingi Gislason, Debian #869248).</li>
|
||||
|
||||
<li>fix typo in <code>INSTALL</code> (Larry Hynes).</li>
|
||||
|
||||
<li>add <code>xterm-direct</code> terminal description based on
|
||||
changes introduced in <a href="#xterm_277">patch #277</a>, and
|
||||
relying upon ncurses <code><strong>RGB</strong></code>
|
||||
extension.</li>
|
||||
|
||||
<li>modify <code>xterm-new</code> terminal description to use
|
||||
ECMA-48 <code>REP</code>, reflecting its use in xterm since
|
||||
<a href="#xterm_32">patch #32</a> (1996).</li>
|
||||
|
||||
<li>clarify comment in ctlseqs.ms regarding blink: it has been
|
||||
part of xterm since <a href="#xterm_60">patch #60</a>
|
||||
(1998).</li>
|
||||
|
||||
<li>update ftp URLs in documentation.</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_330" id="xterm_330">Patch #330 -
|
||||
2017/06/20</a></h1>
|
||||
|
||||
@ -3129,7 +3351,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
|
||||
|
||||
<li>add <code>E3</code> extended capability to
|
||||
<code>xterm-basic</code> to match ncurses <a href=
|
||||
"http://invisible-island.net/ncurses/NEWS.html#t20120728">20120728</a>
|
||||
"https://invisible-island.net/ncurses/NEWS.html#t20120728">20120728</a>
|
||||
patch.</li>
|
||||
|
||||
<li>fix incorrect transformation of row-parameter for
|
||||
@ -4007,7 +4229,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
|
||||
<li>minor formatting changes to ctlseqs.ms to simplify a script
|
||||
which extracts the feature information. See the results in
|
||||
<a href=
|
||||
"http://invisible-island.net/xterm/xterm.faq.html#compare_versions">
|
||||
"https://invisible-island.net/xterm/xterm.faq.html#compare_versions">
|
||||
Comparing versions, by counting controls</a> in the xterm
|
||||
FAQ.</li>
|
||||
|
||||
@ -4210,7 +4432,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
|
||||
|
||||
<ul>
|
||||
<li>modify configure check for <a href=
|
||||
"http://invisible-island.net/luit/">luit</a> to include new
|
||||
"https://invisible-island.net/luit/">luit</a> to include new
|
||||
aliases for the program (<code>xterm-filter</code> and
|
||||
<code>bluit</code>).</li>
|
||||
|
||||
@ -4275,7 +4497,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
|
||||
|
||||
<li>change default value of <code>menuLocale</code> resource to
|
||||
"C", to work around longstanding <a href=
|
||||
"http://invisible-island.net/xterm/xterm.faq.html#slow_menus">Xorg
|
||||
"https://invisible-island.net/xterm/xterm.faq.html#slow_menus">Xorg
|
||||
bug</a>.</li>
|
||||
|
||||
<li>modify handling of <code>scrollKey</code> feature to ignore
|
||||
@ -5803,9 +6025,10 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
|
||||
for the <code>Xaw</code> popup menus (adapted from patch by
|
||||
Dave Coffin).</li>
|
||||
|
||||
<li>modify do_precomposition() function and make-compose.sh to
|
||||
handle 21-bit codes vs the 16-bit codes those were written for,
|
||||
and fix a few mis-sorted codes (patch by Thomas Wolff).</li>
|
||||
<li>modify <code>do_precomposition()</code> function and
|
||||
<code>make-precompose.sh</code> to handle 21-bit codes vs the
|
||||
16-bit codes those were written for, and fix a few mis-sorted
|
||||
codes (patch by Thomas Wolff).</li>
|
||||
|
||||
<li>handle special case in <code>-cjk_width</code> which
|
||||
unexpectedly caused a character's width to change when a
|
||||
@ -8506,7 +8729,7 @@ Klanderman).
|
||||
(patch by Holger Veit).</li>
|
||||
|
||||
<li>used modified indent 2.0 (patch <a href=
|
||||
"ftp://invisible-island.net/gnu-patches/">20020428</a>) to
|
||||
"ftp://ftp.invisible-island.net/gnu-patches/">20020428</a>) to
|
||||
reformat most of the C source files, to simplify
|
||||
maintenance.</li>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -60,7 +60,7 @@
|
||||
/* #undef DEF_ALT_SENDS_ESC */ /* CF_ARG_ENABLE(alt-sends-esc) */
|
||||
/* #undef DEF_BACKARO_BS */ /* CF_ARG_DISABLE(backarrow-key) */
|
||||
#define DEF_BACKARO_ERASE 1 /* CF_ARG_ENABLE(backarrow-is-erase) */
|
||||
/* #undef DEF_INITIAL_ERASE /* CF_ARG_DISABLE(initial-erase) */
|
||||
/* #undef DEF_INITIAL_ERASE */ /* CF_ARG_DISABLE(initial-erase) */
|
||||
/* #undef DEF_META_SENDS_ESC */ /* CF_ARG_ENABLE(meta-sends-esc) */
|
||||
/* #undef DFT_COLORMODE */ /* AC_ARG_WITH(default-color-mode) */
|
||||
#define DFT_DECID "100" /* AC_ARG_WITH(default-terminal-id) */
|
||||
@ -77,16 +77,18 @@
|
||||
#define HAVE_LIBXPM /* CF_WITH_XPM */
|
||||
/* #undef HAVE_LIB_NEXTAW */ /* CF_X_ATHENA(--with-neXtaw) */
|
||||
/* #undef HAVE_LIB_PCRE */ /* CF_WITH_PCRE */
|
||||
/* #undef HAVE_LIB_PCRE2 */ /* CF_WITH_PCRE2 */
|
||||
#define HAVE_LIB_XAW 1 /* CF_X_ATHENA */
|
||||
/* #undef HAVE_LIB_XAW3D */ /* CF_X_ATHENA(--with-Xaw3d) */
|
||||
/* #undef HAVE_LIB_XAW3DXFT */ /* CF_X_ATHENA(--with-Xaw3dxft) */
|
||||
/* #undef HAVE_LIB_XAWPLUS */ /* CF_X_ATHENA(--with-XawPlus) */
|
||||
#define HAVE_LIB_XCURSOR 1 /* AC_CHECK_LIB(Xcursor) */
|
||||
#define HAVE_MKDTEMP 1 /* AC_CHECK_FUNCS(mkdtemp) */
|
||||
/* #undef HAVE_NCURSES_CURSES_H /* AC_CHECK_HEADERS(ncurses/curses.h) */
|
||||
/* #undef HAVE_NCURSES_CURSES_H */ /* AC_CHECK_HEADERS(ncurses/curses.h) */
|
||||
/* #undef HAVE_NCURSES_TERM_H */ /* AC_CHECK_HEADERS(ncurses/term.h) */
|
||||
#define HAVE_PATHS_H 1 /* CF_LASTLOG */
|
||||
/* #undef HAVE_PCREPOSIX_H */ /* CF_WITH_PCRE */
|
||||
/* #undef HAVE_PCRE2POSIX_H */ /* CF_WITH_PCRE2 */
|
||||
/* #undef HAVE_POSIX_OPENPT */ /* CF_FUNC_GRANTPT */
|
||||
#define HAVE_POSIX_SAVED_IDS 1 /* CF_POSIX_SAVED_IDS */
|
||||
/* #undef HAVE_PTSNAME */ /* CF_FUNC_GRANTPT */
|
||||
@ -133,6 +135,7 @@
|
||||
#define LUIT_PATH "/usr/X11R6/bin/luit" /* CF_ARG_ENABLE(luit) */
|
||||
/* #undef NO_ACTIVE_ICON */ /* CF_ARG_DISABLE(active-icon) */
|
||||
/* #undef NO_LEAKS */ /* CF_ARG_DISABLE(leaks) */
|
||||
#define OPT_DIRECT_COLOR 1 /* CF_ARG_ENABLE(direct-color) */
|
||||
#define OPT_256_COLORS 1 /* CF_ARG_ENABLE(256-color) */
|
||||
/* #undef OPT_88_COLORS */ /* CF_ARG_ENABLE(88-color) */
|
||||
/* #undef OPT_AIX_COLORS */ /* CF_ARG_DISABLE(16-color) */
|
||||
@ -169,12 +172,12 @@
|
||||
/* #undef OPT_READLINE */ /* CF_ARG_ENABLE(readline-mouse) */
|
||||
/* #undef OPT_SAME_NAME */ /* CF_ARG_DISABLE(samename) */
|
||||
/* #undef OPT_SCO_FUNC_KEYS */ /* CF_ARG_ENABLE(sco-fkeys) */
|
||||
/* #undef OPT_SELECTION_OPS /* CF_ARG_DISABLE(selection-ops) */
|
||||
/* #undef OPT_SELECTION_OPS */ /* CF_ARG_DISABLE(selection-ops) */
|
||||
#define OPT_SELECT_REGEX 1 /* CF_ARG_DISABLE(regex) */
|
||||
/* #undef OPT_SESSION_MGT */ /* CF_ARG_DISABLE(session-mgt) */
|
||||
/* #undef OPT_REGIS_GRAPHICS /* CF_ARG_ENABLE(regis-graphics) */
|
||||
/* #undef OPT_SIXEL_GRAPHICS /* CF_ARG_ENABLE(sixel-graphics) */
|
||||
/* #undef OPT_GRAPHICS /* CF_ARG_ENABLE(graphics) */
|
||||
/* #undef OPT_REGIS_GRAPHICS */ /* CF_ARG_ENABLE(regis-graphics) */
|
||||
/* #undef OPT_SIXEL_GRAPHICS */ /* CF_ARG_ENABLE(sixel-graphics) */
|
||||
/* #undef OPT_GRAPHICS */ /* CF_ARG_ENABLE(graphics) */
|
||||
/* #undef OPT_SUN_FUNC_KEYS */ /* CF_ARG_ENABLE(sun-fkeys) */
|
||||
/* #undef OPT_TCAP_FKEYS */ /* CF_ARG_ENABLE(tcap-fkeys) */
|
||||
/* #undef OPT_TCAP_QUERY */ /* CF_ARG_ENABLE(tcap-query) */
|
||||
@ -187,7 +190,7 @@
|
||||
/* #undef OPT_XMC_GLITCH */ /* CF_ARG_ENABLE(xmc-glitch) */
|
||||
/* #undef OPT_ZICONBEEP */ /* CF_ARG_DISABLE(ziconbeep) */
|
||||
/* #undef OWN_TERMINFO_DIR */ /* AC_ARG_WITH(own-terminfo) */
|
||||
/* +#undef OWN_TERMINFO_ENV /* AC_ARG_ENABLE(env-terminfo) */
|
||||
/* #undef OWN_TERMINFO_ENV */ /* AC_ARG_ENABLE(env-terminfo) */
|
||||
/* #undef PROCFS_ROOT */ /* CF_ARG_ENABLE(exec-xterm) */
|
||||
#define SCROLLBAR_RIGHT 1 /* CF_ARG_ENABLE(rightbar) */
|
||||
#define SIG_ATOMIC_T volatile sig_atomic_t /* CF_SIG_ATOMIC_T */
|
||||
@ -207,7 +210,7 @@
|
||||
#define USE_UTMP_SETGID 1 /* AC_ARG_WITH(utmp-setgid) */
|
||||
/* #undef UTMPX_FOR_UTMP */ /* CF_UTMP */
|
||||
#define XRENDERFONT 1 /* CF_X_FREETYPE */
|
||||
/* #undef cc_t /* CF_TYPE_CC_T */
|
||||
/* #undef cc_t */ /* CF_TYPE_CC_T */
|
||||
/* #undef gid_t */ /* AC_TYPE_UID_T */
|
||||
/* #undef mode_t */ /* AC_TYPE_MODE_T */
|
||||
/* #undef off_t */ /* AC_TYPE_OFF_T */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: xtermcfg.hin,v 1.213 2017/05/04 00:49:33 tom Exp $ */
|
||||
/* $XTermId: xtermcfg.hin,v 1.215 2017/11/08 02:27:49 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2016,2017 by Thomas E. Dickey
|
||||
@ -77,6 +77,7 @@
|
||||
#undef HAVE_LIBXPM /* CF_WITH_XPM */
|
||||
#undef HAVE_LIB_NEXTAW /* CF_X_ATHENA(--with-neXtaw) */
|
||||
#undef HAVE_LIB_PCRE /* CF_WITH_PCRE */
|
||||
#undef HAVE_LIB_PCRE2 /* CF_WITH_PCRE2 */
|
||||
#undef HAVE_LIB_XAW /* CF_X_ATHENA */
|
||||
#undef HAVE_LIB_XAW3D /* CF_X_ATHENA(--with-Xaw3d) */
|
||||
#undef HAVE_LIB_XAW3DXFT /* CF_X_ATHENA(--with-Xaw3dxft) */
|
||||
@ -87,6 +88,7 @@
|
||||
#undef HAVE_NCURSES_TERM_H /* AC_CHECK_HEADERS(ncurses/term.h) */
|
||||
#undef HAVE_PATHS_H /* CF_LASTLOG */
|
||||
#undef HAVE_PCREPOSIX_H /* CF_WITH_PCRE */
|
||||
#undef HAVE_PCRE2POSIX_H /* CF_WITH_PCRE2 */
|
||||
#undef HAVE_POSIX_OPENPT /* CF_FUNC_GRANTPT */
|
||||
#undef HAVE_POSIX_SAVED_IDS /* CF_POSIX_SAVED_IDS */
|
||||
#undef HAVE_PTSNAME /* CF_FUNC_GRANTPT */
|
||||
@ -133,6 +135,7 @@
|
||||
#undef LUIT_PATH /* CF_ARG_ENABLE(luit) */
|
||||
#undef NO_ACTIVE_ICON /* CF_ARG_DISABLE(active-icon) */
|
||||
#undef NO_LEAKS /* CF_ARG_DISABLE(leaks) */
|
||||
#undef OPT_DIRECT_COLOR /* CF_ARG_ENABLE(direct-color) */
|
||||
#undef OPT_256_COLORS /* CF_ARG_ENABLE(256-color) */
|
||||
#undef OPT_88_COLORS /* CF_ARG_ENABLE(88-color) */
|
||||
#undef OPT_AIX_COLORS /* CF_ARG_DISABLE(16-color) */
|
||||
|
Loading…
Reference in New Issue
Block a user