Update to xterm 291. Tested by many.
This commit is contained in:
parent
c7464f0cb7
commit
a232c77744
@ -1,6 +1,6 @@
|
||||
-- $XTermId: INSTALL,v 1.139 2012/10/10 23:33:29 tom Exp $
|
||||
-- $XTermId: INSTALL,v 1.142 2013/02/03 19:36:47 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
-- Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
-- Copyright 1997-2012,2013 by Thomas E. Dickey
|
||||
--
|
||||
-- All Rights Reserved
|
||||
--
|
||||
@ -215,7 +215,7 @@ The options (in alphabetic order):
|
||||
type. If you do not need input method (and are troubled by the
|
||||
warning messages), it is safe to disable this option.
|
||||
|
||||
--disable-leaks test: set to test memory leaks
|
||||
--disable-leaks test: free permanent memory, analyze leaks
|
||||
|
||||
Compile-in code which frees memory which might confuse a leak-testing
|
||||
tool. Normally these chunks of memory are retained as long as xterm
|
||||
@ -565,13 +565,23 @@ The options (in alphabetic order):
|
||||
Use --without-app-defaults or --with-app-defaults=no to disable the
|
||||
feature.
|
||||
|
||||
--with-dmalloc test: use Gray Watson's dmalloc library
|
||||
|
||||
Check for and link with dmalloc.
|
||||
|
||||
--with-dbmalloc test: use Conor Cahill's dbmalloc library
|
||||
|
||||
Check for and link with dbmalloc.
|
||||
|
||||
--with-desktop-category=XXX one or more desktop catgories or auto
|
||||
This is a list of names. The configure script maps blanks and commas
|
||||
to semicolons (";") which are used by the desktop utils as a separator.
|
||||
|
||||
The default value "auto" tells the configure script to look
|
||||
at existing ".desktop" files for xterm and common terminal
|
||||
emulators, to use those.
|
||||
emulators, to use those. If none are found, the script uses this
|
||||
default:
|
||||
System;TerminalEmulator;Utility;
|
||||
|
||||
--with-freetype-config configure script to use for FreeType
|
||||
|
||||
@ -704,6 +714,11 @@ The options (in alphabetic order):
|
||||
If xterm is not installed setuid'd to root, this option is not needed,
|
||||
since it cannot change the tty device's ownership.
|
||||
|
||||
--with-valgrind test: use valgrind
|
||||
|
||||
Activate the --disable-leaks option, and ensure that "-g" is added to
|
||||
CFLAGS.
|
||||
|
||||
--with-xpm=DIR use Xpm library for colored icon, may specify path
|
||||
|
||||
Use Xpm library to show colored icon in window decoration, e.g.,
|
||||
|
@ -1,4 +1,4 @@
|
||||
XCOMM $XTermId: Imakefile,v 1.105 2011/11/29 10:19:20 Thorsten.Glaser Exp $
|
||||
XCOMM $XTermId: Imakefile,v 1.107 2013/01/01 12:16:40 tom Exp $
|
||||
XCOMM
|
||||
XCOMM Attention xterm porters
|
||||
XCOMM
|
||||
@ -126,19 +126,6 @@ module.o: ; $(CC) -c defines $(CFLAGS) module.c
|
||||
LOCAL_LDFLAGS = -Wl,-bind_at_load
|
||||
#endif
|
||||
|
||||
#ifdef OS2Architecture
|
||||
/*
|
||||
* Only used in os2main.c, see ptyx.h for OPT_I18N_SUPPORT
|
||||
* <werner@suse.de>
|
||||
*/
|
||||
#if XtermWithI18N
|
||||
I18NDEF = -DI18N
|
||||
FEATURE_DEFINES = -DDEBUG -DALLOWLOGGING $(I18NDEF)
|
||||
#else
|
||||
FEATURE_DEFINES = -DDEBUG -DALLOWLOGGING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
OSMAJORVERSION = OSMajorVersion
|
||||
OSMINORVERSION = OSMinorVersion
|
||||
|
||||
@ -190,13 +177,8 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
|
||||
DEFINES = $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(PUTENVDEF) $(IMAKEDEFINES) $(TRACEDEF)
|
||||
INCLUDES = -I. $(XRFINCLUDES)
|
||||
|
||||
#ifdef OS2Architecture
|
||||
MAINSRC = os2main.c
|
||||
MAINOBJ = os2main.o
|
||||
#else
|
||||
MAINSRC = main.c
|
||||
MAINOBJ = main.o
|
||||
#endif
|
||||
#ifdef TraceXTerm
|
||||
TRACESRC = trace.c
|
||||
TRACEOBJ = trace.o
|
||||
@ -204,17 +186,17 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
|
||||
SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \
|
||||
data.c doublechr.c fontutils.c input.c \
|
||||
linedata.c menu.c misc.c print.c ptydata.c scrollback.c \
|
||||
screen.c scrollbar.c tabs.c util.c xstrings.c xtermcap.c \
|
||||
TekPrsTbl.c Tekproc.c VTPrsTbl.c \
|
||||
screen.c scrollbar.c tabs.c util.c version.c xstrings.c \
|
||||
xtermcap.c TekPrsTbl.c Tekproc.c VTPrsTbl.c \
|
||||
$(MAINSRC) $(EXTRASRC) $(UTF8SRC) $(TRACESRC)
|
||||
OBJS1 = button.o cachedGCs.o charproc.o charsets.o cursor.o \
|
||||
data.o doublechr.o fontutils.o input.o \
|
||||
linedata.o menu.o misc.o print.o ptydata.o scrollback.o \
|
||||
screen.o scrollbar.o tabs.o util.o xstrings.o xtermcap.o \
|
||||
TekPrsTbl.o Tekproc.o VTPrsTbl.o \
|
||||
screen.o scrollbar.o tabs.o util.o version.o xstrings.o \
|
||||
xtermcap.o TekPrsTbl.o Tekproc.o VTPrsTbl.o \
|
||||
$(MAINOBJ) $(EXTRAOBJ) $(UTF8OBJ) $(TRACEOBJ)
|
||||
SRCS2 = resize.c xstrings.c
|
||||
OBJS2 = resize.o xstrings.o
|
||||
SRCS2 = resize.c version.c xstrings.c
|
||||
OBJS2 = resize.o version.o xstrings.o
|
||||
SRCS = $(SRCS1) $(SRCS2)
|
||||
OBJS = $(OBJS1) $(OBJS2)
|
||||
PROGRAMS = ProgramTargetName(resize) ProgramTargetName(xterm)
|
||||
|
@ -1,4 +1,4 @@
|
||||
MANIFEST for xterm-287, version xterm-287
|
||||
MANIFEST for xterm-291, version xterm-291
|
||||
--------------------------------------------------------------------------------
|
||||
MANIFEST this file
|
||||
256colres.h resource-definitions for 256-color mode
|
||||
@ -62,12 +62,10 @@ menu.c popup/pulldown menus for 'xterm'
|
||||
menu.h interface of menu.c
|
||||
minstall.in script for installing manpages
|
||||
misc.c miscellaneous utility functions for 'xterm'
|
||||
os2main.c main program for OS/2 EMX port of 'xterm'
|
||||
plink.sh script to prune unneeded libraries from link
|
||||
precompose.c table of precompose sequences
|
||||
precompose.h interface of precompose.c
|
||||
print.c VT100+ print support functions
|
||||
proto.h macros to simplify function prototypes
|
||||
ptydata.c functions to manipulate data read from pty
|
||||
ptyx.h structure-definitions for 'xterm'
|
||||
resize.c program to compute/modify xterm's window size
|
||||
@ -87,6 +85,7 @@ util.c miscellaneous utility functions for 'xterm'
|
||||
uxterm wrapper script to make unicode-xterm
|
||||
uxterm.desktop sample desktop file for uxterm
|
||||
uxterm.man manpage for uxterm, from Debian
|
||||
version.c xterm package version, used also in resize
|
||||
version.h version of xterm
|
||||
vms.c VMS version of xterm's spawn(), etc.
|
||||
vms.h system headers and definitions for vms.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2012/04/07 20:22:27 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2013/03/09 14:45:38 matthieu Exp $
|
||||
.include <bsd.xconf.mk>
|
||||
|
||||
SUBDIR= icons resize
|
||||
@ -23,7 +23,7 @@ SRCS= TekPrsTbl.c Tekproc.c VTPrsTbl.c button.c cachedGCs.c \
|
||||
charclass.c xtermcap.c charproc.c charsets.c cursor.c \
|
||||
data.c doublechr.c fontutils.c input.c linedata.c main.c menu.c \
|
||||
misc.c precompose.c print.c ptydata.c wcwidth.c screen.c \
|
||||
scrollback.c scrollbar.c tabs.c trace.c util.c xstrings.c
|
||||
scrollback.c scrollbar.c tabs.c trace.c util.c version.c xstrings.c
|
||||
|
||||
MANDIR= ${X11BASE}/man/man
|
||||
XETC?= /etc/X11
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: button.c,v 1.435 2012/11/20 01:15:57 tom Exp $ */
|
||||
/* $XTermId: button.c,v 1.451 2013/02/06 09:56:15 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -1320,10 +1320,11 @@ xtermUtf8ToTextList(XtermWidget xw,
|
||||
for (i = 0; i < (*text_list_count); ++i) {
|
||||
data = (Char *) (*text_list)[i];
|
||||
size = strlen((*text_list)[i]) + 1;
|
||||
data = UTF8toLatin1(screen, data, size, &size);
|
||||
memcpy(tmp, data, size + 1);
|
||||
new_text_list[i] = tmp;
|
||||
tmp += size + 1;
|
||||
if ((data = UTF8toLatin1(screen, data, size, &size)) != 0) {
|
||||
memcpy(tmp, data, size + 1);
|
||||
new_text_list[i] = tmp;
|
||||
tmp += size + 1;
|
||||
}
|
||||
}
|
||||
XFreeStringList((*text_list));
|
||||
*text_list = new_text_list;
|
||||
@ -1345,7 +1346,6 @@ parseItem(char *value, char *nextc)
|
||||
}
|
||||
*nextc = *nextp;
|
||||
*nextp = '\0';
|
||||
x_strtrim(value);
|
||||
|
||||
return nextp;
|
||||
}
|
||||
@ -1404,30 +1404,32 @@ overrideTargets(Widget w, String value, Atom ** resultp)
|
||||
count = 0;
|
||||
do {
|
||||
char *nextp = parseItem(listp, &nextc);
|
||||
size_t len = strlen(listp);
|
||||
char *item = x_strtrim(listp);
|
||||
size_t len = (item ? strlen(item) : 0);
|
||||
|
||||
if (len == 0) {
|
||||
/* EMPTY */ ;
|
||||
}
|
||||
#if OPT_WIDE_CHARS
|
||||
else if (sameItem(listp, "UTF8")) {
|
||||
else if (sameItem(item, "UTF8")) {
|
||||
result[count++] = XA_UTF8_STRING(XtDisplay(w));
|
||||
}
|
||||
#endif
|
||||
else if (sameItem(listp, "I18N")) {
|
||||
else if (sameItem(item, "I18N")) {
|
||||
if (screen->i18nSelections) {
|
||||
result[count++] = XA_TEXT(XtDisplay(w));
|
||||
result[count++] = XA_COMPOUND_TEXT(XtDisplay(w));
|
||||
}
|
||||
} else if (sameItem(listp, "TEXT")) {
|
||||
} else if (sameItem(item, "TEXT")) {
|
||||
result[count++] = XA_TEXT(XtDisplay(w));
|
||||
} else if (sameItem(listp, "COMPOUND_TEXT")) {
|
||||
} else if (sameItem(item, "COMPOUND_TEXT")) {
|
||||
result[count++] = XA_COMPOUND_TEXT(XtDisplay(w));
|
||||
} else if (sameItem(listp, "STRING")) {
|
||||
} else if (sameItem(item, "STRING")) {
|
||||
result[count++] = XA_STRING;
|
||||
}
|
||||
*nextp++ = nextc;
|
||||
listp = nextp;
|
||||
free(item);
|
||||
} while (nextc != '\0');
|
||||
if (count) {
|
||||
result[count] = None;
|
||||
@ -1437,6 +1439,7 @@ overrideTargets(Widget w, String value, Atom ** resultp)
|
||||
XtFree((char *) result);
|
||||
}
|
||||
}
|
||||
free(copied);
|
||||
} else {
|
||||
TRACE(("Couldn't allocate copy of selection types\n"));
|
||||
}
|
||||
@ -1597,6 +1600,10 @@ MapSelections(XtermWidget xw, String * params, Cardinal num_params)
|
||||
: params[j]));
|
||||
if (result[j] == 0) {
|
||||
UnmapSelections(xw);
|
||||
while (j != 0) {
|
||||
free((void *) result[--j]);
|
||||
}
|
||||
free(result);
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
@ -3771,8 +3778,10 @@ ConvertSelection(Widget w,
|
||||
|
||||
*value = (XtPointer) targetP;
|
||||
|
||||
while (*my_targets != None) {
|
||||
*targetP++ = *my_targets++;
|
||||
if (my_targets != 0) {
|
||||
while (*my_targets != None) {
|
||||
*targetP++ = *my_targets++;
|
||||
}
|
||||
}
|
||||
*targetP++ = XA_LENGTH(dpy);
|
||||
*targetP++ = XA_LIST_LENGTH(dpy);
|
||||
@ -4180,15 +4189,21 @@ BtnCode(XButtonEvent * event, int button)
|
||||
{
|
||||
int result = (int) (32 + (KeyState(event->state) << 2));
|
||||
|
||||
if (event->type == MotionNotify)
|
||||
result += 32;
|
||||
|
||||
if (button < 0 || button > 5) {
|
||||
result += 3;
|
||||
} else {
|
||||
if (button > 3)
|
||||
result += (64 - 4);
|
||||
if (event->type == MotionNotify)
|
||||
result += 32;
|
||||
result += button;
|
||||
}
|
||||
TRACE(("BtnCode button %d, %s state " FMT_MODIFIER_NAMES " ->%#x\n",
|
||||
button,
|
||||
visibleEventType(event->type),
|
||||
ARG_MODIFIER_NAMES(event->state),
|
||||
result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -4229,6 +4244,22 @@ EmitButtonCode(TScreen * screen,
|
||||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
FirstBitN(int bits)
|
||||
{
|
||||
int result = -1;
|
||||
if (bits > 0) {
|
||||
result = 0;
|
||||
while (!(bits & 1)) {
|
||||
bits /= 2;
|
||||
++result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#define ButtonBit(button) ((button >= 0) ? (1 << (button)) : 0)
|
||||
|
||||
#define EMIT_BUTTON(button) EmitButtonCode(screen, line, count, event, button)
|
||||
|
||||
static void
|
||||
@ -4305,7 +4336,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
|
||||
/* Button-Motion events */
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
screen->mouse_button = button;
|
||||
screen->mouse_button |= ButtonBit(button);
|
||||
count = EMIT_BUTTON(button);
|
||||
break;
|
||||
case ButtonRelease:
|
||||
@ -4315,6 +4346,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
|
||||
* release for buttons 1..3 to a -1, which will be later mapped
|
||||
* into a "0" (some button was released).
|
||||
*/
|
||||
screen->mouse_button &= ~ButtonBit(button);
|
||||
if (button < 3) {
|
||||
switch (screen->extend_coords) {
|
||||
case SET_SGR_EXT_MODE_MOUSE:
|
||||
@ -4325,7 +4357,6 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
|
||||
break;
|
||||
}
|
||||
}
|
||||
screen->mouse_button = button;
|
||||
count = EMIT_BUTTON(button);
|
||||
break;
|
||||
case MotionNotify:
|
||||
@ -4336,7 +4367,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
|
||||
&& (col == screen->mouse_col)) {
|
||||
changed = False;
|
||||
} else {
|
||||
count = EMIT_BUTTON(screen->mouse_button);
|
||||
count = EMIT_BUTTON(FirstBitN(screen->mouse_button));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -4502,6 +4533,7 @@ getDataFromScreen(XtermWidget xw, String method, CELL * start, CELL * finish)
|
||||
lookupSelectUnit(xw, 0, method);
|
||||
screen->selectUnit = screen->selectMap[0];
|
||||
|
||||
memset(start, 0, sizeof(*start));
|
||||
start->row = screen->cur_row;
|
||||
start->col = screen->cur_col;
|
||||
*finish = *start;
|
||||
@ -4617,6 +4649,7 @@ tokenizeFormat(String format)
|
||||
if (!pass) {
|
||||
result = TypeCallocN(char *, argc + 1);
|
||||
if (result == 0) {
|
||||
free(blob);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4805,9 +4838,11 @@ expandFormat(XtermWidget xw,
|
||||
static void
|
||||
executeCommand(char **argv)
|
||||
{
|
||||
if (fork() == 0) {
|
||||
execvp(argv[0], argv);
|
||||
exit(EXIT_FAILURE);
|
||||
if (argv != 0 && argv[0] != 0) {
|
||||
if (fork() == 0) {
|
||||
execvp(argv[0], argv);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4846,13 +4881,14 @@ HandleExecFormatted(Widget w,
|
||||
|
||||
data = getSelectionString(xw, w, event, params, num_params,
|
||||
&start, &finish);
|
||||
argv = tokenizeFormat(params[0]);
|
||||
blob = argv[0];
|
||||
for (argc = 0; argv[argc] != 0; ++argc) {
|
||||
argv[argc] = expandFormat(xw, argv[argc], data, &start, &finish);
|
||||
if ((argv = tokenizeFormat(params[0])) != 0) {
|
||||
blob = argv[0];
|
||||
for (argc = 0; argv[argc] != 0; ++argc) {
|
||||
argv[argc] = expandFormat(xw, argv[argc], data, &start, &finish);
|
||||
}
|
||||
executeCommand(argv);
|
||||
freeArgv(blob, argv);
|
||||
}
|
||||
executeCommand(argv);
|
||||
freeArgv(blob, argv);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4876,14 +4912,18 @@ HandleExecSelectable(Widget w,
|
||||
int argc;
|
||||
|
||||
data = getDataFromScreen(xw, params[1], &start, &finish);
|
||||
argv = tokenizeFormat(params[0]);
|
||||
blob = argv[0];
|
||||
for (argc = 0; argv[argc] != 0; ++argc) {
|
||||
argv[argc] = expandFormat(xw, argv[argc], data, &start, &finish);
|
||||
if (data != 0) {
|
||||
if ((argv = tokenizeFormat(params[0])) != 0) {
|
||||
blob = argv[0];
|
||||
for (argc = 0; argv[argc] != 0; ++argc) {
|
||||
argv[argc] = expandFormat(xw, argv[argc], data,
|
||||
&start, &finish);
|
||||
}
|
||||
executeCommand(argv);
|
||||
freeArgv(blob, argv);
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
executeCommand(argv);
|
||||
freeArgv(blob, argv);
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4903,11 +4943,14 @@ HandleInsertFormatted(Widget w,
|
||||
CELL start, finish;
|
||||
char *data;
|
||||
char *temp = x_strdup(params[0]);
|
||||
char *exps;
|
||||
|
||||
data = getSelectionString(xw, w, event, params, num_params,
|
||||
&start, &finish);
|
||||
temp = expandFormat(xw, temp, data, &start, &finish);
|
||||
unparseputs(xw, temp);
|
||||
if ((exps = expandFormat(xw, temp, data, &start, &finish)) != 0) {
|
||||
unparseputs(xw, exps);
|
||||
free(exps);
|
||||
}
|
||||
free(data);
|
||||
free(temp);
|
||||
}
|
||||
@ -4929,11 +4972,17 @@ HandleInsertSelectable(Widget w,
|
||||
CELL start, finish;
|
||||
char *data;
|
||||
char *temp = x_strdup(params[0]);
|
||||
char *exps;
|
||||
|
||||
data = getDataFromScreen(xw, params[1], &start, &finish);
|
||||
temp = expandFormat(xw, temp, data, &start, &finish);
|
||||
unparseputs(xw, temp);
|
||||
free(data);
|
||||
if (data != 0) {
|
||||
exps = expandFormat(xw, temp, data, &start, &finish);
|
||||
if (exps != 0) {
|
||||
unparseputs(xw, exps);
|
||||
free(exps);
|
||||
}
|
||||
free(data);
|
||||
}
|
||||
free(temp);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: charproc.c,v 1.1270 2012/11/25 19:25:10 Balazs.Kezes Exp $ */
|
||||
/* $XTermId: charproc.c,v 1.1283 2013/02/05 01:47:58 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -1768,7 +1768,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
|
||||
*/
|
||||
#if OPT_VT52_MODE
|
||||
if (sp->vt52_cup) {
|
||||
if (nparam < NPARAM) {
|
||||
if (nparam < NPARAM - 1) {
|
||||
SetParam(nparam++, (int) (c & 0x7f) - 32);
|
||||
parms.is_sub[nparam] = 0;
|
||||
}
|
||||
@ -3932,11 +3932,16 @@ v_write(int f, const Char * data, unsigned len)
|
||||
int riten;
|
||||
|
||||
TRACE2(("v_write(%d:%s)\n", len, visibleChars(data, len)));
|
||||
if (v_bufstr == NULL && len > 0) {
|
||||
v_buffer = (Char *) XtMalloc((Cardinal) len);
|
||||
v_bufstr = v_buffer;
|
||||
v_bufptr = v_buffer;
|
||||
v_bufend = v_buffer + len;
|
||||
if (v_bufstr == NULL) {
|
||||
if (len > 0) {
|
||||
v_buffer = (Char *) XtMalloc((Cardinal) len);
|
||||
v_bufstr = v_buffer;
|
||||
v_bufptr = v_buffer;
|
||||
v_bufend = v_buffer + len;
|
||||
}
|
||||
if (v_bufstr == NULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (debug) {
|
||||
@ -4347,7 +4352,7 @@ in_put(XtermWidget xw)
|
||||
#endif
|
||||
}
|
||||
if (need_cleanup)
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
#if OPT_DOUBLE_BUFFER
|
||||
if (screen->needSwap) {
|
||||
XdbeSwapInfo swap;
|
||||
@ -5937,6 +5942,7 @@ window_ops(XtermWidget xw)
|
||||
unsigned root_height;
|
||||
#endif
|
||||
int code = zero_if_default(0);
|
||||
char *label;
|
||||
|
||||
TRACE(("window_ops %d\n", code));
|
||||
switch (code) {
|
||||
@ -6106,14 +6112,16 @@ window_ops(XtermWidget xw)
|
||||
case ewGetIconTitle: /* Report the icon's label */
|
||||
if (AllowWindowOps(xw, ewGetIconTitle)) {
|
||||
TRACE(("...get icon's label\n"));
|
||||
report_win_label(xw, 'L', get_icon_label(xw));
|
||||
report_win_label(xw, 'L', label = get_icon_label(xw));
|
||||
free(label);
|
||||
}
|
||||
break;
|
||||
|
||||
case ewGetWinTitle: /* Report the window's title */
|
||||
if (AllowWindowOps(xw, ewGetWinTitle)) {
|
||||
TRACE(("...get window's label\n"));
|
||||
report_win_label(xw, 'l', get_window_label(xw));
|
||||
report_win_label(xw, 'l', label = get_window_label(xw));
|
||||
free(label);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -6309,7 +6317,7 @@ unparseputc(XtermWidget xw, int c)
|
||||
IChar *buf = screen->unparse_bfr;
|
||||
unsigned len;
|
||||
|
||||
if ((screen->unparse_len + 2) >= sizeof(screen->unparse_bfr))
|
||||
if ((screen->unparse_len + 2) >= sizeof(screen->unparse_bfr) / sizeof(IChar))
|
||||
unparse_end(xw);
|
||||
|
||||
len = screen->unparse_len;
|
||||
@ -7021,7 +7029,7 @@ set_flags_from_list(char *target,
|
||||
Cardinal n;
|
||||
int value = -1;
|
||||
|
||||
while (*source != '\0') {
|
||||
while (!IsEmpty(source)) {
|
||||
char *next = ParseList(&source);
|
||||
Boolean found = False;
|
||||
|
||||
@ -7253,7 +7261,7 @@ VTInitialize(Widget wrequest,
|
||||
TRACE((" Actual foreground 0x%06lx\n", wnew->old_foreground));
|
||||
TRACE((" Actual background 0x%06lx\n", wnew->old_background));
|
||||
|
||||
TScreenOf(wnew)->mouse_button = -1;
|
||||
TScreenOf(wnew)->mouse_button = 0;
|
||||
TScreenOf(wnew)->mouse_row = -1;
|
||||
TScreenOf(wnew)->mouse_col = -1;
|
||||
|
||||
@ -7963,8 +7971,8 @@ releaseWindowGCs(XtermWidget xw, VTwin * win)
|
||||
|
||||
#define TRACE_FREE_LEAK(name) \
|
||||
if (name) { \
|
||||
free((void *) name); \
|
||||
TRACE(("freed " #name ": %p\n", (const void *) name)); \
|
||||
free((void *) name); \
|
||||
name = 0; \
|
||||
}
|
||||
|
||||
@ -9228,7 +9236,7 @@ ShowCursor(void)
|
||||
* If the cursor happens to be on blanks, and the foreground color is set
|
||||
* but not the background, do not treat it as a colored cell.
|
||||
*/
|
||||
if ((flags & TERM_COLOR_FLAGS(xw)) == BG_COLOR
|
||||
if ((flags & TERM_COLOR_FLAGS(xw)) == FG_COLOR
|
||||
&& base == ' ') {
|
||||
flags &= ~TERM_COLOR_FLAGS(xw);
|
||||
}
|
||||
@ -9246,6 +9254,24 @@ ShowCursor(void)
|
||||
fg_pix = getXtermForeground(xw, flags, extract_fg(xw, fg_bg, flags));
|
||||
bg_pix = getXtermBackground(xw, flags, extract_bg(xw, fg_bg, flags));
|
||||
|
||||
/*
|
||||
* If we happen to have the same foreground/background colors, choose
|
||||
* a workable foreground color from which we can obtain a visible cursor.
|
||||
*/
|
||||
if (fg_pix == bg_pix) {
|
||||
long bg_diff = (long) (bg_pix - T_COLOR(TScreenOf(xw), TEXT_BG));
|
||||
long fg_diff = (long) (bg_pix - T_COLOR(TScreenOf(xw), TEXT_FG));
|
||||
if (bg_diff < 0)
|
||||
bg_diff = -bg_diff;
|
||||
if (fg_diff < 0)
|
||||
fg_diff = -fg_diff;
|
||||
if (bg_diff < fg_diff) {
|
||||
fg_pix = T_COLOR(TScreenOf(xw), TEXT_FG);
|
||||
} else {
|
||||
fg_pix = T_COLOR(TScreenOf(xw), TEXT_BG);
|
||||
}
|
||||
}
|
||||
|
||||
if (OutsideSelection(screen, screen->cur_row, screen->cur_col))
|
||||
in_selection = False;
|
||||
else
|
||||
@ -10095,7 +10121,9 @@ DoSetSelectedFont(Widget w,
|
||||
{
|
||||
XtermWidget xw = getXtermWidget(w);
|
||||
|
||||
if ((xw == 0) || *type != XA_STRING || *format != 8) {
|
||||
if (xw == 0) {
|
||||
xtermWarning("unexpected widget in DoSetSelectedFont\n");
|
||||
} else if (*type != XA_STRING || *format != 8) {
|
||||
Bell(xw, XkbBI_MinorError, 0);
|
||||
} else {
|
||||
Boolean failed = False;
|
||||
@ -10127,6 +10155,7 @@ DoSetSelectedFont(Widget w,
|
||||
XLFD allows up to 255 characters and no control characters;
|
||||
we are a little more liberal here. */
|
||||
if (len < 1000
|
||||
&& used != 0
|
||||
&& !strchr(used, '\n')
|
||||
&& (test = x_strdup(used)) != 0) {
|
||||
TScreenOf(xw)->MenuFontName(fontMenu_fontsel) = test;
|
||||
@ -10159,7 +10188,7 @@ FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe)
|
||||
{
|
||||
TScreen *screen = TScreenOf(xw);
|
||||
static AtomPtr *atoms;
|
||||
unsigned int atomCount = 0;
|
||||
static unsigned int atomCount = 0;
|
||||
AtomPtr *pAtom;
|
||||
unsigned a;
|
||||
Atom target;
|
||||
@ -10171,12 +10200,16 @@ FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe)
|
||||
TRACE(("FindFontSelection(%s)\n", atom_name));
|
||||
|
||||
for (pAtom = atoms, a = atomCount; a; a--, pAtom++) {
|
||||
if (strcmp(atom_name, XmuNameOfAtom(*pAtom)) == 0)
|
||||
if (strcmp(atom_name, XmuNameOfAtom(*pAtom)) == 0) {
|
||||
TRACE(("...found atom %d:%s\n", a + 1, atom_name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!a) {
|
||||
atoms = TypeXtReallocN(AtomPtr, atoms, atomCount + 1);
|
||||
*(pAtom = &atoms[atomCount]) = XmuMakeAtom(atom_name);
|
||||
++atomCount;
|
||||
TRACE(("...added atom %d:%s\n", atomCount, atom_name));
|
||||
}
|
||||
|
||||
target = XmuInternAtom(XtDisplay(xw), *pAtom);
|
||||
|
@ -1,9 +1,9 @@
|
||||
dnl $XTermId: configure.in,v 1.306 2012/10/10 23:32:47 tom Exp $
|
||||
dnl $XTermId: configure.in,v 1.312 2013/02/03 19:30:48 tom Exp $
|
||||
dnl
|
||||
dnl -----------------------------------------------------------------------------
|
||||
dnl this file is part of xterm
|
||||
dnl
|
||||
dnl Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
dnl Copyright 1997-2012,2013 by Thomas E. Dickey
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
@ -53,8 +53,8 @@ esac
|
||||
|
||||
CF_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_AWK
|
||||
CF_PROG_GROFF
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_ARG_PROGRAM
|
||||
@ -112,7 +112,9 @@ CF_WITH_APP_DEFAULTS
|
||||
CF_WITH_ICON_NAME(xterm-color)
|
||||
CF_WITH_ICON_THEME([icons/$ICON_NAME icons/${ICON_NAME}_48x48],,,icons/${ICON_NAME}_48x48)
|
||||
CF_DISABLE_DESKTOP(xterm)
|
||||
CF_WITH_DESKTOP_CATEGORY(xterm,[*rxvt*|konsole|*-terminal],[System|TerminalEmulator|Utility|*])
|
||||
CF_WITH_DESKTOP_CATEGORY(xterm,
|
||||
[*rxvt*|konsole|*-terminal],
|
||||
[System|TerminalEmulator|Utility|*])
|
||||
|
||||
AC_MSG_CHECKING(for install-permissions reference)
|
||||
AC_ARG_WITH(reference,
|
||||
@ -926,16 +928,7 @@ if test "$enable_trace" = yes ; then
|
||||
EXTRAOBJS="$EXTRAOBJS trace.o"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if you want to test memory leaks)
|
||||
CF_ARG_DISABLE(leaks,
|
||||
[ --disable-leaks test: set to test memory leaks],
|
||||
[disable_leaks=yes],
|
||||
[disable_leaks=no])
|
||||
AC_MSG_RESULT($disable_leaks)
|
||||
if test "$disable_leaks" = yes ; then
|
||||
AC_DEFINE(NO_LEAKS,1,[Define to 1 to test memory leaks])
|
||||
fi
|
||||
|
||||
CF_DISABLE_LEAKS
|
||||
CF_DISABLE_ECHO
|
||||
|
||||
AC_MSG_CHECKING(if you want magic cookie emulation)
|
||||
|
@ -1,9 +1,9 @@
|
||||
.\"#! troff -ms $1 -*- Nroff -*-
|
||||
.\" "Xterm Control Sequences" document
|
||||
.\" $XTermId: ctlseqs.ms,v 1.276 2012/11/25 16:23:14 tom Exp $
|
||||
.\" $XTermId: ctlseqs.ms,v 1.285 2013/02/07 01:59:09 tom Exp $
|
||||
.\"
|
||||
.\"
|
||||
.\" Copyright 1996-2011,2012 by Thomas E. Dickey
|
||||
.\" Copyright 1996-2012,2013 by Thomas E. Dickey
|
||||
.\"
|
||||
.\" All Rights Reserved
|
||||
.\"
|
||||
@ -69,8 +69,8 @@
|
||||
.\"
|
||||
.ds XT XTerm
|
||||
.ds xt xterm
|
||||
.ds LF Patch #287
|
||||
.ds RF 2012/11/25
|
||||
.ds LF Patch #289
|
||||
.ds RF 2013/02/06
|
||||
.\"
|
||||
.if n .pl 9999v \" no page breaks in nroff
|
||||
.ND
|
||||
@ -111,6 +111,8 @@
|
||||
.de Ss
|
||||
.LP
|
||||
.B
|
||||
\\$*
|
||||
.br
|
||||
..
|
||||
.ds CH \" as nothing
|
||||
.ds LH \*(XT Control Sequences
|
||||
@ -409,8 +411,7 @@ discussion of character sets.
|
||||
.
|
||||
.St
|
||||
.\"
|
||||
.Ss
|
||||
Single-character functions
|
||||
.Ss Single-character functions
|
||||
.\"
|
||||
.IP \\*(Be
|
||||
Bell (Ctrl-G).
|
||||
@ -453,8 +454,7 @@ Vertical Tab (Ctrl-K). This is treated the same as LF.
|
||||
.\"
|
||||
.\"
|
||||
.St
|
||||
.Ss
|
||||
Controls beginning with \*(Es
|
||||
.Ss Controls beginning with \*(Es
|
||||
.LP
|
||||
This excludes controls where \*(Es is part of a 7-bit equivalent to 8-bit C1 controls, ordered by the final character(s).
|
||||
.\"
|
||||
@ -598,16 +598,14 @@ Invoke the G1 Character Set as GR (LS1R).
|
||||
.Ed
|
||||
.
|
||||
.St
|
||||
.Ss
|
||||
Application Program-Control functions
|
||||
.Ss Application Program-Control functions
|
||||
.IP \\*(AP\\*(Pt\\*s\\*(ST
|
||||
None. \fIxterm\fP implements no \*(AP functions; \*(Pt is ignored.
|
||||
\*(Pt need not be printable characters.
|
||||
.Ed
|
||||
.
|
||||
.St
|
||||
.Ss
|
||||
Device-Control functions
|
||||
.Ss Device-Control functions
|
||||
.IP \\*(Dc\\*(Ps\\*;\\*(Ps\\*|\\*(Pt\\*s\\*(ST
|
||||
User-Defined Keys (DECUDK).
|
||||
The first parameter:
|
||||
@ -670,8 +668,7 @@ The strings are encoded in hexadecimal (2 digits per character).
|
||||
.Ed
|
||||
.\"
|
||||
.St
|
||||
.Ss
|
||||
Functions using \*(Cs, ordered by the final character(s)
|
||||
.Ss Functions using \*(Cs, ordered by the final character(s)
|
||||
.IP \\*(Cs\\*(Ps\\*s\\*@
|
||||
Insert \*(Ps (Blank) Character(s) (default = 1) (ICH).
|
||||
.
|
||||
@ -1478,17 +1475,16 @@ position in the \*(xt window, encoded as ASCII decimal.
|
||||
.br
|
||||
The ``page'' parameter is not used by \*(xt, and will be omitted.
|
||||
.
|
||||
.IP \\*(Cs\\*(Pm\\*s\\*(Sp\\*}
|
||||
.IP \\*(Cs\\*(Pm\\*s\\*(qu\\*}
|
||||
Insert \*(Ps Column(s) (default = 1) (DECIC), VT420 and up.
|
||||
.
|
||||
.IP \\*(Cs\\*(Pm\\*s\\*(Sp\\*~
|
||||
.IP \\*(Cs\\*(Pm\\*s\\*(qu\\*~
|
||||
Delete \*(Ps Column(s) (default = 1) (DECDC), VT420 and up.
|
||||
.
|
||||
.Ed
|
||||
.
|
||||
.St
|
||||
.Ss
|
||||
Operating System Controls
|
||||
.Ss Operating System Controls
|
||||
.
|
||||
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(ST
|
||||
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
|
||||
@ -1639,8 +1635,7 @@ The \fIdynamic colors\fR can also be reset to their default (resource) values:
|
||||
\*(Ps = \*1\*1\*8 \(-> Reset Tektronix cursor color.
|
||||
.
|
||||
.St
|
||||
.Ss
|
||||
Privacy Message
|
||||
.Ss Privacy Message
|
||||
.IP \\*(PM\\*(Pt\\*s\\*(ST
|
||||
\fIxterm\fP implements no \*(PM functions; \*(Pt is ignored.
|
||||
\*(Pt need not be printable characters.
|
||||
@ -1679,12 +1674,15 @@ shift the key from codes 0-127 to 128-255 by adding 128.
|
||||
The table shows the result for a given character "x" with modifiers
|
||||
according to the default translations with the resources set on or off.
|
||||
This assumes \fBaltIsNotMeta\fP is set:
|
||||
.ne 23
|
||||
.TS
|
||||
.\" page-eject to work around grohtml bugs
|
||||
.if t .bp
|
||||
.TS H
|
||||
center;
|
||||
lf3 lf3 lf3 lf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l | l .
|
||||
key altSendsEscape metaSendsEscape result
|
||||
_
|
||||
x off off x
|
||||
@ -1721,13 +1719,14 @@ or by the "DECSET \*1\*0\*3\*5" control sequence.
|
||||
.lP
|
||||
The cursor keys transmit the following escape sequences depending on the
|
||||
mode specified via the \fBDECCKM\fP escape sequence.
|
||||
.ne 10
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Normal Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l .
|
||||
Cursor Up \*(Cs\*A \*(S3\*A
|
||||
Cursor Down \*(Cs\*(cB \*(S3\*(cB
|
||||
Cursor Right \*(Cs\*C \*(S3\*C
|
||||
@ -1738,13 +1737,14 @@ The home- and end-keys
|
||||
(unlike PageUp and other keys also on the 6-key editing keypad)
|
||||
are considered "cursor keys" by \fIxterm\fP.
|
||||
Their mode is also controlled by the \fBDECCKM\fP escape sequence:
|
||||
.ne 8
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Normal Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l .
|
||||
Home \*(Cs\*H \*(S3\*H
|
||||
End \*(Cs\*F \*(S3\*F
|
||||
_
|
||||
@ -1756,13 +1756,14 @@ Use the NumLock key to override the application mode.
|
||||
.lP
|
||||
Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are supported by
|
||||
the program.
|
||||
.ne 30
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Numeric Application Terminfo Termcap
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l | l | l .
|
||||
Space \*(Sp \*(S3\*(Sp - -
|
||||
Tab \*(Ta \*(S3\*I - -
|
||||
Enter \*(Cr \*(S3\*M kent @8
|
||||
@ -1791,13 +1792,14 @@ _
|
||||
.TE
|
||||
.br
|
||||
They also provide 12 function keys, as well as a few other special-purpose keys:
|
||||
.ne 18
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3
|
||||
lf3w(2c) lf3w(2c) .
|
||||
Key Escape Sequence
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l .
|
||||
F1 \*(S3\*P
|
||||
F2 \*(S3\*Q
|
||||
F3 \*(S3\*R
|
||||
@ -1817,13 +1819,14 @@ Older versions of \fIxterm\fP implement different escape sequences for F1 throug
|
||||
These can be activated by setting the \fBoldXtermFKeys\fP resource.
|
||||
However, since they do not correspond to any hardware terminal, they have been deprecated.
|
||||
(The DEC VT220 reserves F1 through F5 for local functions such as \fBSetup\fP).
|
||||
.ne 10
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3
|
||||
lf3w(2c) lf3w(2c) .
|
||||
Key Escape Sequence
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l .
|
||||
F1 \*(Cs\*1\*1\*(c~
|
||||
F2 \*(Cs\*1\*2\*(c~
|
||||
F3 \*(Cs\*1\*3\*(c~
|
||||
@ -1835,13 +1838,14 @@ when the \fBsunKeyboard\fP resource is false,
|
||||
\fIxterm\fP recognizes function key modifiers
|
||||
which are parameters appended before the final character
|
||||
of the control sequence.
|
||||
.ne 13
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 lf3
|
||||
cf3w(2c) lf3w(2c) .
|
||||
Code Modifiers
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l .
|
||||
2 Shift
|
||||
3 Alt
|
||||
4 Shift + Alt
|
||||
@ -1864,13 +1868,14 @@ to act like a VT220 keyboard.
|
||||
.lP
|
||||
The VT102/VT220 application keypad transmits unique escape sequences in
|
||||
application mode, which are distinct from the cursor and scrolling keypad:
|
||||
.ne 32
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Numeric Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l .
|
||||
Space \*(Sp \*(S3\*(Sp
|
||||
Tab \*(Ta \*(S3\*I
|
||||
Enter \*(Cr \*(S3\*M
|
||||
@ -1900,13 +1905,14 @@ _
|
||||
The VT220 provides a 6-key editing keypad,
|
||||
which is analogous to that on the PC keyboard.
|
||||
It is not affected by \fBDECCKM\fP or \fBDECKPNM\fP/\fBDECKPAM\fP:
|
||||
.ne 12
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Normal Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l .
|
||||
\f1Insert\fP \*(Cs\*2\*(c~ \*(Cs\*2\*(c~
|
||||
\f1Delete\fP \*(Cs\*3\*(c~ \*(Cs\*3\*(c~
|
||||
\f1Home\fP \*(Cs\*1\*(c~ \*(Cs\*1\*(c~
|
||||
@ -1918,13 +1924,14 @@ _
|
||||
.LP
|
||||
The VT220 provides 8 additional function keys.
|
||||
With a Sun/PC keyboard, access these keys by Control/F1 for F13, etc.
|
||||
.ne 16
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3
|
||||
lf3w(2c) lf3w(2c) .
|
||||
Key Escape Sequence
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l .
|
||||
F13 \*(Cs\*2\*5\*(c~
|
||||
F14 \*(Cs\*2\*6\*(c~
|
||||
F15 \*(Cs\*2\*8\*(c~
|
||||
@ -1940,13 +1947,14 @@ _
|
||||
A VT52 does not have function keys, but it does have a numeric keypad and cursor keys.
|
||||
They differ from the other emulations by the prefix.
|
||||
Also, the cursor keys do not change:
|
||||
.ne 13
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3
|
||||
lf3w(2c) lf3w(2c) .
|
||||
Key Normal/Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l .
|
||||
Cursor Up \*(Es\*A
|
||||
Cursor Down \*(Es\*(cB
|
||||
Cursor Right \*(Es\*C
|
||||
@ -1954,13 +1962,14 @@ Cursor Left \*(Es\*D
|
||||
_
|
||||
.TE
|
||||
The keypad is similar:
|
||||
.ne 33
|
||||
.TS
|
||||
.TS H
|
||||
center;
|
||||
cf3 cf3 cf3
|
||||
lf3w(2c) lf3w(2c) lf3w(2c) .
|
||||
Key Numeric Application
|
||||
_
|
||||
.TH
|
||||
.T&
|
||||
l | l | l .
|
||||
Space \*(Sp \*(Es\*?\*(Sp
|
||||
Tab \*(Ta \*(Es\*?\*I
|
||||
Enter \*(Cr \*(Es\*?\*M
|
||||
@ -2140,6 +2149,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
|
||||
.lP
|
||||
X10 compatibility mode sends an escape sequence only on button press,
|
||||
encoding the location and the mouse button pressed.
|
||||
@ -2151,6 +2161,7 @@ On button press, \fIxterm\fP sends
|
||||
.bP
|
||||
\*(Cx and \*(Cy are the x and y coordinates of the mouse when the
|
||||
button was pressed.
|
||||
.Ss Normal tracking mode
|
||||
.lP
|
||||
Normal tracking mode sends an escape sequence on both button press and
|
||||
release.
|
||||
@ -2172,6 +2183,7 @@ and is not necessarily the "Meta" key (see \fIxmodmap\fP).
|
||||
.bP
|
||||
\*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
|
||||
in X10 mode.
|
||||
.Ss Wheel mice
|
||||
.lP
|
||||
Wheel mice may return buttons 4 and 5.
|
||||
Those buttons are represented by the same event codes
|
||||
@ -2188,6 +2200,7 @@ then cursor up/down controls are sent when the terminal is displaying
|
||||
the alternate screen.
|
||||
The initial state of Alternate Scroll mode is set
|
||||
using the \fBalternateScroll\fP resource.
|
||||
.Ss Highlight tracking
|
||||
.lP
|
||||
Mouse highlight tracking notifies a program of a button press, receives a
|
||||
range of lines from the program, highlights the region covered by
|
||||
@ -2235,6 +2248,7 @@ ending character positions of the region.
|
||||
give the location of the mouse at button up, which may not be over a
|
||||
character.
|
||||
.RE
|
||||
.Ss Button-event tracking
|
||||
.lP
|
||||
Button-event tracking is essentially the same as normal tracking, but
|
||||
\fIxterm\fP also reports button-motion events.
|
||||
@ -2255,16 +2269,19 @@ down is reported as \*(Cs\*M\*@\*(Cx\*(Cy.
|
||||
Similarly, motion with button 3
|
||||
down is reported as \*(Cs\*M\*(cB\*(Cx\*(Cy.
|
||||
(\ \*(cB = 32 + 2 (button 3) + 32 (motion indicator)\ ).
|
||||
.Ss Any-event tracking
|
||||
.lP
|
||||
Any-event mode is the same as button-event mode, except that all motion
|
||||
events are reported, even if no mouse button is down.
|
||||
It is enabled by specifying 1003 to DECSET.
|
||||
.Ss FocusIn/FocusOut
|
||||
.lP
|
||||
FocusIn/FocusOut can be combined with any of the mouse events since
|
||||
it uses a different protocol.
|
||||
When set, it causes \fIxterm\fP to send
|
||||
\*(Cs\*I when the terminal gains focus, and
|
||||
\*(Cs\*O when it loses focus.
|
||||
.Ss Extended coordinates
|
||||
.lP
|
||||
The original X10 mouse protocol limits the \*(Cx and \*(Cy ordinates
|
||||
to 223 (=255\ -\ 32).
|
||||
@ -2295,13 +2312,17 @@ encoded button value,
|
||||
the \*(Cx and \*(Cy ordinates and a final character which
|
||||
is \*M for button press
|
||||
and \*m for button release.
|
||||
.IP
|
||||
.RS
|
||||
.bP
|
||||
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.
|
||||
.bP
|
||||
The modifiers are encoded in the same way.
|
||||
.bP
|
||||
A different final character is used for button release
|
||||
to resolve the X10 ambiguity regarding which button was released.
|
||||
.RE
|
||||
.IP
|
||||
The highlight tracking responses are also modified to an SGR-like format,
|
||||
using the same SGR-style scheme and button-encodings.
|
||||
|
@ -21,7 +21,7 @@
|
||||
Thomas Dickey
|
||||
XFree86 Project (1996-2006)
|
||||
invisible-island.net (2006-2012)
|
||||
updated for XTerm Patch #287 (2012/11/25)
|
||||
updated for XTerm Patch #289 (2013/02/06)
|
||||
|
||||
|
||||
|
||||
@ -921,9 +921,9 @@ CSI Ps ' |
|
||||
mal.
|
||||
The ``page'' parameter is not used by xterm, and will be omit-
|
||||
ted.
|
||||
CSI Pm SP }
|
||||
CSI Pm ' }
|
||||
Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.
|
||||
CSI Pm SP ~
|
||||
CSI Pm ' ~
|
||||
Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.
|
||||
|
||||
Operating System Controls
|
||||
@ -1089,24 +1089,24 @@ This assumes altIsNotMeta is set:
|
||||
|
||||
-----------------------------------------------------------
|
||||
key altSendsEscape metaSendsEscape result
|
||||
-----------------------------------------------------------
|
||||
x off off x
|
||||
Meta-x off off shift
|
||||
Alt-x off off shift
|
||||
Alt+Meta-x off off shift
|
||||
x ON off x
|
||||
Meta-x ON off shift
|
||||
Alt-x ON off ESC x
|
||||
Alt+Meta-x ON off ESC shift
|
||||
x off ON x
|
||||
Meta-x off ON ESC x
|
||||
Alt-x off ON shift
|
||||
Alt+Meta-x off ON ESC shift
|
||||
x ON ON x
|
||||
Meta-x ON ON ESC x
|
||||
Alt-x ON ON ESC x
|
||||
Alt+Meta-x ON ON ESC x
|
||||
-----------------------------------------------------------
|
||||
-----------+----------------+-----------------+------------
|
||||
x | off | off | x
|
||||
Meta-x | off | off | shift
|
||||
Alt-x | off | off | shift
|
||||
Alt+Meta-x | off | off | shift
|
||||
x | ON | off | x
|
||||
Meta-x | ON | off | shift
|
||||
Alt-x | ON | off | ESC x
|
||||
Alt+Meta-x | ON | off | ESC shift
|
||||
x | off | ON | x
|
||||
Meta-x | off | ON | ESC x
|
||||
Alt-x | off | ON | shift
|
||||
Alt+Meta-x | off | ON | ESC shift
|
||||
x | ON | ON | x
|
||||
Meta-x | ON | ON | ESC x
|
||||
Alt-x | ON | ON | ESC x
|
||||
Alt+Meta-x | ON | ON | ESC x
|
||||
-----------+----------------+-----------------+------------
|
||||
|
||||
|
||||
PC-Style Function Keys
|
||||
@ -1124,23 +1124,23 @@ recognized as modifiers when enabled by the numLock resource, or by the
|
||||
The cursor keys transmit the following escape sequences depending on the
|
||||
mode specified via the DECCKM escape sequence.
|
||||
|
||||
Key Normal Application
|
||||
--------------------------------------
|
||||
Cursor Up CSI A SS3 A
|
||||
Cursor Down CSI B SS3 B
|
||||
Cursor Right CSI C SS3 C
|
||||
Cursor Left CSI D SS3 D
|
||||
--------------------------------------
|
||||
Key Normal Application
|
||||
-------------+----------+-------------
|
||||
Cursor Up | CSI A | SS3 A
|
||||
Cursor Down | CSI B | SS3 B
|
||||
Cursor Right | CSI C | SS3 C
|
||||
Cursor Left | CSI D | SS3 D
|
||||
-------------+----------+-------------
|
||||
|
||||
The home- and end-keys (unlike PageUp and other keys also on the 6-key
|
||||
editing keypad) are considered "cursor keys" by xterm. Their mode is
|
||||
also controlled by the DECCKM escape sequence:
|
||||
|
||||
Key Normal Application
|
||||
----------------------------------
|
||||
Home CSI H SS3 H
|
||||
End CSI F SS3 F
|
||||
----------------------------------
|
||||
Key Normal Application
|
||||
---------+----------+-------------
|
||||
Home | CSI H | SS3 H
|
||||
End | CSI F | SS3 F
|
||||
---------+----------+-------------
|
||||
|
||||
|
||||
The application keypad transmits the following escape sequences depend-
|
||||
@ -1150,52 +1150,52 @@ Use the NumLock key to override the application mode.
|
||||
Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are
|
||||
supported by the program.
|
||||
|
||||
Key Numeric Application Terminfo Termcap
|
||||
--------------------------------------------------------------
|
||||
Space SP SS3 SP - -
|
||||
Tab TAB SS3 I - -
|
||||
Enter CR SS3 M kent @8
|
||||
PF1 SS3 P SS3 P kf1 k1
|
||||
PF2 SS3 Q SS3 Q kf2 k2
|
||||
PF3 SS3 R SS3 R kf3 k3
|
||||
PF4 SS3 S SS3 S kf4 k4
|
||||
* (multiply) * SS3 j - -
|
||||
+ (add) + SS3 k - -
|
||||
, (comma) , SS3 l - -
|
||||
- (minus) - SS3 m - -
|
||||
. (Delete) . CSI 3 ~ - -
|
||||
/ (divide) / SS3 o - -
|
||||
0 (Insert) 0 CSI 2 ~ - -
|
||||
1 (End) 1 SS3 F kc1 K4
|
||||
2 (DownArrow) 2 CSI B - -
|
||||
3 (PageDown) 3 CSI 6 ~ kc3 K5
|
||||
4 (LeftArrow) 4 CSI D - -
|
||||
5 (Begin) 5 CSI E kb2 K2
|
||||
6 (RightArrow) 6 CSI C - -
|
||||
7 (Home) 7 SS3 H ka1 K1
|
||||
8 (UpArrow) 8 CSI A - -
|
||||
9 (PageUp) 9 CSI 5 ~ ka3 K3
|
||||
= (equal) = SS3 X - -
|
||||
--------------------------------------------------------------
|
||||
Key Numeric Application Terminfo Termcap
|
||||
---------------+----------+-------------+----------+----------
|
||||
Space | SP | SS3 SP | - | -
|
||||
Tab | TAB | SS3 I | - | -
|
||||
Enter | CR | SS3 M | kent | @8
|
||||
PF1 | SS3 P | SS3 P | kf1 | k1
|
||||
PF2 | SS3 Q | SS3 Q | kf2 | k2
|
||||
PF3 | SS3 R | SS3 R | kf3 | k3
|
||||
PF4 | SS3 S | SS3 S | kf4 | k4
|
||||
* (multiply) | * | SS3 j | - | -
|
||||
+ (add) | + | SS3 k | - | -
|
||||
, (comma) | , | SS3 l | - | -
|
||||
- (minus) | - | SS3 m | - | -
|
||||
. (Delete) | . | CSI 3 ~ | - | -
|
||||
/ (divide) | / | SS3 o | - | -
|
||||
0 (Insert) | 0 | CSI 2 ~ | - | -
|
||||
1 (End) | 1 | SS3 F | kc1 | K4
|
||||
2 (DownArrow) | 2 | CSI B | - | -
|
||||
3 (PageDown) | 3 | CSI 6 ~ | kc3 | K5
|
||||
4 (LeftArrow) | 4 | CSI D | - | -
|
||||
5 (Begin) | 5 | CSI E | kb2 | K2
|
||||
6 (RightArrow) | 6 | CSI C | - | -
|
||||
7 (Home) | 7 | SS3 H | ka1 | K1
|
||||
8 (UpArrow) | 8 | CSI A | - | -
|
||||
9 (PageUp) | 9 | CSI 5 ~ | ka3 | K3
|
||||
= (equal) | = | SS3 X | - | -
|
||||
---------------+----------+-------------+----------+----------
|
||||
|
||||
They also provide 12 function keys, as well as a few other special-pur-
|
||||
pose keys:
|
||||
|
||||
Key Escape Sequence
|
||||
---------------------------
|
||||
F1 SS3 P
|
||||
F2 SS3 Q
|
||||
F3 SS3 R
|
||||
F4 SS3 S
|
||||
F5 CSI 1 5 ~
|
||||
F6 CSI 1 7 ~
|
||||
F7 CSI 1 8 ~
|
||||
F8 CSI 1 9 ~
|
||||
F9 CSI 2 0 ~
|
||||
F10 CSI 2 1 ~
|
||||
F11 CSI 2 3 ~
|
||||
F12 CSI 2 4 ~
|
||||
---------------------------
|
||||
Key Escape Sequence
|
||||
---------+-----------------
|
||||
F1 | SS3 P
|
||||
F2 | SS3 Q
|
||||
F3 | SS3 R
|
||||
F4 | SS3 S
|
||||
F5 | CSI 1 5 ~
|
||||
F6 | CSI 1 7 ~
|
||||
F7 | CSI 1 8 ~
|
||||
F8 | CSI 1 9 ~
|
||||
F9 | CSI 2 0 ~
|
||||
F10 | CSI 2 1 ~
|
||||
F11 | CSI 2 3 ~
|
||||
F12 | CSI 2 4 ~
|
||||
---------+-----------------
|
||||
|
||||
|
||||
Older versions of xterm implement different escape sequences for F1
|
||||
@ -1204,28 +1204,28 @@ resource. However, since they do not correspond to any hardware termi-
|
||||
nal, they have been deprecated. (The DEC VT220 reserves F1 through F5
|
||||
for local functions such as Setup).
|
||||
|
||||
Key Escape Sequence
|
||||
---------------------------
|
||||
F1 CSI 1 1 ~
|
||||
F2 CSI 1 2 ~
|
||||
F3 CSI 1 3 ~
|
||||
F4 CSI 1 4 ~
|
||||
---------------------------
|
||||
Key Escape Sequence
|
||||
---------+-----------------
|
||||
F1 | CSI 1 1 ~
|
||||
F2 | CSI 1 2 ~
|
||||
F3 | CSI 1 3 ~
|
||||
F4 | CSI 1 4 ~
|
||||
---------+-----------------
|
||||
|
||||
In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is
|
||||
false, xterm recognizes function key modifiers which are parameters
|
||||
appended before the final character of the control sequence.
|
||||
|
||||
Code Modifiers
|
||||
---------------------------------
|
||||
2 Shift
|
||||
3 Alt
|
||||
4 Shift + Alt
|
||||
5 Control
|
||||
6 Shift + Control
|
||||
7 Alt + Control
|
||||
8 Shift + Alt + Control
|
||||
---------------------------------
|
||||
---------+-----------------------
|
||||
2 | Shift
|
||||
3 | Alt
|
||||
4 | Shift + Alt
|
||||
5 | Control
|
||||
6 | Shift + Control
|
||||
7 | Alt + Control
|
||||
8 | Shift + Alt + Control
|
||||
---------+-----------------------
|
||||
|
||||
For example, shift-F5 would be sent as CSI 1 5 ; 2 ~
|
||||
|
||||
@ -1241,61 +1241,61 @@ The VT102/VT220 application keypad transmits unique escape sequences in
|
||||
application mode, which are distinct from the cursor and scrolling key-
|
||||
pad:
|
||||
|
||||
Key Numeric Application
|
||||
--------------------------------------
|
||||
Space SP SS3 SP
|
||||
Tab TAB SS3 I
|
||||
Enter CR SS3 M
|
||||
PF1 SS3 P SS3 P
|
||||
PF2 SS3 Q SS3 Q
|
||||
PF3 SS3 R SS3 R
|
||||
PF4 SS3 S SS3 S
|
||||
* (multiply) * SS3 j
|
||||
+ (add) + SS3 k
|
||||
, (comma) , SS3 l
|
||||
- (minus) - SS3 m
|
||||
. (period) . SS3 n
|
||||
/ (divide) / SS3 o
|
||||
0 0 SS3 p
|
||||
1 1 SS3 q
|
||||
2 2 SS3 r
|
||||
3 3 SS3 s
|
||||
4 4 SS3 t
|
||||
5 5 SS3 u
|
||||
6 6 SS3 v
|
||||
7 7 SS3 w
|
||||
8 8 SS3 x
|
||||
9 9 SS3 y
|
||||
= (equal) = SS3 X
|
||||
--------------------------------------
|
||||
Key Numeric Application
|
||||
-------------+----------+-------------
|
||||
Space | SP | SS3 SP
|
||||
Tab | TAB | SS3 I
|
||||
Enter | CR | SS3 M
|
||||
PF1 | SS3 P | SS3 P
|
||||
PF2 | SS3 Q | SS3 Q
|
||||
PF3 | SS3 R | SS3 R
|
||||
PF4 | SS3 S | SS3 S
|
||||
* (multiply) | * | SS3 j
|
||||
+ (add) | + | SS3 k
|
||||
, (comma) | , | SS3 l
|
||||
- (minus) | - | SS3 m
|
||||
. (period) | . | SS3 n
|
||||
/ (divide) | / | SS3 o
|
||||
0 | 0 | SS3 p
|
||||
1 | 1 | SS3 q
|
||||
2 | 2 | SS3 r
|
||||
3 | 3 | SS3 s
|
||||
4 | 4 | SS3 t
|
||||
5 | 5 | SS3 u
|
||||
6 | 6 | SS3 v
|
||||
7 | 7 | SS3 w
|
||||
8 | 8 | SS3 x
|
||||
9 | 9 | SS3 y
|
||||
= (equal) | = | SS3 X
|
||||
-------------+----------+-------------
|
||||
|
||||
The VT220 provides a 6-key editing keypad, which is analogous to that on
|
||||
the PC keyboard. It is not affected by DECCKM or DECKPNM/DECKPAM:
|
||||
|
||||
Key Normal Application
|
||||
----------------------------------
|
||||
Insert CSI 2 ~ CSI 2 ~
|
||||
Delete CSI 3 ~ CSI 3 ~
|
||||
Home CSI 1 ~ CSI 1 ~
|
||||
End CSI 4 ~ CSI 4 ~
|
||||
PageUp CSI 5 ~ CSI 5 ~
|
||||
PageDown CSI 6 ~ CSI 6 ~
|
||||
----------------------------------
|
||||
Key Normal Application
|
||||
---------+----------+-------------
|
||||
Insert | CSI 2 ~ | CSI 2 ~
|
||||
Delete | CSI 3 ~ | CSI 3 ~
|
||||
Home | CSI 1 ~ | CSI 1 ~
|
||||
End | CSI 4 ~ | CSI 4 ~
|
||||
PageUp | CSI 5 ~ | CSI 5 ~
|
||||
PageDown | CSI 6 ~ | CSI 6 ~
|
||||
---------+----------+-------------
|
||||
|
||||
The VT220 provides 8 additional function keys. With a Sun/PC keyboard,
|
||||
access these keys by Control/F1 for F13, etc.
|
||||
|
||||
Key Escape Sequence
|
||||
---------------------------
|
||||
F13 CSI 2 5 ~
|
||||
F14 CSI 2 6 ~
|
||||
F15 CSI 2 8 ~
|
||||
F16 CSI 2 9 ~
|
||||
F17 CSI 3 1 ~
|
||||
F18 CSI 3 2 ~
|
||||
F19 CSI 3 3 ~
|
||||
F20 CSI 3 4 ~
|
||||
---------------------------
|
||||
Key Escape Sequence
|
||||
---------+-----------------
|
||||
F13 | CSI 2 5 ~
|
||||
F14 | CSI 2 6 ~
|
||||
F15 | CSI 2 8 ~
|
||||
F16 | CSI 2 9 ~
|
||||
F17 | CSI 3 1 ~
|
||||
F18 | CSI 3 2 ~
|
||||
F19 | CSI 3 3 ~
|
||||
F20 | CSI 3 4 ~
|
||||
---------+-----------------
|
||||
|
||||
|
||||
VT52-Style Function Keys
|
||||
@ -1303,43 +1303,43 @@ A VT52 does not have function keys, but it does have a numeric keypad
|
||||
and cursor keys. They differ from the other emulations by the prefix.
|
||||
Also, the cursor keys do not change:
|
||||
|
||||
Key Normal/Application
|
||||
----------------------------------
|
||||
Cursor Up ESC A
|
||||
Cursor Down ESC B
|
||||
Cursor Right ESC C
|
||||
Cursor Left ESC D
|
||||
----------------------------------
|
||||
Key Normal/Application
|
||||
-------------+--------------------
|
||||
Cursor Up | ESC A
|
||||
Cursor Down | ESC B
|
||||
Cursor Right | ESC C
|
||||
Cursor Left | ESC D
|
||||
-------------+--------------------
|
||||
|
||||
The keypad is similar:
|
||||
|
||||
Key Numeric Application
|
||||
--------------------------------------
|
||||
Space SP ESC ? SP
|
||||
Tab TAB ESC ? I
|
||||
Enter CR ESC ? M
|
||||
PF1 ESC P ESC P
|
||||
PF2 ESC Q ESC Q
|
||||
PF3 ESC R ESC R
|
||||
PF4 ESC S ESC S
|
||||
* (multiply) * ESC ? j
|
||||
+ (add) + ESC ? k
|
||||
, (comma) , ESC ? l
|
||||
- (minus) - ESC ? m
|
||||
. (period) . ESC ? n
|
||||
/ (divide) / ESC ? o
|
||||
0 0 ESC ? p
|
||||
1 1 ESC ? q
|
||||
2 2 ESC ? r
|
||||
3 3 ESC ? s
|
||||
4 4 ESC ? t
|
||||
5 5 ESC ? u
|
||||
6 6 ESC ? v
|
||||
7 7 ESC ? w
|
||||
8 8 ESC ? x
|
||||
9 9 ESC ? y
|
||||
= (equal) = ESC ? X
|
||||
--------------------------------------
|
||||
Key Numeric Application
|
||||
-------------+----------+-------------
|
||||
Space | SP | ESC ? SP
|
||||
Tab | TAB | ESC ? I
|
||||
Enter | CR | ESC ? M
|
||||
PF1 | ESC P | ESC P
|
||||
PF2 | ESC Q | ESC Q
|
||||
PF3 | ESC R | ESC R
|
||||
PF4 | ESC S | ESC S
|
||||
* (multiply) | * | ESC ? j
|
||||
+ (add) | + | ESC ? k
|
||||
, (comma) | , | ESC ? l
|
||||
- (minus) | - | ESC ? m
|
||||
. (period) | . | ESC ? n
|
||||
/ (divide) | / | ESC ? o
|
||||
0 | 0 | ESC ? p
|
||||
1 | 1 | ESC ? q
|
||||
2 | 2 | ESC ? r
|
||||
3 | 3 | ESC ? s
|
||||
4 | 4 | ESC ? t
|
||||
5 | 5 | ESC ? u
|
||||
6 | 6 | ESC ? v
|
||||
7 | 7 | ESC ? w
|
||||
8 | 8 | ESC ? x
|
||||
9 | 9 | ESC ? y
|
||||
= (equal) | = | ESC ? X
|
||||
-------------+----------+-------------
|
||||
|
||||
|
||||
Sun-Style Function Keys
|
||||
@ -1460,6 +1460,7 @@ 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 sends an escape sequence only on button press,
|
||||
encoding the location and the mouse button pressed. It is enabled by
|
||||
@ -1468,6 +1469,7 @@ 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.
|
||||
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
|
||||
@ -1484,6 +1486,7 @@ o The next three bits encode the modifiers which were down when the
|
||||
the mod1 mask, and is not necessarily the "Meta" key (see xmodmap).
|
||||
o Cx and Cy are the x and y coordinates of the mouse event, encoded as
|
||||
in X10 mode.
|
||||
Wheel mice
|
||||
|
||||
Wheel mice may return buttons 4 and 5. Those buttons are represented by
|
||||
the same event codes as buttons 1 and 2 respectively, except that 64 is
|
||||
@ -1494,6 +1497,7 @@ 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.
|
||||
Highlight tracking
|
||||
|
||||
Mouse highlight tracking notifies a program of a button press, receives
|
||||
a range of lines from the program, highlights the region covered by the
|
||||
@ -1525,6 +1529,7 @@ o otherwise:
|
||||
character 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
|
||||
xterm also reports button-motion events. Motion events are reported
|
||||
@ -1539,14 +1544,17 @@ o The other bits of the event code specify button and modifier keys as
|
||||
(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
|
||||
events are reported, even if no mouse button is down. It is enabled by
|
||||
specifying 1003 to DECSET.
|
||||
FocusIn/FocusOut
|
||||
|
||||
FocusIn/FocusOut can be combined with any of the mouse events since it
|
||||
uses a different protocol. When set, it causes xterm to send CSI I
|
||||
when the terminal gains focus, and CSI O when it loses focus.
|
||||
Extended coordinates
|
||||
|
||||
The original X10 mouse protocol limits the Cx and Cy ordinates to 223
|
||||
(=255 - 32). Xterm supports more than one scheme for extending this
|
||||
@ -1573,12 +1581,14 @@ 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.
|
||||
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. The
|
||||
modifiers are encoded in the same way. A different final
|
||||
character is used for button release to resolve the X10 ambi-
|
||||
guity regarding which button was released.
|
||||
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
|
||||
released.
|
||||
The highlight tracking responses are also modified to an SGR-
|
||||
like format, using the same SGR-style scheme and button-encod-
|
||||
ings.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: fontutils.c,v 1.383 2012/09/22 00:15:55 tom Exp $ */
|
||||
/* $XTermId: fontutils.c,v 1.386 2012/12/31 20:51:54 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2011,2012 by Thomas E. Dickey
|
||||
@ -89,8 +89,6 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#define MAX_FONTNAME 200
|
||||
|
||||
/*
|
||||
* A structure to hold the relevant properties from a font
|
||||
* we need to make a well formed font name for it.
|
||||
@ -243,9 +241,6 @@ check_fontname(const char *name)
|
||||
if (IsEmpty(name)) {
|
||||
TRACE(("fontname missing\n"));
|
||||
result = False;
|
||||
} else if (strlen(name) >= MAX_FONTNAME - 1) {
|
||||
TRACE(("fontname too large: %s\n", name));
|
||||
result = False;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -258,7 +253,7 @@ check_fontname(const char *name)
|
||||
* or NULL on error.
|
||||
*/
|
||||
static FontNameProperties *
|
||||
get_font_name_props(Display * dpy, XFontStruct * fs, char *result)
|
||||
get_font_name_props(Display * dpy, XFontStruct * fs, char **result)
|
||||
{
|
||||
static FontNameProperties props;
|
||||
static char *last_name;
|
||||
@ -294,7 +289,9 @@ get_font_name_props(Display * dpy, XFontStruct * fs, char *result)
|
||||
if (result != 0) {
|
||||
if (!check_fontname(name))
|
||||
return 0;
|
||||
strcpy(result, name);
|
||||
if (*result != 0)
|
||||
free(*result);
|
||||
*result = x_strdup(name);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -515,7 +512,8 @@ xtermSpecialFont(TScreen * screen, unsigned atts, unsigned chrset)
|
||||
old_props.res_x = res_x;
|
||||
old_props.res_x = res_y;
|
||||
old_props.pixel_size = pixel_size;
|
||||
old_props.spacing = strcpy(old_spacing, props->spacing);
|
||||
old_props.spacing = old_spacing;
|
||||
sprintf(old_spacing, "%.*s", (int) sizeof(old_spacing) - 2, props->spacing);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -584,13 +582,14 @@ same_font_name(const char *pattern, const char *match)
|
||||
static int
|
||||
got_bold_font(Display * dpy, XFontStruct * fs, String requested)
|
||||
{
|
||||
char actual[MAX_FONTNAME];
|
||||
char *actual = 0;
|
||||
int got;
|
||||
|
||||
if (get_font_name_props(dpy, fs, actual) == 0)
|
||||
if (get_font_name_props(dpy, fs, &actual) == 0)
|
||||
got = 0;
|
||||
else
|
||||
got = same_font_name(requested, actual);
|
||||
free(actual);
|
||||
return got;
|
||||
}
|
||||
|
||||
@ -876,7 +875,7 @@ xtermLoadFont(XtermWidget xw,
|
||||
Pixel new_normal;
|
||||
Pixel new_revers;
|
||||
char *tmpname = NULL;
|
||||
char normal[MAX_FONTNAME];
|
||||
char *normal = NULL;
|
||||
Boolean proportional = False;
|
||||
fontWarningTypes warn[fMAX];
|
||||
int j;
|
||||
@ -945,10 +944,10 @@ xtermLoadFont(XtermWidget xw,
|
||||
goto bad;
|
||||
}
|
||||
|
||||
strcpy(normal, myfonts.f_n);
|
||||
normal = x_strdup(myfonts.f_n);
|
||||
if (!check_fontname(myfonts.f_b)) {
|
||||
warn[fBold] = fwAlways;
|
||||
fp = get_font_name_props(screen->display, fnts[fNorm].fs, normal);
|
||||
fp = get_font_name_props(screen->display, fnts[fNorm].fs, &normal);
|
||||
if (fp != 0) {
|
||||
myfonts.f_b = bold_font_name(fp, fp->average_width);
|
||||
if (!xtermOpenFont(xw, myfonts.f_b, &fnts[fBold], fwAlways, False)) {
|
||||
@ -984,12 +983,12 @@ xtermLoadFont(XtermWidget xw,
|
||||
*/
|
||||
if_OPT_WIDE_CHARS(screen, {
|
||||
Boolean derived;
|
||||
char bold[MAX_FONTNAME];
|
||||
char *bold = NULL;
|
||||
|
||||
if (check_fontname(myfonts.f_w)) {
|
||||
cache_menu_font_name(screen, fontnum, fWide, myfonts.f_w);
|
||||
} else if (screen->utf8_fonts && !is_double_width_font(fnts[fNorm].fs)) {
|
||||
fp = get_font_name_props(screen->display, fnts[fNorm].fs, normal);
|
||||
fp = get_font_name_props(screen->display, fnts[fNorm].fs, &normal);
|
||||
if (fp != 0) {
|
||||
myfonts.f_w = wide_font_name(fp);
|
||||
warn[fWide] = fwAlways;
|
||||
@ -1007,7 +1006,7 @@ xtermLoadFont(XtermWidget xw,
|
||||
|
||||
derived = False;
|
||||
if (!check_fontname(myfonts.f_wb)) {
|
||||
fp = get_font_name_props(screen->display, fnts[fBold].fs, bold);
|
||||
fp = get_font_name_props(screen->display, fnts[fBold].fs, &bold);
|
||||
if (fp != 0) {
|
||||
myfonts.f_wb = widebold_font_name(fp);
|
||||
warn[fWBold] = fwAlways;
|
||||
@ -1059,6 +1058,8 @@ xtermLoadFont(XtermWidget xw,
|
||||
TRACE(("...cannot load wide bold font, use wide %s\n", NonNull(myfonts.f_w)));
|
||||
}
|
||||
|
||||
free(bold);
|
||||
|
||||
if (EmptyFont(fnts[fWBold].fs))
|
||||
goto bad; /* can't use a 0-sized font */
|
||||
});
|
||||
@ -1251,12 +1252,16 @@ xtermLoadFont(XtermWidget xw,
|
||||
screen->menu_font_sizes[fontnum] = FontSize(fnts[fNorm].fs);
|
||||
#endif
|
||||
}
|
||||
if (normal)
|
||||
free(normal);
|
||||
set_cursor_gcs(xw);
|
||||
xtermUpdateFontInfo(xw, doresize);
|
||||
TRACE(("Success Cgs - xtermLoadFont\n"));
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
if (normal)
|
||||
free(normal);
|
||||
if (tmpname)
|
||||
free(tmpname);
|
||||
|
||||
@ -1537,9 +1542,9 @@ HandleLoadVTFonts(Widget w,
|
||||
char name_buf[80];
|
||||
char class_buf[80];
|
||||
String name = (String) ((*param_count > 0) ? params[0] : empty);
|
||||
char *myName = (char *) MyStackAlloc(strlen(name), name_buf);
|
||||
char *myName = (char *) MyStackAlloc(strlen(name) + 1, name_buf);
|
||||
String convert = (String) ((*param_count > 1) ? params[1] : myName);
|
||||
char *myClass = (char *) MyStackAlloc(strlen(convert), class_buf);
|
||||
char *myClass = (char *) MyStackAlloc(strlen(convert) + 1, class_buf);
|
||||
int n;
|
||||
|
||||
TRACE(("HandleLoadVTFonts(%d)\n", *param_count));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: input.c,v 1.344 2012/11/23 18:43:35 tom Exp $ */
|
||||
/* $XTermId: input.c,v 1.345 2013/02/06 09:51:33 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
@ -143,42 +143,6 @@ static void sunfuncvalue(ANSI *, KEY_DATA *);
|
||||
static void hpfuncvalue(ANSI *, KEY_DATA *);
|
||||
static void scofuncvalue(ANSI *, KEY_DATA *);
|
||||
|
||||
#if OPT_TRACE
|
||||
static const char *
|
||||
ModifierName(unsigned modifier)
|
||||
{
|
||||
const char *s = "";
|
||||
if (modifier & ShiftMask)
|
||||
s = " Shift";
|
||||
else if (modifier & LockMask)
|
||||
s = " Lock";
|
||||
else if (modifier & ControlMask)
|
||||
s = " Control";
|
||||
else if (modifier & Mod1Mask)
|
||||
s = " Mod1";
|
||||
else if (modifier & Mod2Mask)
|
||||
s = " Mod2";
|
||||
else if (modifier & Mod3Mask)
|
||||
s = " Mod3";
|
||||
else if (modifier & Mod4Mask)
|
||||
s = " Mod4";
|
||||
else if (modifier & Mod5Mask)
|
||||
s = " Mod5";
|
||||
return s;
|
||||
}
|
||||
|
||||
#define FMT_MODIFIER_NAMES "%s%s%s%s%s%s%s%s"
|
||||
#define ARG_MODIFIER_NAMES(state) \
|
||||
ModifierName(state & ShiftMask), \
|
||||
ModifierName(state & LockMask), \
|
||||
ModifierName(state & ControlMask), \
|
||||
ModifierName(state & Mod1Mask), \
|
||||
ModifierName(state & Mod2Mask), \
|
||||
ModifierName(state & Mod3Mask), \
|
||||
ModifierName(state & Mod4Mask), \
|
||||
ModifierName(state & Mod5Mask)
|
||||
#endif
|
||||
|
||||
static void
|
||||
AdjustAfterInput(XtermWidget xw)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $XTermId: koi8rxterm.man,v 1.5 2012/10/23 23:27:24 tom Exp $
|
||||
.\" $XTermId: koi8rxterm.man,v 1.6 2013/01/01 00:43:18 tom Exp $
|
||||
.\"
|
||||
.\" Copyright 2004 Branden Robinson
|
||||
.\"
|
||||
@ -19,22 +19,33 @@
|
||||
.\" 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.
|
||||
.\"
|
||||
.ds N Koi8rxterm
|
||||
.ds n koi8rxterm
|
||||
.\"
|
||||
.ie \n(.g .ds AQ \(aq
|
||||
.el .ds AQ '
|
||||
.ie \n(.g .ds `` \(lq
|
||||
.el .ds `` ``
|
||||
.ie \n(.g .ds '' \(rq
|
||||
.el .ds '' ''
|
||||
.\"
|
||||
.TH KOI8RXTERM 1 "__app_date__" "__app_version__" "X Window System"
|
||||
.SH NAME
|
||||
koi8rxterm \- X terminal emulator for KOI8-R environments
|
||||
.SH SYNOPSIS
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
[
|
||||
.I xterm-options
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
is a wrapper around the
|
||||
.BR xterm(1)
|
||||
program that invokes the latter program with the \(oqKOI8R__default_class__\(cq X
|
||||
program that invokes the latter program with the \*(``KOI8R__default_class__\*('' X
|
||||
resource class set.
|
||||
All arguments to
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
are passed to
|
||||
.B xterm
|
||||
without processing; the
|
||||
@ -47,9 +58,9 @@ See the
|
||||
manual page for more information on
|
||||
.IR xterm-options .
|
||||
.PP
|
||||
The environment's locale settings (see \(lqENVIRONMENT\(rq below) are
|
||||
The environment's locale settings (see \*(``ENVIRONMENT\*('' below) are
|
||||
used to discern the locale's character set.
|
||||
If no current locale can be determined, the locale \(oqru_RU.KOI8-R\(cq
|
||||
If no current locale can be determined, the locale \*(``ru_RU.KOI8-R\*(''
|
||||
(the Russian language as used in the territory of Russia, with the KOI8-R
|
||||
character set) is assumed.
|
||||
The
|
||||
@ -57,20 +68,20 @@ The
|
||||
utility is used to determine whether the system supports the selected
|
||||
locale.
|
||||
If it does not,
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
will exit with an error and report the output of
|
||||
.BR locale .
|
||||
.PP
|
||||
.B Note: koi8rxterm
|
||||
.B Note: \*n
|
||||
may produce unexpected results if the current locale is set to one in which
|
||||
the KOI8-R character encoding is not supported, or if fonts using that
|
||||
encoding are not available.
|
||||
In the Debian system, the \(oqxfonts\-cyrillic\(cq package provides the
|
||||
In the Debian system, the \*(``xfonts\-cyrillic\*('' package provides the
|
||||
fonts that
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
uses by default.
|
||||
To change the fonts
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
uses, edit the
|
||||
.I __apploaddir__/KOI8R__default_class__
|
||||
file.
|
||||
@ -84,7 +95,7 @@ is available for Unicode UTF-8 environments.
|
||||
The values of these variables are checked, in order, to determine the
|
||||
character set used by the current locale.
|
||||
.SH AUTHOR
|
||||
.B koi8rxterm
|
||||
.B \*n
|
||||
was written by Branden Robinson and is very heavily based on
|
||||
.BR uxterm ,
|
||||
by Thomas Dickey.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: linedata.c,v 1.81 2012/09/21 20:40:21 tom Exp $ */
|
||||
/* $XTermId: linedata.c,v 1.82 2013/02/08 00:11:16 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2009-2010,2011 by Thomas E. Dickey
|
||||
* Copyright 2009-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include <xterm.h>
|
||||
#include <data.h> /* FIXME - needed for 'term' */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@ -64,6 +63,7 @@ getLineData(TScreen * screen, int 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;
|
||||
|
177
app/xterm/main.c
177
app/xterm/main.c
@ -1,7 +1,7 @@
|
||||
/* $XTermId: main.c,v 1.689 2012/11/19 10:33:33 tom Exp $ */
|
||||
/* $XTermId: main.c,v 1.716 2013/02/03 23:10:05 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 2002-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -90,6 +90,7 @@
|
||||
#define RES_OFFSET(field) XtOffsetOf(XTERM_RESOURCE, field)
|
||||
|
||||
#include <xterm.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/Xlocale.h>
|
||||
@ -445,7 +446,7 @@ extern char *ptsname(int);
|
||||
#endif
|
||||
|
||||
#ifndef VMS
|
||||
static SIGNAL_T reapchild(int /* n */ );
|
||||
static void reapchild(int /* n */ );
|
||||
static int spawnXTerm(XtermWidget /* xw */ );
|
||||
static void remove_termcap_entry(char *, const char *);
|
||||
#ifdef USE_PTY_SEARCH
|
||||
@ -1534,9 +1535,10 @@ parseArg(int *num, char **argv, char **valuep)
|
||||
if (result != 0) {
|
||||
TRACE(("...result %s\n", result->option));
|
||||
/* expand abbreviations */
|
||||
if (result->argKind != XrmoptionStickyArg
|
||||
&& strcmp(argv[*num], x_strdup(result->option))) {
|
||||
argv[*num] = x_strdup(result->option);
|
||||
if (result->argKind != XrmoptionStickyArg) {
|
||||
if (strcmp(argv[*num], result->option)) {
|
||||
argv[*num] = x_strdup(result->option);
|
||||
}
|
||||
}
|
||||
|
||||
/* adjust (*num) to skip option value */
|
||||
@ -1998,7 +2000,9 @@ main(int argc, char *argv[]ENVP_ARG)
|
||||
|
||||
for (n = 1; n < argc; n++) {
|
||||
if ((option_ptr = parseArg(&n, argv, &option_value)) == 0) {
|
||||
if (isOption(argv[n])) {
|
||||
if (argv[n] == 0) {
|
||||
break;
|
||||
} else if (isOption(argv[n])) {
|
||||
Syntax(argv[n]);
|
||||
} else if (explicit_shname != 0) {
|
||||
xtermWarning("Explicit shell already was %s\n", explicit_shname);
|
||||
@ -2178,7 +2182,7 @@ main(int argc, char *argv[]ENVP_ARG)
|
||||
my_class,
|
||||
optionDescList,
|
||||
XtNumber(optionDescList),
|
||||
&argc, argv,
|
||||
&argc, (String *) argv,
|
||||
fallback_resources,
|
||||
sessionShellWidgetClass,
|
||||
NULL, 0);
|
||||
@ -2889,11 +2893,10 @@ static const char *vtterm[] =
|
||||
};
|
||||
|
||||
/* ARGSUSED */
|
||||
static SIGNAL_T
|
||||
static void
|
||||
hungtty(int i GCC_UNUSED)
|
||||
{
|
||||
siglongjmp(env, 1);
|
||||
SIGNAL_RETURN;
|
||||
}
|
||||
|
||||
#if OPT_PTY_HANDSHAKE
|
||||
@ -2983,7 +2986,7 @@ HsSysError(int error)
|
||||
handshake.status = PTY_FATALERROR;
|
||||
handshake.error = errno;
|
||||
handshake.fatal_error = error;
|
||||
strcpy(handshake.buffer, ttydev);
|
||||
strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
|
||||
if (resource.ptyHandshake && (cp_pipe[1] >= 0)) {
|
||||
TRACE(("HsSysError errno=%d, error=%d device \"%s\"\n",
|
||||
@ -3101,18 +3104,26 @@ static struct UTMP_STR *
|
||||
find_utmp(struct UTMP_STR *tofind)
|
||||
{
|
||||
struct UTMP_STR *result;
|
||||
struct UTMP_STR limited;
|
||||
struct UTMP_STR working;
|
||||
|
||||
for (;;) {
|
||||
memset(&working, 0, sizeof(working));
|
||||
working.ut_type = tofind->ut_type;
|
||||
memcpy(working.ut_id, tofind->ut_id, sizeof(tofind->ut_id));
|
||||
strncpy(working.ut_id, tofind->ut_id, sizeof(tofind->ut_id));
|
||||
#if defined(__digital__) && defined(__unix__) && (defined(OSMAJORVERSION) && OSMAJORVERSION < 5)
|
||||
working.ut_type = 0;
|
||||
#endif
|
||||
if ((result = call_getutid(&working)) == 0)
|
||||
break;
|
||||
if (!strcmp(result->ut_line, tofind->ut_line))
|
||||
/*
|
||||
* ut_line may not be null-terminated, but if it is, there may be
|
||||
* garbage after the null. Use strncpy to ensure that the value
|
||||
* we check is null-terminated (if there is enough space in the
|
||||
* buffer), and that unused space is nulled.
|
||||
*/
|
||||
strncpy(limited.ut_line, result->ut_line, sizeof(result->ut_line));
|
||||
if (!memcmp(limited.ut_line, tofind->ut_line, sizeof(limited.ut_line)))
|
||||
break;
|
||||
/*
|
||||
* Solaris, IRIX64 and HPUX manpages say to fill the static area
|
||||
@ -3181,6 +3192,7 @@ spawnXTerm(XtermWidget xw)
|
||||
#endif /* sony */
|
||||
#endif /* TERMIO_STRUCT */
|
||||
|
||||
char *shell_path = 0;
|
||||
char *ptr, *shname, *shname_minus;
|
||||
int i;
|
||||
#if USE_NO_DEV_TTY
|
||||
@ -3447,7 +3459,7 @@ spawnXTerm(XtermWidget xw)
|
||||
if (get_termcap(xw, next)) {
|
||||
free(TermName);
|
||||
TermName = next;
|
||||
ok_termcap = True;
|
||||
ok_termcap = True + 1;
|
||||
break;
|
||||
} else {
|
||||
free(next);
|
||||
@ -3743,7 +3755,7 @@ spawnXTerm(XtermWidget xw)
|
||||
/* let our master know that the open failed */
|
||||
handshake.status = PTY_BAD;
|
||||
handshake.error = errno;
|
||||
strcpy(handshake.buffer, ttydev);
|
||||
strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
TRACE_HANDSHAKE("writing", &handshake);
|
||||
IGNORE_RC(write(cp_pipe[1],
|
||||
(const char *) &handshake,
|
||||
@ -3763,6 +3775,8 @@ spawnXTerm(XtermWidget xw)
|
||||
}
|
||||
|
||||
/* We have a new pty to try */
|
||||
if (ttyfd >= 0)
|
||||
close(ttyfd);
|
||||
free(ttydev);
|
||||
ttydev = x_strdup(handshake.buffer);
|
||||
}
|
||||
@ -4175,9 +4189,10 @@ spawnXTerm(XtermWidget xw)
|
||||
if (!utret)
|
||||
TRACE(("getutid: NULL\n"));
|
||||
else
|
||||
TRACE(("getutid: pid=%d type=%d user=%s line=%s id=%s\n",
|
||||
TRACE(("getutid: pid=%d type=%d user=%s line=%.*s id=%.*s\n",
|
||||
(int) utret->ut_pid, utret->ut_type, utret->ut_user,
|
||||
utret->ut_line, utret->ut_id));
|
||||
(int) sizeof(utret->ut_line), utret->ut_line,
|
||||
(int) sizeof(utret->ut_id), utret->ut_id));
|
||||
#endif
|
||||
|
||||
/* set up the new entry */
|
||||
@ -4219,9 +4234,9 @@ spawnXTerm(XtermWidget xw)
|
||||
if (!resource.utmpInhibit) {
|
||||
errno = 0;
|
||||
call_pututline(&utmp);
|
||||
TRACE(("pututline: id %s, line %s, pid %ld, errno %d %s\n",
|
||||
utmp.ut_id,
|
||||
utmp.ut_line,
|
||||
TRACE(("pututline: id %.*s, line %.*s, pid %ld, errno %d %s\n",
|
||||
(int) sizeof(utmp.ut_id), utmp.ut_id,
|
||||
(int) sizeof(utmp.ut_line), utmp.ut_line,
|
||||
(long) utmp.ut_pid,
|
||||
errno, (errno != 0) ? strerror(errno) : ""));
|
||||
}
|
||||
@ -4343,7 +4358,7 @@ spawnXTerm(XtermWidget xw)
|
||||
if (resource.ptyHandshake) {
|
||||
handshake.status = UTMP_ADDED;
|
||||
handshake.error = 0;
|
||||
strcpy(handshake.buffer, ttydev);
|
||||
strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
TRACE_HANDSHAKE("writing", &handshake);
|
||||
IGNORE_RC(write(cp_pipe[1], (char *) &handshake, sizeof(handshake)));
|
||||
}
|
||||
@ -4368,8 +4383,8 @@ spawnXTerm(XtermWidget xw)
|
||||
#if OPT_PTY_HANDSHAKE
|
||||
if (resource.ptyHandshake) {
|
||||
/* mark the pipes as close on exec */
|
||||
fcntl(cp_pipe[1], F_SETFD, 1);
|
||||
fcntl(pc_pipe[0], F_SETFD, 1);
|
||||
(void) fcntl(cp_pipe[1], F_SETFD, 1);
|
||||
(void) fcntl(pc_pipe[0], F_SETFD, 1);
|
||||
|
||||
/* We are at the point where we are going to
|
||||
* exec our shell (or whatever). Let our parent
|
||||
@ -4377,7 +4392,7 @@ spawnXTerm(XtermWidget xw)
|
||||
*/
|
||||
handshake.status = PTY_GOOD;
|
||||
handshake.error = 0;
|
||||
(void) strcpy(handshake.buffer, ttydev);
|
||||
(void) strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
TRACE_HANDSHAKE("writing", &handshake);
|
||||
IGNORE_RC(write(cp_pipe[1],
|
||||
(const char *) &handshake,
|
||||
@ -4491,22 +4506,29 @@ spawnXTerm(XtermWidget xw)
|
||||
* Incidentally, our setting of $SHELL tells luit to use that
|
||||
* program rather than choosing between $SHELL and "/bin/sh".
|
||||
*/
|
||||
if ((ptr = explicit_shname) == NULL) {
|
||||
if ((ptr = x_getenv("SHELL")) == NULL) {
|
||||
if ((shell_path = explicit_shname) == NULL) {
|
||||
if ((shell_path = x_getenv("SHELL")) == NULL) {
|
||||
if ((!OkPasswd(&pw) && !x_getpwuid(screen->uid, &pw))
|
||||
|| *(ptr = pw.pw_shell) == 0) {
|
||||
ptr = x_strdup("/bin/sh");
|
||||
} else if (ptr != 0) {
|
||||
xtermSetenv("SHELL", ptr);
|
||||
|| *(shell_path = x_strdup(pw.pw_shell)) == 0) {
|
||||
if (shell_path)
|
||||
free(shell_path);
|
||||
shell_path = x_strdup("/bin/sh");
|
||||
} else if (shell_path != 0) {
|
||||
xtermSetenv("SHELL", shell_path);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
xtermSetenv("SHELL", explicit_shname);
|
||||
}
|
||||
xtermSetenv("XTERM_SHELL", ptr);
|
||||
if (access(shell_path, X_OK) != 0) {
|
||||
xtermPerror("Cannot use '%s' as shell", shell_path);
|
||||
free(shell_path);
|
||||
shell_path = x_strdup("/bin/sh");
|
||||
}
|
||||
xtermSetenv("XTERM_SHELL", shell_path);
|
||||
|
||||
shname = x_basename(ptr);
|
||||
TRACE(("shell path '%s' leaf '%s'\n", ptr, shname));
|
||||
shname = x_basename(shell_path);
|
||||
TRACE(("shell path '%s' leaf '%s'\n", shell_path, shname));
|
||||
|
||||
#if OPT_LUIT_PROG
|
||||
/*
|
||||
@ -4515,8 +4537,9 @@ spawnXTerm(XtermWidget xw)
|
||||
* to command that the user gave anyway.
|
||||
*/
|
||||
if (command_to_exec_with_luit && command_to_exec) {
|
||||
xtermSetenv("XTERM_SHELL",
|
||||
xtermFindShell(*command_to_exec_with_luit, False));
|
||||
char *myShell = xtermFindShell(*command_to_exec_with_luit, False);
|
||||
xtermSetenv("XTERM_SHELL", myShell);
|
||||
free(myShell);
|
||||
TRACE_ARGV("spawning luit command", command_to_exec_with_luit);
|
||||
execvp(*command_to_exec_with_luit, command_to_exec_with_luit);
|
||||
xtermPerror("Can't execvp %s", *command_to_exec_with_luit);
|
||||
@ -4524,12 +4547,14 @@ spawnXTerm(XtermWidget xw)
|
||||
}
|
||||
#endif
|
||||
if (command_to_exec) {
|
||||
xtermSetenv("XTERM_SHELL",
|
||||
xtermFindShell(*command_to_exec, False));
|
||||
char *myShell = xtermFindShell(*command_to_exec, False);
|
||||
xtermSetenv("XTERM_SHELL", myShell);
|
||||
free(myShell);
|
||||
TRACE_ARGV("spawning command", command_to_exec);
|
||||
execvp(*command_to_exec, command_to_exec);
|
||||
if (command_to_exec[1] == 0)
|
||||
execlp(ptr, shname, "-c", command_to_exec[0], (void *) 0);
|
||||
execlp(shell_path, shname, "-c", command_to_exec[0],
|
||||
(void *) 0);
|
||||
xtermPerror("Can't execvp %s", *command_to_exec);
|
||||
}
|
||||
#ifdef USE_SYSV_SIGHUP
|
||||
@ -4569,13 +4594,14 @@ spawnXTerm(XtermWidget xw)
|
||||
xtermPerror("Can't execvp %s", *command_to_exec_with_luit);
|
||||
}
|
||||
#endif
|
||||
execlp(ptr,
|
||||
execlp(shell_path,
|
||||
(xw->misc.login_shell ? shname_minus : shname),
|
||||
(void *) 0);
|
||||
|
||||
/* Exec failed. */
|
||||
xtermPerror("Could not exec %s", ptr);
|
||||
xtermPerror("Could not exec %s", shell_path);
|
||||
IGNORE_RC(sleep(5));
|
||||
free(shell_path);
|
||||
exit(ERROR_EXEC);
|
||||
}
|
||||
/* end if in child after fork */
|
||||
@ -4625,7 +4651,7 @@ spawnXTerm(XtermWidget xw)
|
||||
exit(ERROR_PTYS);
|
||||
}
|
||||
handshake.status = PTY_NEW;
|
||||
(void) strcpy(handshake.buffer, ttydev);
|
||||
(void) strncpy(handshake.buffer, ttydev, sizeof(handshake.buffer));
|
||||
TRACE_HANDSHAKE("writing", &handshake);
|
||||
IGNORE_RC(write(pc_pipe[1],
|
||||
(const char *) &handshake,
|
||||
@ -4717,11 +4743,15 @@ spawnXTerm(XtermWidget xw)
|
||||
signal(SIGTERM, Exit);
|
||||
signal(SIGPIPE, Exit);
|
||||
#endif /* USE_SYSV_SIGNALS and not SIGTSTP */
|
||||
#ifdef NO_LEAKS
|
||||
if (ok_termcap != True)
|
||||
free(TermName);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
} /* end spawnXTerm */
|
||||
|
||||
SIGNAL_T
|
||||
void
|
||||
Exit(int n)
|
||||
{
|
||||
XtermWidget xw = term;
|
||||
@ -4738,8 +4768,9 @@ Exit(int n)
|
||||
struct UTMP_STR *utptr;
|
||||
|
||||
/* don't do this more than once */
|
||||
if (xterm_exiting)
|
||||
SIGNAL_RETURN;
|
||||
if (xterm_exiting) {
|
||||
exit(n);
|
||||
}
|
||||
xterm_exiting = True;
|
||||
|
||||
#ifdef PUCC_PTYD
|
||||
@ -4871,32 +4902,31 @@ Exit(int n)
|
||||
|
||||
#ifdef NO_LEAKS
|
||||
if (n == 0) {
|
||||
TRACE(("Freeing memory leaks\n"));
|
||||
if (xw != 0) {
|
||||
Display *dpy = TScreenOf(xw)->display;
|
||||
Display *dpy = TScreenOf(xw)->display;
|
||||
|
||||
if (toplevel) {
|
||||
XtDestroyWidget(toplevel);
|
||||
TRACE(("destroyed top-level widget\n"));
|
||||
}
|
||||
sortedOpts(0, 0, 0);
|
||||
noleaks_charproc();
|
||||
noleaks_ptydata();
|
||||
#if OPT_WIDE_CHARS
|
||||
noleaks_CharacterClass();
|
||||
#endif
|
||||
/* XrmSetDatabase(dpy, 0); increases leaks ;-) */
|
||||
XtCloseDisplay(dpy);
|
||||
XtDestroyApplicationContext(app_con);
|
||||
xtermCloseSession();
|
||||
TRACE(("closed display\n"));
|
||||
TRACE(("Freeing memory leaks\n"));
|
||||
|
||||
if (toplevel) {
|
||||
XtDestroyWidget(toplevel);
|
||||
TRACE(("destroyed top-level widget\n"));
|
||||
}
|
||||
sortedOpts(0, 0, 0);
|
||||
noleaks_charproc();
|
||||
noleaks_ptydata();
|
||||
#if OPT_WIDE_CHARS
|
||||
noleaks_CharacterClass();
|
||||
#endif
|
||||
/* XrmSetDatabase(dpy, 0); increases leaks ;-) */
|
||||
XtCloseDisplay(dpy);
|
||||
XtDestroyApplicationContext(app_con);
|
||||
xtermCloseSession();
|
||||
TRACE(("closed display\n"));
|
||||
|
||||
TRACE_CLOSE();
|
||||
}
|
||||
#endif
|
||||
|
||||
exit(n);
|
||||
SIGNAL_RETURN;
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -4938,14 +4968,16 @@ resize_termcap(XtermWidget xw)
|
||||
? MaxRows(screen)
|
||||
: MaxCols(screen)));
|
||||
temp += strlen(temp);
|
||||
ptr1 = strchr(ptr1, ':');
|
||||
strncpy(temp, ptr1, i = (size_t) (ptr2 - ptr1));
|
||||
temp += i;
|
||||
sprintf(temp, "%d", (li_first
|
||||
? MaxCols(screen)
|
||||
: MaxRows(screen)));
|
||||
ptr2 = strchr(ptr2, ':');
|
||||
strcat(temp, ptr2);
|
||||
if ((ptr1 = strchr(ptr1, ':')) != 0 && (ptr1 < ptr2)) {
|
||||
strncpy(temp, ptr1, i = (size_t) (ptr2 - ptr1));
|
||||
temp += i;
|
||||
sprintf(temp, "%d", (li_first
|
||||
? MaxCols(screen)
|
||||
: MaxRows(screen)));
|
||||
if ((ptr2 = strchr(ptr2, ':')) != 0) {
|
||||
strcat(temp, ptr2);
|
||||
}
|
||||
}
|
||||
TRACE((" ==> %s\n", newtc));
|
||||
TRACE((" new size %dx%d\n", MaxRows(screen), MaxCols(screen)));
|
||||
}
|
||||
@ -4985,7 +5017,7 @@ nonblocking_wait(void)
|
||||
#ifndef VMS
|
||||
|
||||
/* ARGSUSED */
|
||||
static SIGNAL_T
|
||||
static void
|
||||
reapchild(int n GCC_UNUSED)
|
||||
{
|
||||
int olderrno = errno;
|
||||
@ -5012,7 +5044,6 @@ reapchild(int n GCC_UNUSED)
|
||||
} while ((pid = nonblocking_wait()) > 0);
|
||||
|
||||
errno = olderrno;
|
||||
SIGNAL_RETURN;
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: menu.c,v 1.310 2012/09/22 14:53:45 tom Exp $ */
|
||||
/* $XTermId: menu.c,v 1.313 2013/02/03 21:53:58 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -842,7 +842,7 @@ domenu(Widget w,
|
||||
FindFontSelection(xw, NULL, True);
|
||||
SetItemSensitivity(
|
||||
fontMenuEntries[fontMenu_fontsel].widget,
|
||||
(screen->menu_font_names[fontMenu_fontsel]
|
||||
(screen->menu_font_names[fontMenu_fontsel][fNorm]
|
||||
? True : False));
|
||||
break;
|
||||
|
||||
@ -1639,6 +1639,7 @@ do_vtfont(Widget gw GCC_UNUSED,
|
||||
char *entryname = (char *) closure;
|
||||
int i;
|
||||
|
||||
TRACE(("do_vtfont(%s)\n", entryname));
|
||||
for (i = 0; i < NMENUFONTS; i++) {
|
||||
if (strcmp(entryname, fontMenuEntries[i].name) == 0) {
|
||||
SetVTFont(xw, i, True, NULL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $XTermId: minstall.in,v 1.15 2012/10/29 09:23:22 tom Exp $
|
||||
# $XTermId: minstall.in,v 1.18 2013/01/01 01:18:24 tom Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
# this file is part of xterm
|
||||
#
|
||||
@ -42,7 +42,8 @@
|
||||
# $4 = app-defaults directory
|
||||
# $5 = app-defaults class
|
||||
# $6 = application name, normally "xterm"
|
||||
# $7 = pixmap directory
|
||||
# $7 = application name transformed
|
||||
# $8 = pixmap directory
|
||||
#
|
||||
# Other values correspond to definitions in xtermcfg.h, and cannot be directly
|
||||
# modified using "make". They are substituted directly into this script.
|
||||
@ -72,7 +73,8 @@ END_FILE="$3"
|
||||
APPS_DIR="$4"
|
||||
APP_TYPE="$5"
|
||||
APP_name="$6"
|
||||
XPMS_DIR="$7"
|
||||
USE_name="$7"
|
||||
XPMS_DIR="$8"
|
||||
|
||||
suffix=`echo "$END_FILE" | sed -e 's%^.*\.%%'`
|
||||
NEW_FILE=temp$$
|
||||
@ -122,16 +124,25 @@ VERSION_H=`echo "$OLD_FILE" | sed -e 's,/[^/]*$,/version.h,' -e s',^[^/]*$,versi
|
||||
PATCH_NUM=`fgrep XTERM_PATCH $VERSION_H|sed -e 's/[^0-9]*//g'`
|
||||
PATCH_YMD=`fgrep XTERM_DATE $VERSION_H|sed -e 's,[^0-9/.-]*,,g'`
|
||||
|
||||
# Provide for renaming in test-builds:
|
||||
APP_Name=`echo "$APP_name" | sed -e s/xterm/Xterm/`
|
||||
# Make capitalization variants
|
||||
APP_chr0=`echo "$APP_name" | sed -e 's/^\(.\).*/\1/' | tr '[a-z]' '[A-Z]'`
|
||||
APP_chr1=`echo "$APP_name" | sed -e 's/^.//'`
|
||||
APP_Name=${APP_chr0}${APP_chr1}
|
||||
APP_NAME=`echo "$APP_name" | tr '[a-z]' '[A-Z]'`
|
||||
|
||||
# Provide for renaming in test-builds:
|
||||
USE_chr0=`echo "$USE_name" | sed -e 's/^\(.\).*/\1/' | tr '[a-z]' '[A-Z]'`
|
||||
USE_chr1=`echo "$USE_name" | sed -e 's/^.//'`
|
||||
USE_Name=${USE_chr0}${USE_chr1}
|
||||
USE_NAME=`echo "$USE_name" | tr '[a-z]' '[A-Z]'`
|
||||
|
||||
sed -e 's%__vendorversion__%"X Window System"%' \
|
||||
-e 's%__app_version__%Patch\ \#'$PATCH_NUM% \
|
||||
-e 's%__app_date__%'$PATCH_YMD% \
|
||||
-e "s%^\.TH [^ ][^ ]*%.TH $APP_NAME%" \
|
||||
-e "s%^\.ds N Xterm%.ds N $APP_Name%" \
|
||||
-e "s%^\.ds n xterm%.ds n $APP_name%" \
|
||||
-e "s%^\.TH [^ ][^ ]*%.TH $USE_NAME%" \
|
||||
-e "s%^\.ds N $APP_Name%.ds N $USE_Name%" \
|
||||
-e "s%^\.ds n $APP_name%.ds n $USE_name%" \
|
||||
-e 's%^'"$APP_name"' \\- %'"$USE_name"' \- %' \
|
||||
-e s%__default_termname__%@default_TERM@% \
|
||||
-e s%__default_termid__%@default_termid@% \
|
||||
-e s%__alt_sends_esc__%@alt_sends_esc@% \
|
||||
@ -149,6 +160,7 @@ sed -e 's%__vendorversion__%"X Window System"%' \
|
||||
-e s%fIwtmp'\\%fI'$WTMP_NAME'\\%g' \
|
||||
-e s%/etc/wtmp%$WTMP_PATH%g \
|
||||
$OLD_FILE >$NEW_FILE
|
||||
# diff -u $OLD_FILE $NEW_FILE
|
||||
|
||||
echo "$MINSTALL $OLD_FILE $END_FILE"
|
||||
eval "$MINSTALL $NEW_FILE $END_FILE"
|
||||
|
317
app/xterm/misc.c
317
app/xterm/misc.c
@ -1,7 +1,7 @@
|
||||
/* $XTermId: misc.c,v 1.631 2012/11/25 16:05:51 tom Exp $ */
|
||||
/* $XTermId: misc.c,v 1.658 2013/02/03 23:18:38 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -126,6 +126,8 @@
|
||||
static Boolean xtermAllocColor(XtermWidget, XColor *, const char *);
|
||||
static Cursor make_hidden_cursor(XtermWidget);
|
||||
|
||||
static char emptyString[] = "";
|
||||
|
||||
#if OPT_EXEC_XTERM
|
||||
/* Like readlink(2), but returns a malloc()ed buffer, or NULL on
|
||||
error; adapted from libc docs */
|
||||
@ -551,7 +553,7 @@ xevents(void)
|
||||
XtInputMask input_mask;
|
||||
|
||||
if (need_cleanup)
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
|
||||
if (screen->scroll_amt)
|
||||
FlushScroll(xw);
|
||||
@ -844,13 +846,12 @@ HandleSpawnTerminal(Widget w GCC_UNUSED,
|
||||
xtermWarning("exec of '%s': %s\n", child_exe, SysErrorMsg(errno));
|
||||
}
|
||||
_exit(0);
|
||||
} else {
|
||||
/* We are the parent; clean up */
|
||||
if (child_cwd)
|
||||
free(child_cwd);
|
||||
if (child_exe)
|
||||
free(child_exe);
|
||||
}
|
||||
|
||||
/* We are the parent; clean up */
|
||||
if (child_cwd)
|
||||
free(child_cwd);
|
||||
free(child_exe);
|
||||
}
|
||||
#endif /* OPT_EXEC_XTERM */
|
||||
|
||||
@ -1563,6 +1564,7 @@ RequestMaximize(XtermWidget xw, int maximize)
|
||||
success = True;
|
||||
} else if (screen->restore_data) {
|
||||
success = True;
|
||||
maximize = 0;
|
||||
}
|
||||
|
||||
if (success) {
|
||||
@ -1764,7 +1766,7 @@ creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, unsigned mode)
|
||||
int childstat = 0;
|
||||
#ifndef HAVE_WAITPID
|
||||
int waited;
|
||||
SIGNAL_T(*chldfunc) (int);
|
||||
void (*chldfunc) (int);
|
||||
|
||||
chldfunc = signal(SIGCHLD, SIG_DFL);
|
||||
#endif /* HAVE_WAITPID */
|
||||
@ -1830,7 +1832,7 @@ creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, unsigned mode)
|
||||
*/
|
||||
do
|
||||
if (waited == TScreenOf(term)->pid)
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
while ((waited = nonblocking_wait()) > 0) ;
|
||||
#endif /* HAVE_WAITPID */
|
||||
#ifndef WIFEXITED
|
||||
@ -1866,7 +1868,7 @@ xtermResetIds(TScreen * screen)
|
||||
*/
|
||||
|
||||
#ifdef ALLOWLOGFILEEXEC
|
||||
static SIGNAL_T
|
||||
static void
|
||||
logpipe(int sig GCC_UNUSED)
|
||||
{
|
||||
XtermWidget xw = term;
|
||||
@ -1945,8 +1947,34 @@ StartLog(XtermWidget xw)
|
||||
static char *shell;
|
||||
struct passwd pw;
|
||||
|
||||
if (pipe(p) < 0 || (pid = fork()) < 0)
|
||||
if ((shell = x_getenv("SHELL")) == NULL) {
|
||||
|
||||
if (x_getpwuid(screen->uid, &pw)) {
|
||||
char *name = x_getlogin(screen->uid, &pw);
|
||||
if (*(pw.pw_shell)) {
|
||||
shell = pw.pw_shell;
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
}
|
||||
|
||||
if (shell == 0) {
|
||||
static char dummy[] = "/bin/sh";
|
||||
shell = dummy;
|
||||
}
|
||||
|
||||
if (access(shell, X_OK) != 0) {
|
||||
xtermPerror("Can't execute `%s'\n", shell);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pipe(p) < 0) {
|
||||
xtermPerror("Can't make a pipe connection\n");
|
||||
return;
|
||||
} else if ((pid = fork()) < 0) {
|
||||
xtermPerror("Can't fork...\n");
|
||||
return;
|
||||
}
|
||||
if (pid == 0) { /* child */
|
||||
/*
|
||||
* Close our output (we won't be talking back to the
|
||||
@ -1963,21 +1991,6 @@ StartLog(XtermWidget xw)
|
||||
close(ConnectionNumber(screen->display));
|
||||
close(screen->respond);
|
||||
|
||||
if ((shell = x_getenv("SHELL")) == NULL) {
|
||||
|
||||
if (x_getpwuid(screen->uid, &pw)) {
|
||||
x_getlogin(screen->uid, &pw);
|
||||
if (*(pw.pw_shell)) {
|
||||
shell = pw.pw_shell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shell == 0) {
|
||||
static char dummy[] = "/bin/sh";
|
||||
shell = dummy;
|
||||
}
|
||||
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
|
||||
@ -1985,9 +1998,12 @@ StartLog(XtermWidget xw)
|
||||
if (xtermResetIds(screen) < 0)
|
||||
exit(ERROR_SETUID);
|
||||
|
||||
execl(shell, shell, "-c", &screen->logfile[1], (void *) 0);
|
||||
|
||||
xtermWarning("Can't exec `%s'\n", &screen->logfile[1]);
|
||||
if (access(shell, X_OK) == 0) {
|
||||
execl(shell, shell, "-c", &screen->logfile[1], (void *) 0);
|
||||
xtermWarning("Can't exec `%s'\n", &screen->logfile[1]);
|
||||
} else {
|
||||
xtermWarning("Can't execute `%s'\n", shell);
|
||||
}
|
||||
exit(ERROR_LOGEXEC);
|
||||
}
|
||||
close(p[0]);
|
||||
@ -2701,9 +2717,9 @@ ManipulateSelectionData(XtermWidget xw, TScreen * screen, char *buf, int final)
|
||||
};
|
||||
|
||||
const char *base = buf;
|
||||
char *used = x_strdup(base);
|
||||
char *used;
|
||||
Cardinal j, n = 0;
|
||||
String *select_args = 0;
|
||||
String *select_args;
|
||||
|
||||
TRACE(("Manipulate selection data\n"));
|
||||
|
||||
@ -2716,46 +2732,54 @@ ManipulateSelectionData(XtermWidget xw, TScreen * screen, char *buf, int final)
|
||||
|
||||
if (*base == '\0')
|
||||
base = "s0";
|
||||
if ((select_args = TypeCallocN(String, 1 + strlen(base))) == 0)
|
||||
return;
|
||||
while (*base != '\0') {
|
||||
for (j = 0; j < XtNumber(table); ++j) {
|
||||
if (*base == table[j].given) {
|
||||
used[n] = *base;
|
||||
select_args[n++] = table[j].result;
|
||||
TRACE(("atom[%d] %s\n", n, table[j].result));
|
||||
break;
|
||||
|
||||
if ((used = x_strdup(base)) != 0) {
|
||||
if ((select_args = TypeCallocN(String, 2 + strlen(base))) != 0) {
|
||||
while (*base != '\0') {
|
||||
for (j = 0; j < XtNumber(table); ++j) {
|
||||
if (*base == table[j].given) {
|
||||
used[n] = *base;
|
||||
select_args[n++] = table[j].result;
|
||||
TRACE(("atom[%d] %s\n", n, table[j].result));
|
||||
break;
|
||||
}
|
||||
}
|
||||
++base;
|
||||
}
|
||||
used[n] = 0;
|
||||
|
||||
if (!strcmp(buf, "?")) {
|
||||
if (AllowWindowOps(xw, ewGetSelection)) {
|
||||
TRACE(("Getting selection\n"));
|
||||
unparseputc1(xw, ANSI_OSC);
|
||||
unparseputs(xw, "52");
|
||||
unparseputc(xw, ';');
|
||||
|
||||
unparseputs(xw, used);
|
||||
unparseputc(xw, ';');
|
||||
|
||||
/* Tell xtermGetSelection data is base64 encoded */
|
||||
screen->base64_paste = n;
|
||||
screen->base64_final = final;
|
||||
|
||||
/* terminator will be written in this call */
|
||||
xtermGetSelection((Widget) xw,
|
||||
(Time) 0,
|
||||
select_args, n,
|
||||
NULL);
|
||||
}
|
||||
} else {
|
||||
if (AllowWindowOps(xw, ewSetSelection)) {
|
||||
TRACE(("Setting selection with %s\n", buf));
|
||||
ClearSelectionBuffer(screen);
|
||||
while (*buf != '\0')
|
||||
AppendToSelectionBuffer(screen, CharOf(*buf++));
|
||||
CompleteSelection(xw, select_args, n);
|
||||
}
|
||||
}
|
||||
free(select_args);
|
||||
}
|
||||
++base;
|
||||
}
|
||||
used[n] = 0;
|
||||
|
||||
if (!strcmp(buf, "?")) {
|
||||
if (AllowWindowOps(xw, ewGetSelection)) {
|
||||
TRACE(("Getting selection\n"));
|
||||
unparseputc1(xw, ANSI_OSC);
|
||||
unparseputs(xw, "52");
|
||||
unparseputc(xw, ';');
|
||||
|
||||
unparseputs(xw, used);
|
||||
unparseputc(xw, ';');
|
||||
|
||||
/* Tell xtermGetSelection data is base64 encoded */
|
||||
screen->base64_paste = n;
|
||||
screen->base64_final = final;
|
||||
|
||||
/* terminator will be written in this call */
|
||||
xtermGetSelection((Widget) xw, (Time) 0, select_args, n, NULL);
|
||||
}
|
||||
} else {
|
||||
if (AllowWindowOps(xw, ewSetSelection)) {
|
||||
TRACE(("Setting selection with %s\n", buf));
|
||||
ClearSelectionBuffer(screen);
|
||||
while (*buf != '\0')
|
||||
AppendToSelectionBuffer(screen, CharOf(*buf++));
|
||||
CompleteSelection(xw, select_args, n);
|
||||
}
|
||||
free(used);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3569,7 +3593,7 @@ parse_decudk(const char *cp)
|
||||
{
|
||||
while (*cp) {
|
||||
const char *base = cp;
|
||||
char *str = CastMallocN(char, strlen(cp) + 1);
|
||||
char *str = CastMallocN(char, strlen(cp) + 2);
|
||||
unsigned key = 0;
|
||||
int lo, hi;
|
||||
int len = 0;
|
||||
@ -3584,6 +3608,7 @@ parse_decudk(const char *cp)
|
||||
}
|
||||
}
|
||||
if (len > 0 && key < MAX_UDK) {
|
||||
str[len] = '\0';
|
||||
if (user_keys[key].str != 0)
|
||||
free(user_keys[key].str);
|
||||
user_keys[key].str = str;
|
||||
@ -3623,7 +3648,7 @@ parse_decdld(ANSI * params, const char *string)
|
||||
? Pcmw
|
||||
: (Pcmw + 3)));
|
||||
int char_high = ((Pcmh == 0)
|
||||
? ((Pcmw >= 2 || Pcmw <= 4)
|
||||
? ((Pcmw >= 2 && Pcmw <= 4)
|
||||
? 10
|
||||
: 20)
|
||||
: Pcmh);
|
||||
@ -3869,7 +3894,7 @@ do_dcs(XtermWidget xw, Char * dcsbuf, size_t dcslen)
|
||||
|
||||
if (okay) {
|
||||
unparseputc1(xw, ANSI_DCS);
|
||||
unparseputc(xw, okay ? '1' : '0');
|
||||
unparseputc(xw, '1');
|
||||
unparseputc(xw, '$');
|
||||
unparseputc(xw, 'r');
|
||||
cp = reply;
|
||||
@ -4538,7 +4563,6 @@ ChangeGroup(XtermWidget xw, const char *attribute, char *value)
|
||||
#if OPT_WIDE_CHARS
|
||||
static Char *converted; /* NO_LEAKS */
|
||||
#endif
|
||||
static char empty[1];
|
||||
|
||||
Arg args[1];
|
||||
Boolean changed = True;
|
||||
@ -4555,14 +4579,16 @@ ChangeGroup(XtermWidget xw, const char *attribute, char *value)
|
||||
return;
|
||||
|
||||
if (value == 0)
|
||||
value = empty;
|
||||
value = emptyString;
|
||||
if (IsTitleMode(xw, tmSetBase16)) {
|
||||
const char *temp;
|
||||
char *test;
|
||||
|
||||
value = x_decode_hex(value, &temp);
|
||||
if (*temp != '\0')
|
||||
if (*temp != '\0') {
|
||||
free(value);
|
||||
return;
|
||||
}
|
||||
for (test = value; *test != '\0'; ++test) {
|
||||
if (CharOf(*test) < 32) {
|
||||
*test = '\0';
|
||||
@ -4668,13 +4694,12 @@ ChangeGroup(XtermWidget xw, const char *attribute, char *value)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
free(my_attr);
|
||||
|
||||
if (IsTitleMode(xw, tmSetBase16))
|
||||
free(value);
|
||||
|
||||
}
|
||||
if (IsTitleMode(xw, tmSetBase16)) {
|
||||
free(value);
|
||||
}
|
||||
free(my_attr);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4682,8 +4707,7 @@ void
|
||||
ChangeIconName(XtermWidget xw, char *name)
|
||||
{
|
||||
if (name == 0) {
|
||||
static char dummy[] = "";
|
||||
name = dummy;
|
||||
name = emptyString;
|
||||
}
|
||||
if (!showZIconBeep(xw, name))
|
||||
ChangeGroup(xw, XtNiconName, name);
|
||||
@ -4895,44 +4919,48 @@ SysError(int code)
|
||||
Cleanup(code);
|
||||
}
|
||||
|
||||
void
|
||||
NormalExit(void)
|
||||
{
|
||||
static Bool cleaning;
|
||||
|
||||
/*
|
||||
* Process "-hold" and session cleanup only for a normal exit.
|
||||
*/
|
||||
if (cleaning) {
|
||||
hold_screen = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
cleaning = True;
|
||||
need_cleanup = False;
|
||||
|
||||
if (hold_screen) {
|
||||
hold_screen = 2;
|
||||
while (hold_screen) {
|
||||
xevents();
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
#if OPT_SESSION_MGT
|
||||
if (resource.sessionMgt) {
|
||||
XtVaSetValues(toplevel,
|
||||
XtNjoinSession, False,
|
||||
(void *) 0);
|
||||
}
|
||||
#endif
|
||||
Cleanup(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* cleanup by sending SIGHUP to client processes
|
||||
*/
|
||||
void
|
||||
Cleanup(int code)
|
||||
{
|
||||
static Bool cleaning;
|
||||
TScreen *screen = TScreenOf(term);
|
||||
|
||||
/*
|
||||
* Process "-hold" and session cleanup only for a normal exit.
|
||||
*/
|
||||
if (code == 0) {
|
||||
if (cleaning) {
|
||||
hold_screen = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
cleaning = True;
|
||||
need_cleanup = False;
|
||||
|
||||
TRACE(("Cleanup %d\n", code));
|
||||
|
||||
if (hold_screen) {
|
||||
hold_screen = 2;
|
||||
while (hold_screen) {
|
||||
xevents();
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
#if OPT_SESSION_MGT
|
||||
if (resource.sessionMgt) {
|
||||
XtVaSetValues(toplevel,
|
||||
XtNjoinSession, False,
|
||||
(void *) 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
TRACE(("Cleanup %d\n", code));
|
||||
|
||||
if (screen->pid > 1) {
|
||||
(void) kill_process_group(screen->pid, SIGHUP);
|
||||
@ -4947,10 +4975,12 @@ Cleanup(int code)
|
||||
char *
|
||||
xtermFindShell(char *leaf, Bool warning)
|
||||
{
|
||||
char *s0;
|
||||
char *s;
|
||||
char *d;
|
||||
char *tmp;
|
||||
char *result = leaf;
|
||||
Bool allocated = False;
|
||||
|
||||
TRACE(("xtermFindShell(%s)\n", leaf));
|
||||
|
||||
@ -4963,13 +4993,14 @@ xtermFindShell(char *leaf, Bool warning)
|
||||
if (getcwd(buffer, need) != 0) {
|
||||
sprintf(buffer + strlen(buffer), "/%s", result);
|
||||
result = buffer;
|
||||
allocated = True;
|
||||
} else {
|
||||
free(buffer);
|
||||
}
|
||||
}
|
||||
} else if (*result != '\0' && strchr("+/-", *result) == 0) {
|
||||
/* find it in $PATH */
|
||||
if ((s = x_getenv("PATH")) != 0) {
|
||||
if ((s = s0 = x_getenv("PATH")) != 0) {
|
||||
if ((tmp = TypeMallocN(char, strlen(leaf) + strlen(s) + 2)) != 0) {
|
||||
Bool found = False;
|
||||
while (*s != '\0') {
|
||||
@ -4987,17 +5018,17 @@ xtermFindShell(char *leaf, Bool warning)
|
||||
&& access(tmp, X_OK) == 0) {
|
||||
result = x_strdup(tmp);
|
||||
found = True;
|
||||
allocated = True;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
free(tmp);
|
||||
}
|
||||
free(s0);
|
||||
}
|
||||
}
|
||||
TRACE(("...xtermFindShell(%s)\n", result));
|
||||
@ -5006,8 +5037,13 @@ xtermFindShell(char *leaf, Bool warning)
|
||||
|| access(result, X_OK) != 0) {
|
||||
if (warning)
|
||||
xtermWarning("No absolute path found for shell: %s\n", result);
|
||||
if (allocated)
|
||||
free(result);
|
||||
result = 0;
|
||||
}
|
||||
/* be consistent, so that caller can always free the result */
|
||||
if (result != 0 && !allocated)
|
||||
result = x_strdup(result);
|
||||
return result;
|
||||
}
|
||||
#endif /* VMS */
|
||||
@ -5468,7 +5504,9 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
|
||||
} else {
|
||||
code = 0;
|
||||
}
|
||||
strcpy(temp, opt_array[j].desc);
|
||||
sprintf(temp, "%.*s",
|
||||
(int) sizeof(temp) - 2,
|
||||
opt_array[j].desc);
|
||||
if (x_strindex(temp, "inhibit") != 0)
|
||||
code = -code;
|
||||
if (code != 0
|
||||
@ -5576,45 +5614,6 @@ xtermEnvUTF8(void)
|
||||
}
|
||||
#endif /* OPT_WIDE_CHARS */
|
||||
|
||||
/*
|
||||
* Returns the version-string used in the "-v' message as well as a few other
|
||||
* places. It is derived (when possible) from the __vendorversion__ symbol
|
||||
* that some newer imake configurations define.
|
||||
*/
|
||||
char *
|
||||
xtermVersion(void)
|
||||
{
|
||||
static char vendor_version[] = __vendorversion__;
|
||||
static char *result;
|
||||
|
||||
if (result == 0) {
|
||||
char *vendor = vendor_version;
|
||||
char first[BUFSIZ];
|
||||
char second[BUFSIZ];
|
||||
|
||||
result = CastMallocN(char, strlen(vendor) + 9);
|
||||
if (result == 0)
|
||||
result = vendor;
|
||||
else {
|
||||
/* some vendors leave trash in this string */
|
||||
for (;;) {
|
||||
if (!strncmp(vendor, "Version ", (size_t) 8))
|
||||
vendor += 8;
|
||||
else if (isspace(CharOf(*vendor)))
|
||||
++vendor;
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (strlen(vendor) < BUFSIZ &&
|
||||
sscanf(vendor, "%[0-9.] %[A-Za-z_0-9.]", first, second) == 2)
|
||||
sprintf(result, "%s %s(%d)", second, first, XTERM_PATCH);
|
||||
else
|
||||
sprintf(result, "%s(%d)", vendor, XTERM_PATCH);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the current widget, or any parent, is the VT100 "xterm" widget.
|
||||
*/
|
||||
@ -5643,7 +5642,7 @@ die_callback(Widget w GCC_UNUSED,
|
||||
XtPointer client_data GCC_UNUSED,
|
||||
XtPointer call_data GCC_UNUSED)
|
||||
{
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
}
|
||||
|
||||
static void
|
||||
|
2230
app/xterm/os2main.c
2230
app/xterm/os2main.c
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,28 @@
|
||||
xterm-dev (291) unstable; urgency=low
|
||||
|
||||
* Fix a different #282 change (Redhat #874327).
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 26 Feb 2013 19:09:32 -0500
|
||||
|
||||
xterm-dev (290) unstable; urgency=low
|
||||
|
||||
* Fix incomplete revert of #282 change.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 12 Feb 2013 19:48:21 -0500
|
||||
|
||||
xterm-dev (289) unstable; urgency=low
|
||||
|
||||
* Miscellaneous fixes.
|
||||
* Fix regression with XTERM_SHELL feature.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 03 Feb 2013 13:59:20 -0500
|
||||
|
||||
xterm-dev (288) unstable; urgency=low
|
||||
|
||||
* Miscellaneous fixes.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 26 Nov 2012 20:53:23 -0500
|
||||
|
||||
xterm-dev (287) unstable; urgency=low
|
||||
|
||||
* Miscellaneous fixes.
|
||||
|
@ -58,6 +58,7 @@ configure-stamp:
|
||||
--libdir=/etc/$(PACKAGE) \
|
||||
--with-app-class=$(PKG_CLASS) \
|
||||
--without-xterm-symlink \
|
||||
--disable-imake \
|
||||
--enable-256-color \
|
||||
--enable-88-color \
|
||||
--enable-dabbrev \
|
||||
|
@ -5,7 +5,7 @@
|
||||
# and "make makesum".
|
||||
|
||||
PORTNAME= xterm
|
||||
PORTVERSION= 286
|
||||
PORTVERSION= 290
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ftp://invisible-island.net/xterm/ \
|
||||
CRITICAL
|
||||
|
@ -1,7 +1,7 @@
|
||||
# $XTermId: xterm.spec,v 1.40 2012/11/19 09:53:15 tom Exp $
|
||||
# $XTermId: xterm.spec,v 1.45 2013/02/27 00:09:35 tom Exp $
|
||||
Summary: X terminal emulator (development version)
|
||||
Name: xterm-dev
|
||||
Version: 287
|
||||
Version: 291
|
||||
Release: 1
|
||||
License: X11
|
||||
Group: User Interface/X
|
||||
@ -79,6 +79,7 @@ CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \
|
||||
--with-icondir=%{_iconsdir} \
|
||||
%endif
|
||||
--with-app-class=%{my_class} \
|
||||
--disable-imake \
|
||||
--enable-256-color \
|
||||
--enable-88-color \
|
||||
--enable-dabbrev \
|
||||
|
@ -4,7 +4,7 @@
|
||||
* DO NOT EDIT BY HAND! This is generated by the script
|
||||
* unicode/make-precompose.sh
|
||||
*/
|
||||
/* $XTermId: precompose.c,v 1.8 2007/02/05 01:06:36 Thomas.Wolff Exp $ */
|
||||
/* $XTermId: precompose.c,v 1.9 2013/02/03 17:06:01 tom Exp $ */
|
||||
/* $XFree86$ */
|
||||
|
||||
#include <precompose.h>
|
||||
@ -1014,6 +1014,11 @@ static struct {
|
||||
{ 0x30FE, 0x30FD, 0x3099},
|
||||
{ 0xFB2C, 0xFB49, 0x05C1},
|
||||
{ 0xFB2D, 0xFB49, 0x05C2},
|
||||
{ 0x1109A, 0x11099, 0x110BA},
|
||||
{ 0x1109C, 0x1109B, 0x110BA},
|
||||
{ 0x110AB, 0x110A5, 0x110BA},
|
||||
{ 0x1112E, 0x11131, 0x11127},
|
||||
{ 0x1112F, 0x11132, 0x11127},
|
||||
{ 0x1D15E, 0x1D157, 0x1D165},
|
||||
{ 0x1D15F, 0x1D158, 0x1D165},
|
||||
{ 0x1D160, 0x1D15F, 0x1D16E},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: print.c,v 1.147 2012/10/29 10:41:53 tom Exp $ */
|
||||
/* $XTermId: print.c,v 1.149 2012/12/31 13:58:16 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
@ -659,14 +659,19 @@ xtermHasPrinter(XtermWidget xw)
|
||||
|
||||
if (strlen(SPS.printer_command) != 0 && !result) {
|
||||
char **argv = x_splitargs(SPS.printer_command);
|
||||
if (argv && argv[0]) {
|
||||
if (xtermFindShell(argv[0], False) == 0) {
|
||||
xtermWarning("No program found for printerCommand: %s\n", SPS.printer_command);
|
||||
SPS.printer_command = x_strdup("");
|
||||
} else {
|
||||
SPS.printer_checked = True;
|
||||
result = True;
|
||||
if (argv) {
|
||||
if (argv[0]) {
|
||||
char *myShell = xtermFindShell(argv[0], False);
|
||||
if (myShell == 0) {
|
||||
xtermWarning("No program found for printerCommand: %s\n", SPS.printer_command);
|
||||
SPS.printer_command = x_strdup("");
|
||||
} else {
|
||||
free(myShell);
|
||||
SPS.printer_checked = True;
|
||||
result = True;
|
||||
}
|
||||
}
|
||||
x_freeargs(argv);
|
||||
}
|
||||
TRACE(("xtermHasPrinter:%d\n", result));
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: ptydata.c,v 1.101 2011/09/11 14:59:38 tom Exp $ */
|
||||
/* $XTermId: ptydata.c,v 1.103 2013/02/03 23:17:07 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2010,2011 by Thomas E. Dickey
|
||||
* Copyright 1999-2011,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -203,7 +203,7 @@ readPtyData(XtermWidget xw, PtySelect * select_mask, PtyData * data)
|
||||
*/
|
||||
if (size <= 0) {
|
||||
if (save_err == EIO || save_err == 0)
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
else if (!E_TEST(save_err))
|
||||
Panic("input: read returned unexpected error (%d)\n", save_err);
|
||||
size = 0;
|
||||
@ -211,13 +211,13 @@ readPtyData(XtermWidget xw, PtySelect * select_mask, PtyData * data)
|
||||
#else /* !f*ugly */
|
||||
if (size < 0) {
|
||||
if (save_err == EIO)
|
||||
Cleanup(0);
|
||||
NormalExit();
|
||||
else if (!E_TEST(save_err))
|
||||
Panic("input: read returned unexpected error (%d)\n", save_err);
|
||||
size = 0;
|
||||
} else if (size == 0) {
|
||||
#if defined(__UNIXOS2__) || defined(__FreeBSD__)
|
||||
Cleanup(0);
|
||||
#if defined(__FreeBSD__)
|
||||
NormalExit();
|
||||
#else
|
||||
Panic("input: read returned zero\n", 0);
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: ptyx.h,v 1.759 2012/11/25 16:05:51 tom Exp $ */
|
||||
/* $XTermId: ptyx.h,v 1.762 2013/02/13 00:42:21 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -231,11 +231,7 @@
|
||||
#ifdef __hpux
|
||||
#define PTYCHAR1 "zyxwvutsrqp"
|
||||
#else /* !__hpux */
|
||||
#ifdef __UNIXOS2__
|
||||
#define PTYCHAR1 "pq"
|
||||
#else
|
||||
#define PTYCHAR1 "pqrstuvwxyzPQRSTUVWXYZ"
|
||||
#endif /* !__UNIXOS2__ */
|
||||
#endif /* !__hpux */
|
||||
#endif /* !PTYCHAR1 */
|
||||
|
||||
@ -866,13 +862,17 @@ typedef enum {
|
||||
, MOUSE_FG /* mouse foreground */
|
||||
, MOUSE_BG /* mouse background */
|
||||
#if OPT_TEK4014
|
||||
, TEK_FG /* tektronix foreground */
|
||||
, TEK_FG = 5 /* tektronix foreground */
|
||||
, TEK_BG /* tektronix background */
|
||||
, TEK_CURSOR /* tektronix cursor */
|
||||
#endif
|
||||
#if OPT_HIGHLIGHT_COLOR
|
||||
, HIGHLIGHT_BG /* highlight background */
|
||||
, HIGHLIGHT_FG /* highlight foreground */
|
||||
, HIGHLIGHT_BG = 7 /* highlight background */
|
||||
#endif
|
||||
#if OPT_TEK4014
|
||||
, TEK_CURSOR = 8 /* tektronix cursor */
|
||||
#endif
|
||||
#if OPT_HIGHLIGHT_COLOR
|
||||
, HIGHLIGHT_FG = 9 /* highlight foreground */
|
||||
#endif
|
||||
, NCOLORS /* total number of colors */
|
||||
} TermColors;
|
||||
@ -1897,7 +1897,6 @@ typedef struct {
|
||||
* Working variables for getLineData().
|
||||
*/
|
||||
size_t lineExtra; /* extra space for combining chars */
|
||||
Dimension widestLine; /* length of longest LineData */
|
||||
/*
|
||||
* Pointer to the current visible buffer.
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: resize.c,v 1.118 2011/09/11 20:19:19 tom Exp $ */
|
||||
/* $XTermId: resize.c,v 1.129 2013/01/06 19:42:20 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2003-2010,2011 by Thomas E. Dickey
|
||||
* Copyright 2003-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -54,17 +54,15 @@
|
||||
|
||||
/* resize.c */
|
||||
|
||||
#include <xterm.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <xterm.h>
|
||||
#include <version.h>
|
||||
#include <xstrings.h>
|
||||
#include <xtermcap.h>
|
||||
#include <xterm_io.h>
|
||||
|
||||
#ifdef APOLLO_SR9
|
||||
#define CANT_OPEN_DEV_TTY
|
||||
#endif
|
||||
|
||||
#ifndef USE_TERMINFO /* avoid conflict with configure script */
|
||||
#if defined(__QNX__) || defined(__SCO__) || defined(linux) || defined(__OpenBSD__) || defined(__UNIXWARE__)
|
||||
#define USE_TERMINFO
|
||||
@ -140,14 +138,13 @@ static const char *getsize[EMULATIONS] =
|
||||
ESCAPE("7") ESCAPE("[r") ESCAPE("[999;999H") ESCAPE("[6n"),
|
||||
ESCAPE("[18t"),
|
||||
};
|
||||
#if defined(USE_STRUCT_TTYSIZE)
|
||||
#elif defined(USE_STRUCT_WINSIZE)
|
||||
#if defined(USE_STRUCT_WINSIZE)
|
||||
static const char *getwsize[EMULATIONS] =
|
||||
{ /* size in pixels */
|
||||
0,
|
||||
ESCAPE("[14t"),
|
||||
};
|
||||
#endif /* USE_STRUCT_{TTYSIZE|WINSIZE} */
|
||||
#endif /* USE_STRUCT_WINSIZE */
|
||||
static const char *restore[EMULATIONS] =
|
||||
{
|
||||
ESCAPE("8"),
|
||||
@ -177,20 +174,54 @@ static char sunname[] = "sunsize";
|
||||
static int tty;
|
||||
static FILE *ttyfp;
|
||||
|
||||
#if defined(USE_STRUCT_TTYSIZE)
|
||||
#elif defined(USE_STRUCT_WINSIZE)
|
||||
#if defined(USE_STRUCT_WINSIZE)
|
||||
static const char *wsize[EMULATIONS] =
|
||||
{
|
||||
0,
|
||||
ESCAPE("[4;%hd;%hdt"),
|
||||
};
|
||||
#endif /* USE_STRUCT_{TTYSIZE|WINSIZE} */
|
||||
#endif /* USE_STRUCT_WINSIZE */
|
||||
|
||||
static SIGNAL_T onintr(int sig);
|
||||
static SIGNAL_T resize_timeout(int sig);
|
||||
static int checkdigits(char *str);
|
||||
static void Usage(void);
|
||||
static void readstring(FILE *fp, char *buf, const char *str);
|
||||
static void
|
||||
failed(const char *s)
|
||||
{
|
||||
int save = errno;
|
||||
IGNORE_RC(write(2, myname, strlen(myname)));
|
||||
IGNORE_RC(write(2, ": ", (size_t) 2));
|
||||
errno = save;
|
||||
perror(s);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
onintr(int sig GCC_UNUSED)
|
||||
{
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
(void) ioctl(tty, TCSETAW, &tioorig);
|
||||
#elif defined(USE_TERMIOS)
|
||||
(void) tcsetattr(tty, TCSADRAIN, &tioorig);
|
||||
#else /* not USE_TERMIOS */
|
||||
(void) ioctl(tty, TIOCSETP, &sgorig);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void
|
||||
resize_timeout(int sig)
|
||||
{
|
||||
fprintf(stderr, "\n%s: Time out occurred\r\n", myname);
|
||||
onintr(sig);
|
||||
}
|
||||
|
||||
static void
|
||||
Usage(void)
|
||||
{
|
||||
fprintf(stderr, strcmp(myname, sunname) == 0 ?
|
||||
"Usage: %s [rows cols]\n" :
|
||||
"Usage: %s [-v] [-u] [-c] [-s [rows cols]]\n", myname);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifdef USE_TERMCAP
|
||||
static void
|
||||
@ -218,6 +249,58 @@ print_termcap(const char *termcap)
|
||||
}
|
||||
#endif /* USE_TERMCAP */
|
||||
|
||||
static int
|
||||
checkdigits(char *str)
|
||||
{
|
||||
while (*str) {
|
||||
if (!isdigit(CharOf(*str)))
|
||||
return (0);
|
||||
str++;
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
readstring(FILE *fp, char *buf, const char *str)
|
||||
{
|
||||
int last, c;
|
||||
#if !defined(USG)
|
||||
/* What is the advantage of setitimer() over alarm()? */
|
||||
struct itimerval it;
|
||||
#endif
|
||||
|
||||
signal(SIGALRM, resize_timeout);
|
||||
#if defined(USG)
|
||||
alarm(TIMEOUT);
|
||||
#else
|
||||
memset((char *) &it, 0, sizeof(struct itimerval));
|
||||
it.it_value.tv_sec = TIMEOUT;
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL);
|
||||
#endif
|
||||
if ((c = getc(fp)) == 0233) { /* meta-escape, CSI */
|
||||
c = ESCAPE("")[0];
|
||||
*buf++ = (char) c;
|
||||
*buf++ = '[';
|
||||
} else {
|
||||
*buf++ = (char) c;
|
||||
}
|
||||
if (c != *str) {
|
||||
fprintf(stderr, "%s: unknown character, exiting.\r\n", myname);
|
||||
onintr(0);
|
||||
}
|
||||
last = str[strlen(str) - 1];
|
||||
while ((*buf++ = (char) getc(fp)) != last) {
|
||||
;
|
||||
}
|
||||
#if defined(USG)
|
||||
alarm(0);
|
||||
#else
|
||||
memset((char *) &it, 0, sizeof(struct itimerval));
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL);
|
||||
#endif
|
||||
*buf = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
resets termcap string to reflect current screen size
|
||||
*/
|
||||
@ -231,6 +314,7 @@ main(int argc, char **argv ENVP_ARG)
|
||||
int emu = VT100;
|
||||
char *shell;
|
||||
int i;
|
||||
int rc;
|
||||
int rows, cols;
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
struct termio tio;
|
||||
@ -269,6 +353,9 @@ main(int argc, char **argv ENVP_ARG)
|
||||
case 'c': /* C shell */
|
||||
shell_type = SHELL_C;
|
||||
break;
|
||||
case 'v':
|
||||
printf("%s\n", xtermVersion());
|
||||
exit(EXIT_SUCCESS);
|
||||
default:
|
||||
Usage(); /* Never returns */
|
||||
}
|
||||
@ -295,9 +382,11 @@ main(int argc, char **argv ENVP_ARG)
|
||||
shell = x_basename(ptr);
|
||||
|
||||
/* now that we know, what kind is it? */
|
||||
for (i = 0; shell_list[i].name; i++)
|
||||
if (!strcmp(shell_list[i].name, shell))
|
||||
for (i = 0; shell_list[i].name; i++) {
|
||||
if (!strcmp(shell_list[i].name, shell)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
shell_type = shell_list[i].type;
|
||||
}
|
||||
|
||||
@ -306,13 +395,14 @@ main(int argc, char **argv ENVP_ARG)
|
||||
fprintf(stderr,
|
||||
"%s: Can't set window size under %s emulation\n",
|
||||
myname, emuname[emu]);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (!checkdigits(argv[0]) || !checkdigits(argv[1]))
|
||||
if (!checkdigits(argv[0]) || !checkdigits(argv[1])) {
|
||||
Usage(); /* Never returns */
|
||||
} else if (argc != 0)
|
||||
}
|
||||
} else if (argc != 0) {
|
||||
Usage(); /* Never returns */
|
||||
|
||||
}
|
||||
#ifdef CANT_OPEN_DEV_TTY
|
||||
if ((name_of_tty = ttyname(fileno(stderr))) == NULL)
|
||||
#endif
|
||||
@ -321,32 +411,35 @@ main(int argc, char **argv ENVP_ARG)
|
||||
if ((ttyfp = fopen(name_of_tty, "r+")) == NULL) {
|
||||
fprintf(stderr, "%s: can't open terminal %s\n",
|
||||
myname, name_of_tty);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
tty = fileno(ttyfp);
|
||||
#ifdef USE_TERMCAP
|
||||
if ((env = x_getenv("TERM")) == 0) {
|
||||
env = DFT_TERMTYPE;
|
||||
if (SHELL_BOURNE == shell_type)
|
||||
if (SHELL_BOURNE == shell_type) {
|
||||
setname = "TERM=" DFT_TERMTYPE ";\nexport TERM;\n";
|
||||
else
|
||||
} else {
|
||||
setname = "setenv TERM " DFT_TERMTYPE ";\n";
|
||||
}
|
||||
}
|
||||
termcap[0] = 0; /* ...just in case we've accidentally gotten terminfo */
|
||||
if (tgetent(termcap, env) <= 0 || termcap[0] == 0)
|
||||
if (tgetent(termcap, env) <= 0 || termcap[0] == 0) {
|
||||
ok_tcap = 0;
|
||||
}
|
||||
#endif /* USE_TERMCAP */
|
||||
#ifdef USE_TERMINFO
|
||||
if (x_getenv("TERM") == 0) {
|
||||
if (SHELL_BOURNE == shell_type)
|
||||
if (SHELL_BOURNE == shell_type) {
|
||||
setname = "TERM=" DFT_TERMTYPE ";\nexport TERM;\n";
|
||||
else
|
||||
} else {
|
||||
setname = "setenv TERM " DFT_TERMTYPE ";\n";
|
||||
}
|
||||
}
|
||||
#endif /* USE_TERMINFO */
|
||||
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
ioctl(tty, TCGETA, &tioorig);
|
||||
rc = ioctl(tty, TCGETA, &tioorig);
|
||||
tio = tioorig;
|
||||
UIntClr(tio.c_iflag, (ICRNL | IUCLC));
|
||||
UIntClr(tio.c_lflag, (ICANON | ECHO));
|
||||
@ -354,7 +447,7 @@ main(int argc, char **argv ENVP_ARG)
|
||||
tio.c_cc[VMIN] = 6;
|
||||
tio.c_cc[VTIME] = 1;
|
||||
#elif defined(USE_TERMIOS)
|
||||
tcgetattr(tty, &tioorig);
|
||||
rc = tcgetattr(tty, &tioorig);
|
||||
tio = tioorig;
|
||||
UIntClr(tio.c_iflag, ICRNL);
|
||||
UIntClr(tio.c_lflag, (ICANON | ECHO));
|
||||
@ -362,23 +455,29 @@ main(int argc, char **argv ENVP_ARG)
|
||||
tio.c_cc[VMIN] = 6;
|
||||
tio.c_cc[VTIME] = 1;
|
||||
#else /* not USE_TERMIOS */
|
||||
ioctl(tty, TIOCGETP, &sgorig);
|
||||
rc = ioctl(tty, TIOCGETP, &sgorig);
|
||||
sg = sgorig;
|
||||
sg.sg_flags |= RAW;
|
||||
UIntClr(sg.sg_flags, ECHO);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
if (rc != 0)
|
||||
failed("get tty settings");
|
||||
|
||||
signal(SIGINT, onintr);
|
||||
signal(SIGQUIT, onintr);
|
||||
signal(SIGTERM, onintr);
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
ioctl(tty, TCSETAW, &tio);
|
||||
#elif defined(USE_TERMIOS)
|
||||
tcsetattr(tty, TCSADRAIN, &tio);
|
||||
#else /* not USE_TERMIOS */
|
||||
ioctl(tty, TIOCSETP, &sg);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
|
||||
if (argc == 2) {
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
rc = ioctl(tty, TCSETAW, &tio);
|
||||
#elif defined(USE_TERMIOS)
|
||||
rc = tcsetattr(tty, TCSADRAIN, &tio);
|
||||
#else /* not USE_TERMIOS */
|
||||
rc = ioctl(tty, TIOCSETP, &sg);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
if (rc != 0)
|
||||
failed("set tty settings");
|
||||
|
||||
if (argc == 2) { /* look for optional parameters of "-s" */
|
||||
char *tmpbuf = TypeMallocN(char,
|
||||
strlen(setsize[emu]) +
|
||||
strlen(argv[0]) +
|
||||
@ -401,14 +500,7 @@ main(int argc, char **argv ENVP_ARG)
|
||||
}
|
||||
if (restore[emu])
|
||||
IGNORE_RC(write(tty, restore[emu], strlen(restore[emu])));
|
||||
#if defined(USE_STRUCT_TTYSIZE)
|
||||
/* finally, set the tty's window size */
|
||||
if (ioctl(tty, TIOCGSIZE, &ts) != -1) {
|
||||
TTYSIZE_ROWS(ts) = rows;
|
||||
TTYSIZE_COLS(ts) = cols;
|
||||
SET_TTYSIZE(tty, ts);
|
||||
}
|
||||
#elif defined(USE_STRUCT_WINSIZE)
|
||||
#if defined(USE_STRUCT_WINSIZE)
|
||||
/* finally, set the tty's window size */
|
||||
if (getwsize[emu]) {
|
||||
/* get the window size in pixels */
|
||||
@ -434,15 +526,18 @@ main(int argc, char **argv ENVP_ARG)
|
||||
TTYSIZE_COLS(ts) = (ttySize_t) cols;
|
||||
SET_TTYSIZE(tty, ts);
|
||||
}
|
||||
#endif /* USE_STRUCT_{TTYSIZE|WINSIZE} */
|
||||
#endif /* USE_STRUCT_WINSIZE */
|
||||
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
ioctl(tty, TCSETAW, &tioorig);
|
||||
rc = ioctl(tty, TCSETAW, &tioorig);
|
||||
#elif defined(USE_TERMIOS)
|
||||
tcsetattr(tty, TCSADRAIN, &tioorig);
|
||||
rc = tcsetattr(tty, TCSADRAIN, &tioorig);
|
||||
#else /* not USE_TERMIOS */
|
||||
ioctl(tty, TIOCSETP, &sgorig);
|
||||
rc = ioctl(tty, TIOCSETP, &sgorig);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
if (rc != 0)
|
||||
failed("set tty settings");
|
||||
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGQUIT, SIG_DFL);
|
||||
signal(SIGTERM, SIG_DFL);
|
||||
@ -453,7 +548,7 @@ main(int argc, char **argv ENVP_ARG)
|
||||
/* first do columns */
|
||||
if ((ptr = x_strindex(termcap, "co#")) == NULL) {
|
||||
fprintf(stderr, "%s: No `co#'\n", myname);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
i = ptr - termcap + 3;
|
||||
@ -465,7 +560,7 @@ main(int argc, char **argv ENVP_ARG)
|
||||
/* now do lines */
|
||||
if ((ptr = x_strindex(newtc, "li#")) == NULL) {
|
||||
fprintf(stderr, "%s: No `li#'\n", myname);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
i = ptr - newtc + 3;
|
||||
@ -504,87 +599,5 @@ main(int argc, char **argv ENVP_ARG)
|
||||
setname, cols, rows);
|
||||
#endif /* USE_TERMINFO */
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static int
|
||||
checkdigits(char *str)
|
||||
{
|
||||
while (*str) {
|
||||
if (!isdigit(CharOf(*str)))
|
||||
return (0);
|
||||
str++;
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
readstring(FILE *fp, char *buf, const char *str)
|
||||
{
|
||||
int last, c;
|
||||
#if !defined(USG) && !defined(__UNIXOS2__)
|
||||
/* What is the advantage of setitimer() over alarm()? */
|
||||
struct itimerval it;
|
||||
#endif
|
||||
|
||||
signal(SIGALRM, resize_timeout);
|
||||
#if defined(USG) || defined(__UNIXOS2__)
|
||||
alarm(TIMEOUT);
|
||||
#else
|
||||
memset((char *) &it, 0, sizeof(struct itimerval));
|
||||
it.it_value.tv_sec = TIMEOUT;
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL);
|
||||
#endif
|
||||
if ((c = getc(fp)) == 0233) { /* meta-escape, CSI */
|
||||
c = ESCAPE("")[0];
|
||||
*buf++ = (char) c;
|
||||
*buf++ = '[';
|
||||
} else {
|
||||
*buf++ = (char) c;
|
||||
}
|
||||
if (c != *str) {
|
||||
fprintf(stderr, "%s: unknown character, exiting.\r\n", myname);
|
||||
onintr(0);
|
||||
}
|
||||
last = str[strlen(str) - 1];
|
||||
while ((*buf++ = (char) getc(fp)) != last) {
|
||||
;
|
||||
}
|
||||
#if defined(USG) || defined(__UNIXOS2__)
|
||||
alarm(0);
|
||||
#else
|
||||
memset((char *) &it, 0, sizeof(struct itimerval));
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL);
|
||||
#endif
|
||||
*buf = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
Usage(void)
|
||||
{
|
||||
fprintf(stderr, strcmp(myname, sunname) == 0 ?
|
||||
"Usage: %s [rows cols]\n" :
|
||||
"Usage: %s [-u] [-c] [-s [rows cols]]\n", myname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static SIGNAL_T
|
||||
resize_timeout(int sig)
|
||||
{
|
||||
fprintf(stderr, "\n%s: Time out occurred\r\n", myname);
|
||||
onintr(sig);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static SIGNAL_T
|
||||
onintr(int sig GCC_UNUSED)
|
||||
{
|
||||
#ifdef USE_ANY_SYSV_TERMIO
|
||||
ioctl(tty, TCSETAW, &tioorig);
|
||||
#elif defined(USE_TERMIOS)
|
||||
tcsetattr(tty, TCSADRAIN, &tioorig);
|
||||
#else /* not USE_TERMIOS */
|
||||
ioctl(tty, TIOCSETP, &sgorig);
|
||||
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
|
||||
exit(1);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
@ -1,7 +1,42 @@
|
||||
.\" $XTermId: resize.man,v 1.21 2012/10/23 23:26:20 tom Exp $
|
||||
.\" $XTermId: resize.man,v 1.30 2013/01/06 16:13:44 tom Exp $
|
||||
.\"
|
||||
.\" Copyright 1998-2012,2013 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.
|
||||
.\"
|
||||
.\" updated by Thomas E. Dickey for XFree86, 1998-2006.
|
||||
.\"
|
||||
.ds N Resize
|
||||
.ds n resize
|
||||
.\"
|
||||
.\" Bulleted paragraph
|
||||
.de bP
|
||||
.IP \(bu 4
|
||||
..
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds AQ \(aq
|
||||
.el .ds AQ '
|
||||
@ -13,14 +48,57 @@
|
||||
.SH NAME
|
||||
resize \- set environment and terminal settings to current xterm window size
|
||||
.SH SYNOPSIS
|
||||
.B resize
|
||||
[ \fB\-u\fP | \fB\-c\fP ] [ \fB\-s\fP [ \fIrow col\fP ] ]
|
||||
.B \*n
|
||||
[ \fB\-v\fP | \fB\-u\fP | \fB\-c\fP ] [ \fB\-s\fP [ \fIrow col\fP ] ]
|
||||
.SH DESCRIPTION
|
||||
.I Resize
|
||||
.I \*N
|
||||
prints a shell command for setting the appropriate environment variables
|
||||
to indicate the current size of \fIxterm\fP window from which the command
|
||||
is run.
|
||||
For this output to take effect, \fIresize\fP must either be evaluated
|
||||
.PP
|
||||
.I \*N
|
||||
determines the command through several steps:
|
||||
.bP
|
||||
first, it finds the name of the user's shell program.
|
||||
It uses the \fBSHELL\fP variable if set,
|
||||
otherwise it uses the user's data from /etc/passwd.
|
||||
.bP
|
||||
then it decides whether to use Bourne shell syntax or C-Shell syntax.
|
||||
It uses a built-in table of known shells,
|
||||
which can be overridden by the \fB\-u\fP and \fB\-c\fP options.
|
||||
.bP
|
||||
then \fI\*n\fP asks the operating system for the terminal settings.
|
||||
This is the same information which can be manipulated using \fIstty\fP.
|
||||
.bP
|
||||
then \fI\*n\fP asks the terminal for its size in characters.
|
||||
Depending on whether the "\fB\-s\fP option is given,
|
||||
\fI\*n\fP uses a different escape sequence to ask for this information.
|
||||
.bP
|
||||
at this point, \fI\*n\fP attempts to update the terminal settings
|
||||
to reflect the terminal window's size in pixels:
|
||||
.RS
|
||||
.bP
|
||||
if the \fB\-s\fP option is used,
|
||||
\fI\*n\fP then asks the terminal for its size in pixels.
|
||||
.bP
|
||||
otherwise,
|
||||
\fI\*n\fP asks the operating system for the information
|
||||
and updates that after ensuring that the window's dimensions are
|
||||
a multiple of the character height and width.
|
||||
.bP
|
||||
in either case, the updated terminal settings are done
|
||||
using a different system call than used for \fIstty\fP.
|
||||
.RE
|
||||
.bP
|
||||
then \fI\*n\fP updates the terminal settings to reflect any altered
|
||||
values such as its size in rows or columns.
|
||||
This affects the values shown by \fIstty\fP.
|
||||
.bP
|
||||
finally, \fI\*n\fP writes the shell command for setting the
|
||||
environment variables to the standard output.
|
||||
.SH EXAMPLES
|
||||
For \*n's output to take effect,
|
||||
\fI\*n\fP must either be evaluated
|
||||
as part of the command line (usually done with a shell alias or function) or
|
||||
else redirected to a file which can then be read in.
|
||||
From the C shell (usually
|
||||
@ -28,7 +106,7 @@ known as \fI/bin/csh\fP), the following alias could be defined in the
|
||||
user's \fI.cshrc\fP:
|
||||
.sp
|
||||
.nf
|
||||
% alias rs \*(AQset noglob; eval \fC\`\fPresize\fC\`\fP\*(AQ
|
||||
% alias rs \*(AQset noglob; eval \fC\`\fP\*n\fC\`\fP\*(AQ
|
||||
.fi
|
||||
.sp
|
||||
After resizing the window, the user would type:
|
||||
@ -43,41 +121,45 @@ functions will need to send the output to a temporary file and then read it back
|
||||
in with the \*(``.\*('' command:
|
||||
.sp
|
||||
.nf
|
||||
$ resize > /tmp/out
|
||||
$ \*n > /tmp/out
|
||||
$ .\0/tmp/out
|
||||
.fi
|
||||
.PP
|
||||
.I Resize
|
||||
determines the user's current shell by first checking if \fB$SHELL\fP
|
||||
is set, and using that.
|
||||
Otherwise it determines the user's shell by looking in the password file.
|
||||
Generally Bourne-shell variants (including \fIksh\fP)
|
||||
do not modify \fB$SHELL\fP,
|
||||
so it is possible for \fIresize\fP to be confused if one runs
|
||||
\fIresize\fP from a Bourne shell spawned from a C shell.
|
||||
.SH OPTIONS
|
||||
The following options may be used with \fIresize\fP:
|
||||
.TP 8
|
||||
.B \-u
|
||||
This option indicates that Bourne shell commands should be generated even if
|
||||
the user's current shell isn't \fI/bin/sh\fP.
|
||||
The following options may be used with \fI\*n\fP:
|
||||
.TP 8
|
||||
.B \-c
|
||||
This option indicates that C shell commands should be generated even if the
|
||||
user's current shell isn't \fI/bin/csh\fP.
|
||||
user's current shell is not \fI/bin/csh\fP.
|
||||
.TP 8
|
||||
.B \-s \fR[\fIrows columns\fP]
|
||||
This option indicates that Sun console escape sequences will be used
|
||||
instead of the VT100-style \fIxterm\fP escape codes.
|
||||
If \fIrows\fP and
|
||||
\fIcolumns\fP are given, \fIresize\fP will ask the \fIxterm\fP to resize
|
||||
itself.
|
||||
However, the window manager may choose to disallow the change.
|
||||
\fIcolumns\fP are given,
|
||||
\fI\*n\fP will ask the \fIxterm\fP to resize itself using those values.
|
||||
.IP
|
||||
Both of the escape sequences used for this option
|
||||
(first to obtain the window size and
|
||||
second to modify it)
|
||||
are subject to \fIxterm\fP's \fBallowWindowOps\fP resource setting.
|
||||
The window manager may also choose to disallow the change.
|
||||
.IP
|
||||
The VT100-style escape sequence used to determine the
|
||||
screen size always works for VT100-compatible terminals.
|
||||
VT100s have no corresponding way to modify the screensize.
|
||||
.TP 8
|
||||
.B \-u
|
||||
This option indicates that Bourne shell commands should be generated even if
|
||||
the user's current shell is not \fI/bin/sh\fP.
|
||||
.TP 8
|
||||
.B \-v
|
||||
This causes \fI\*n\fP to print a version number to the standard output,
|
||||
and then exit.
|
||||
.PP
|
||||
Note that the Sun console escape sequences are recognized
|
||||
by XFree86 \fIxterm\fP and
|
||||
by \fIdtterm\fP.
|
||||
The \fIresize\fP program may be installed as \fIsunsize\fP,
|
||||
The \fI\*n\fP program may be installed as \fIsunsize\fP,
|
||||
which causes makes it assume the \fB\-s\fP option.
|
||||
.PP
|
||||
The \fIrows\fP and
|
||||
@ -92,19 +174,44 @@ for the base termcap entry to modify.
|
||||
user's alias for the command.
|
||||
.SH ENVIRONMENT
|
||||
.TP 15
|
||||
SHELL
|
||||
.I \*N
|
||||
determines the user's current shell by first checking if \fB$SHELL\fP
|
||||
is set, and using that.
|
||||
Otherwise it determines the user's shell by looking in the password file
|
||||
(/etc/passwd).
|
||||
Generally Bourne-shell variants (including \fIksh\fP)
|
||||
do not modify \fB$SHELL\fP,
|
||||
so it is possible for \fI\*n\fP to be confused if one runs
|
||||
\fI\*n\fP from a Bourne shell spawned from a C shell.
|
||||
.TP 15
|
||||
TERM
|
||||
set to "__default_termname__" if not already set.
|
||||
.I \*N
|
||||
sets this to "__default_termname__" if not already set.
|
||||
.TP 15
|
||||
TERMCAP
|
||||
variable set on systems using termcap
|
||||
.I \*N
|
||||
sets this variable on systems using termcap,
|
||||
e.g., when \*n is linked with the \fItermcap\fP library
|
||||
rather than a \fIterminfo\fP library.
|
||||
The latter does not provide the complete text for a termcap entry.
|
||||
.TP 15
|
||||
COLUMNS, LINES
|
||||
variables set on systems using terminfo
|
||||
.I \*N
|
||||
sets these variables on systems using terminfo.
|
||||
Many applications (including the curses library)
|
||||
use those variables when set to override their screensize.
|
||||
.SH "SEE ALSO"
|
||||
csh(1), tset(1), xterm(__mansuffix__)
|
||||
use_env(3)
|
||||
.br
|
||||
csh(1), stty(1), tset(1)
|
||||
.br
|
||||
xterm(__mansuffix__)
|
||||
.SH AUTHORS
|
||||
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
|
||||
.br
|
||||
Thomas Dickey (invisible-island.net).
|
||||
.br
|
||||
Copyright (c) 1984, 1985 by X Consortium
|
||||
.br
|
||||
See
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2011/06/23 22:48:59 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2013/03/09 14:45:39 matthieu Exp $
|
||||
|
||||
PROG= resize
|
||||
MAN= resize.1
|
||||
@ -13,7 +13,7 @@ CPPFLAGS+= -I${.CURDIR}/.. -I${X11BASE}/include \
|
||||
X11BASE?= /usr/X11R6
|
||||
MANDIR= ${X11BASE}/man/man
|
||||
|
||||
SRCS= resize.c xstrings.c
|
||||
SRCS= resize.c version.c xstrings.c
|
||||
|
||||
resize.1: resize.man
|
||||
sed -e 's#__vendorversion__#"X Window System"#g' \
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: screen.c,v 1.469 2012/10/25 23:12:20 tom Exp $ */
|
||||
/* $XTermId: screen.c,v 1.475 2013/02/13 00:42:30 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -72,6 +72,10 @@
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef _Xconst
|
||||
#define _Xconst const /* Solaris 7 workaround */
|
||||
#endif /* _Xconst */
|
||||
|
||||
#define inSaveBuf(screen, buf, inx) \
|
||||
((buf) == (screen)->saveBuf_index && \
|
||||
((inx) < (screen)->savelines || (screen)->savelines == 0))
|
||||
@ -323,8 +327,9 @@ allocScrnData(TScreen * screen, unsigned nrow, unsigned ncol)
|
||||
size_t length;
|
||||
|
||||
AlignValue(ncol);
|
||||
length = (nrow * sizeofScrnRow(screen, ncol));
|
||||
if ((result = (Char *) calloc(length, sizeof(Char))) == 0)
|
||||
length = ((nrow + 1) * sizeofScrnRow(screen, ncol));
|
||||
if (length == 0
|
||||
|| (result = (Char *) calloc(length, sizeof(Char))) == 0)
|
||||
SysError(ERROR_SCALLOC2);
|
||||
|
||||
TRACE(("allocScrnData %ux%u -> %lu -> %p..%p\n",
|
||||
@ -442,10 +447,6 @@ Reallocate(XtermWidget xw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (screen->widestLine < ncol)
|
||||
screen->widestLine = (Dimension) ncol;
|
||||
ncol = screen->widestLine;
|
||||
|
||||
oldBufData = *sbufaddr;
|
||||
|
||||
TRACE(("Reallocate %dx%d -> %dx%d\n", oldrow, MaxCols(screen), nrow, ncol));
|
||||
@ -545,10 +546,6 @@ ReallocateBufOffsets(XtermWidget xw,
|
||||
assert(nrow != 0);
|
||||
assert(ncol != 0);
|
||||
|
||||
if (screen->widestLine < ncol)
|
||||
screen->widestLine = (Dimension) ncol;
|
||||
ncol = screen->widestLine;
|
||||
|
||||
oldBufData = *sbufaddr;
|
||||
oldBufHead = *sbuf;
|
||||
|
||||
@ -1865,7 +1862,9 @@ ScreenResize(XtermWidget xw,
|
||||
|
||||
/* update buffers if the screen has changed size */
|
||||
if (MaxRows(screen) != rows || MaxCols(screen) != cols) {
|
||||
#if !OPT_SAVE_LINES
|
||||
int whichBuf = 0;
|
||||
#endif
|
||||
int delta_rows = rows - MaxRows(screen);
|
||||
#if OPT_TRACE
|
||||
int delta_cols = cols - MaxCols(screen);
|
||||
@ -2124,8 +2123,10 @@ ScreenResize(XtermWidget xw,
|
||||
screen->cursorp.row += move_down_by;
|
||||
ScrollSelection(screen, move_down_by, True);
|
||||
|
||||
#if !OPT_SAVE_LINES
|
||||
if (whichBuf)
|
||||
SwitchBufPtrs(screen, whichBuf); /* put the pointers back */
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -2881,7 +2882,7 @@ FullScreen(XtermWidget xw, int new_ewmh_mode)
|
||||
|
||||
TRACE(("FullScreen %d:%s\n", new_ewmh_mode, BtoS(new_ewmh_mode)));
|
||||
|
||||
if (new_ewmh_mode < 0 || new_ewmh_mode > MAX_EWMH_MODE) {
|
||||
if (new_ewmh_mode < 0 || new_ewmh_mode >= MAX_EWMH_MODE) {
|
||||
TRACE(("BUG: FullScreen %d\n", new_ewmh_mode));
|
||||
return;
|
||||
} else if (new_ewmh_mode == 0) {
|
||||
|
@ -707,7 +707,9 @@ AlternateScroll(Widget w, long amount)
|
||||
|
||||
amount /= FontHeight(screen);
|
||||
memset(&reply, 0, sizeof(reply));
|
||||
reply.a_type = ANSI_CSI;
|
||||
reply.a_type = ((xw->keyboard.flags & MODE_DECCKM)
|
||||
? ANSI_SS3
|
||||
: ANSI_CSI);
|
||||
if (amount > 0) {
|
||||
reply.a_final = 'B';
|
||||
} else {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: trace.c,v 1.142 2012/11/22 20:19:54 tom Exp $ */
|
||||
/* $XTermId: trace.c,v 1.145 2013/02/06 09:51:17 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1997-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -35,6 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <xterm.h> /* for definition of GCC_UNUSED */
|
||||
#include <version.h>
|
||||
|
||||
#if OPT_TRACE
|
||||
|
||||
@ -749,6 +750,29 @@ no_error(Display * dpy GCC_UNUSED, XErrorEvent * event GCC_UNUSED)
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *
|
||||
ModifierName(unsigned modifier)
|
||||
{
|
||||
const char *s = "";
|
||||
if (modifier & ShiftMask)
|
||||
s = " Shift";
|
||||
else if (modifier & LockMask)
|
||||
s = " Lock";
|
||||
else if (modifier & ControlMask)
|
||||
s = " Control";
|
||||
else if (modifier & Mod1Mask)
|
||||
s = " Mod1";
|
||||
else if (modifier & Mod2Mask)
|
||||
s = " Mod2";
|
||||
else if (modifier & Mod3Mask)
|
||||
s = " Mod3";
|
||||
else if (modifier & Mod4Mask)
|
||||
s = " Mod4";
|
||||
else if (modifier & Mod5Mask)
|
||||
s = " Mod5";
|
||||
return s;
|
||||
}
|
||||
|
||||
void
|
||||
TraceTranslations(const char *name, Widget w)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: trace.h,v 1.67 2012/11/22 20:22:15 tom Exp $ */
|
||||
/* $XTermId: trace.h,v 1.68 2013/02/06 09:52:14 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
@ -116,6 +116,18 @@ extern XtGeometryResult TraceResizeRequest(const char * /* fn */, int /* ln */,
|
||||
(reqwide), (reqhigh), \
|
||||
(gotwide), (gothigh))
|
||||
|
||||
extern const char * ModifierName(unsigned /* modifier */);
|
||||
#define FMT_MODIFIER_NAMES "%s%s%s%s%s%s%s%s"
|
||||
#define ARG_MODIFIER_NAMES(state) \
|
||||
ModifierName(state & ShiftMask), \
|
||||
ModifierName(state & LockMask), \
|
||||
ModifierName(state & ControlMask), \
|
||||
ModifierName(state & Mod1Mask), \
|
||||
ModifierName(state & Mod2Mask), \
|
||||
ModifierName(state & Mod3Mask), \
|
||||
ModifierName(state & Mod4Mask), \
|
||||
ModifierName(state & Mod5Mask)
|
||||
|
||||
#else
|
||||
|
||||
#define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: util.c,v 1.598 2012/10/05 00:26:28 tom Exp $ */
|
||||
/* $XTermId: util.c,v 1.600 2013/02/04 00:46:58 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -3541,24 +3541,17 @@ drawXtermText(XtermWidget xw,
|
||||
(unsigned) (last - first), on_wide);
|
||||
}
|
||||
#if OPT_WIDE_CHARS
|
||||
if (ucs_workaround(xw, ch, flags, gc,
|
||||
x, y,
|
||||
chrset, on_wide)) {
|
||||
/*
|
||||
* if true, we drew at least one cell whether or not it is
|
||||
* printable
|
||||
*/
|
||||
if (ch_width <= 0)
|
||||
ch_width = 1;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (ch_width <= 0)
|
||||
ch_width = 1;
|
||||
xtermDrawBoxChar(xw, ch, flags, gc,
|
||||
x, y,
|
||||
ch_width);
|
||||
/*
|
||||
* One way or another, we will draw at least one cell.
|
||||
*/
|
||||
if (ch_width <= 0)
|
||||
ch_width = 1;
|
||||
if (!ucs_workaround(xw, ch, flags, gc, x, y, chrset, on_wide)) {
|
||||
xtermDrawBoxChar(xw, ch, flags, gc, x, y, ch_width);
|
||||
}
|
||||
#else
|
||||
xtermDrawBoxChar(xw, ch, flags, gc, x, y, ch_width);
|
||||
#endif
|
||||
x += (ch_width * FontWidth(screen));
|
||||
first = last + 1;
|
||||
drewBoxes = True;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $XTermId: uxterm.man,v 1.5 2012/10/23 23:25:53 tom Exp $
|
||||
.\" $XTermId: uxterm.man,v 1.6 2013/01/01 00:40:55 tom Exp $
|
||||
.\"
|
||||
.\" Copyright 2001, 2004 Branden Robinson
|
||||
.\"
|
||||
@ -19,22 +19,33 @@
|
||||
.\" 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.
|
||||
.\"
|
||||
.ds N Uxterm
|
||||
.ds n uxterm
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds AQ \(aq
|
||||
.el .ds AQ '
|
||||
.ie \n(.g .ds `` \(lq
|
||||
.el .ds `` ``
|
||||
.ie \n(.g .ds '' \(rq
|
||||
.el .ds '' ''
|
||||
.\"
|
||||
.TH UXTERM 1 "__app_date__" "__app_version__" "X Window System"
|
||||
.SH NAME
|
||||
uxterm \- X terminal emulator for Unicode (UTF-8) environments
|
||||
.SH SYNOPSIS
|
||||
.B uxterm
|
||||
.B \*n
|
||||
[
|
||||
.I xterm-options
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.B uxterm
|
||||
.B \*n
|
||||
is a wrapper around the
|
||||
.BR xterm(1)
|
||||
program that invokes the latter program with the \(oqU__default_class__\(cq X resource
|
||||
program that invokes the latter program with the \*(``U__default_class__\*('' X resource
|
||||
class set.
|
||||
All arguments to
|
||||
.B uxterm
|
||||
.B \*n
|
||||
are passed to
|
||||
.B xterm
|
||||
without processing; the
|
||||
@ -47,29 +58,29 @@ See the
|
||||
manual page for more information on
|
||||
.IR xterm-options .
|
||||
.PP
|
||||
The environment's locale settings (see \(lqENVIRONMENT\(rq below) are
|
||||
The environment's locale settings (see \*(``ENVIRONMENT\*('' below) are
|
||||
used to discern the locale's character set.
|
||||
If no current locale can be determined, the locale \(oqen_US\(cq (the
|
||||
If no current locale can be determined, the locale \*(``en_US\*('' (the
|
||||
English language as used in the territory of the United States) is assumed.
|
||||
The
|
||||
.BR locale(1)
|
||||
utility is used to determine whether the system supports the selected
|
||||
locale.
|
||||
If it does not,
|
||||
.B uxterm
|
||||
.B \*n
|
||||
will exit with an error and report the output of
|
||||
.BR locale .
|
||||
.PP
|
||||
.B Note: uxterm
|
||||
.B Note: \*n
|
||||
may produce unexpected results if the current locale is set to one in which
|
||||
the UTF-8 character encoding is not supported, or if fonts using the ISO
|
||||
10646-1 character set are not available.
|
||||
In the Debian system, the \(oqxfonts\-base\(cq package provides the fonts
|
||||
In the Debian system, the \*(``xfonts\-base\*('' package provides the fonts
|
||||
that
|
||||
.B uxterm
|
||||
.B \*n
|
||||
uses by default.
|
||||
To change the fonts
|
||||
.B uxterm
|
||||
.B \*n
|
||||
uses, edit the
|
||||
.I __apploaddir__/U__default_class__
|
||||
file.
|
||||
|
@ -1,12 +1,10 @@
|
||||
/* $XTermId: version.c,v 1.1 2013/01/01 12:10:44 tom Exp $ */
|
||||
|
||||
/*
|
||||
* $XTermId: proto.h,v 1.10 2003/10/27 01:07:57 tom Exp $
|
||||
* ----------------------------------------------------------------------------
|
||||
* this file is part of xterm
|
||||
* Copyright 2013 by Thomas E. Dickey
|
||||
*
|
||||
* Copyright 1996-2008,2003 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
|
||||
@ -14,10 +12,10 @@
|
||||
* 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.
|
||||
@ -25,38 +23,52 @@
|
||||
* 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.
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef included_proto_h
|
||||
#define included_proto_h
|
||||
#include <ctype.h>
|
||||
#include <xterm.h>
|
||||
#include <version.h>
|
||||
|
||||
#define PROTO_XT_ACTIONS_ARGS \
|
||||
(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
/*
|
||||
* Returns the version-string used in the "-v' message as well as a few other
|
||||
* places. It is derived (when possible) from the __vendorversion__ symbol
|
||||
* that some newer imake configurations define.
|
||||
*/
|
||||
char *
|
||||
xtermVersion(void)
|
||||
{
|
||||
static char vendor_version[] = __vendorversion__;
|
||||
static char *result;
|
||||
|
||||
#define PROTO_XT_CALLBACK_ARGS \
|
||||
(Widget gw, XtPointer closure, XtPointer data)
|
||||
if (result == 0) {
|
||||
char *vendor = vendor_version;
|
||||
char first[BUFSIZ];
|
||||
char second[BUFSIZ];
|
||||
|
||||
#define PROTO_XT_CVT_SELECT_ARGS \
|
||||
(Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format)
|
||||
|
||||
#define PROTO_XT_EV_HANDLER_ARGS \
|
||||
(Widget w, XtPointer closure, XEvent *event, Boolean *cont)
|
||||
|
||||
#define PROTO_XT_SEL_CB_ARGS \
|
||||
(Widget w, XtPointer client_data, Atom *selection, Atom *type, XtPointer value, unsigned long *length, int *format)
|
||||
|
||||
#ifdef SIGNALRETURNSINT
|
||||
#define SIGNAL_T int
|
||||
#define SIGNAL_RETURN return 0
|
||||
#else
|
||||
#define SIGNAL_T void
|
||||
#define SIGNAL_RETURN return
|
||||
#endif
|
||||
|
||||
#endif/*included_proto_h*/
|
||||
result = CastMallocN(char, strlen(vendor) + 9);
|
||||
if (result == 0)
|
||||
result = vendor;
|
||||
else {
|
||||
/* some vendors leave trash in this string */
|
||||
for (;;) {
|
||||
if (!strncmp(vendor, "Version ", (size_t) 8))
|
||||
vendor += 8;
|
||||
else if (isspace(CharOf(*vendor)))
|
||||
++vendor;
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (strlen(vendor) < BUFSIZ &&
|
||||
sscanf(vendor, "%[0-9.] %[A-Za-z_0-9.]", first, second) == 2)
|
||||
sprintf(result, "%s %s(%d)", second, first, XTERM_PATCH);
|
||||
else
|
||||
sprintf(result, "%s(%d)", vendor, XTERM_PATCH);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: version.h,v 1.352 2012/11/26 01:07:33 tom Exp $ */
|
||||
/* $XTermId: version.h,v 1.360 2013/02/26 23:48:28 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1998-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -30,15 +30,21 @@
|
||||
* authorization.
|
||||
*/
|
||||
|
||||
#ifndef included_version_h
|
||||
#define included_version_h
|
||||
/*
|
||||
* These definitions are used to build the string that's printed in response to
|
||||
* "xterm -version", or embedded in "xterm -help". It usually indicates the
|
||||
* version of X to which this version of xterm has been built. The number in
|
||||
* parentheses is my patch number (Thomas E. Dickey).
|
||||
* 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 287
|
||||
#define XTERM_DATE 2012-11-25
|
||||
#define XTERM_PATCH 291
|
||||
#define XTERM_DATE 2013-02-26
|
||||
|
||||
#ifndef __vendorversion__
|
||||
#define __vendorversion__ "XTerm/OpenBSD"
|
||||
#endif
|
||||
|
||||
extern char *xtermVersion(void);
|
||||
|
||||
#endif /* included_version_h */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: wcwidth.c,v 1.22 2009/02/13 19:53:12 tom Exp $ */
|
||||
/* $XTermId: wcwidth.c,v 1.24 2013/02/03 18:54:31 tom Exp $ */
|
||||
|
||||
/* $XFree86: xc/programs/xterm/wcwidth.c,v 1.9 2006/06/19 00:36:52 dickey Exp $ */
|
||||
|
||||
@ -132,54 +132,83 @@ int mk_wcwidth(wchar_t ucs)
|
||||
* uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c
|
||||
*/
|
||||
static const struct interval combining[] = {
|
||||
{ 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },
|
||||
{ 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
|
||||
{ 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },
|
||||
{ 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 },
|
||||
{ 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
|
||||
{ 0x0300, 0x036F }, { 0x0483, 0x0489 }, { 0x0591, 0x05BD },
|
||||
{ 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, { 0x05C4, 0x05C5 },
|
||||
{ 0x05C7, 0x05C7 }, { 0x0600, 0x0604 }, { 0x0610, 0x061A },
|
||||
{ 0x064B, 0x065F }, { 0x0670, 0x0670 }, { 0x06D6, 0x06DD },
|
||||
{ 0x06DF, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
|
||||
{ 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
|
||||
{ 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 },
|
||||
{ 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },
|
||||
{ 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },
|
||||
{ 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },
|
||||
{ 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
|
||||
{ 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
|
||||
{ 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },
|
||||
{ 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0816, 0x0819 },
|
||||
{ 0x081B, 0x0823 }, { 0x0825, 0x0827 }, { 0x0829, 0x082D },
|
||||
{ 0x0859, 0x085B }, { 0x08E4, 0x08FE }, { 0x0900, 0x0902 },
|
||||
{ 0x093A, 0x093A }, { 0x093C, 0x093C }, { 0x0941, 0x0948 },
|
||||
{ 0x094D, 0x094D }, { 0x0951, 0x0957 }, { 0x0962, 0x0963 },
|
||||
{ 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 },
|
||||
{ 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 },
|
||||
{ 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 },
|
||||
{ 0x0A4B, 0x0A4D }, { 0x0A51, 0x0A51 }, { 0x0A70, 0x0A71 },
|
||||
{ 0x0A75, 0x0A75 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },
|
||||
{ 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },
|
||||
{ 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
|
||||
{ 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },
|
||||
{ 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },
|
||||
{ 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
|
||||
{ 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC },
|
||||
{ 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
|
||||
{ 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },
|
||||
{ 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B44 }, { 0x0B4D, 0x0B4D },
|
||||
{ 0x0B56, 0x0B56 }, { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 },
|
||||
{ 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 },
|
||||
{ 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 },
|
||||
{ 0x0C62, 0x0C63 }, { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF },
|
||||
{ 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, { 0x0CE2, 0x0CE3 },
|
||||
{ 0x0D41, 0x0D44 }, { 0x0D4D, 0x0D4D }, { 0x0D62, 0x0D63 },
|
||||
{ 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
|
||||
{ 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
|
||||
{ 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
|
||||
{ 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
|
||||
{ 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
|
||||
{ 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },
|
||||
{ 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F8D, 0x0F97 },
|
||||
{ 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
|
||||
{ 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },
|
||||
{ 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F },
|
||||
{ 0x1032, 0x1037 }, { 0x1039, 0x103A }, { 0x103D, 0x103E },
|
||||
{ 0x1058, 0x1059 }, { 0x105E, 0x1060 }, { 0x1071, 0x1074 },
|
||||
{ 0x1082, 0x1082 }, { 0x1085, 0x1086 }, { 0x108D, 0x108D },
|
||||
{ 0x109D, 0x109D }, { 0x1160, 0x11FF }, { 0x135D, 0x135F },
|
||||
{ 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },
|
||||
{ 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD },
|
||||
{ 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },
|
||||
{ 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
|
||||
{ 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },
|
||||
{ 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
|
||||
{ 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
|
||||
{ 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },
|
||||
{ 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },
|
||||
{ 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },
|
||||
{ 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
|
||||
{ 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
|
||||
{ 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
|
||||
{ 0x1A17, 0x1A18 }, { 0x1A56, 0x1A56 }, { 0x1A58, 0x1A5E },
|
||||
{ 0x1A60, 0x1A60 }, { 0x1A62, 0x1A62 }, { 0x1A65, 0x1A6C },
|
||||
{ 0x1A73, 0x1A7C }, { 0x1A7F, 0x1A7F }, { 0x1B00, 0x1B03 },
|
||||
{ 0x1B34, 0x1B34 }, { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C },
|
||||
{ 0x1B42, 0x1B42 }, { 0x1B6B, 0x1B73 }, { 0x1B80, 0x1B81 },
|
||||
{ 0x1BA2, 0x1BA5 }, { 0x1BA8, 0x1BA9 }, { 0x1BAB, 0x1BAB },
|
||||
{ 0x1BE6, 0x1BE6 }, { 0x1BE8, 0x1BE9 }, { 0x1BED, 0x1BED },
|
||||
{ 0x1BEF, 0x1BF1 }, { 0x1C2C, 0x1C33 }, { 0x1C36, 0x1C37 },
|
||||
{ 0x1CD0, 0x1CD2 }, { 0x1CD4, 0x1CE0 }, { 0x1CE2, 0x1CE8 },
|
||||
{ 0x1CED, 0x1CED }, { 0x1CF4, 0x1CF4 }, { 0x1DC0, 0x1DE6 },
|
||||
{ 0x1DFC, 0x1DFF }, { 0x200B, 0x200F }, { 0x202A, 0x202E },
|
||||
{ 0x2060, 0x2064 }, { 0x206A, 0x206F }, { 0x20D0, 0x20F0 },
|
||||
{ 0x2CEF, 0x2CF1 }, { 0x2D7F, 0x2D7F }, { 0x2DE0, 0x2DFF },
|
||||
{ 0x302A, 0x302D }, { 0x3099, 0x309A }, { 0xA66F, 0xA672 },
|
||||
{ 0xA674, 0xA67D }, { 0xA69F, 0xA69F }, { 0xA6F0, 0xA6F1 },
|
||||
{ 0xA802, 0xA802 }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
|
||||
{ 0xA825, 0xA826 }, { 0xA8C4, 0xA8C4 }, { 0xA8E0, 0xA8F1 },
|
||||
{ 0xA926, 0xA92D }, { 0xA947, 0xA951 }, { 0xA980, 0xA982 },
|
||||
{ 0xA9B3, 0xA9B3 }, { 0xA9B6, 0xA9B9 }, { 0xA9BC, 0xA9BC },
|
||||
{ 0xAA29, 0xAA2E }, { 0xAA31, 0xAA32 }, { 0xAA35, 0xAA36 },
|
||||
{ 0xAA43, 0xAA43 }, { 0xAA4C, 0xAA4C }, { 0xAAB0, 0xAAB0 },
|
||||
{ 0xAAB2, 0xAAB4 }, { 0xAAB7, 0xAAB8 }, { 0xAABE, 0xAABF },
|
||||
{ 0xAAC1, 0xAAC1 }, { 0xAAEC, 0xAAED }, { 0xAAF6, 0xAAF6 },
|
||||
{ 0xABE5, 0xABE5 }, { 0xABE8, 0xABE8 }, { 0xABED, 0xABED },
|
||||
{ 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE26 },
|
||||
{ 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, { 0x101FD, 0x101FD },
|
||||
{ 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
|
||||
{ 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },
|
||||
{ 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
|
||||
{ 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
|
||||
{ 0xE0100, 0xE01EF }
|
||||
{ 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x11001, 0x11001 },
|
||||
{ 0x11038, 0x11046 }, { 0x11080, 0x11081 }, { 0x110B3, 0x110B6 },
|
||||
{ 0x110B9, 0x110BA }, { 0x110BD, 0x110BD }, { 0x11100, 0x11102 },
|
||||
{ 0x11127, 0x1112B }, { 0x1112D, 0x11134 }, { 0x11180, 0x11181 },
|
||||
{ 0x111B6, 0x111BE }, { 0x116AB, 0x116AB }, { 0x116AD, 0x116AD },
|
||||
{ 0x116B0, 0x116B5 }, { 0x116B7, 0x116B7 }, { 0x16F8F, 0x16F92 },
|
||||
{ 0x1D167, 0x1D169 }, { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B },
|
||||
{ 0x1D1AA, 0x1D1AD }, { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 },
|
||||
{ 0xE0020, 0xE007F }, { 0xE0100, 0xE01EF }
|
||||
};
|
||||
|
||||
/* test for 8-bit control characters */
|
||||
@ -283,29 +312,34 @@ int mk_wcwidth_cjk(wchar_t ucs)
|
||||
{ 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },
|
||||
{ 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },
|
||||
{ 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },
|
||||
{ 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },
|
||||
{ 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },
|
||||
{ 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },
|
||||
{ 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },
|
||||
{ 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },
|
||||
{ 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },
|
||||
{ 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },
|
||||
{ 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },
|
||||
{ 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
|
||||
{ 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
|
||||
{ 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
|
||||
{ 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
|
||||
{ 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
|
||||
{ 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },
|
||||
{ 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },
|
||||
{ 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },
|
||||
{ 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },
|
||||
{ 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },
|
||||
{ 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },
|
||||
{ 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },
|
||||
{ 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },
|
||||
{ 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },
|
||||
{ 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
|
||||
{ 0x2189, 0x2189 }, { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 },
|
||||
{ 0x21D2, 0x21D2 }, { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 },
|
||||
{ 0x2200, 0x2200 }, { 0x2202, 0x2203 }, { 0x2207, 0x2208 },
|
||||
{ 0x220B, 0x220B }, { 0x220F, 0x220F }, { 0x2211, 0x2211 },
|
||||
{ 0x2215, 0x2215 }, { 0x221A, 0x221A }, { 0x221D, 0x2220 },
|
||||
{ 0x2223, 0x2223 }, { 0x2225, 0x2225 }, { 0x2227, 0x222C },
|
||||
{ 0x222E, 0x222E }, { 0x2234, 0x2237 }, { 0x223C, 0x223D },
|
||||
{ 0x2248, 0x2248 }, { 0x224C, 0x224C }, { 0x2252, 0x2252 },
|
||||
{ 0x2260, 0x2261 }, { 0x2264, 0x2267 }, { 0x226A, 0x226B },
|
||||
{ 0x226E, 0x226F }, { 0x2282, 0x2283 }, { 0x2286, 0x2287 },
|
||||
{ 0x2295, 0x2295 }, { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 },
|
||||
{ 0x22BF, 0x22BF }, { 0x2312, 0x2312 }, { 0x2460, 0x24E9 },
|
||||
{ 0x24EB, 0x254B }, { 0x2550, 0x2573 }, { 0x2580, 0x258F },
|
||||
{ 0x2592, 0x2595 }, { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 },
|
||||
{ 0x25B2, 0x25B3 }, { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD },
|
||||
{ 0x25C0, 0x25C1 }, { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB },
|
||||
{ 0x25CE, 0x25D1 }, { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF },
|
||||
{ 0x2605, 0x2606 }, { 0x2609, 0x2609 }, { 0x260E, 0x260F },
|
||||
{ 0x2614, 0x2615 }, { 0x261C, 0x261C }, { 0x261E, 0x261E },
|
||||
{ 0x2640, 0x2640 }, { 0x2642, 0x2642 }, { 0x2660, 0x2661 },
|
||||
{ 0x2663, 0x2665 }, { 0x2667, 0x266A }, { 0x266C, 0x266D },
|
||||
{ 0x266F, 0x266F }, { 0x269E, 0x269F }, { 0x26BE, 0x26BF },
|
||||
{ 0x26C4, 0x26CD }, { 0x26CF, 0x26E1 }, { 0x26E3, 0x26E3 },
|
||||
{ 0x26E8, 0x26FF }, { 0x273D, 0x273D }, { 0x2757, 0x2757 },
|
||||
{ 0x2776, 0x277F }, { 0x2B55, 0x2B59 }, { 0x3248, 0x324F },
|
||||
{ 0xE000, 0xF8FF }, { 0xFFFD, 0xFFFD }, { 0x1F100, 0x1F10A },
|
||||
{ 0x1F110, 0x1F12D }, { 0x1F130, 0x1F169 }, { 0x1F170, 0x1F19A },
|
||||
{ 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
|
||||
};
|
||||
|
||||
/* binary search in table of non-spacing characters */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: xstrings.c,v 1.50 2012/03/30 10:54:12 tom Exp $ */
|
||||
/* $XTermId: xstrings.c,v 1.57 2013/02/03 22:11:25 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 2000-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -64,10 +64,6 @@ x_basename(char *name)
|
||||
char *cp;
|
||||
|
||||
cp = strrchr(name, '/');
|
||||
#ifdef __UNIXOS2__
|
||||
if (cp == 0)
|
||||
cp = strrchr(name, '\\');
|
||||
#endif
|
||||
return (cp ? cp + 1 : name);
|
||||
}
|
||||
|
||||
@ -168,6 +164,7 @@ login_alias(char *login_name, uid_t uid, struct passwd *in_out)
|
||||
/* use the other passwd-data including shell */
|
||||
alloc_pw(in_out, &pw2);
|
||||
} else {
|
||||
free(login_name);
|
||||
login_name = NULL;
|
||||
}
|
||||
}
|
||||
@ -188,6 +185,7 @@ x_getlogin(uid_t uid, struct passwd *in_out)
|
||||
|
||||
login_name = login_alias(x_getenv("LOGNAME"), uid, in_out);
|
||||
if (IsEmpty(login_name)) {
|
||||
free(login_name);
|
||||
login_name = login_alias(x_getenv("USER"), uid, in_out);
|
||||
}
|
||||
#ifdef HAVE_GETLOGIN
|
||||
@ -199,14 +197,15 @@ x_getlogin(uid_t uid, struct passwd *in_out)
|
||||
*/
|
||||
if (IsEmpty(login_name)) {
|
||||
TRACE2(("...try getlogin\n"));
|
||||
login_name = login_alias(getlogin(), uid, in_out);
|
||||
free(login_name);
|
||||
login_name = login_alias(x_strdup(getlogin()), uid, in_out);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IsEmpty(login_name))
|
||||
login_name = in_out->pw_name;
|
||||
if (!IsEmpty(login_name))
|
||||
login_name = x_strdup(login_name);
|
||||
if (IsEmpty(login_name)) {
|
||||
free(login_name);
|
||||
login_name = x_strdup(in_out->pw_name);
|
||||
}
|
||||
|
||||
TRACE2(("x_getloginid ->%s\n", NonNull(login_name)));
|
||||
return login_name;
|
||||
@ -303,6 +302,14 @@ x_skip_nonblanks(String s)
|
||||
return s;
|
||||
}
|
||||
|
||||
static const char *
|
||||
skip_blanks(const char *s)
|
||||
{
|
||||
while (isspace(CharOf(*s)))
|
||||
++s;
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
* Split a command-string into an argv[]-style array.
|
||||
*/
|
||||
@ -312,37 +319,42 @@ x_splitargs(const char *command)
|
||||
char **result = 0;
|
||||
|
||||
if (command != 0) {
|
||||
char *blob = x_strdup(command);
|
||||
const char *first = skip_blanks(command);
|
||||
char *blob = x_strdup(first);
|
||||
size_t count;
|
||||
size_t n;
|
||||
int state;
|
||||
int pass;
|
||||
|
||||
for (pass = 0; pass < 2; ++pass) {
|
||||
for (n = count = 0, state = 0; command[n] != '\0'; ++n) {
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (!isspace(CharOf(command[n]))) {
|
||||
state = 1;
|
||||
if (pass)
|
||||
result[count] = blob + n;
|
||||
++count;
|
||||
} else {
|
||||
blob[n] = '\0';
|
||||
if (blob != 0) {
|
||||
for (pass = 0; pass < 2; ++pass) {
|
||||
for (n = count = 0, state = 0; first[n] != '\0'; ++n) {
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (!isspace(CharOf(first[n]))) {
|
||||
state = 1;
|
||||
if (pass)
|
||||
result[count] = blob + n;
|
||||
++count;
|
||||
} else {
|
||||
blob[n] = '\0';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (isspace(CharOf(first[n]))) {
|
||||
blob[n] = '\0';
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!pass) {
|
||||
result = TypeCallocN(char *, count + 1);
|
||||
if (!result) {
|
||||
free(blob);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (isspace(CharOf(command[n]))) {
|
||||
blob[n] = '\0';
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!pass) {
|
||||
result = TypeCallocN(char *, count + 1);
|
||||
if (!result)
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -351,6 +363,19 @@ x_splitargs(const char *command)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free storage allocated by x_splitargs().
|
||||
*/
|
||||
void
|
||||
x_freeargs(char **argv)
|
||||
{
|
||||
if (argv != 0) {
|
||||
if (*argv != 0)
|
||||
free(*argv);
|
||||
free(argv);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
x_strcasecmp(const char *s1, const char *s2)
|
||||
{
|
||||
@ -426,17 +451,19 @@ x_strtrim(const char *source)
|
||||
|
||||
if (source != 0 && *source != '\0') {
|
||||
char *t = x_strdup(source);
|
||||
s = t;
|
||||
d = s;
|
||||
while (isspace(CharOf(*s)))
|
||||
++s;
|
||||
while ((*d++ = *s++) != '\0') {
|
||||
;
|
||||
}
|
||||
if (*t != '\0') {
|
||||
s = t + strlen(t);
|
||||
while (s != t && isspace(CharOf(s[-1]))) {
|
||||
*--s = '\0';
|
||||
if (t != 0) {
|
||||
s = t;
|
||||
d = s;
|
||||
while (isspace(CharOf(*s)))
|
||||
++s;
|
||||
while ((*d++ = *s++) != '\0') {
|
||||
;
|
||||
}
|
||||
if (*t != '\0') {
|
||||
s = t + strlen(t);
|
||||
while (s != t && isspace(CharOf(s[-1]))) {
|
||||
*--s = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
result = t;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $XTermId: xstrings.h,v 1.27 2012/03/25 23:31:52 tom Exp $ */
|
||||
/* $XTermId: xstrings.h,v 1.28 2012/11/26 21:55:10 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000-2011,2012 by Thomas E. Dickey
|
||||
@ -59,6 +59,7 @@ extern int x_strcasecmp(const char * /* s1 */, const char * /* s2 */);
|
||||
extern int x_strncasecmp(const char * /* s1 */, const char * /* s2 */, unsigned /* n */);
|
||||
extern unsigned x_countargv(char ** /* argv */);
|
||||
extern void x_appendargv(char ** /* target */, char ** /* source */);
|
||||
extern void x_freeargs(char ** /* argv */);
|
||||
|
||||
/* *INDENT-ON* */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: xterm.h,v 1.710 2012/10/25 23:18:58 tom Exp $ */
|
||||
/* $XTermId: xterm.h,v 1.716 2013/02/03 23:21:00 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1999-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -123,7 +123,7 @@
|
||||
#define HAVE_TCGETATTR 1
|
||||
#endif
|
||||
|
||||
#if defined(__UNIXOS2__) || defined(__SCO__) || defined(__UNIXWARE__)
|
||||
#if defined(__SCO__) || defined(__UNIXWARE__)
|
||||
#define USE_TERMCAP 1
|
||||
#endif
|
||||
|
||||
@ -286,7 +286,21 @@ extern int errno;
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
#include <proto.h>
|
||||
#define PROTO_XT_ACTIONS_ARGS \
|
||||
(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
|
||||
#define PROTO_XT_CALLBACK_ARGS \
|
||||
(Widget gw, XtPointer closure, XtPointer data)
|
||||
|
||||
#define PROTO_XT_CVT_SELECT_ARGS \
|
||||
(Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format)
|
||||
|
||||
#define PROTO_XT_EV_HANDLER_ARGS \
|
||||
(Widget w, XtPointer closure, XEvent *event, Boolean *cont)
|
||||
|
||||
#define PROTO_XT_SEL_CB_ARGS \
|
||||
(Widget w, XtPointer client_data, Atom *selection, Atom *type, XtPointer value, unsigned long *length, int *format)
|
||||
|
||||
#include <ptyx.h>
|
||||
|
||||
#if (XtSpecificationRelease >= 6) && !defined(NO_XPOLL_H) && !defined(sun)
|
||||
@ -327,10 +341,6 @@ extern int errno;
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#if defined(__UNIXOS2__) && !defined(XTERM_MAIN)
|
||||
#define environ gblenvp /* circumvent a bug */
|
||||
#endif
|
||||
|
||||
#if !defined(VMS) && !(defined(linux) && defined(__USE_GNU)) && !defined(__hpux) && !defined(_ALL_SOURCE) && !defined(__osf__)
|
||||
extern char **environ;
|
||||
#endif
|
||||
@ -936,11 +946,7 @@ extern void saveCellData(TScreen * /* screen */, CellData * /* data */, Cardinal
|
||||
extern void restoreCellData(TScreen * /* screen */, CellData * /* data */, Cardinal /* cell */, LineData * /* ld */, int /* column */);
|
||||
|
||||
/* main.c */
|
||||
#ifndef __UNIXOS2__
|
||||
#define ENVP_ARG /**/
|
||||
#else
|
||||
#define ENVP_ARG , char ** /* envp */
|
||||
#endif
|
||||
|
||||
extern int main (int /* argc */, char ** /* argv */ ENVP_ARG);
|
||||
extern int GetBytesAvailable (int /* fd */);
|
||||
@ -953,9 +959,7 @@ extern void first_map_occurred (void);
|
||||
#define first_map_occurred() /* nothing */
|
||||
#endif
|
||||
|
||||
#ifdef SIGNAL_T
|
||||
extern SIGNAL_T Exit (int /* n */) GCC_NORETURN;
|
||||
#endif
|
||||
extern void Exit (int /* n */) GCC_NORETURN;
|
||||
|
||||
#ifndef SIG_ATOMIC_T
|
||||
#define SIG_ATOMIC_T int
|
||||
@ -989,7 +993,6 @@ extern XtermWidget getXtermWidget (Widget /* w */);
|
||||
extern char *udk_lookup (int /* keycode */, int * /* len */);
|
||||
extern char *xtermEnvEncoding (void);
|
||||
extern char *xtermFindShell (char * /* leaf */, Bool /* warning */);
|
||||
extern char *xtermVersion (void);
|
||||
extern const char *SysErrorMsg (int /* n */);
|
||||
extern const char *SysReasonMsg (int /* n */);
|
||||
extern int ResetAnsiColorRequest (XtermWidget, char *, int);
|
||||
@ -1006,7 +1009,7 @@ extern void ChangeGroup(XtermWidget /* xw */, const char * /* attribute */, char
|
||||
extern void ChangeIconName (XtermWidget /* xw */, char * /* name */);
|
||||
extern void ChangeTitle (XtermWidget /* xw */, char * /* name */);
|
||||
extern void ChangeXprop (char * /* name */);
|
||||
extern void Cleanup (int /* code */);
|
||||
extern void Cleanup (int /* code */) GCC_NORETURN;
|
||||
extern void HandleBellPropertyChange PROTO_XT_EV_HANDLER_ARGS;
|
||||
extern void HandleEightBitKeyPressed PROTO_XT_ACTIONS_ARGS;
|
||||
extern void HandleEnterWindow PROTO_XT_EV_HANDLER_ARGS;
|
||||
@ -1016,6 +1019,7 @@ extern void HandleKeyPressed PROTO_XT_ACTIONS_ARGS;
|
||||
extern void HandleLeaveWindow PROTO_XT_EV_HANDLER_ARGS;
|
||||
extern void HandleSpawnTerminal PROTO_XT_ACTIONS_ARGS;
|
||||
extern void HandleStringEvent PROTO_XT_ACTIONS_ARGS;
|
||||
extern void NormalExit (void);
|
||||
extern void Panic (const char * /* s */, int /* a */);
|
||||
extern void Redraw (void);
|
||||
extern void ReverseOldColors (void);
|
||||
|
@ -3,7 +3,7 @@
|
||||
*****************************************************************************
|
||||
* this file is part of xterm *
|
||||
* *
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey *
|
||||
* Copyright 1997-2012,2013 by Thomas E. Dickey *
|
||||
* *
|
||||
* All Rights Reserved *
|
||||
* *
|
||||
@ -31,7 +31,7 @@
|
||||
* sale, use or other dealings in this Software without prior written *
|
||||
* authorization. *
|
||||
*****************************************************************************
|
||||
$XTermId: xterm.log.html,v 1.1282 2012/11/26 00:52:40 tom Exp $
|
||||
$XTermId: xterm.log.html,v 1.1319 2013/02/27 00:19:22 tom Exp $
|
||||
-->
|
||||
|
||||
<html>
|
||||
@ -52,7 +52,7 @@
|
||||
<a href=
|
||||
"http://invisible-island.net/">http://invisible-island.net/</a><a href="http://invisible-island.net/xterm/">xterm/</a><br>
|
||||
|
||||
Copyright © 1997-2011,2012 by <a href=
|
||||
Copyright © 1997-2012,2013 by <a href=
|
||||
"mailto:dickey@invisible-island.net">Thomas E. Dickey</a>
|
||||
<hr>
|
||||
|
||||
@ -70,6 +70,14 @@
|
||||
the latest version of this file.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#xterm_291">Patch #291 - 2013/02/26</a></li>
|
||||
|
||||
<li><a href="#xterm_290">Patch #290 - 2013/02/12</a></li>
|
||||
|
||||
<li><a href="#xterm_289">Patch #289 - 2013/02/08</a></li>
|
||||
|
||||
<li><a href="#xterm_288">Patch #288 - 2013/01/09</a></li>
|
||||
|
||||
<li><a href="#xterm_287">Patch #287 - 2012/11/25</a></li>
|
||||
|
||||
<li><a href="#xterm_286">Patch #286 - 2012/10/29</a></li>
|
||||
@ -857,6 +865,164 @@
|
||||
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_291" id="xterm_291">Patch #291 -
|
||||
2013/02/26</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>add validity check for xterm widget parameter to
|
||||
<code>AlternateScroll</code> function, needed to handle wheel
|
||||
mouse events in the scrollbar area since <a href=
|
||||
"#xterm_282">patch #282</a> changes which introduced
|
||||
<code>alternateScroll</code> feature (Redhat #874327).</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_290" id="xterm_290">Patch #290 -
|
||||
2013/02/12</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>revert of <a href="#xterm_282">patch #282</a> change was
|
||||
incomplete (report by Jim Reisert).</li>
|
||||
|
||||
<li>fix typo in manpage (report by Vincent Lefevre).</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_289" id="xterm_289">Patch #289 -
|
||||
2013/02/08</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>revert the <a href="#xterm_282">patch #282</a> change which
|
||||
restored "lost" text after shrinking/growing the screen size.
|
||||
If the screen was updated between the two resizing operations,
|
||||
unexpected text might be shown at the end (report/testcase by
|
||||
Joe Peterson).</li>
|
||||
|
||||
<li>reverse the arrow-keys sent for
|
||||
<code>alternateScroll</code> to match the usage in browsers
|
||||
(suggested by Dieter Roelants).</li>
|
||||
|
||||
<li>modify mouse reports to consistently indicate motion events
|
||||
whether or not a button is pressed. Old behavior (since
|
||||
<a href="#xterm_127">patch #127</a> modified encoding for wheel
|
||||
mouse) showed only that the button was released if no button
|
||||
had been pressed (report by Andy Koppe).</li>
|
||||
|
||||
<li>correct and improve behavior for SGR 1006 mouse protocol on
|
||||
button release in any-event mode. Initial implementation in
|
||||
<a href="#xterm_277">patch #277</a> left internal state showing
|
||||
the last button pressed when reporting motion events. It now
|
||||
keeps track of all buttons which have been pressed and
|
||||
released, showing the lowest remaining button by number in the
|
||||
response (reports by Hayaki Saito, Andy Koppe).</li>
|
||||
|
||||
<li>fix inconsistency between <code>TermColors</code> and
|
||||
<code>OscTextColors</code> enums which interchanged values for
|
||||
tektronix cursor color and highlight foreground in control
|
||||
sequences in <a href="#xterm_225">patch #225</a> (report/patch
|
||||
by Peder Stray).</li>
|
||||
|
||||
<li>fix inconsistent use of noreturn-attribute in
|
||||
<code>Exit</code> function which interfered with analysis by
|
||||
clang.</li>
|
||||
|
||||
<li>remove incorrect <code>free</code> used in computation of
|
||||
<code>XTERM_SHELL</code> variable, from Coverity fixes in
|
||||
<a href="#xterm_288">patch #288</a> (FreeBSD #175782).</li>
|
||||
|
||||
<li>add <code>--with-valgrind</code> option to configure script
|
||||
for consistency with my other programs.</li>
|
||||
|
||||
<li>update table of ambiguous width characters in wcwidth.c
|
||||
based on Unicode 6.2.0</li>
|
||||
|
||||
<li>update table of combining characters in wcwidth.c based on
|
||||
Unicode 6.2.0</li>
|
||||
|
||||
<li>update precompose.c based on Unicode 6.2.0</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_288" id="xterm_288">Patch #288 -
|
||||
2013/01/09</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>fix a special case in <code>ShowCursor</code> where the
|
||||
foreground and background colors of the current position are
|
||||
the same. In that case, choose the further of the window's
|
||||
foreground and background colors for the cursor color.</li>
|
||||
|
||||
<li>modify <code>alternateScroll</code> feature added in
|
||||
<a href="#xterm_282">patch #282</a> to use either
|
||||
<code>CSI</code> or <code>SS3</code> according to the cursor
|
||||
keys application mode setting, to simplify using it in vi, etc.
|
||||
(suggested by Dietar Roelants).</li>
|
||||
|
||||
<li>revise manpage for <code>resize</code> to clarify the
|
||||
changes which <code>resize</code> may make to the terminal
|
||||
settings as well as to the terminal itself.</li>
|
||||
|
||||
<li>remove code such as <code>struct ttysize</code>, used for
|
||||
SunOS 3 and 4.</li>
|
||||
|
||||
<li>modify configure script and makefile to check for
|
||||
<code>groff</code> and suppress groff-specific rules if groff
|
||||
is not found.</li>
|
||||
|
||||
<li>modify ctlseqs.ms and makefile to work around bugs in
|
||||
<code>grohtml</code> which cause ".png" files to be truncated
|
||||
when producing html documentation.</li>
|
||||
|
||||
<li>modify suffix rules for "make docs" to make the names of
|
||||
the generated ".png" files predictable, helping to work around
|
||||
longstanding problems with this feature of groff—none of
|
||||
its releases work for <em>all</em> of xterm's tables..</li>
|
||||
|
||||
<li>correct typo in ctlseqs.ms for DECIC and DECDC; the
|
||||
character preceding the final "<code>~</code>" is an ASCII
|
||||
single-quote "<code>'</code>" rather than a space (report by
|
||||
Paul LeoNerd Evans).</li>
|
||||
|
||||
<li>update CF_GCC_VERSION macro, handling both Debian and
|
||||
Darwin.</li>
|
||||
|
||||
<li>improve configure script checks for the
|
||||
<code>--with-desktop-category</code> option. After <a href=
|
||||
"#xterm_280">patch #280</a> changes, if no value was given for
|
||||
this option, and no existing desktop files found for
|
||||
comparison, the incorrect "auto" value was passed into the
|
||||
generated desktop file (report by Julien Cristau).</li>
|
||||
|
||||
<li>modify sample build-scripts to disable check for
|
||||
<code>imake</code> due to code-rot in Xorg.</li>
|
||||
|
||||
<li>add <code>-v</code> command-line option to
|
||||
<code>resize</code>, reporting the same version string as
|
||||
<code>xterm</code> and the two shell-wrappers.</li>
|
||||
|
||||
<li>make name-transformation apply to other occurrences of
|
||||
<code>resize</code>, other manpages.</li>
|
||||
|
||||
<li>special-case the name-transformation in xterm's manpage in
|
||||
the NAME section so that the result works with
|
||||
<code>makewhatis</code> (report by Julien Cristau).</li>
|
||||
|
||||
<li>modify install-rules for manpages to put each program's
|
||||
respective transformed name into the header rather than
|
||||
xterm's.</li>
|
||||
|
||||
<li>remove deprecated files: proto.h, os2main.c</li>
|
||||
|
||||
<li>minor fixes based on Coverity scan, including:
|
||||
|
||||
<ul>
|
||||
<li>correct caching of Atom value for the font menu's
|
||||
"Selection" entry.</li>
|
||||
|
||||
<li>ensure that utmp/utmpx calls do not depend upon
|
||||
trailing nulls in the <code>ut_id</code> and
|
||||
<code>ut_line</code> values.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="xterm_287" id="xterm_287">Patch #287 -
|
||||
2012/11/25</a></h1>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
'\" t
|
||||
.\" $XTermId: xterm.man,v 1.554 2012/11/22 18:42:30 tom Exp $
|
||||
.\" $XTermId: xterm.man,v 1.556 2013/02/13 00:47:18 tom Exp $
|
||||
.\"
|
||||
.\" Copyright 1996-2011,2012 by Thomas E. Dickey
|
||||
.\"
|
||||
@ -85,7 +85,7 @@
|
||||
.el .ds '' ''
|
||||
.TH XTERM 1 "__app_date__" "__app_version__" "X Window System"
|
||||
.SH NAME
|
||||
\*n \- terminal emulator for X
|
||||
xterm \- terminal emulator for X
|
||||
.SH SYNOPSIS
|
||||
.B \*n
|
||||
[\-\fItoolkitoption\fP ...] [\-\fIoption\fP ...] [\fIshell\fP]
|
||||
@ -3785,7 +3785,7 @@ Set window/icon labels using hexadecimal
|
||||
Query window/icon labels using hexadecimal
|
||||
.TP 5
|
||||
2
|
||||
Set window/icon labels using UTF-8 (overrides \fButf8Titles\fP resource).
|
||||
Set window/icon labels using UTF-8 (overrides \fButf8Title\fP resource).
|
||||
.TP 5
|
||||
3
|
||||
Query window/icon labels using UTF-8
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: xterm_io.h,v 1.54 2012/03/16 09:48:56 tom Exp $ */
|
||||
/* $XTermId: xterm_io.h,v 1.56 2013/01/06 15:20:45 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 2000-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -52,10 +52,6 @@
|
||||
#define USE_SYSV_TERMIO
|
||||
#endif
|
||||
|
||||
#ifdef __UNIXOS2__
|
||||
#define USE_SYSV_TERMIO
|
||||
#endif
|
||||
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__INTERIX) || defined(__APPLE__) || defined(__UNIXWARE__) || defined(__hpux)
|
||||
#ifndef USE_POSIX_TERMIOS
|
||||
#define USE_POSIX_TERMIOS
|
||||
@ -171,11 +167,6 @@
|
||||
#include <sys/ptem.h> /* get struct winsize */
|
||||
#endif
|
||||
#endif /* USE_USG_PTYS */
|
||||
#elif defined(sun) && !defined(SVR4)
|
||||
#include <sys/ttycom.h>
|
||||
#ifdef TIOCSWINSZ
|
||||
#undef TIOCSSIZE
|
||||
#endif
|
||||
#endif /* SYSV */
|
||||
|
||||
/*
|
||||
@ -186,56 +177,6 @@
|
||||
#define TIOCSPGRP (_IOW('t', 118, pid_t))
|
||||
#endif
|
||||
|
||||
#ifdef __UNIXOS2__
|
||||
|
||||
#define XFREE86_PTY 0x76
|
||||
|
||||
#define XTY_TIOCSETA 0x48
|
||||
#define XTY_TIOCSETAW 0x49
|
||||
#define XTY_TIOCSETAF 0x4a
|
||||
#define XTY_TIOCCONS 0x4d
|
||||
#define XTY_TIOCSWINSZ 0x53
|
||||
#define XTY_ENADUP 0x5a
|
||||
#define XTY_TRACE 0x5b
|
||||
#define XTY_TIOCGETA 0x65
|
||||
#define XTY_TIOCGWINSZ 0x66
|
||||
#define PTMS_GETPTY 0x64
|
||||
#define PTMS_BUFSZ 14
|
||||
|
||||
#ifndef NCCS
|
||||
#define NCCS 11
|
||||
#endif
|
||||
|
||||
#define TIOCCONS 108
|
||||
#define TIOCSWINSZ 113
|
||||
#define TIOCGWINSZ 117
|
||||
|
||||
struct pt_termios
|
||||
{
|
||||
unsigned short c_iflag;
|
||||
unsigned short c_oflag;
|
||||
unsigned short c_cflag;
|
||||
unsigned short c_lflag;
|
||||
unsigned char c_cc[NCCS];
|
||||
long _reserved_[4];
|
||||
};
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row; /* rows, in characters */
|
||||
unsigned short ws_col; /* columns, in characters */
|
||||
unsigned short ws_xpixel; /* horizontal size, pixels */
|
||||
unsigned short ws_ypixel; /* vertical size, pixels */
|
||||
};
|
||||
#define TTYSIZE_STRUCT struct winsize
|
||||
#define USE_STRUCT_WINSIZE 1
|
||||
|
||||
#ifdef XTERM_MAIN
|
||||
extern int ptioctl(int fd, int func, void* data);
|
||||
#define ioctl ptioctl
|
||||
#endif
|
||||
|
||||
#endif /* __UNIXOS2__ */
|
||||
|
||||
#ifdef __hpux
|
||||
#include <sys/bsdtty.h> /* defines TIOCSLTC */
|
||||
#endif
|
||||
@ -283,32 +224,19 @@ extern int ptioctl(int fd, int func, void* data);
|
||||
#endif
|
||||
|
||||
#if !defined(TTYSIZE_STRUCT)
|
||||
#if defined(TIOCSSIZE) && (defined(sun) && !defined(SVR4))
|
||||
#define USE_STRUCT_TTYSIZE 1
|
||||
#define TTYSIZE_STRUCT struct ttysize
|
||||
#elif defined(TIOCSWINSZ)
|
||||
#if defined(TIOCSWINSZ)
|
||||
#define USE_STRUCT_WINSIZE 1
|
||||
#define TTYSIZE_STRUCT struct winsize
|
||||
#endif /* sun vs TIOCSWINSZ */
|
||||
#endif /* TTYSIZE_STRUCT */
|
||||
|
||||
#if defined(USE_STRUCT_TTYSIZE)
|
||||
|
||||
#define TTYSIZE_STRUCT struct ttysize
|
||||
#define GET_TTYSIZE(fd, data) ioctl(fd, TIOCGSIZE, &data)
|
||||
#define SET_TTYSIZE(fd, data) ioctl(fd, TIOCSSIZE, &data)
|
||||
#define TTYSIZE_COLS(data) data.ts_cols
|
||||
#define TTYSIZE_ROWS(data) data.ts_lines
|
||||
|
||||
#elif defined(USE_STRUCT_WINSIZE)
|
||||
|
||||
#define TTYSIZE_STRUCT struct winsize
|
||||
#define GET_TTYSIZE(fd, data) ioctl(fd, TIOCGWINSZ, (char *) &data)
|
||||
#define SET_TTYSIZE(fd, data) ioctl(fd, TIOCSWINSZ, (char *) &data)
|
||||
#define TTYSIZE_COLS(data) data.ws_col
|
||||
#define TTYSIZE_ROWS(data) data.ws_row
|
||||
#endif /* TIOCSWINSZ */
|
||||
#endif /* TTYSIZE_STRUCT */
|
||||
|
||||
#endif /* (USE_STRUCT_TTYSIZE) */
|
||||
#ifndef USE_STRUCT_WINSIZE
|
||||
#error "There is a configuration error with struct winsize ifdef"
|
||||
#endif
|
||||
|
||||
#if OPT_TRACE
|
||||
#define TRACE_TTYSIZE(fd, id) { \
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* $XTermId: xtermcfg.hin,v 1.196 2012/10/05 00:27:29 tom Exp $ */
|
||||
/* $XTermId: xtermcfg.hin,v 1.197 2013/02/03 22:58:03 tom Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997-2011,2012 by Thomas E. Dickey
|
||||
* Copyright 1997-2012,2013 by Thomas E. Dickey
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
@ -201,6 +201,7 @@
|
||||
#ifndef __cplusplus
|
||||
#undef GCC_PRINTF
|
||||
#undef GCC_PRINTFLIKE
|
||||
#undef GCC_NORETURN
|
||||
#undef GCC_UNUSED
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user