Copyright 1997,1998,1999,2000,2001 by Thomas E. Dickey
Contents
This file contains a list of the changes that I have made for XFree86 xterm,
from the notes that I add when submitting a patch.
You should note that other changes have been made as well, by other people,
to fix bugs and correct ifdef's for portability. All of these are summarized
in the XFree86 CHANGELOG (found in the unbundled tree,
xc/programs/Xserver/hw/xfree86).
- modify logic in main.c (see patch #145) to avoid generating the
same identifier, for example, for /dev/tty1 and /dev/pts/1, which
is used to denote an entry in the utmp file (Debian bug report
#84676),
- add configure check for
<ncurses/term.h>
to get
rid of hardcoded __CYGWIN__
ifdef in resize.c
NOTE: The CYGWIN port should not be linking resize
with ncurses. It appears that the only reason it is, is because
both the ncurses and termcap ports on that platform are badly
misconfigured (essential pieces have been removed, etc). Checking
for <ncurses/term.h>
does not hurt anything,
since there are some correct installations that are set up that
way.
- add a sample
uxterm
script, which uses the
UXTerm
application defaults for UTF-8 environments.
- undo change to xterm application defaults, since this introduced an
unnecessary incompatibility. The intended functionality was
already addressed by the UXTerm
app-defaults file.
- resync with XFree86 CVS:
- Modified xterm app default to use LFD fontnames instead of old type
(Michael Schroeder).
- Fix xterm when XIM is disabled - caused a segfault
(Tomohiro Kubota).
- remove an ifdef for
USE_HANDSHAKE
added in patch
#158 from the second TIOCSSIZE
ioctl call in the
initialization code. Paul Gilmartin reports that for Solaris 2.6
(sparc), stty does not show that xterm sets rows and columns unless
the second ioctl is executed.
- correct treatment of empty parameter list for some OSC strings
(report by Sami Farin <sfarin@ratol.fi>).
- augment key translations for scrollbar widget to ensure that
keystrokes intended for the text area are not lost if the mouse
pointer happens to fall on the scrollbar. This can happen, for
instance, if the user's
app-defaults
or
.Xdefaults
file contains a translations resource,
though it may also happen through unrelated resource settings:
probably a bug in libXt (reported by Paul Fox
<pgf@foxharp.boston.ma.us> and Dmitry Yu. Bolkhovityanov
<D.Yu.Bolkhovityanov@inp.nsk.su>).
- widen ifdef's in xterm.h to define
__EXTENSIONS__
on
Solaris, for compilers other than gcc. This was added along
_POSIX_C_SOURCE
with in patch
#151, but is not sufficient since Sun's compiler does not define
__STDC__
by default (report by Matthias Scheler
<tron@zhadum.de>).
- modify xterm to obtain the closest matching color if an exact color
is not available, e.g., on 8-bit displays (patch by Steve Wall)
- patch by Tomohiro KUBOTA <tkubota@riken.go.jp> to implement
"OverTheSpot" preedit type of XIM input:
- This preedit type is a reasonable compromise between
simpleness of implementation and usefulness. "Root" preedit
type is easy to implement but not useful; "OnTheSpot" preedit
type is the best in the point of view of user interface but
very complex. And more, "OverTheSpot" is the preedit type
which the most XIM servers support. Thus, to achieve reasonable
usability, support of "OverTheSpot" preedit type is needed.
- In "OverTheSpot" preedit type, the preedit (preconversion)
string is displayed at the position of the cursor. On the
other hand, it is XIM server's responsibility to display
the preedit string. Thus, it is needed for XIM client (here
XTerm) to inform the XIM server of the cursor position.
And more, to achieve good visual proportion, preedit string
must be written using proper font. Thus, it is XIM client's
responsibility to inform the XIM server of the proper font.
The font must be supplied by "fontset". Fontset is a set of
fonts with charsets which are specified by the current locale.
Since XTerm uses ISO10646 fonts regardless of the current locale,
the fonts for XIM must be prepared separately. It is difficult
to prepare fonts which are similar to XTerm font. Thus, my
patch uses a simple way - the default font is "*" which matches
every fonts and X library will automatically choose fonts with
proper charsets. I added "-fx" command option and "ximFont"
resource to override this default font setting.
- changed the definition of "OverTheSpot" preedit type
from XIMPreeditPosition|XIMStatusArea
to XIMPreeditPosition|XIMStatusNothing.
This matches the behavior of other programs such as
Rxvt, Kterm, Gedit.
- A tiny XIM bugfix is also included. By calling XSetLocaleModifiers()
with parameter of "", it can consier XMODIFIERS environmental
variable which is a standard way for users to specify XIM server
to be used.
- adjust configure script to accommodate repackaging of keysym2ucs.c
as include-file for xutf8.c (patch by Tomohiro KUBOTA
<kubota@debian.org>).
- add the
UXTerm
app-defaults file to makefile install
rules (request by Juliusz Chroboczek).
- correct logic in
get_termcap()
, which returned false
if the tgetent()
call indicated that xterm was linked
with terminfo. Although the $TERMCAP
variable cannot be
adjusted in this case, xterm still needs information from this call
to extract data to initialize the erase-mode when the
ptyInitialErase
resource is false.
- modify
ScrollbarReverseVideo()
function to cache the
original border color, so it can restore that when an application
flashes the screen (Bugzilla #38872).
- resync with XFree86 CVS:
- remove ifdef's for X_NOT_STDC_ENV (David Dawes).
- add Cygwin to special errno handling case in ptydata.c (Alan Hourihane)
- set screen size earlier in initialization, to address a race
with window manager resizing its clients (Keith Packard).
- patch by Juliusz Chroboczek to clean up button.c and input.c. The
basic idea is to use a single set of APIs in the XTerm core, and put
a set of workarounds in a separate file. As you will notice, this
drastically simplifies parts of the code; in particular, the only
remaining ifdefs related to the differences between Xutf8 and legacy
systems are related to the selection provider logic.
This defines two new files, xutf8.h and xutf8.c, provide some
half-hearted but fully portable emulation for the three Xutf8*
functions that XTerm uses.
Putting these in a separate file will allow people to experiment with
more complex versions without making the core of XTerm more difficult
to maintain.
The functionality of the emulation is as follows.
- Xutf8TextListToTextProperty fully handles XStringstyle and
XUTF8StringStyle. It will only generate STRING for XStdICCTextStyle,
and wil only generate Latin-1 in XCompoundTextStyle (but label it as
COMPOUND_TEXT, as the spec requires). (I have hesitated to make this
function fail for XStdICCTextStyle and XCompoundTextStyle; this might
be a smart thing to do, in the hope that the selection requestor will
try UTF8_STRING afterwards; opinions?)
- Xutf8TextPropertyToTextList fully handles STRING and UTF8_STRING.
It systematically fails for COMPOUND_TEXT.
- Xutf8LookupString will properly handle single-keystroke input for
the keysyms covered by Markus' keysym2ucs function. It will not
handle either compose key input or external input methods.
- add an ifdef for
SunXK_F36
, used in
xtermcapKeycode()
(patch by Mark Waggoner
<waggoner@ichips.intel.com>).
- modify check for login name to try
getlogin()
and
$LOGNAME, $USER environment variables to detect if the user has
logged in under an alias, i.e., an account with the same user id
but a different name (Debian bug report #70084).
- add resource
tiXtraScroll
, which can be used to
preserve the screen contents in the scrollback rather than erasing
it when starting a fullscreen application such as vi
(patch by Ken Martin <fletcher@catsreach.org>).
- two patches by Denis Zaitsev <zzz@cd-club.ru>:
- added
forceBoxChars
resource to control the
"line-drawing characters" option.
- added
freeBoldBox
resource, which, when set true,
suppresses check in same_font_size()
, so xterm does
not attempt to ensure that the bold font is the same size as
the normal font.
- change the color class for ANSI colors and similar ones such as
bold-color, etc., to follow the convention that the classname is the
instance name with a leading capital (e.g.,
color0
and
Color0
rather than color0
and
Foreground
). There was little use for Foreground as a
class other than to create occasional confusion and bug reports, most
recently by Nelson Beebe who reports that it disables colors in xterm
but not on Linux, which is probably due to a difference in resource
evaluation order. A configure script option (--disable-color-class)
is provided for anyone who did use the older behavior.
- fix a signal-handling bug. When running xterm with
ksh
or similar shell such as bash 2.05, xterm will hang
and not respond to keystrokes after the user types
suspend
. Additionally the popup menus do not respond,
so it is not possible to send SIGCONT to the shell.
What is happening is that the shell is sending itself SIGSTOP, and it
is being stopped. Per specification it also means that the operating
system is sending SIGCHLD to parent to the bash (XTERM).
Now the issue is that xterm assumes it cannot happen and it expects
to receive SIGCHLD only upon termination of its children.
This causes a deadlock with xterm waiting for the child to
die, and the child waiting for SIGCONT.
(report/patch by Adam Sulmicki), analysis/testing by Sven Mascheck
<sven.mascheck@student.uni-ulm.de>).
- correct some inconsistent checks for
XtReleaseGC()
calls in xtermLoadFont()
(patch by Nam SungHyun
<namsh@lge.com>).
- updated wcwidth.c and keysym2ucs.c to versions dated 2001/1/12
and 2001/4/18, respectively from
http://www.cl.cam.ac.uk/~mgk25/ucs/
- correction to change from patch #90, which was intended to
reset the saved cursor position for normal/alternate screens
on a soft reset, but actually wiped out all of the saved cursor
information. Just reset the saved position for the current screen
(report by Michael Schroeder).
- modify ShowCursor() and HideCursor() so that if the cursor points
to the second part of a wide character, make the show/hide operate on
the first position of the wide character (patch by Sven Verdoolaege).
- scrolling in the alternate screen just before switching back to the
main screen can cause extra blank lines to be inserted into the
scrollback buffer (patch by Paul Vojta
<vojta@math.berkeley.edu>).
- resync with XFree86 4.1.0:
- Use TermcapLibrary as -lncurses instead of -ltermcap, fixes
problem building xterm/resize on Cygwin/XFree86 (Harold Hunt).
- Install xterm.termcap and xterm.terminfo when installing xterm
(Torrey T. Lyons).
- Fix some build issues on Cygwin/XFree86 (Suhaib Siddiqi).
- Define CBAUD, when it's missing in xterm, on LynxOS
(Stuart Lissaman).
- change order of selection-target types to make 8-bit xterm prefer
UTF8_STRING to COMPOUND_TEXT (patch by Juliusz Chroboczek).
- document
-fa
, -fs
command-line options
and faceName
, faceSize
resources which are used by the freetype library support.
- if configure script finds freetype libraries, but imake definitions
do not have the XRENDERFONT definition, define it anyway.
- modify configure script check for freetype libraries to include
<Xlib.h>
, since an older version of the related
headers relies on this (patch by Adam Sulmicki).
- correct return type of in_put() from patch #153 changes, which
left it not wide enough for UTF-8 (patch by Bruno Haible).
- undo check for return value from
pututline
(used for
debugging) since that function does not return a value on Slackware
3.6.
- correct length in ScreenWrite, when rendering invisible text
(patch by Sven Verdoolaege <skimo@kotnet.org>).
- fixes/improvements for the
i18nSelection
resource
from patch #153, by Bruno Haible:
- add missing initialization for
i18nSelection
resource.
- split-out the non-ICCM aspect of the
i18nSelection
resource as a new resource,
brokenSelections
.
- add configure check for
<time.h>
and
<sys/time.h>
, to allow for Unixware 7,
which requires both. If the configure script is not used, only
<time.h>
will be included as before (report
by Thanh Ma).
- fix redefinition of
dup2
, getutent
,
getutid
, getutline
and sleep
functions on Unixware 7 (report by Thanh Ma
<Thanh.Ma@casi-rusco.com>)
- add a fall-back definition for
__hpux
, which is
apparently not defined in some compilers on HPUX 11.0 (reported
by Clint Olsen).
- change VAL_INITIAL_ERASE, which is used as a fallback for the
"kb"
termcap string to 8, since that matches the
xterm terminal description (request by Alexander V Lukyanov).
- correct an off-by-one in
ClearInLine
, which caused
the erase-characters (ECH) control to display incorrectly
(patch by Alexander V Lukyanov).
- correct escape sequences shown in terminfo for shifted editing
keys. The modifier code was for the control key rather than
the shift key.
- increase PTYCHARLEN to 8 for os390, add some debugging traces
for UTMP functions (patch by Paul Gilmartin).
- correct an misplaced brace in
SelectionReceived()
(patch by Bruno Haible).
- correct an assignment dropped in
SelectionReceived()
which made it not compile for wide-characters combined with debug
traces.
- correct typo, clarify description of 88- and 256-color controls
(report by Bram Moolenaar).
- correct a typo in ctlseqs.ms which caused DEC Locator control
sequences using single quote "'" display grave "`" instead (reported
by Paul Williams, apparently in patch #114).
- correct index in inner loop in
VTInitI18N()
from
patch #151 changes, which resulted in infinite loop under some
conditions (report/analysis by Paul Gilmartin).
- remove spurious "%|" from terminfo sgr capabilities
(report/analysis by Adam M Costello, Debian bug #89222).
- add shell script to adjust list of dynamic libraries linked by
resize
when building with the standalone configure
script. Otherwise it uses the same list as for xterm, which is
excessive.
- fix a few compiler warnings reported by the 20010305 gcc snapshot.
Changes from XFree86 4.0.2:
- add definition of
_POSIX_C_SOURCE
for Solaris to
make this compile with gcc -ansi -pedantic
(report
by <mark@zang.com>.
- move the binding for shifted keypad plus/minus, which invokes the
larger-vt-font()
and smaller-vt-font()
actions, respectively, into the translations resource (suggested by
Marius Gedminas <mgedmin@puni.osf.lt>).
- modify configure script to support the
--program-prefix
, --program-suffix
and
--program-transform-name
options (request by Alison
Winters <alison@mirrabooka.com>).
- patch from Robert Brady
- fix a scrolling / combining characters display anomaly
- fix a problem with double-width characters where if the primary
font had no box-drawing characters, the right hand half of
double-width characters was erased (reported by Yao Zhang
<yzhang@sharemedia.com>).
- fix special case of null byte for key handling in UTF-8 locales.
- modify logic that compares sizes of normal and bold fonts to be
more forgiving of the font server's choice of bold font which must
match the normal font's size. Now
same_font_size()
compares the height of the fonts rather than individually ascent and
descent, and allows the bold font to be one pixel smaller than the
normal font (addresses a report by Alan Citterman
<alan@mticket.com>, who says that something in patches #146 to
#148 made xterm more likely to overstrike bold fonts, and indirectly
Debian bug report #76404, which reports the opposite).
- make configure script use $CFLAGS and $CPPFLAGS consistently,
including removing a chunk from configure.in which attempted to
save/restore $CPPFLAGS while processing value set by the --x-includes
option, but lost values set in an intervening AC_CHECK_HEADERS. This
change modifies macros CF_ADD_CFLAGS, CF_ANSI_CC_CHECK and
CF_X_TOOLKIT, as well as removing variables IMAKE_CFLAGS and X_CFLAGS
from the generated makefile (the AC_CHECK_HEADERS problem was
reported by Albert Chin-A-Young <china@thewrittenword.com<).
- correct a comparison in SELECTWORD case of ComputeSelect(), which
resulted in a word-selection wrapping past the first column without
checking the first column's character class (reported by Christian
Lacunza <celacunza@netscape.net>
- correct a logic in UTF-8 mode for selecting double-width characters;
a combining character was omitted (patch by Markus Kuhn).
- add feature to pop (raise) window when a bell is received
(patch by Gael Roualland <gael.roualland@dial.oleane.com>).
- add __NetBSD__ and __OpenBSD__ to special-case in xterm_io.h
for USE_POSIX_TERMIOS definition (patch by Christian Weisgerber).
- move special-case HPUX include for <sys/bsdtty.h> to
xterm_io.h to define TIOCSLTC, making HAS_LTCHARS defined for HPUX
10.20 (report by Bruno Betro).
- restructured includes for
termios.h
,
termio.h
and related definitions for main.c, os2main.c,
screen.c and resize.c so they will share equivalent definitions in a
new header xterm_io.h
. This is intended to solve some
problems mainly for HPUX which appear to arise from inconsistent
definitions for SIGWINCH- and HAS_LTCHARS-related symbols (reports
by Bruno Betro, Jeremie Petit and Clint Olsen).
- improve usability of double-width fonts by allowing normal fonts
to be given as double-width (from a patch by Fabrice Bellard
<bellard@email.enst.fr>).
- correct a few compiler warnings in TRACE() macros for
signed/unsigned variable differences (reported by Clint Olsen).
- make configure script use $CFLAGS and $CPPFLAGS more consistently,
i.e., by using CF_ADD_CFLAGS in CF_ANSI_CC macro.
- expanded description of environment variables in manual-page.
- modify OPT_TCAP_QUERY feature to always return the termcap or
terminfo capability string in the response, and to read/write the
names in hexadecimal form to allow for the special case of termcap's
k;
name (patch by Bram Moolenaar).
- add OPT_SAME_NAME and OPT_TCAP_QUERY to xtermcfg.hin, so the
corresponding configure options work (patch by Bram Moolenaar).
- resync with XFree86 4.0.1g:
- Rewrite Xft library for Render extension/core text and font management
Change xterm to use new interface (Keith Packard).
- document logfile options in man-page.
- correct spelling of
-samename
option in help message.
- add configure script option
--enable-tcap-query
(request by Bram Moolenaar).
- patch by Bram Moolenaar to add a
"Co" or "colors" entry to the OPT_TCAP_QUERY feature.
- patch by Kiyokazu SUTO <suto@ks-and-ks.ne.jp>:
- add support for bold font for double width characters.
The font name may be specified with the command line option
-fwb
or with resource
wideBoldFont
(class WideBoldFont
).
- correct underlining of double width character string, which
was drawn only half width.
- correct binary search of precomposed character table, which
may return wrong result when
int
is just 32 bits.
- some changes to align terminfo with ncurses 5.2:
- remove xtermm description, retaining xterm-mono since the former
conflicts with ncurses.
- modify initialization and reset strings to avoid putting the
save/restore cursor operations bracketing changes to video
attributes, since the changes could be lost when the cursor is
restored. This affects xterm-r6 and xterm-8bit (the xterm-xfree86
entry uses the soft-reset feature which resets scrolling margins
and origin mode without requiring us to save/restore the cursor
position).
- make a few entries explicitly inherit from xterm-xfree86 rather
than xterm: xterm-rep, xterm-xmc, xterm-nrc
- ensure that sign-extension does not affect
ctype
macros by using CharOf()
macro to coerce the parameter
to an unsigned char.
- resync with XFree86 4.0.1d:
- Add primitive support in xterm for Xft based fonts (Keith Packard).
The changes are ifdef'd with
-DXRENDERFONT
.
- correct implementation of
ptyInitialErase
: the
value assigned to initial_erase
was for the control
terminal, which is correct as far as it goes. But there was no
following test for the pseudo-terminal's erase value, which would
overwrite the default obtained from the control terminal
(reported by Christian Weisgerber <naddy@mips.inka.de>).
- modify check for printable-characters in OSC string to use xterm's
ansi_table rather than isprint() macro, to isolate this check from
locale settings. This fixes a problem using 8-bit characters to
set the title (reported by Ricardas Cepas <rch@richard.eu.org>).
- modify sample scripts to check for printf before print, since the
latter is not as well standardized (e.g., on Linux).
- updated config.sub, config.guess to reflect changes on
subversions.gnu.org
- correct two instances overlooked from patch #141 which assumed
UTF-8 mode without checking, causing a core dump in non-UTF-8 mode
(one instance was reported by Tommi Virtanen <tv@debian.org>).
- correct a problem selecting from the scrollback buffer in UTF-8
mode by changing remaining getXtermCell() calls to XTERM_CELL() as in
the non-UTF-8 cases (report by Markus Kuhn, patch by Robert Brady).
- several changes from Robert Brady for UTF-8 configuration:
- doublewide characters don't lose their accents when the cursor
moves onto or from them (a visual bug)
- fix logic in addXtermCombining, which mean that if the low byte
of a cell's first combining char was 0, a following combining char
would go into combining slot 1, not 2.
- modify logic for cut-buffers so UTF-8 data is first converted
to Latin1.
- collapse surrogates, 0xfffe, 0xffff to UCS_REPL.
- modify to allow xterm to to show combining characters
attached to doublewidth characters.
- correct bug in linewrap with -u8 option (reported by
Andreas Koenig <andreas.koenig@anima.de>).
- several changes to PTY logic (based on request by Tim Ryan
<timryan@nortelnetworks.com>).
- modify treatment of
-S
option to to make it work with
Unix98 PTY's.
- restore sense of IsPts flag in
get_pty()
, which was
lost in Unix98 changes.
- use new functions
my_pty_id()
and
my_pty_name()
to simplify/fix strings used for utmp,
wtmp identifiers.
- simplify
get_pty()
function, making it have a single
return point so its inputs/outputs can be identified.
- update config.guess and config.sub and scripts to my 20000819 patch,
adding cases for OS/2 EMX.
- add special case for os390 compiler options to configure script
(patch by Paul Gilmartin)
- fix some unused-variable compiler warnings (reported by
Zdenek Sekera).
- split-out some string functions into xstrings.c, to use them
more consistently among main.c, os2main.c and resize.c
- align termcap/terminfo files, adding entries to make them match.
The termcap entries are necessarily less complete than the terminfo,
to fit within 1023 character per entry.
- add terminfo entry for xterm-sco (SCO function keys).
- modify
same_font_name()
to properly handle wildcard
introduced in bold_font_name()
, making comparison for
different fonts succeed when only the normal font is specified. This
is needed to decide if 1-pixel offset should be used. (reported
in a newsgroup by Bart Oldeman <enbeo@enbeo.resnet.bris.ac.uk>)
- correct preprocessor line for OPT_WIDE_CHARS in drawXtermText()
from patch #141 which resulted in overstriking for bold fonts not
working.
- correct Imakefile from 4.0.1c resync so UTF-8 modules are in
UTF8SRC, UTF8OBJ lists, allowing build without UTF-8 support.
- remove a spurious assignment in ScreenWrite() from Robert Brady's
patch which set a null at the "end" of the buffer to be written.
That made the autowrap feature write a blank in the first column for
the non-UTF-8 configuration, rather than the actual character
(reported by Alan Citterman <alan@mticket.com>).
- add a check to ensure that
-class
command-line option
is not confused with -c
(reported by Paul Townsend
<aab@aab.cc.purdue.edu>).
- correction to precompose scripts, so 0061 + 0300 will now be really
be displayed as 00C0 (patch by Robert Brady
<robert@susu.org.uk>).
- correct macro ClassSelects() in button.c, used to hide ifdef's for
OPT_WIDE_CHARS in patch #141 (reported by Andreas Paul
<paula@informatik.tu-muenchen.de>).
- change wcwidth.h to include stddef.h rather than wchar.h, which is
not present on OpenBSD and FreeBSD (reported by Christian
Weisgerber and Bram Moolenaar).
- newer config.sub and config.guess, from lynx 2.8.4dev.7
- Most of this patch is an integration of Robert Brady's patch #11
for doublewidth and combining characters, from
http://www.ecs.soton.ac.uk/~rwb197/xterm/. In this context,
doublewidth refers to 16-bit character sets which may have glyphs
occupying two cells.
- add command-line option
-class
, which allows one
to override xterm's resource class. Also add resource file
UXTerm.ad
, which simplifies using xterm for both
8-bit character sets and UTF-8.
- fixes/improvements to OPT_TCAP_QUERY logic (patches by Bram
Moolenaar, Steve Wall).
- modify Makefile.in to circumvent GNU make's built-in suffix rule
for ".sh" which confuses install.sh with the "make install" target
(report/patch by Paul Gilmartin).
- implement an experimental control sequence which an application may
use to query the terminal to determine what sequence of characters it
would send for a given function key. This is ifdef'd with
OPT_TCAP_QUERY (request by Bram Moolenaar).
- add /usr/local to search path in CF_X_ATHENA configure macro
to build with Xaw3d on OpenBSD (patch by Christian Weisgerber).
- add missing
#undef HAVE_TERMIO_C_ISPEED
to
xtermcfg.hin, omitted in patch #133 fix for IRIX 6.5 baudrate (report
by Alain Filbois <Alain.Filbois@loria.fr>).
- correct a few errors in xterm.man: font in filename example for
Tektronix emulation, and description of -nul/+nul command-line
options (report by Eric Fischer <enf@pobox.com>).
- update config.guess and config.sub (from tin and lynx)
- back out change to
-name
command-line option,
restoring its original behavior (as noted by David Madore, the
correct interpretation of this option is the application instance
rather than the application class).
- workaround for fixed fonts which are generated from Unicode fonts:
they omit glyphs for some xterm's less-used line-drawing characters,
which caused xterm to set a flag telling it to use only its internal
line-drawing characters. Do not set the flag (it can be set from the
popup menu), and xterm will generate only the line-drawing glyphs
which actually are missing.
Otherwise, when used for large fonts, xterm may generate a 2-pixel
wide line, which can leave dots on the screen.
- restore first line of 256colres.pl, omitted in 4.0c diffs.
- make command-line
-name
option work as documented.
Apparently this was lost in X11R5 when coding to use
XtAppInitialize
.
- limit numeric parameters of control sequences to 65535 to
simplify checks for numeric overflow.
- change index into UDK list to unsigned to guard against numeric
overflow making the index negative (Taneli Huuskonen
<huuskone@cc.helsinki.fi>).
- change
sun function-keys
resource name to
sunFunctionKeys
to work around redefinition of the
token sun
by xrdb on Solaris. Similarly, renamed
resource sun keyboard
to sunKeyboard
(Steve Wall).
- change similar resource names for HP and SCO to avoid potential
conflict with xrdb symbols on other systems, as well as for
consistency.
- reorganized the install targets in the autoconf'd Makefile, adding
install-app, install-bin, install-dirs and install-man. The
app-defaults class can be overridden by setting the make variable
'CLASS', simplifying customization of xterm as a Unicode terminal,
e.g., CLASS=UXTerm.
- add limit checks to
ClearInLine()
,
ScrnInsertChar()
, ScrnDeleteChar()
to
correct potential out-of-bounds indexing (prompted by Debian bug
report #64713, which reported a problem with ICH escape sequences).
- updates to config.sub and config.guess
Kevin Buettner <kev@primenet.com> for elf64_ia64
Bernd Kuemmerlen <bkuemmer@mevis.de> and MacOS X.
- patch from Paul Gilmartin for os390 to check for errno set to
ENODEV on failure to open /dev/tty when there is no controlling
terminal.
- patch from H Merijn Brand <h.m.brand@hccnet.nl> for
building on Digital Unix 4.0 and AIX 4.2.
- modify DECRQSS reply for DECSCL to additionally report if the
terminal is set for 8-bit controls.
- add a resource (
limitResize
)
limiting resizing via the CSI 4 t and CSI 8 t sequences.
- ignore out-of-bounds resize requests, i.e., where sign-extension
or truncation of the parameters would occur.
- remove code introduced in #134 which made some backgrounds bold.
- minor correction to format of updated $TERMCAP when adding
kb
capability for ptyInitialErase
logic.
- improved test for SVR4 definition.
- update URL's and mailing addresses, moved to http://dickey.his.com
and dickey@herndon4.his.com
- correct missing quotes in CF_TTY_GROUP configure script macro in
case the script is run in batch mode.
- modify ownership-check of log file to ignore the group ownership.
Otherwise xterm cannot create logfiles in directories with set-gid
permissions.
- simplify the logic that reads termcap data.
- add fallback definition for B9600 in case line speed definition
for 38400 is missing (report by Jack J Woehr <jwoehr@ibm.net>,
for OpenBSD 2.6).
- fix: Set highlightColor, and select a region containing the text
cursor. If the window loses focus, the cursor becomes hollow, with
the region inside the cursor being background/foreground, unlike the
rest of the selection, which is foreground/highlight
(patch by Ross Paterson <ross@soi.city.ac.uk>).
- add configure script tests to define SVR4, SYSV and USE_POSIX_WAIT,
which enables xterm to compile on Solaris 7 and SCO Openserver
without imake, though there are still a few features for the latter
which require
sco
to be predefined.
- patches from Steve Wall:
- add support for two Sun-specific function keys. These keys are
labeled F11 and F12 on Sun Type 5 keyboards, but return SunXK_F36 and
SunXK_F37. Support will only be compiled in if the header file
<X11/Sunkeysym.h> exists and contains the appropriate symbol
definitions. The keycodes for the DEC keycodes were arbitrary unused
codes, but the ones for the Sun keycodes are what cmdtool and
shelltool actually send.
- add
colorRV
and colorRVMode
resources to allow specifying a
color to use for reverse video, similar to the existing UL, BD, and BL
modes.
- add
alwaysUseMods
resource, to override check if
alt
or meta
modifiers are used in
translations
resource. Revamped the code to calculate
the modifier value, and included Meta if alwaysUseMods is TRUE, using
values 9-16.
- patches from Paul Gilmartin for os390:
- regularize the definition of CONTROL() and remove an
acknowledged "trial and error" table.
- translate "^?" into A2E(0177) which is the EBCDIC "DEL"
rather than plain 0177 which is the EBCDIC quotation mark.
- modify
xtermMissingChar()
so that EBCDIC codes 128-159
are not rendered as blanks by X server running on Solaris, which sees
those as control characters.
- make debugging traces (configure --enable-trace)
work properly with EBCDIC.
- add substitutions in autoconf'd Makefile for CPPFLAGS, LDFLAGS and
AWK (reported by Neil Bird).
- correct uninitialized
childstat
variable from patch
#131 in creat_as()
function, which caused logging to not
work on Solaris, whose waitpid()
function does not
initialize its parameter. Add check for EINTR on return from
waitpid()
as well (reported by Neil Bird
<neil.bird@rdel.co.uk>).
- remove a redundant check for working
setuid()
function
introduced in patch #132 (Greg Smith reports that this does not work
as intended on os390).
- change line speed from 9600bd to 38400bd, to accommodate people who
mistakenly use $TERM set to vt100, to reduce the effect of
padding associated with this terminal type.
- add configure script check for IRIX 6.5's redefinition of baud
rates associated with
struct termio
, to correct a
situation where the baud rate was initialized to zero (reported by
Andrew Isaacson <adi@lcse.umn.edu>).
- remove unused configure script check for VDISABLE.
- undo an incorrect change from patch #113 caused the right scrollbar
to be positioned incorrectly when re-enabling it (analysis by
D Roland Walker).
- add ctrlFKeys resource, replacing constant for adjusting
control-F1 to control-F12 to VT220-style F10-F20. The resource
changes the constant 12 to a default value of 10 (request by
Jim Knoble <jmknoble@pobox.com>).
- correct ifdef'ing for conflict between definitions in AIX's
<sys/select.h> and <X11/XPoll.h> (reported by Clint
Olsen).
- add checks for return-values of getutid(), initgroups() and
setuid() in main.c, as well as modifying ifdef's for __osf__ to
include tty-group and WTMP logic (adapted from patch by Paul Szabo
<psz@maths.usyd.edu.au>)
- modify resize.c to build and work on os390 (uses EBCDIC)
(adapted from patch by Phil Sidler <Phil.Sidler@airborne.com>)
- use Ires(), Bres() and Sres() macros to simplify resource list in
charproc.c
- resync with XFree86 4.0a:
- correct a typo in os2main.c (Holger Veit, from 4.0a).
- integrate patch by Branden Robinson for improving logfile
security:
- make the
creat_as()
function more strict by using
O_EXCL rather than O_APPEND.
- fixes to make DEBUG ifdef's compile/run, including making the
debug logfile more unique by appending a timestamp to its name.
- include <term.h> in resize.c, to fix a missing-prototype
warning.
- modified
creat_as()
a little more, retaining the
ability to append to a logfile If the user specifies the name.
Also, check if the opened file (which patch #130 ensures is
owned by the effective user) is not writable by other users.
- use
creat_as()
logic to make tek4014 screen-copy
more secure (noted by Branden Robinson).
- ifdef'd some of Branden's changes to build/work on older machines.
- correct missing initialization of the
.mode
flag in
ColorRes
struct, from patch #129. This worked on Linux
because malloc()
zeroes memory on that platform
(reported by Christian Weisgerber).
- modify logic for
deleteIsDEL
resource so it has
internally 3 states: unspecified, true and false. If unspecified,
the keyboard type determines whether the Delete key transmits
<esc>[3~
or \177
, and the popup menu
entry reflects the internal state. Otherwise, the popup menu entry
overrides the keyboard type (suggested by Dr Werner Fink, to make it
simpler to set resources that imitate the legacy X11R6 xterm).
- modify
scroll-forw()
and scroll-back()
actions, adding a third parameter which will direct xterm to ignore
the action when mouse reporting is enabled. This is needed for
the wheel mouse to be used to report to the application rather than
scroll the window.
- add menu entry and action to allow disabling xterm's assumption
that the current font contains line-drawing characters if the
font cells 1-31 are nonempty. Some fonts may have other characters
(reported by Bruno Betro <bruno@iami.mi.cnr.it>).
- add a check in
creat_as()
to ensure that the user
really owns the logfile that has been opened.
- add logic to implement SCO function-keys. (This is really
incomplete, since I intend to revisit this and make xterm able to
emulate scoansi better than just the function-keys).
- add configure script option --enable-sco-fkeys, minor related fixes
(patch by Dr Werner Fink).
- fix typos in ctlseqs.ms (reported by Bram Moolenaar)
- fix typo in sinstall.sh default for $TST_PROG (reported by
Paul Gilmartin <pg@sweng.stortek.com>)
- improve initialization of ANSI colors by delaying allocation until
each color is first used.
- remove ifdef that prevented colorBD/colorUL/colorBL resources from
working when 256-color configuration was built (reported by
Todd Larason).
- fix some minor inconsistencies in terminfo (Debian #58530).
- correct logic for
oldXtermFKeys
resource, fixes a core
dump when attempting to set it from the command-line (reported by Dr
Werner Fink).
- correct ifdef for meta-sends-escap so configure --disable-num-lock
builds.
- add resource, popup menu entry and control sequence to allow
changing the Delete key to send either DEL or the VT220-style
Remove escape sequence.
- remove logic for metaSendsEscape that would allow xterm to send
<esc>[3~
before a function key that would begin
with <esc>[3~
(request by Christian Weisgerber).
- add missing action and documentation for meta-sends-escape.
- correct a few typos in ctlseqs.ms (incorrect code for Cyan color)
- patch by Markus Kuhn:
ensure that xterm will automatically activate the UTF-8 mode whenever
the name of the locale environment variable suggests that a UTF-8
locale is in use. This will help that by simply setting LC_CTYPE an
entire system can be switched over to UTF-8, without users having to
remember the UTF-8 command line options ("-u8", etc.) of the various
applications. Command line options and X resource entries can still
be used to override this default choice.
- add old function-keys control sequences and popup menu entry, for
compatibility with legacy X11R6 xterm.
- revert translation of editing keypad "Delete" key to legacy \177.
- simplify the color-resource data expressions with macro COLOR_RES,
for later use in restructuring color initialization.
- change encoding of wheel mouse (buttons 4 and 5) to avoid conflict
with legacy mouse modifiers (suggested by Bram Moolenaar).
- integrate patch by David Mathog
<mathog@seqaxp.bio.caltech.edu> to make this work on OpenVMS
- rename some functions, e.g.,
Index
to
xtermIndex
so that ports such as VMS which link
externals ignoring case will not have library conflicts (reported by
David Mathog).
- correct logic of
do_reversevideo()
, which did not
update the corresponding popup menu check mark (reported by David
Mathog, this was a detail overlooked in patch #94).
- change TRACE macro so semicolon is not within definition, making
indent and similar programs work better.
- add
depend
rule to Makefile.in
- modify logic of boldColors resource to suppress it if an extended
color control has been used, e.g., for 88-color or 256-color mode
(patch by Todd Larason).
- revise logic that handles menus and input translation for keyboard
type so only one can be selected at a time.
- restore kdch1=\177 for the Sun function-key type, and make the
the Delete key send DEL (\177) if the oldXtermFKeys resource is set.
- rephrase logic and ifdef's for POSIX VDISABLE to avoid preprocessor
expression that will not compile on NetBSD/x86 1.4.1 (reported by
Takaaki Nomura <amadeus@yk.rim.or.jp>).
- change coding of editing keypad's "Delete" key to
<escape>[3~, in the default (Sun/PC) keyboard mode.
This makes the terminfo kdch1 capability independent of the
coding of the backarrow key, which sends either backspace (8)
or DEL (127). The reason for doing this (compatibility with
the screen program) outweighs the choice of DEL (127)
which was used in X11R5/X11R6 xterms. The screen
program translates whatever matches kdch1 into <escape>[3~,
even if it happens to be the stty erase character.
- add encoding for control/?, to work around xmodmap or key
translations which may confuse backspace and delete. A control/?
will send DEL (127), and a control/H will of course send backspace
(8).
- add encoding for kcbt to <escape>[Z (fixes Debian #54840).
- minor correction to logic that encodes Sun and DEC function keys
to avoid sending an escape sequence if the key symbol is not found
in xterm's lookup table.
- simplify ifdef's in main.c for POSIX VDISABLE so the "^-" pattern
is more likely to be implemented when imake configures xterm
(fixes Debian #55105).
- change manpage to make it clearer what codes are sent by the
backarrow key.
- add a note reserving OSC 51 for use in Emacs shell (request by
Rob Myoff <mayoff@dqd.com>).
- correct a missing backslash in xterm-vt220 termcap.
- cleanup remaining quoted includes, preferring bracketed form.
- minor configure-script macro updates from tin and vile.
- add configure-script option for using utempter library, adapted
from Redhat 6.1 patch for XFree86 3.3.5
- resync with XFree86 3.9.17a:
- correction to QNX support (Frank Guangxin Liu)
- some cosmetic changes that did not correct any reported problems.
- move the suggested wheel-mouse button translations into charproc.c
to simplify customization. Correct some minor logic errors in the
support for buttons 4 and 5, used for wheel mice (reported by
Bram Moolenaar).
- implement metaSendsEscape resource, with corresponding
control sequence and menu entry. Like eightBitInput, this
causes xterm to send ESC prefixing the given key, but applies to
all keys and is independent of the 8-bit/7-bit terminal setting.
(requests by Alexander V Lukyanov and Marc Feeley).
- correct potential indexing with negative subscript in udk_lookup(),
(reported by Ian Collier <Ian.Collier@comlab.ox.ac.uk>).
- modify configure script that sets TERMINFO_DIR to use ${prefix}
rather than /usr if the --prefix option was specified (request by
Zdenek Sekera <zs@sgi.com>).
- modify checks for repeat-character control sequence to test the
character class against xterm's state table, rather than the
isprint() macro (patch by Alexander V Lukyanov).
- change several functions to macros to improve speed
- two corrections to simulation of bold font via overstriking:
- use clipping to avoid leaving trash at end of the text, and
- add brackets so wide-character logic does not fall-through
into the overstriking logic (reported by
Marc Feeley <feeley@IRO.UMontreal.CA>)
- add several entries to termcap file to make it have the same set
of aliases as the terminfo file.
- scale the color values used for xterm-256color terminfo entry to
0..1000, as expected by ncurses.
- change xterm-r6 terminfo definitions for F1-F4 to match program.
- Add QNX/Neutrino support (Frank Guangxin Liu
<frank@ctcqnx4.ctc.cummins.com>)
- refine the change to
SGR_Background()
in patch #119,
by not flushing the pending scrolling operation if the background
color is not actually changing. This combination occurs when using
color-ls to display a long listing, since each line ends with an SGR0
which affects only the foreground color. The unnecessary flushing
made it noticeably slower (reported by D Roland Walker
<walker@pobox.com>).
- remove obsolete documentation about modifiers which can be returned
in mouse tracking mode, and modify logic to ignore modifiers other
than the existing ones, e.g., NumLock (prompted by discussions with
Christian Weisgerber and Brad Pepers <brad@linuxcanada.com>).
- use free bit from obsolete shift-modifier coding of mouse tracking
button events to encode buttons 4 and 5, e.g., for a wheel mouse
(requests by Brad Pepers and Bram Moolenaar).
- correct a place where the ptyInitialErase logic did not set the
backarrowKey state, and modify it further to use tgetstr() rather
than parse the termcap data returned from tgetent() so the
ptyInitialErase logic will work when xterm is linked with a terminfo
library (based on a patch by Dr Werner Fink <werner@suse.de>).
- fix definition of HAVE_UTMP_UT_HOST for ISC configuration (patch by
<michael.rohleder@stadt-frankfurt.de>)
- improve configure script's utmp tests (based on reports by Greg
Smith for os390, and David Ellement for HPUX).
- modify sinstall.sh to use uid=0 rather than 'root' to determine if
the installer is privileged. This is needed on some systems since
more than one account may be privileged (report by Greg Smith).
- add an application resource,
messages
(and a
corresponding -/+mesg option) which controls the initial permission
on the terminal: if messages is set to true (the default), behavior
is as without the patch; if it is set to false (as per -mesg), the
terminal is opened in mode 0600, thus producing the effect of the
mesg n
command. This is useful for users who want to
redirect all their messages to one particular xterm: it is more
pleasant to do this with xterm resources than with explicit calls to
the mesg
program (patch, description by David Madore
<madore@clipper.ens.fr>).
- add responses (DA and DSR) for DEC locator mode
- add coding for ANSI color to DA response
- implement UTF-8 translation for Media Copy (print) operations.
- implement vt320 control sequences for Print Composed Main Display
and for Print All Pages. The latter directs xterm to print the
current screen as well as the scrollback buffer.
- correct error in _GNU_SOURCE configure test, which left it always
defined.
- add more information, i.e., with strerror for some system calls in
the main program which may fail due to insufficient permissions
(prompted by a problem report for
-C
by Jeremie Petit
<Jeremie.Petit@digital.com>).
- add workaround for conflict between <X11/XPoll.h> and
<sys/select.h> on AIX 4.3 (Richard Griswold
<griswold@acm.org>).
- add configure script test to resolve conflict between between
<X11/XPoll.h> and <sys/select.h>
- modify translation of UTF-8 sequences to reject "overly long"
variations (patch by Markus Kuhn).
- remove
utf8controls
resource, since Markus' change
removes the corresponding logic.
- correct a case where colors were not rendered properly. This
happened when an application inserted several lines, then changed
colors. If this was done all in one write, then there would be no
intervening refresh, and the new color was applied to the pending
scrolling operation which was awaiting the next refresh (reported
by Stephane Chazelas <Stephane_Chazelas@Raytheon.com>).
- refine configure test for utmp versus utmpx, to build on HP-UX 10.x
(reported by David Ellement).
- move the configure check for
const
after the check
for ANSI C compiler options, since those may be required to make
it work properly on HP-UX.
- add configure test for defining
_GNU_SOURCE
- correction to -hold option, ensure that if data is already
in the output buffer that it will be displayed before closing the
PTY.
- move the configure checks for setuid install of xterm into a script
to avoid installing it setuid'd to a non-root user (reported by
Adam Sulmicki <adam@cfar.umd.edu>).
- correct configure script's check for termcap.h to avoid using
ncurses' version of it on systems that have a working
tgetent()
function. This is needed to make
resize
work properly.
- fix some typography in ctlseqs.ms description of DEC locator events
(reported by Steve Wall).
- change order of tests in configure script for utmp and utmpx
to test utmpx first, to compile on Solaris (reported by
Leena Heino <liinu@uta.fi>
and Patrik Hagglund <patha@ida.liu.se>).
- add a configure test for utmp.ut_xtime, needed for SCO Openserver,
and for lastlog, needed for Redhat 6.0, to refine the utmp/utmpx
auto-configure.
- remove a spurious comma in an #undef (reported by
David Green <greendjf@cvhp152.marconicomms.com> and
David Ellement <ellement@sdd.hp.com> both on HP-UX, whose
compiler does care about syntax).
- change ifdef's using __CYGWIN32__ to __CYGWIN__ (reported by Suhaib
M. Siddiqi <Ssiddiqi@InspirePharm.Com>, who is told that the
next Cygnus release will drop that symbol in their next release).
- minor cleanup of ifdef's for makeColorPair (patch by Steve Wall).
- patch by Alexander V Lukyanov to work around problem observed
in XFree86 3.3.5, reported as bug #5419 to Mozilla. From the
problem report:
xterm consumes cpu when selecting text with mouse (holding
down left mouse button) and when a program working under the
xterm outputs something to stdout.
Easy way to reproduce:
while :; do echo aaa; sleep 1; done
(while this runs, select text and hold down left mouse button)
watch cpu load.
release left mouse button - spinning stops.
- integrated changes by Steve Wall to implement an 88-color model
for systems where 256-colors cannot be allocated.
- when 256-color configuration is compiled, colored bold and
underlining is not available; ifdef'd to avoid possible odd effects
in this case (reported by Steve Wall).
- add resource cacheDoublesize, to limit the caching of font
information for double-sized characters. This addresses a problem
reported by Aryeh Koenigsberg for X terminals with limited font
memory.
- modify treatment of line-drawing characters in UTF-8 mode so that
the Unicode values are used rather than the C0 codes for storing the
translated characters (request by Markus Kuhn).
- add configure script checks for Athena headers and libraries under
/usr/contrib to work on HPUX (reported by several people:
David Nixon <djn@csc.liv.ac.uk>
Aryeh Koenigsberg <aryeh.koenigsberg@telrad.co.il>
Johannes Mähner <johanm@camline.com>
Andrew Gaylard <andrew.gaylard@bsw.co.za>).
- add check to configure script if xterm is installed setgid rather
than setuid, since wtmp and utmp may be installed with group-writable
permissions other than root (based on Debian bug report #7112 by Bo
Branten <bosse@ing.umu.se>).
- rewrote logic that removes data from termcap entry, e.g., for
titeInhibit, to make it less likely to remove the wrong data.
- correct logic which checks for missing characters used for line
drawing. The 0 character was tested unnecessarily, leading to
some inefficiency when rendering.
- change termcap capability which is used as input or output of
ptyInitialErase logic from kD to kb.
Christian Weisgerber <naddy@mips.rhein-neckar.de> pointed out
in effect that kD (in terminfo kdch1) should
correspond to the control sequence for dch1, which deletes
from the current position toward the right.
- check for failure to change ownership of the PTY device and warn
when xterm is running setuid'd to root. This was reported to happen
on the FreeBSD/NetBSD/OpenBSD systems as a result of the chflags()
call.
- add xterm-noapp terminfo entry to illustate a nominally
bash-compatible terminal description.
Several fixes. The main one is a first draft of pulldown menus. It's not
complete (I have some minor/annoying geometry problems to correct), but is
usable. Once it's complete I plan to add a menu to support additional
selections that won't fit on the current popup menus. Also, this fits into my
longterm plan to allow configuring with Motif libraries.
- add null-pointer check to FlushLog(), fixes a core dump when both
-l and -lf options are used when xterm is configured with wide-character
support.
- remove "ISO" case for SD, which was due to a typographical error in
ECMA-48 (reported by Paul Williams <paul@celigne.co.uk> for
vttest).
- add "FILES" section to manpage.
- generate header file to initialize default resources for colors
16-255.
- patches by Greg Smith for os390:
- add README.os390
- use the pty_search() function to find an available pty/tty pair.
- move E2A() call out of getXtermCell() to SaveText() function
so it will be available in all configurations.
- patches by Todd Larason:
- enable SGR 48 5 in ISO color mode, not just 256 color mode
- change configure's --disable-256-color option to
--enable-256-color, to match its effect
- fix OSC 4 xx ? (report ansi color) to report a string which can
actually be used to set the color back
- fix OSC 4 xx yy (change ansi color) to not allow setting colors >
15 in 16 color mode
- simplify the COLOR_ settings a bit in ptyx.h, along with setting
NUM_ANSI_COLORS needed for #1 and #4 above
- correct string-terminator code passed for reference to OSC
responses; when in 7-bit mode, only the final byte of ST was seen.
- Allow multiple color #;name pairs in OSC 4,
and document changes to match.
- add control sequences for specifying the RGB value of the ANSI
colors, and for configuring with 256 colors (patch by Todd Larason
<jtl@molehill.org>). I made the default configuration to
16-colors, because xterm uses the default color map (which has only
256 colors).
- correct an error in DCS $ q m reporting for colors 8-15 (Todd
Larason).
- add test/demo script for double size characters. Used this to
test/correct display of double size characters that should wrap,
underlined double size characters.
- increased cache size for double size fonts to 8, to allow for both
normal and bold fonts (from discussion with Aryeh Koenigsberg
<aryeh.koenigsberg@telrad.co.il>).
- integrated patch from Greg Smith <rys@epaibm.rtpnc.epa.gov>
for port to OS390 (aka MVS). OS390 uses EBCDIC rather than ASCII.
- correct an off-by-one in binary search limits in keysym2ucs.c (Markus
Kuhn).
- implement logging for UTF-8 mode. The output is written in UTF-8 form.
- If colorMode is enabled by default, compile-in default resources to
match the colors listed in XTerm-col.ad (this should fix a
longstanding FAQ).
- added new OSC 3 ; PROPNAME=VALUE ST escape
sequence to set an arbitrary X property on the top level xterm X11
window. Omit "=VALUE" to delete the X property (patch by Greg Badros
<gjb@cs.washington.edu>).
- change internal flag used for utf8controls resource
so we allow 31-bit range of characters (suggested by Thomas Wolff).
- add check for 16-bit characters in OSC strings, change them to '?'
(reported by Thomas Wolff).
- modify logic of same_font_name() to avoid trying to interpret both
parameters as wildcard patterns. That does not (cannot) work, and in
some instances the font server will return unresolved wildcards for
the normal or bold fontnames, making them match inadvertently,
triggering the fallback overstrike logic (reported by Tim Adye).
- correct range-check from patch #108, which resulted in not being
able to select from the scrollback buffer (reported by Tim Adye
<T.J.Adye@rl.ac.uk>)
- correct "no available ptys" problem with Cygwin B20.1 (patch by Tim
Adye).
- modified install-ti rule in Makefile.in to allow override of the
terminfo directory when doing a "make install", i.e., by assigning
to TERMINFO_DIR (request by Zdenek Sekera <zs@sgi.com>).
- added install-full rule to Makefile.in
- resync mkdirs.sh and install.sh scripts against current autoconf
- implement $(DESTDIR) in Makefile.in, making it simple to install
xterm and associated files into a directory just for packaging a
binary release (suggested by CaT <cat@zip.com.au>).
- change IChar type to unsigned, rather than unsigned short, making
room for a flag to keep with 16-bit characters to prevent them from
being interpreted as C0 or C1 controls (reported by Thomas Wolff).
- correct a typo from patch #107, incorrect array name, in the
filterUTF8 function (patch by Bruno Haible <haible@ilog.fr>)
- add utf8controls resource to specify whether xterm should
interpret 16-bit characters unpacked from UTF-8 form as control
characters if they happen to fall into that range. This behavior
is left unspecified by the Unicode standard (request by Thomas Wolff).
- modify handling of OSC to recover if application sends 16-bit
characters with codes above 255. We cannot display them as is, but
translate out-of-range characters to a '?' (reported by Thomas
Wolff).
- add a range-check to LastTextCol(), to guard against indexing
before the beginning of the scrollback buffer. This appears to
happen with certain fonts under X11R5 (reported by Stephane Chazelas
<Stephane_Chazelas@Raytheon.com>).
- implement resource boldMode, to allow disabling the
simulation of bold fonts when the bold and normal fonts are not
different (requested by Will Day <willday@rom.oit.gatech.edu>).
- change the atom "UTF-8" to "UTF8_STRING", and fixes a few bugs in
the UTF-8 selection (patch by Juliusz Chroboczek).
- correct logic of binary-search in keysym2ucs.c (patch by Markus
Kuhn).
- add special interpretation of keysym codes above 0x1000000 as
the corresponding UCS value plus 0x1000000 (patch by Markus Kuhn).
- Two changes from Stephen P Wall.
From his description:
The first change is simple - I added ESC[3J to erase the stored lines
above the screen. That's what the changes to util.c and ctlseqs.ms
are.
The second change is to get the blinking cursor working. I took out
the cursorBlinkTime resource, and put in cursorBlink (Boolean),
cursorOnTime (time cursor is on in msecs) and cursorOffTime, and added
a cursorblink item to the vtMenu to enable/disable it.
- Integrated a patch from Juliusz Chroboczek <jec@dcs.ed.ac.uk>.
From his description:
With this patch, selection conversion works properly:
ISO 8859-1 xterm -> ISO 8859-1 xterm (transferred as STRING);
ISO 8859-1 xterm -> UTF-8 xterm (transferred as STRING);
UTF-8 xterm -> ISO 8859-1 xterm (transferred as STRING);
UTF-8 xterm -> UTF-8 xterm (transferred as UTF-8).
It will not work properly if one xterm is in, say, ISO 8859-2.
Actually, for this case xterm breaks the ICCCM routinely (sending ISO
8859-2 data as STRING), so I wouldn't worry too much about it. I have
not changed the behaviour in eight-bit mode in any way.
- remove duplicate fix for OpenBSD in resize.c
- correct logic in ScreenWrite, which did not reset the high bytes
of 16-bit characters when overwriting them with a 8-bit character
string (reported by Thomas Wolff).
- integrate patch by Markus Kuhn to provide limited support for
input of UTF-8 16-bit data by a lookup table.
- correct check in non_blank_line to ensure we're in wide-character
mode before looking at the high bytes, for InsertChar.
- implement new resource trimSelection, which allows xterm
to trim trailing blanks from selected lines. This does not affect
the highlighting. (reported by several people using mutt,
including
Hans Morten Kind <edphk@uib.no>,
Jeremy <jeremy@exit109.com>
and (Michael Fuller <msf@mds.rmit.edu.au>).
- add patch by Matthieu Herrb to include term.h in resize for OpenBSD.
- correct logic for UTF-8 in functions that hide and show the cursor;
it was displaying a space whenever the low byte of the character at
the cursor position was zero (reported by Thomas Wolff
<Thomas.Wolff@icn.siemens.de>).
This is a resync patch against XFree86 3.9Pn, reflecting changes which were
submitted by Branden Robinson, who worked with
Wichert Akkerman <wichert@cs.leidenuniv.nl>
to set up ifdef's to handle GNU libc 2.1,
and use getpt() which lets xterm avoid having to know the actual PTY name.
I have also added a few fixes for signed/unsigned mismatches, and corrected
a problem in the configure script (the UTF-8 code was always configured since
the Imakefile defines this).
- correct selection logic: I omitted an offset that accounts for
the distance into the scrollback buffer when rewriting this for
patch #101. Also fixed a similar problem for selecting double
size characters from the scrollback buffer (first was reported
by D Roland Walker <walker@pobox.com>).
- improved support for Unix98 PTY's, using patch in Debian bug report
#35650, by J.H.M. Dassen <jdassen@wi.leidenuniv.nl>. From
the patch description:
- No longer links xterm against libutil on a glibc2.1 system.
libutil is a compatibility library and should only be used when
necessary. Rather than having get_pty() use openpty() from this
compatibility library, use the real UNIX98 pty support in get_pty()
(open()ing the master pty, through getpt() if available (glibc
extension)). Use openpty() only under glibc2.0.
- GNU libc2 is not Linux-specific; already it runs on the Hurd. It
provides the UNIX98 pty functions (plus the getpt() extension),
regardless of the underlying OS. Changed two constructs to look for
GNU libc2 only, not GNU libc2 on Linux.
- improve font configuration, by checking if the user's resource
settings for normal and bold fonts give the same font sizes
(fixes problem reported by Peter Waltenberg <peterw@dascom.com>).
- revert change to openpty call in patch #101; this causes xterm to
fail on DEC-Alpha OSF/1 4.0B (reported by H Merijn Brand).
- modify print.c to move include of stdio.h after the autoconf'd
xtermcfg.h since HP's ANSI C compiler otherwise sees inconsistent
prototype for getopt, probably due to problem with const (reported by
H Merijn Brand).
- moved includes and definitions for 'select' from data.h to xterm.h
to fix problem introduced by prototype for getPtyData, part of UTF-8
changes (reported by Jens Schleusener <Jens.Schleusener@dlr.de>)
- added "Meta <Btn2Down>:clear-saved-lines()" default
translation (patch by H Merijn Brand)
- fixes to configure script and ifdef's in main.c to build on a
HP9000/D390 (hppa-2.0w) running HP-UX 11.00 (64 bit) with egcs 1.1.2
and HP's ANSI C compiler (patch by H Merijn Brand
<PROCURA_BV@CompuServe.com>)
- add more parentheses in ifdef's (patch by Bob Maynard).
- eliminate conflicting definitions for USE_TERMINFO in resize.c
(reported by Jeremy Buhler).
- change openpty call to pass NULL rather than ttydev parameter,
since that was used only to estimate the length of the
corresponding data, and may not really be long enough
(reported by Andreas Jaeger)
- update description in xterm manpage for character class table,
which said it handles only 7-bit codes.
- correct a typo in ScrnDeleteChar() which made it not clear the
high byte of wide-character data.
- add logic to convert selection to UTF-8 form when appropriate.
This makes select/paste "work", but further work is needed to
make UTF-8 recognized as a locale in Xlib.
- correct right-limit check when selecting double-width characters.
- change default answerback response to an empty string.
- Correct a typo in the default resource value for
backarrowKeyIsErase: it was always true (reported by Bram
Moolenaar).
- improve configure script's test if the installed xterm is setuid,
in case that is a symbolic link.
- correct "install-ti" rule in Makefile.in, by not setting a blank
$TERMINFO value. That is interpreted as "." by ncurses' tic.
- correct logic that computes num_ptrs count of the number of indices
into the screen buffer. This is the maximum of the colors and
character-set indices; was incorrect in patch #97.
- correct argument type for sigsetjmp, incidental change in patch
#96's Unix88 PTY patch (reported by Bram Moolenaar).
- correct description of secondary DA in ctlseqs.ms (reported by Bram
Moolenaar).
- decouple the backarrowKey and ptyInitialErase resources by
adding a new resource backarrowKeyIsErase, to accommodate people
using applications which have hardcoded tests for characters 8 and
127 rather than relying on the stty settings.
- modify the UTF-8 decoder so that all possible illegal UTF-8
sequences are properly represented by U+FFFD. This should be very
helpful for developers of code that output UTF-8 strings for
debugging. See the file utf-8-test.txt in
http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz for a
demonstration text that contains numerous illegal UTF-8 values.
(patch by Markus Kuhn).
- correct a place in ScrnRefresh where I was filling the high byte of
a wide character with a space rather than a null (reported by Markus
Kuhn).
- correct data manipulation in unparseputc(), broken for
little-endian machines by patch #97's UTF-8 changes. This meant that
keyboard input on SunOS did not work, though Linux i386 was fine.
- modify initialization for backarrowKey and logic for initial-erase
to prevent the initial-erase from overriding an explicitly set
backarrowKey resource (reported by Vikas Agnihotri).
- add a missing null-pointer check in ScrnRefresh, for the
wide-characters configuration.
- add configure script test for -lutil, needed for openpty call when
configuring xterm for Glibc-2.1 and Unix98 PTY's (first reported by
Martin Lorentz" <m.lorentz@w12.link-goe.de>).
- completely parenthesize ifdef expressions for Glibc (suggested by
Bob Maynard).
- add initial-erase options (-ie, +ie) to help message (reported by
Vikas Agnihotri).
- remove duplicate definition of USE_USG_PTYS (reported by Jeremy
Buhler).
- change termcap kD and terminfo kdch1 to a DEL
(\177).
I overlooked this when separating the styles of keyboard with
the sunKeyboard resources in patch #94, so that it normally
matches the value of the stty erase character:
- Reported by Jae Gangemi <jgangemi@ccf.rutgers.edu>,
this caused emacs to not process the DEL properly, combining it
with succeeding characters.
- This does not appear to be related to a problem which I have
found with screen, which translates the stty erase into
the termcap kD or terminfo kdch1 value
(depending on how it is linked)
if the $TERMCAP variable is set when screen is invoked.
- add command-line options for enabling UTF-8 mode: -u8 and +u8.
The more obvious -utf8 and +utf8 would conflict with xterm's
-ut and +ut (utmp) options.
The UTF-8 changes were requested by Markus Kuhn
<Markus.Kuhn@cl.cam.ac.uk>. This patch does not complete UTF-8
implementation, but makes it usable, i.e., display and refresh work,
and I am able to display the test cases which Markus provides.
More work is needed to complete this feature:
- modify Makefile.in to work with configure script's --srcdir option.
(patch by Jeremy Buhler <jbuhler@cs.washington.edu>)
- add checks for 'echo -n' equivalent for 8colors.sh and 16colors.sh
scripts (reported by Vikas Agnihotri).
- improve logic that looks for bold fonts to allow for wildcards
in the specification for normal fonts, and to ensure that if
a bold font is specified as normal, that xterm will simulate a
bold version of that using a one-pixel offset overstrike
(reported by Henrik Harmsen <harmsen@erv.ericsson.se>).
- correct horizontal spacing of double width line-drawing characters
that xterm simulates.
- improve support for Unix98 PTY's, using patch in Debian bug report
#35650, by Topi Miettinen <Topi.Miettinen@medialab.sonera.fi>.
Andreas Jaeger says this also corrects a permissions problem
reported by cat@zip.net.au
- modify initial-erase logic to ensure that
ttyModes
resource overrides it.
- modify primary DA response to allow a '1' parameter.
- add printer and national replacement character sets to VT220
primary DA response.
- document primary and secondary DA responses in ctlseqs.ms
- use the patch number (e.g., 95) in the secondary DA response,
providing user applications a means of determining the version
of xterm for feature comparison (request by Bram Moolenaar).
- make xterm respond to secondary DA when the decTerminalId
is set for VT100.
- limit user-defined keys (DECUDK) to VT220-style keyboard
when sunKeyBoard resource is true.
- modify ifdef's for Linux-2.2.x with Glibc-2.1 to work with
Glibc-2.1 and no Unix98 PTY support (patch from From Andreas Jaeger
<aj@arthur.rhein-neckar.de>)
- add optional feature (resource and command-line options) to make
xterm use the PTY's sense of erase character on startup, rather than
requiring it to be \177, or set the PTY's erase character to match
xterm's configuration. Note that while $TERMCAP is modified to
reflect the actual configuration, the terminfo kdch1 string is not
(request by Dirk H Hohndel <hohndel@suse.de>)
- improve scripts in vttest to work with newer shells that do not
use 'echo -n'.
- add fonts.sh example script
- correct inequality in handling of "#1" font specification.
- correct call to XGetWMNormalHints() used for computing maximum
screen size; the size hints may not have been set.
- begin implementation of support for wide-characters (configure
option --enable-wide-chars defines OPT_WIDE_CHARS, invoke xterm with
-wc option to activate this feature). This patch optionally widens
internal data structures, invokes the 16-bit text output rather than
the 8-bit version and adds some tables.
- further fixes for terminfo: ka1, ka3, etc., differ between the
default xterm-xfree86 and xterm-vt220 entries.
- change default (with sunKeyboard resource false) behavior of
the editing keypad "Delete" to send a 127, like xterm-r6.
The VT220-style
<esc>[3~
is sent when
sunKeyboard is true (reported by Tomas Vanhala).
- add parameters to function keys to indicate if shift, control
or alt are set. The codes are based on a description of
a DEC VT510 with a PC keyboard, from Jeffrey Altman
<jaltman@watsun.cc.columbia.edu>.
- add control sequence 1035, set-num-lock action and num-lock
menu entry to control the use of the NumLock and Alt keys for
the Sun/PC and VT220 keyboard extensions.
- implement DECSET/DECRST numeric keypad (DECNKM) mode.
- modify terminfo and termcap to use recommended "X Window" or "X11"
names rather than "X Windows" (reported by Tomas Vanhala).
- suppress translation of shifted keypad "+" when sunKeyboard
is true.
- workaround unexpected behavior (perhaps bug) in XmbLookupString,
which returns trash in the string buffer for numlock and control-key
combined with keypad-keys.
- modify ScrollBarReverseVideo() to keep scrollbar border visible
when reverse video is toggled.
- correct missing case for parameter 17 (set highlight color) in
dynamic colors control sequences.
- extend dynamic colors control sequences to allow users to
determine the colors and font which are currently active.
- minor tweak to OSC responses, to use BEL if the application used
that to end the request, rather than ST. This works better with
shell scripts, which may not handle an
<esc>backslash
very well.
- separate menu settings for reverse video from that done under
program control.
- corrected ifdef's for menus, which did not allow tek4014 to
be suppressed properly (reported by Clint Olsen).
- integrated patch from Pavel Roskin
<pavel_roskin@geocities.com>
for Linux-2.2.x with GLibc-2.1 and
/dev/ptmx support:
- main.c and resize.c were using different rules to determine
whether ATT should be defined (actually USE_USG_PTYS is more
apt).
- copy definitions from main.c to resize.c to prevent
sys/stream.h and sys/ptem.h from inclusion when SYSV is not
defined
- define CNUL if not already defined like other variables.
- /dev/tty does exist in Linux, but it doesn't mean, it
should be used. Therefore EACCES is now an acceptable
result.
- ifdef'd several calls such as
ioctl (ptyfd, I_PUSH,
"ptem")
to build on Linux (I_PUSH is not defined when
sys/stropts.h is not included).
- initialize second "ltc" variable in main.c (reported by David
Dawes).
- provide definition for USE_USG_PTYS in screen.c
- add resource-files to install rule in standalone Makefile.in
- add sample scripts to illustrate titlebar controls, resizing
and colors.
Here are several fixes and minor enhancements. The chief ones
are the fixes for NumLock mode and reverse video, since we had become
used to working around the problems.
- remove kfnd/kll/kslt strings from terminfo, because curses
applications do not necessarily return khome/kend pairs
(reported by Vikas Agnihotri).
- implement NumLock resource which overrides the keyboard tables for the
special case of keypad keys. This is a problem introduced in xterm
by X11R6 changes, i.e., an ambiguity which in effect discarded vt100
keypad support.
- modify Sun/PC keyboard mode to extend this (emulation of DEC vt100
keypad) to the remainder of the numeric keypad. Now, the default
operating mode of xterm uses the keyboard tables as-is (except if
the NumLock mode overrides), but provides good vt100 keypad compatibility
if the Sun/PC keyboard menu item is checked.
- separate command-line settings for reverse video from that done
under program control. This is a problem which was introduced by
X11R6. Though correct, most users are confused by allowing
the reset command to undo the effect of the command-line -rv
option.
- add description of function keys, keypad and cursor keys to ctlseqs.ms
- add terminfo entries for xterm-vt52, xterm-sun and xterm-hp
- correct typo (missing case value) for DECSET 35, enable/disable
shifted keypad action and a few compiler warnings (reported by Zdenek
Sekera <zs@sgi.com>).
- correct reporting of color values 8-15 in DECRQSS (reported by
Vikas Agnihotri).
- modify parsing of ttyModes resource to recognize "^-" as "undef"
(requested by Tomas Vanhala).
- integrate/extend changes to add iconify/maximize actions
(from Edward S. Arthur <eda@ultranet.com>).
- add control sequences for maximizing/restoring window, and
for reporting maximum screen size.
- add 'interpret' action, to support local function-key interpretation.
Used properly, this makes most of the specialized actions of xterm
redundant.
- add control sequence private modes 1051, 1052 and 1052, for
setting the Sun and HP function key modes, and for setting the
Sun/PC keyboard mode.
- add configure option --disable-maximize
- add configure option --disable-num-lcok
- extend descriptions of configure script options in INSTALL.
- increase buffer size for tgetent (i.e., termcap) to 1500. This
fixes a problem where screen is built using ncurses or
GNU termcap and xterm is built using the standard termcap
interface. The former does not limit the termcap size, while the
latter is assumed to be no longer than 1023 characters. The
screen program's termcap entry is about 1200 characters
long.
- change update_menu_item() to a function, to simplify debugging.
This also reduces the executable by 4Kb.
- add control sequences for DECSET 30, 1010, 1011 like rxvt (enable
or disable some features that were only settable via resources or
command line arguments).
- add control sequence for DECSET 35, which enables/disables the
shifted keypad functions.
- add support for switching font sizes, by stepping through the
font menu using shifted keypad plus and minus.
- correct missing initialization of tekInhibit and tekSmall resources.
- correct ifdef's in charproc.c for XtNgeometry and XtCGeometry
(reported by Bram Moolenaar).
- Implement logic to translate input characters which are mapped
when in vt220 National Replacement Character mode (requested by
Tomas Vanhala).
- Resync configure scripts with my patches to autoconf 2.13
- Change order of -lXmu and -lXext to accommodate cygwin32
(reported by Vikas Agnihotri).
- Add "-ti" option to set terminal emulation level from command
line rather than via resource.
- Simplify some of the preprocessor logic using #elif.
This implements several small fixes and enhancements. The chief one implements
fallback support for line drawing characters with fonts that do not include
those characters. But I implemented that last.
- If any of the glyphs in positions 0-31 (used by xterm to implement
the VT100 alternate character set) are zero-sized (i.e., missing),
xterm will reserve a normal space for the glyph when drawing. I
implemented a simple stroke-drawing function to draw the line-drawing
characters and a couple of the other (simpler) characters such as
diamond. (This was suggested by Vikas Agnihotri).
- Modify the computation of doublesize characters to work around font
servers which shift the scaled characters up/down or do not give the
correct width.
- Add popup menu item and corresponding resource settings to disable
the font-scaling logic for doublesize characters to work around
(older) font servers which simply do not draw the fonts scaled to the
size that they said they would. I see this problem on a SunOS system
running X11R5; the X11R6 servers seem well behaved.
- Implement new escape sequence, private mode 1049, which combines
the switch to/from alternate screen mode with screen clearing and
cursor save/restore. Unlike the existing escape sequence, this
clears the alternate screen when switching to it rather than when
switching to the normal screen, thus retaining the alternate screen
contents for select/paste operations.
When I implemented the popup menu entry to toggle between the normal
and alternate screens, I considered only pasting from the normal
screen to the alternate; this improvement allows either direction.
- Changed the termcap and terminfo for xterm-xfree86 and xterm-8bit
to use the new 1049 private mode.
- Modify the logic which switches between normal and alternate
screens so that the save/restore cursor operations apply only to the
current screen. That means that applications which use the terminfo
smcur/rmcur or termcap ti/te capabilities will restore the cursor to
the original position on the normal screen rather than to the most
recent place where a save-cursor operation was performed.
I note that a real VT100 terminal would not behave in this way,
but it is a moot point since the VT100 does not implement alternate
screen, and therefore the save/restore cursor sequence would not be
used in this context. I reviewed the logic which switches between
normal and alternate screens based on some recent newsgroup postings
as well as a proposed patch in the Debian group which attempts to
do this (the patch has a bug, however, so I did not use it).
- Add popup menu entry for toggling the titeInhibit resource.
- Add new resource answerbackString, which overrides the default
"xterm" returned by xterm when responding to an ENQ (control/E)
character (request by Rajesh Vaidheeswarran <rv@fore.com>).
- Add new resource keyboardDialect for setting the NRC display
character set (request by Tomas Vanhala, who notes that I should
add logic to translate the keyboard as well).
- Add new command-line option and corresponding resources for making
xterm generate escape sequences compatible with HP terminals. Like
the existing Sun escape sequences, this is available as a popup menu
item. It is enabled by the configure script with the option
--enable-hp-fkeys (requested by Toni Mueller <sales@oeko.net>).
- Add configure script option --disable-boxchars to disable the
fallback support for line drawing characters.
- Fix ifdef's for configure script --disable-ansi-color, and reviewed
all configure options to ensure that all can be enabled/disabled
appropriately.
- Update config.guess and config.sub, from Lynx.
This patch completes the implementation of double-sized character support
for the VT100 emulation, and fixes a few minor bugs:
- corrected the cursor position in HideCursor, which did not multiply
the column by two when in doublesize mode.
This bug, which did not appear in normal use,
dates back to my original changes to partly implement
double-sized characters.
I noticed it when cat'ing a typescript from vttest's double-sized character
test.
- ensure that the current line is repainted when switching between
single and double width characters.
- reduce the number of bits used for double-sized character coding
from 3 to 2, to make more room for soft-font codes.
- copy newer ifdef's from the XFree86 3.3.3 release's main.c,
which address details of glibc and powerpc.
- moved definition of DECL_ERRNO in xterm.h to match XFree86 3.3.3
- modify resize to remove the ifdef on SVr4 that suppressed
printing the script for $LINES and $COLUMNS.
Solaris' resize utility does this; suppressing the behavior is unnecessary.
I tested the double-sized characters using vttest and the xfsft patch.
These fonts worked reasonably well:
-bitstream-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1
9x15
The iso8859 font does not include box characters, of course, but looks good.
This refines my #85 patch by checking for a case where the font server
returns a bold font that does not quite correspond to the normal font.
When I asked for a bold version of the 6x12 font, the font server
returned a near equivalent where the ascent and descent values did not
match, causing xterm to leave lines across the display.
This patch makes xterm reject that type of mismatch, falling back to the
old font behavior.
This corrects a problem reported by Stefan Dalibor. My table entries for the
printerExtent and printerFormFeed resources used the wrong
types for sizeof, causing the printer to not work properly on some platforms
because the printAttributes resource was overwritten (e.g., Digital Unix with DEC Alpha).
I reviewed all of the resource table entries and fixed a potential problem with
resizeGravity, which was typed as int rather than
XtGravity.
A small fix: when switching to/from the continuous mouse reporting mode,
the event mask was incorrect if xterm was built under X11R5 because the
original data was saved under an ifdef for active-icon.
Some cleanup (I noticed the pixel droppings a few months ago after getting a
new 17" monitor):
- split-out the functions that load/reload fonts for xterm as new
file fontutils.c to extend them to support automatic loading of
bold font corresponding to the normal font. Adapted logic from
EMU 1.3 for this purpose. This fixes most occurrences of pixel
droppings from bold characters.
- modified by renaming variables and adding casts to permit compile
with g++.
- modify headers so they can all be compiled without order
dependencies, and use bracketed rather than quoting includes to allow
compile from separate directory.
- renamed xtermm terminfo entry to xterm-mono, to avoid conflict with
Solaris entry now in ncurses.
Several small fixes and enhancements, including a patch from
Bjorn Helgaas:
- correct initialization of TERMCAP environment variable, which
was frequently set to garbage on non-Linux systems because
"termcap" and "newtc" contained random data from the stack.
- remove the LINEWRAPPED attribute from lines as they are cleared.
Previously, the attribute was set but never cleared.
- make word and line selections work even when lines are wrapped
by xterm. Previously, selections were limited to one screen line.
as well as
- modify logic for line-wrapping to reset the associated flag if
the application deletes a character. This fixes a problem reported
by Bjorn Helgaas where word/line selection would still wrap even
after deleting characters from the first line.
- add kll/kH capabilities to xterm-xfree86 entries in termcap and
terminfo (request by Michael Schroeder).
- shorten descriptions in termcap to make resolved entries all
shorter than 1023 character limit.
- use DECSTR control sequence to shorten initialization and reset
strings in xterm-xfree86 termcap and terminfo.
- use rmul/smul and rmir/smir in xterm-r5 terminfo to match termcap.
- correct typos in initialization and reset strings in xterm-r5
termcap and terminfo.
- disable special translations of key symbols (the backarrow key,
the editing keypad and the keypad "+") when a modifier other than
shift, control or numlock is used. This makes xterm handle the meta
key as expected by people using emacs (reported by Pete Harlan
<harlan@pointofchoice.com> in linux.debian.user newsgroup).
Merge changes through patch #83 with the 3.3.2e version. This follows a
patch by Matthieu Herrb <matthieu@laas.fr> to add checks for non-null
return from malloc.
Several small fixes and enhancements:
- add configure test to infer if xterm should be installed setuid
based on previously installed xterm (reported by Stephen Marley
and Stefan Dalibor).
- integrate/extend patch by Jason Bacon to implement quasi-continuous
mouse reporting.
- correct control sequences transmitted by function keys F1 to F4
when sunFunctionKeys resource is true (it was still using the
VT100 control sequences).
- modify handling of backarrow key so that the control modifier
toggles the backspace/delete interpretation set by the
backarrowKey resource.
- limit the row and column values used to report mouse position.
From resync with XFree86 3.9Nb:
- add support for the VSTATUS control character (patch by
Robert Earl <rearl@teleport.com>).
Bug fix for patch #81:
- remove an #undef for NBBY, which caused compile problem on FreeBSD
(reported by David Dawes).
More bug fixes:
- fix conflicting ifdef's for TIOCSLTC when building with Linux on
AXP aka DEC Alpha (reported by Robin Cutshaw).
- correction to patch #79, move assignment for *utptr->ut_user = 0;
back into non-SVR4 ifdef in main.c, since this clobbers username on
Solaris 2.5.1 (analysis by Will Day
<willday@rom.oit.gatech.edu>).
- corrected khome/kend in xterm-8bit terminfo description.
- improve cursor color by making it always the reverse of fg/bg
unless the cursorColor resource is set, i.e., to something other than
the default foreground (reported by Vikas Agnihotri and Bram
Moolenaar).
- minor fixes for compiler warnings, including a syntax error in
the AMOEBA ifdef's.
From resync with XFree86 3.9Aj:
- correction to patch #73, supply missing #else for fallback definitions
of size_t, time_t (Robin Cutshaw <robin@intercore.com>).
This fixes a couple of items leftover or introduced by patch 79:
- take out the logic that suppresses editing-keypad in vt100 mode
(those keys are too valuable to give up for a fine point of
emulation).
- corrected a couple of places in terminfo where I missed using the
vt220-style editing-keypad codes for Find/Select (mapped to Home/End).
- checked termcap file against terminfo, fix several places where it
was inconsistent.
This patch fixes several small bugs:
- use X_EXTRA_LIBS in standalone Makefile.in (patch by Tomas Vanhala).
- add new resource 'oldXtermFKeys' which provides backward compatibility
for F1-F4 control sequences with TOG's xterm.
- determine the server's default foreground/background Pixel values,
needed if the -flipPixels X server option is used (reported by
David Dawes).
- correct logic for F1-F4 function keys so that they generate VT100
compatible escape sequences in VT220 mode, since that is what the
numeric keypad is supposed to do (reported by Ron Johnson, Jr.
<ronjohn@communique.net>).
- modify logic for editing keypad to work more like VT220: don't
pass those codes in VT100-mode unless oldXtermFKeys mode is set.
- correct an interaction with the editing-keypad logic that prevented
backarrow key from sending a 127 for the delete key (the 'remove'
escape sequence was being sent instead).
- use return-value from getuid() rather than the parameter, to work on
systems which do not update the latter (patch by Kevin Buhr
<buhr@mozart.stat.wisc.edu>)
- correct scrollbar border color when toggling to/from secure keyboard
mode (patch by Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>)
- modifications to terminfo file:
- rename description to xterm-xfree86, adding an entry 'xterm'
which is derived from xterm-xfree86 to simplify customization.
- change string for kdch1 from \177 to \E[3~, to address complaints
from Debian developers. (This applies to the key labeled "Delete",
and does not affect the backarrow key).
- add user-strings u6, u7, u8, u9 to entries to make them work with
Daniel Weaver's "tack" program.
- modify xterm-24, xterm-bold, xterm-boldso entries to disentangle them from
explicit dependency upon xterm-xfree86.
- add generic 'xterm-color' entry.
- minor corrections to xterm-xfree86, xterm-8bit, xterm-r5 and
xterm-r6 entries.
Again, most of the bulk of this patch is for ANSI conversion. I used the
IRIX compiler's -wlint option to find the remaining functions that use
K&R syntax (since gcc does not do this properly).
Also, I changed the logic in the print code slightly to close unwanted files
before opening a pipe to the printer. This may help in some configurations
where the line printer hangs until xterm closes the pipe.
Most of the bulk of this patch is to convert the extended C (K&R functions
with prototypes) to ANSI. I verified that on Linux by comparing object
files, to ensure that I did not, for example, interchange parameters in
the function declarations.
The rest of the patch fixes several minor bugs, and adds a few features:
- back-out my use of ncurses "captoinfo -f" option (if/then/else/endif)
formatting, since ncurses did not correctly filter embedded newlines
in terminfo capability strings until _after_ ncurses 4.1, thus
corrupting setf/setb/sgr strings (reported by Darren Hiebert and
others).
- document SGR 8, 28 (invisible/visible), add corresponding
capabilities to terminfo description.
I would also add the 'prot protected capability, but the control
sequences for that would not be recognized or properly ignored by the
older xterm programs.
- modify ChangeGroup to not suppress a null-resource, but treat it as an
empty string (recommended by Stefan Dalibor).
- add printerAutoClose resource to control whether printer is closed
when going offline. More than one person reports problems (on
Solaris 2.6 and Digital Unix 4.0) getting the printer to proceed
unless xterm exits; I think that it is a problem flushing the pipe.
Closing it ought to flush it.
- adapt TOG fix-3 to in HandleKeymapChange and VTInitI18N (but adapt
XtStackAlloc/XtStackFree for clarity, as well as fixing memory leak).
- change calls on FillCurBackground to ClearCurBackground, in effect
using XClearArea rather than XFillRectangle when clearing as a
side-effect of scrolling and insertion (patch by Alexander V
Lukyanov)
- correct some places where insert/delete did not _move_ the color
attributes, using memmove (patch by Alexander V Lukyanov
<lav@long.yar.ru>)
- add ifdef's for __CYGWIN32__, for port to cygnus version B19.1
(patch by Andrew Sumner <andrew_sumner@hotmail.com>).
- remove #define for hpux that turned on USE_SYSV_ENVVARS, since this
causes some applications (such as 'less') to get incorrect $LINES and
$COLUMNS values (reported by Clint Olsen).
- modify behavior for HP-UX, to set the "reserved" process group
controls to _POSIX_VDISABLE so the TIOCSLTC ioctl does not produce an
error (patch by Ben Yoshino <ben@wiliki.eng.hawaii.edu>).
- correct length of underlining, reducing it by one pixel to avoid
leaving a dot when the application does not clear the whole screen
(patch by (Sergei Laskavy <Laskavy@cs.msu.su>).
I noticed this only recently myself (and other people as well); it
depends on the font chosen. A 6x10 font shows it, but the other
fonts (from XTerm.ad) do not. I also see a similar problem with the
emulation of bold fonts.
- add include for Xos.h to xterm.h, to ensure proper definitions
(reported by Holger Veit).
- update config.guess to recognize Unixware 2.1 and 7 (patch by
Mike Hopkirk <hops@sco.com>).
A fix for the print-window function, and some minor cleanup:
- modify logic that closes pipe in the print-window function to not use
pclose, which does not work on all systems, since I did not open the
pipe with popen (reported by Stefan Dalibor).
- correct name of $(EXTRA_LOAD_FLAGS) imake variable (reported
by Stefan Dalibor).
- guard logic in ChangeGroup() function against null pointer
(reported by Stefan Dalibor).
- ensure that menu entry for toggling sunKeyboard resource is
initialized (reported by Branden Robinson <branden@purdue.edu>).
- gcc unused-variable warnings (reported by Bernd Ernesti
<bernd@arresum.inka.de>)
- rename global variable 'buffer' to 'VTbuffer'
This incorporates fixes from several people, as well as some improvements
that I made based on feedback from users:
- add option to standalone configure script, "--with-own-terminfo-dir",
which causes xterm to pass a predefined value of $TERMINFO to the
application. Also use this value in install rule "make install-ti",
for the standalone configure script.
(patch & feedback from Tor Lillqvist <tml@hemuli.tte.vtt.fi>)
- change ifdef's for "hpux" to "__hpux" (patch by Tor Lillqvist). The
imake configuration uses the former, but the latter is predefined by
HP's compilers.
- define USE_SYSV_ENVVARS for HP-UX, curses does not use $TERMCAP (patch
by Tor Lillqvist).
- on HP-UX, use the /dev/ptym/clone device to allocate PTY's. Works
both on HP-UX 9 and 10. (patch by Tor Lillqvist).
- modify configure script to obtain the $(EXTRA_LOADFLAGS) value from
imake, needed for compiling under DEC OSF/1 (reported by
Stefan Dalibor)
- modify print-window action so that the printer is closed after
printing a window, unless the printer was already opened (i.e.,
by an application running in the window). This makes the printing
complete without having to exit xterm, since not all systems treat
fflush through a pipe very well (reported by Stefan Dalibor)
- modify printing code so that the ^M's are not printed if the
printAttribute resource is set to zero (request by Stefan Dalibor).
- correct typo in xterm.man, for the default value of printAttribute
(reported by Stefan Dalibor).
- correct printing code so that the alternate character set is
printed, like other attributes, with escape sequences.
- correct termcap description, removing spurious 'm' character from
the 'op' capability (reported by Greg Woods <woods@weird.com>).
- correct trace code so that the initial timestamp is set.
- correct/modify utmp data for the Linux glibc 2 configuration,
so that the ut_line member is set before using it to update wtmp
(patch by Bill Nottingham <wen1@cec.wustl.edu>).
This corrects a couple of recent bugs and adds a new resource:
- modify definition of TRACE_CHILD so that it does not conflict with
ifdef's for USE_USG_PTYS in main.c (reported by Vikas Agnihotri
<VikasA@att.com> and Stefan Dalibor).
- correct ownership of file (actually pipe) written by the print
controls. When undoing the setuid changes in patch #69, I overlooked
this. Now xterm forks a process which resets setuid and routes the
printer data as the real user.
- add a new resource, "printAttributes", which controls whether
color attributes (or any attributes) are sent to the printer.
This patch does the following:
- implements a print-window facility for xterm. Though useful in
itself, I added it as part of some debugging which I am doing.
(Occasionally during an exposure event xterm fails to restore the
proper colors for highlighted text, and printing the screen will
show the internal states nicely).
The print facility now also displays the color information.
(I will probably make this a resource).
- modified the xterm-16color terminfo description to use the setaf and
setab strings, which is a little more efficient (requested by Stephen
Marley).
- reduced some clutter of the ifdef/includes (e.g., stdlib.h, unistd.h,
errno) making the configure script test for these.
I removed the symbols Size_t and Time_t, since they no longer serve
a useful purpose.
- added some debugging traces to show the initial screen size,
and the success/failure of the ioctl calls pass handle window
resizing events to the application (for Clint Olsen).
I also modified the trace code to produce two files since some
of the information is produced by the child process. So now
they are Trace-parent.out and Trace-child.out
- updated configure test for ANSI compiler options to handle a
special case for HP-UX 10.x (reported by Clint Olsen).
This is a patch from Chris Siebenmann <cks@hawkwind.utcs.toronto.edu>,
which I have cleaned up a little, and integrated into the configure script.
From his description:
This set of patches is the latest incarnation of patches originally
written by Ian! D Allen, then of the University of Waterloo and now of
who knows where; I have been carrying them forward from xterm to xterm
ever since about X11R4. What they do is add an option so that when an
iconified xterm receives output it prepends '*** ' to its icon title
and (optionally) beeps the bell; deiconifying the xterm removes the
'*** '. Over the years I've found this to be incredibly convenient for
monitoring all sorts of low-activity things.
This patch is a slightly modified version of one by Richard Braakman, which
prevents buffer overflow in the input-method and preedit-type parsing in xterm.
I changed a couple of details to make the code more maintainable, and looked
for similar things - copying into a fixed-size buffer (found none, though I did
spot an unused variable).
This patch corrects some minor bugs in xterm, and fills in some more details
in the VT220 emulation:
- modify Imakefile to use SpecialCObjectRule for menu and data modules,
making xterm build properly if logging is enabled
(patch by Scott Sewall <scott@iprg.nokia.com>).
- restore "ich" capability to terminfo entries, since
Michael Schroeder points out that "ich1"
is the one which is the problem in Solaris vi.
- correct color of cursor, which would disappear on inverse-video
since the initialization did not compare the cursor color against
both foreground and background (reported by Olivier Calle).
- correct abbreviation-test for -version and -help options, making
command-line option -vb work (reported by Stefan Dalibor).
- correct a dependency between ifdef's for OPT_I18N_SUPPORT and
OPT_INPUT_METHOD (reported by Stefan Dalibor).
- split-out character-set translations as new module charsets.c, to
implement VT220 national replacement character sets (a mode where
some of the characters are displayed as specific European glyphs).
This relies on xterm using an ISO 8859-1 font (approach suggested by
Kenneth R. Robinette <zkrr01@mailbox.neosoft.com>).
- correct a missing increment, which made SS2 and SS3 controls
repeat the shifted character.
- add xterm-nrc to terminfo to illustrate the VT220 national
replacement character sets.
- reformat terminfo using new ncurses tic option "-f", which makes
if/then/else/endif expressions easier to read.
This corrects the problem in xterm with utmp, reported by Olivier Calle
<olivier@tc.fluke.com>
as well as some other people after the XFree86 3.3.2 release.
The error was introduced by my patch #53 in XFree86 3.9r (October 1997).
The correction removes the reset of setuid/setgid before the main event loop,
and solves the problem which I had worked around in a different manner: for
some reason, the particular waitpid() call in creat_as() hangs, does not
return when the child process exits. I changed the ifdef's to force the Linux
configuration to use wait() instead. This call appears to work properly on
other platforms such as SunOS and Solaris.
I also added tests in the standalone configure script to check for the
existence of waitpid().
This corrects another problem with the logic for highlightColor resource.
As reported by David Dawes:
I've just noticed a problem with with the "inverse" control sequence
(ESC[7m) with the 3.3.2 xterm. What it does is sets the background
black, and the text the usual foreground colour rather than simply
swapping the foreground/background.
This appears to be because when I added logic to check that the highlightColor
was distinct from foreground and background colors, I did not add a further
check to see that it was not black (I would make an explicit check for the
resource not being set, but see nothing definite in the headers that would let
me reference an explicitly-undefined Pixel value, though there are some
implications in xpm.h). But this should work.
This patch does the following:
This fixes the problem reported with failure to build the resize
program (BSDI, OSF/1) due to not having <termcap.h>, by changing the
ifdef to one that would be set only if the file exists (not currently
specified, except by the standalone configure script). We do not really need
to include <termcap.h> to build, but only for a clean compile, since it
may declare the tgetent() prototype.
I also updated the man-page for resize, since I had recently noticed
that it can be used to resize xterm using the "Sun" control sequences
option.
This is a small patch to xterm's 8-bit terminal description. I noticed
while testing ncurses that I had specified the wrong (VT100-style) codes
for the F1-F4. Xterm only uses VT220-style function keys in 8-bit mode.
This fixes the following problems with xterm:
This is another patch from Bjorn Helgaas <helgaas@rsn.hp.com>, which I've
reviewed (and learned some). Following are his notes:
I poked around some more and finally got xterm-62 to build and run
cleanly on HP-UX 10.20. Here are the patches. They look sort of
ugly, so here's a little explanation:
- aclocal.m4: Removed side effects from the AC_CACHE_VAL
commands in CF_FUNC_TGETENT. Previously, LIBS was set inside
AC_CACHE_VAL, which worked fine the first time configure was
run, but failed if there were cached values.
- aclocal.m4: Added temporary setting of LIBS before
AC_TRY_LINK in CF_FUNC_TGETENT. Previously, the last value set
by the AC_TRY_RUN loop was used, so only -lcurses was checked.
- configure.in: Added temporary setting of CPPFLAGS before
AC_CHECK_HEADERS for X11 files. Previously <X11/DECkeysym.h>
and <X11/Xpoll.h> were found only if they were in the compiler's
default include directories, even if `--x-includes=DIR' had been
used or AC_PATH_XTRA had found them elsewhere.
The problem on HP-UX was that we were linking with -lcurses rather than
-ltermcap due to the second bullet above, and apparently something in
HP-UX curses is broken. This seems very strange, because the only thing
used is tgetent, which should affect any tty/pty configuration, but I
lost interest in tracking down the exact problem.
This is a patch mostly by Bjorn Helgaas <helgaas@dhc.net> (I added the
os2main.c change, and a little of the documentation). From Bjorn's
description:
- If you use the "-hc <color>" option or set the "highlightColor"
resource, text is highlighted by changing only the background color,
rather than using reverse video. I find this easier to read,
especially when selecting multi-colored text, and it is similar to
the way Netscape shows selections.
- Most of the code changes are under "#if OPT_HIGHLIGHT_COLOR". The
principal exception is in screen.c, where I added a couple calls to
resetXtermGC(). This seems like it could be a bug even without
the color highlighting changes (though I don't pretend to understand
all the logic).
This patch modifies the reset behavior of xterm slightly:
- change the terminfo entry so that rs1 (one of the strings used by
the 'reset' program) does a hard reset rather than switching
character sets. This is more in accord with other terminal
descriptions.
- modifies the treatment of hard reset by the xterm program to
reset the saved lines.
- corrects hard reset by also resetting user-defined keys (DECUDK).
This fixes some minor bugs and adds new functionality:
- add support for blinking text.
- This does not actually cause the
text to flash, but text with the blink attribute can be displayed
in color, using new resources colorBL and colorBLMode.
- If colors are not used, the blinking text will be displayed as
before (just like bold). The main purpose of this is to make
applications work properly when they assume the emulator supports
blinking text.
- I did this by moving the per-cell LINEWRAPPED flag to a per-line
flag, to make room for the new BLINK flag. There were no per-line
flags, so this changes a lot of logic.
- corrected missing save-cursor logic in the handling of SGR 1048
(the new control sequence I added in patch #54, 1997/10/17).
Reported by Darren Hiebert.
- flush the output of the transparent printing after each line
Reported by Tomas Vanhala <vanhala@ling.helsinki.fi>.
- correct the modes that are affected by save/restore cursor by adding
WRAPAROUND and PROTECTED.
- corrected placement of one of the XSync calls that I added in patch
#51, 1997/9/15, which had the side-effect of writing on the window
border when the xterm was resizing from 132 to 80 columns.
- work around an incompatibility of the XKB definition used in xterm
versus that symbol from IRIX 6.2's imake definitions (by adjusting
the standalone configure script).
My last patch has an off-by-one error in the comparison for argc. Douglas
Kosovic <douglask@dstc.edu.au> showed me where (he got a core dump).
Also, I think this explains Clint Olsen's problem, but the symptoms were more
subtle (EINVAL for a system call if the -display option is omitted).
This patch does the following:
- implement logic to permit xterm to work with proportional fonts.
- Thomas Wolff
<Thomas.Wolff@sietec.de>
requested this (but it isn't exactly what he's asking
for - that's a more involved task).
- I chose to do this by rendering the characters on a fixed pitch,
because it would not be useful for existing applications to display
varying numbers of characters on each line.
- Except that this forces the display to be wider, it works reasonably
well. A couple of special cases (reverse + colorBD, for example)
do not display with proper colors, since the inter-character gaps
are painted with the background.
- added a version number to the program (several people have requested
this).
- make the -version and -help options interpreted before the program
attempts to open the display.
- minor reorganization of the man-page (ordered the options, resources
and translations alphabetically - and eliminated some duplication).
- corrected a misspelled filename in Makefile.in, and added a lint
rule.
- updated the configure script to correct behavior when it cannot
find imake, as well as to fix the IRIX+gcc build (conflict with
/usr/include).
- regenerated the configure script with a newer patch to autoconf
that fixes a problem with environment space vs the configure --help
message.
This patch is mostly concerned with the standalone configure script; a few
minor corrections are added:
- add configure option --disable-tek4014, to allow xterm to be built
without the tek4014 emulation.
- add configure option --with-terminal-type, to allow xterm to be
compiled with default $TERM value other than "xterm" (e.g.,
"xterm-16color") -- requested by Stephen Marley <stephen@memex.com>.
- fix a typo in the configure --help message -- reported by Darren
Hiebert <darren@hmi.com>.
- review diffs between main.c and os2main.c, to make them more alike.
(applies some minor bug-fixes to OS/2's version).
- add missing quotes in memmove/bcopy configure test
This patch is based on analysis by Arfst Ludwig <arfst@luxor.IN-Berlin.DE>,
who reported:
Setting the following resources xterm (all current versions) receives a
segmentation fault on <Btn2Up> after scrolling:
*XTerm*VT100*translations: #override \
~Shift~Ctrl<Btn2Up>: insert-selection(PRIMARY, CUT_BUFFER0)\n\
Shift~Ctrl<Btn2Up>: insert-selection(CLIPBOARD, CUT_BUFFER1)\n\
~Shift<BtnUp>: select-end(PRIMARY, CUT_BUFFER0)\n\
Shift<BtnUp>: select-end(CLIPBOARD, CUT_BUFFER1)
(The above resources intention is to be able to paste the latest
selection even if the xterm was cleared.)
And here is how it works (and a fix!): The widget given to the action
handler as first argument is not guaranteed to be a XtermWidget (it can
be the ScrollbarWidget). Instead of accessing the widget's member
directly XtDisplay gives the required pointer in a safe way.
I noticed that this was not the only instance (by reading the code, and testing
with his example), and extended the solution to check the widget-class to
ensure that it is indeed xterm's widget class before attempting to use it in
the context of translations.
This fixes the segmentation violation noted by Rogier Wolff about a month
ago. He'd set xterm to 400 (rows) by 150 columns, which broke because there
were limited buffers (200 rows) used for juggling data when adding or deleting
lines and for switching between alternate and normal screens. I replaced this
by an allocated buffer.
The bug is simple to test if you set titeInhibit false.
This patch does the following:
- correct a minor placement problem with the right scrollbar.
- implement a new set of control sequences for switching between the
normal and alternate VT100 screens. These work around the older
sequences limitation that required modification of the runtime
$TERMCAP to cooperate with the titeInhibit resource (that can't work
with terminfo). I do this by moving all of the functionality of the
rmcur terminfo capability into the control sequences.
- implement the alternate-screen menu entry
This patch adds a fix and implements a new feature (as well as some minor
typos):
- JCHANDRA@Inf.COM (JCHANDRA) noted that there was still a problem
with the wait call with the logging option. It hung when the logfile
was opened as a command-line option. I fixed this by moving the
StartLogging() call down past the place where I'd reset the setuid
mode. So the logfile is opened as the real user, without having
to fork.
- Michael Rohleder <michael.rohleder@stadt-frankfurt.de> sent
me a patch which implements right-scrollbars for xterm. I used that
as a starting point, renamed the command-line options and reduced
the number of ifdef's.
This patch addresses bugs and requests reported by
- Bob Maynard <rmaynard@montana.com>,
- Clint Olsen <olsenc@ichips.intel.com>,
- JCHANDRA@Inf.COM (JCHANDRA),
- Michael Schroeder <Michael.Schroeder@informatik.uni-erlangen.de>,
- Pablo Ariel Kohan <pablo@memco.co.il>
Some of the changes are interrelated (it was an unusually busy week).
- change the default resource value for colorMode to true, matching
the Xterm.ad file.
- correct behavior of 'ech' control, making the default and 0
parameters erase one character rather than to the end of line
(reported by Michael Schroeder).
- add resource boldColors, command-line options +pc and -pc and
configure-script option to specify behavior of xterm's mapping bold
colors 0 through 7 to colors 8 through 15.
(request by Pablo Ariel Kohan).
- add resource colorAttrMode to specify whether colorULMode and
colorBDMode can override the ANSI colors
(from a problem report by Clint Olsen).
- correct a conflict between colorULMode/colorBDMode versus ANSI
colors, where exposure events would occasionally pick up the
former (e.g., colorBD) rather than ANSI colors. Testing the
colorAttrMode made this apparent, though it has been in the
code since 3.2A (patch #35 in Jan 1997).
- correct two problems with the optional logging support. On Linux
at least, the waitpid call in creat_as hangs when the logging is
toggled from the popup menu. Also, the mktemp template has the wrong
number of X's (since X11R5!). Fixed the waitpid problem by
exploiting the fact that the setuid behavior is reset before the
popup menus are available.
(reported by Jayachandran C.).
- add configure script options for building with the Xaw3d and neXtaw
libraries.
- correct CF_IMAKE_CFLAGS standalone configure script macro, so that it
will pick up $(ALLDEFINES) rather than $(STD_DEFINES). This is
needed to make scrollbars work on Linux, since that uses narrow
prototypes.
(reported by Bob Maynard).
- various minor updates to configure-script macros.
Most of this patch is related to the standalone configure script, though
there are fixes/enhancements as well:
- add a new resource sunKeyboard, with associated command-line
option and menu-toggle that allows using a normal Sun or PC
keyboard to generated the complete DEC-style function keys
and keypad.
- correct a reversed foreground/background test in the control
sequence that replies with the current SGR settings.
- correct, by invoking XSync, a display problem that caused the
program to not properly update newly exposed areas when a font
change or 80/132 resize request was not completely accepted.
- restructured autoconf macros (I made a library of all of the
macros across the complicated configure scripts I'm working on).
- use the autoconf config.guess and config.sub scripts to better
identify the host-os.
- improve the configure script that uses 'imake' as a fallback for
definitions.
- correct several instances of unsigned/signed mixed expressions.
I've tested the configure script on Linux, SunOS 4.1.3, Solaris 2.5.1,
IRIX 5.2 and 6.2, AIX 3.2.5 and CLIX 3.1 (all but the last run properly
as well).
This is a collection of small fixes, and a couple of minor enhancements:
- plug a security hole in the implementation of Media Copy (print)
by invoking setuid just before the main loop.
- add an ifdef'd include for <sys/termio.h> for HP-UX, which allows
the program to process SIGWINCH events (this is a bug in X11R6.3)
- add state-table entries for VT52 emulation to enter/exit keypad
application mode.
- disable the popup-menu entry for 8-bit controls when the terminal-id
is less than 200 (e.g., VT52 or VT100).
- ensure that the popup-menu entry for 8-bit controls is updated when
the application enables/disables this mode, including the response
to a full-reset.
- implement VT300 DECBKM feature: set interpretation of the backarrow
key to either backspace or delete. The initial setting is via
resource; it can also be modified in the main popup menu.
- implement VTxxx KAM (ISO AM), which allows a keyboard to be locked
(i.e., the terminal discards input).
- implement VTxxx SRM, which is used to control local echoing of
input on the terminal.
- add terminfo and termcap entries for xterm-8bit, a variation of
the xterm description that uses 8-bit control characters.
- add fallback definitions for Imakefile to allow it to work on some
X11R5 systems that have no SpecialCObjectRule or ProgramTargetName
macros.
- add .c.o and .c.i rules to standalone Makefile.in
- correct order of -lXmu and -lXext in standalone configure script.
- add configure script options to allow selective disabling of
active-icon, input-method and i18n code (mainly for users with X11R5
or an incomplete X11R6 configuration).
- change menu-indices from #define's to enum values, thereby making
it work better with the ifdef's for logging and active-icon (the
X11R6.3 active-icon code is incorrectly ifdef'd; this corrects an
error introduced by incorporating that code).
- correct minor compile errors in the configuration where active-icon
is not used.
- add configure option to suppress echoing of long compiler commands
- correct spelling of decTerminalID in configure script help message
- use gcc __attribute__((unused)) to quiet warnings about unused
parameters when compiling with -W (to make it simpler to find the
real problems).
This patch implements the VT100/VT220 Media Copy (i.e., print-screen) control
sequences.
This patch does the following (all but the first affect only the standalone
configure script):
This patch does the following
- corrects an indexing error in the doublesize character logic
(button.c) that caused core dump (this was reported by J. Wunsch).
- corrects the logic of ShowCursor when it is painting in a doublesize
cell (charproc.c).
- corrects, according to vttest, the behavior when switching to
doublesize characters and back again (doublechr.c).
- adds cbt (back_tab) to the terminfo description (this was something
that I'd overlooked as applicable to curses optimization last
summer).
- corrects, for the standalone xmc test, the logic for disabling xmc.
This is a patch to provide test-support for some work I'm doing on ncurses. It
does not modify the normal configuration of xterm; the code is compiled if the
standalone configure option "--enable-xmc-glitch" is specified.
This fixes the problem reported with xterm's cursor color versus the background
(the second chunk in this patch) and also removes some duplicate initialization
of the cursor GC's. If the cursor color at startup is the same as the
background, then xterm will use the reverse GC, ignoring the setting of the
colorMode resource.
This implements the first part of the VT100 doublesize characters for xterm,
as well as fixing a handful of bugs:
- the doublesize character support uses the normal font (using scaled
fonts will be another patch) with blanks to simulate doublesize
characters. This patch does most of the global changes that'll be
required. I've hidden most of the details in macros and ifdef's so
it's easy to configure out (part of the patch is a configure option
for that purpose).
- corrected limits in DeleteChar() function -- it's always ignored the
size of the left border and scrollbar. I noticed this when working
on the doublesize characters since the glitch was doubled in size
(i.e., it wrapped some garbage around the right margin).
- corrected 'memmove()' logic, for standalone builds (it referenced a
malloc wrapper from my development library).
- add a check for HideCursor() to prevent repeated screen updates
(which can cause a spurious cursor glitch to appear, e.g., during
scrolling). I noticed this with the 3.2A version (but only a few
weeks ago, when I started working on this patch).
Here's a fix for two problems:
- modify handling of tgetent results in xterm and resize programs to
make them tolerant of missing termcap file, or unknown terminal name.
In this scheme, an explicit "-tn" option will succeed, overriding
the fallback list.
- a nit in the configure script (log extra information to help diagnose
which case of the test-compile of tgetent was used).
Bram Moolenaar reported that the cursor color changed unexpectedly while
scrolling. The cause was that it used the same GC's as the logic that draws
the ANSI colors. The bug only appears if the cursorColor resource isn't set,
and has been present since the initial implementation early last year. (The
same bug also appears in rxvt ;-). Here's a fix.
Some nits found by Darren Hiebert (missing part of install-rule, incorrect
assignment for --enable-color-mode option).
Patch for the configure script's logic for obtaining imake predefined
symbols.
This patch does the following:
- integrate the 16-color change for 'xterm'
- minor fixes/clarification of tgetent in terminfo vs termcap to
'resize'
(both changes also modify the configure script)
This implements a simple configuration script with autoconf (to which I'll
add more options later). It does the following:
- configures xterm to build with X11R5 (at least on SunOS 4.1, Solaris
2.4, possibly IRIX - sorry network was down today, but I did test
an earlier version yesterday).
- enables/disables the configuration ifdef's for ANSI color and VT52
emulation.
It does not make tests for the things that imake does (that's another project),
instead it uses a hybrid of the autoconf tests for libraries and adds imake's
compiler options (which are necessary in some cases to get main.c to compile).
This corrects a minor, but annoying error in the vt220 emulation: the DECUDK
is only supposed to be interpreted for _shifted_ function keys.
This corrects something that I overlooked in patch #27 (21-aug-1996), which is
that when trimming the region to be repainted for the highlightSelection
resource of xterm, I still have to paint the background past the highlighted
region. This only happens when I first do a selection in a window that's
partly off-screen, then move the window on-screen.
This patch does the following:
- combines the coding for foreground and background colors into a
single byte, reducing the memory required to store saved-lines in
color. (I'll take back that byte in a following patch to use to
ensure the character-set, so there's no long-term decrease in memory
use).
- modifies the PF1-PF4 coding in termcap/terminfo. Because xterm is
still by default emulating vt100, the function key codes are
vt100-compatible (I overlooked this in patch #31).
I also reformatted the whole terminfo file into a single-column,
for consistency.
- adds an interim xterm-vt220 description to accommodate the old and new
styles of function-keys (though probably it'd be better to drop the
old-style altogether).
This patch does the following:
- implement DECSTR (soft terminal reset). The biggest diff is due to
adding another state table (note that there's only one useful state
here, but it's only 256 bytes rather than 1k as it would have been
before I reduced the size of state entries).
- some minor tidying up (e.g., signed/unsigned use bitcpy, MODE_DECCKM,
resetColor, resetCharsets). More is done in patch #35.
I got the description of DECSTR from a vt420 user's manual. I'll do some
testing with vttest to ensure that there's nothing else to do than what was
documented.
This adds to the reset-fix by Matthieu Herrb <Mathieu.Herrb@mipnet.fr> a
small change to make xterm able to output 8-bit characters in VT100 mode.
Applications that run on real VT100's don't do that anyway, and this feature
should be removed sometime after finishing off the VT220 emulation (VT220's can
do 8-bit characters). That would be a good time to change the default
terminal-id to 220.
This implements the REP (repeat) control for xterm. That isn't part of the DEC
VTxxx series, but is defined in ISO 6429. (Note that the base xterm terminal
description is not changed -- I added a variant, "xterm-rep").
This implements vt52 emulation in xterm (ifdef'd so it can be removed).
I've been using it for testing for the past month or so.
From bug-report by <auroux@clipper.ens.fr> (Denis Auroux), missing reset to
ground state. I checked through the rest of that table and found another,
in the unimplemented MC (screen print).
This patch does the following:
- corrects the restoration of color for bold/underline color mode
- adds a resource 'decTerminalID' to control the reporting level of
xterm (e.g., VT100, VT220).
- uses the new resource to implement/correct the DA1, DA2 and
DECRPTUI reports.
- change valid-response code in DECRQSS from 0 to 1 (the manual says 0,
but the VT420 terminal I've been testing on says 1).
All of these changes are based on vttest 2.6
(Most of the volume in the patch is to add 2 more state tables for parsing
the 2nd/3rd device-attribute controls).
This patch corrects the following reported by Roland Rosenfeld
<roland@spinnaker.rhein.de>:
- handle SGR 22, 24 and 25 in combination with colorUL and colorBD
resources. Also noted & fixed reset of colored underline/bold
with SGR 0.
- a typo in the termcap (missing '['), from 3.1.2Dj (my error)
Roland also complained that he couldn't use box characters with
-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1
but that's a known xterm limitation (the box characters must be part of the
font, in the first 32 locations).
This patch fixes one of my long-term gripes: xterm's selection doesn't clearly
show what's being selected (as per David's request, it's controlled by a
resource, which defaults to the older behavior).
Here's a patch to fix a problem with xterm's cut/paste and another to modify
the appearance of the highlighting while selecting. (The changes are
independent, so you can see if the change to screen.c is desirable).
Here's a correction for two minor bugs that I picked up in testing, plus
some lint (from Solaris 2.5) where NULL was used incorrectly:
- make the second alternate font the same as the first (that's what
vt420 and dtterm do)
- corrected DECSCL report when DECSCL hasn't been set (i.e., don't
return a '60').
This patch does several things. In effect, xterm can (I think) do a reasonably
good job of emulating vt220 and vt320 terminals (as well as it was doing
vt100, at any rate ;-).
It does NOT do:
- soft fonts
- rigel or sixel graphics
Anyway, I:
- added ECH, CPL, CNL, SU, SD, CBT, CHT controls
- added popup-menu for switching between DEC and Sun function keys.
(corrected alignment err wrt logging entry at that point).
- make xterm recognize both 8-bit and 7-bit controls (including
popup menu for switching modes).
- add user-definable function keys (aka DECUDK)
- support concealed text
- support protected text (both ISO compatible and DEC compatible -
that's not the same thing, btw), with SPA, EPA, DECSCA, DECSED,
DECSEL controls.
- implement DECSCL.
I'll be continuing to test this patch for a while, but don't expect to add any
new functionality (it passes all of the current tests I've built in vttest, but
I need to make more tests)..
This removes the blinking cursor I added last week (for performance reasons).
Time-permitting, I'll revisit this after 3.2 is released (there will be more
work after XFree86 3.2, I assume).
I looked more closely at my "double-negative" and realized that I had been
confused by the default color scheme (black on white) in combination with
reverse video. However, I did see that the original_fg and original_bg data
weren't really used - so I removed that logic.
Also:
- during initialization, check if ANSI colors are set with non fg/bg
values, disable color mode if not. This makes xterm tolerant of
applications that allocate the whole color map.
- implemented blinking cursor (default is off)
This patch does the following:
- fixes some minor typography in the control-sequences documentation
(it didn't occur to me til I'd sent the last patch that I could use
ghostview for previewing the troff output ;-)
- adjusts the shell's background color in ReverseVideo so that flicker
in resizing is reduced
- adds an ifdef OPT_ISO_COLORS to allow configuring xterm without
the ISO color support (saves a lot of memory)
- used that ifdef to isolate/modify logic so that if the user doesn't
have the colorMode enabled, then ISO color support is disabled (saving
memory).
(If anyone needs numbers, I had savedLines set to 2000, and found
a reduction from ~700k to ~400k of allocated memory, according to
Purify).
This documents the changes in control sequences for window operations that
I added in my previous patch. I'm testing another patch that allows the
user to use less memory if colors aren't needed.
This patch does the following:
This implements the following:
- escape sequences that act like the CDE dtterm's window operations
(though I have implemented the default width and height -- I've seen
a rather buggy dtterm running that seems to treat width=0 or height=0
literally -- maybe that's a feature, not a bug?)
- minor tweak to the screen-repainting when resizing (I still cannot
entirely get rid of flicker).
- still more fixes to terminfo & termcap (I corrected my error for
the hpa code and added some other stuff by comparing to ncurses'
description and rxvt's).
- a tweak to the patch by Michael Rohleder for the color translation
- re-order attribute codes to allow later implementation of protected
fields (dtterm supposedly does this; it's probably more useful than
blinking or invisible text -- that uses up all of the available bits
without changing the attribute scheme radically).
This patch implements for xterm several minor features from ISO 6429 which are
useful for terminfo applications. The HPA and VPA control sequences allow
cursor movement along a row or column, cutting down a little on the characters
transmitted. The other codes allow resetting specific graphic rendition
attributes without modifying the other attributes.
(now if someone just had time to implement blinking cursors...)
Adam Tla/lka <atlka@pg.gda.pl> told me a couple of weeks ago that I'd missed
some of the background coloring in xterm. I investigated, and found that while
I'd picked up on the clear-to-bottom and clear-to-end-of-line operations, I'd
overlooked the insert/delete lines. Just so I wouldn't overlook any more of
these, I updated a copy of vttest to test ISO colors and bce (background color
erase). This patch introduces a new function, ClearCurBackground, whose calls
replace the direct XClearArea calls that I'd overlooked.
(There's also a few compiler warnings fixed, etc ;-)
This fixes the problem reported by David Dawes, by making the 50msec select
timeout for the Xaw3d arrow scrollbar a resource. (I made it a boolean for a
variety of reasons -- to make it a number, you'd need an additional resource,
to avoid breaking the logic).
This patch brings the termcap and terminfo descriptions for xterm up to date.
I made the following changes:
This corrects my earlier changes for colors - the inner border of the xterm was
getting painted with the wrong color, since I'd moved the call to set the
background into the logic that tracks SGR information.
This corrects a memory leak in xterm that happens whenever one switches fonts.
This patch corrects the behavior of the ANSI colors in xterm when reverse
video is used, as well as some other lesser sins:
- button.c
- (compiler warnings: shadowing of 'time', redundant cast)
- charproc.c
- renamed screen.colors[] array to screen.Acolors[] to more
easily distinguish the non-ANSI colors from the ANSI colors.
- moved logic of SGR_Save() into VTInitialize, getting rid of
local private variables original_fg and original_bg.
- moved some logic into getXtermForeground and getXtermBackground
from SGR_Foreground, SGR_Background, etc.
- corrected misleading 'row' to 'col' in case for CUF, CUB
sequences.
- ctlseqs.ms
- xterm.man
- (correct a misconception which I'd added that the color0
through color6 resource values apply to non-ANSI colors)
- ptyx.h
- added original_fg, original_bg to TScreen structure.
- scrollbar.c
- (compiler warnings: redundant cast)
- util.c
- new functions getXtermForeground and getXtermBackground replace
the macros GET_FG and GET_BG, with the added functionality of
checking for the reverse-video status of xterm.
- in ReverseVideo, swap the SGR foreground and background colors
also.
I observed an occasional glitch in the xterm's color behavior; a clear to end
of line would get a color that had been used in a program that supposedly reset
colors. I traced this down to the way xterm was modifying colors of GC's on
the fly; it didn't restore the original color of the GC, even though it would
later be used in functions (such as ClearRight) that assumed (my error) that
the GC would have the current foreground or background color.
I fixed this by resetting the GC's colors with a new function 'resetXtermGC()',
and direct calls on SGR_Foreground/SGR_Background, as appropriate and using a
new function 'updatedXtermGC()' to encapsulate the logic that modifies the GC's
color. (I also removed some commented-out code that was trying to do this --
the problem was a little more obscure).
This patch fixes the remaining problems that I had making xterm run with x11r5,
as well as a couple of other bugs. It follows my patch from yesterday, that
added ifdef's for some of the input-method resources.
- corrected ifdef's that suppress the input-method code (doesn't
exist in my x11r5, and xterm works adequately without it).
- corrected fallback definition for 'Select()' macro (oops: I'd
copied the wrong text...)
- moved the declarations for the fd_set variables to data.[ch]
- corrected an ifdef in resize.c (sunos 4.x doesn't have termcap.h)
- corrected (in main.c) some unused/orphaned variables.
This is mostly a documentation patch for xterm. It describes the color control
sequences in more detail, and documents some other features of xterm that
aren't described elsewhere.
I've also added a couple of ifdef's to fix (part of) the problem that I'm
working on (making the program work properly on x11r5, where I'm doing memory
testing -- I have a "good" version from mid-January, but my resync version
doesn't work properly on x11r5). I'm not done with that yet.
I did a (clean) build of 3.1.2n on Linux 1.2.13 (ELF). I've got an S3 card.
This fixes the following in the 3.1.2n xterm:
- initialize cur_foreground, cur_background in charproc.c (Purify
told me they weren't initialized).
- add interpretation of codes 39, 49, to reset background and
foreground to default value (I'm told that ISO 6429 does this; but I
don't have a written reference -- yet -- can anyone help here?).
Anyway, rxvt does it, and it'll solve my remaining color management
problems.
- shadowing of 'time' in menu.c
- 'Cardinal' vs 'int' in scrollbar.c
- several changes to permit compile with X11R5 (the system that I've
got Purify on won't be upgraded to X11R6 for a long time).
I built this version (with a minor nit that I'll patch soon) on SunOS 4.1.3 so
that I can test it some more with Purify.
btw:
the changes made in Xpoll.h won't work on some older systems, because
fd_set isn't a defined type (I've got one machine at least that this
applies to).
This patch does all of the SGR foreground/background fixes (i.e., clearing the
screen after an SGR color is set causes that color to be used in the foreground
and/or background). If the FG_COLOR and/or BG_COLOR flags aren't set, then the
xterm foreground and background default to the window's values. This usage is
consistent with various types of hardware (especially the IBM PC), and is also
used in rxvt.
- charproc.c:
- add/use new macros GET_FG, GET_BG - n/c.
- add/use new functions SGR_Foreground() and SGR_Background()
to set corresponding colors in GC's, and to retain sense of
"original" colors.
=> This makes redundant some of the corresponding logic
in HideCursor to set the foreground and background,
but I left it in since it may be fixing an unrelated
requirement.
- set GC's in LoadNewFont() according to whether the SGR fg/bg
colors are active.
=> This fixes some glitches in the accompanying resize,
that leaves parts of the window in the original
background color.
- screen.c:
- util.c:
- modified ClearRight() so that if either of the SGR fg/bg
colors is set, we don't bzero the attributes and color
arrays, but instead fill them with the appropriate codes.
- modified ClearLeft to use SGR fg/bg colors.
This patch modifies the object code, by replacing indexing expressions with
temporary variables with the full indexing expression. At first glance, this
seems inefficient (it did to me ;-), until remembering comments made in the
compilers newsgroups that trying to "help" the compiler doesn't really work
that well. A good optimizing compiler can do a better job than the programmer
can. (There's a moral in the use of 'register' variables also, but I won't fix
those...).
Anyway, the revised code generates a smaller object...
- charproc.c:
- recode index expressions in ShowCursor() and HideCursor()
using SCRN_BUF_xxxxS macros - changes object.
- replace constant '4' by MAX_PTRS - n/c.
- ptyx.h:
- defined the SCRN_BUF_xxxxS macros in terms of BUF_xxxxS
macros, to pick up references to ScrnBuf data directly, and
added MAX_PTRS symbol to pick up those '4' constants strewn
about the code - n/c.
- screen.c:
- recode index expressions in ScreenWrite() using
SCRN_BUF_xxxxS macros - changes object.
- replace constant '4' by MAX_PTRS - n/c.
- use macros BUF_CHARS, BUF_ATTRS - n/c.
- cast calloc to 'Char *' to fix compiler warning on IRIX - n/c
- scrollbar.c:
- replace constant '4' by MAX_PTRS - n/c.
- cast calloc to 'Char *' to fix compiler warning on IRIX - n/c
When setting up for this phase, I saw that you'd corrected the bug that I found
in ClearLeft. I decided to make this series of patches anyway, since
readability never hurt (and there's the potential for finding another bug while
reviewing this set).
- button.c:
- use SCRN_BUF_xxxxS macros - n/c
- charproc.c:
- use SCRN_BUF_xxxxS macros - n/c
- ptyx.h:
- added four macros: SCRN_BUF_CHARS, SCRN_BUF_ATTRS,
SCRN_BUF_FORES, SCRN_BUF_BACKS to represent the four
arrays that are derived from screen->buf.
- screen.c:
- use SCRN_BUF_xxxxS macros - n/c
- util.c:
- use SCRN_BUF_xxxxS macros - n/c
This is my third (and final cleanup) patch for xterm. It gets rid of the
unused stuff, and converts several functions to static (thereby reducing their
scope).
At this point, the only compile warnings I've got (on Linux) are those about
the select arguments (int vs fd_set type), and a missing declaration for
waitpid. Those both are hard to get right without autoconfigure.
The next patches will address the functional changes...
- Tekproc.c:
- changed several functions to 'static' that aren't used
outside this module -- changes object
- charproc.c:
- changed several functions to 'static' that aren't used
outside this module -- changes object
- deleted unused function unparsefputs -- changes object.
- main.c:
- changed several functions to 'static' that aren't used
outside this module -- changes object
- ifdef'd out unused function 'consolepr()' -- changes object
- removed unused variable 'dummy_tio' -- changes object
- moved variable 'discipline' to quiet unused-warning -- changes object
- main.h:
- deleted unused definition of DEFBORDERWIDTH - n/c
- misc.c:
- changed several functions to 'static' that aren't used
outside this module -- changes object
- provide dummy return statements for xerror and xioerror to
quiet compiler warnings -- changes object
- ptyx.h:
- change sbuf_address and abuf_address to 'Char *' - n/c
- resize.c:
- changed several functions to 'static' that aren't used outside this module
-- changes object
- screen.c:
- remove unnecessary 'Char **' casts - n/c
- util.c:
- changed several functions to 'static' that aren't used outside this module
-- changes object
This is my second patch to xterm. It corrects most of the gcc warnings (except
for some that are due to X header files ;-). I compared objects to keep track
of the changes that don't affect the object code (n/c) versus those that do.
At this point, I'm compiling (fairly) clean with gcc options
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wnested-externs
(I also compiled with -Wshadow, but while that found some things that I wanted
to find, there's far too many warnings from the X headers to be usable in this
context).
The changes:
- Tekproc.c:
- parenthesized expression to avoid gcc warning -- n/c.
- corrected nested-extern declaration for Bool
waiting_for_initial_map; ourTopLevelShellArgs, and
number_ourTopLevelShellArgs - n/c
- charproc.c:
- corrected potentially-unintialized variables 'scstype', 'xim',
and 'input_style' -- changes object.
- adjusted logic of VTparse so that gcc won't warn about setjmp
clobbering parsestate -- changes object.
- corrected initialization of 'scstype', which could have been
clobbered by setjmp/longjmp - changes object.
- corrected nested-extern declaration of 'term', 'ProgramName'
- n/c
- cursor.c:
- corrected nested-extern declaration of 'term' -- n/c
- renamed 'term' parameters to avoid gcc -Wshadow warning - n/c
- input.c:
- change interface of StringInput to assume size_t (i.e.,
unsigned) nbytes -- changes object.
- change interface of funcvalue, and sunfuncvalue to use
'KeySym' type instead of 'int' - changes object.
- main.c:
- moved definitions of SIGNAL_T, SIGNAL_RETURN to proto.h - n/c
- corrected missing params of 'do_hangup()' -- changes object
(note: the missing params were not used).
- corrected missing param of 'Error()' -- changes object
- corrected nested-extern 'environ' - n/c
- adjusted assignments to 'tty_got_hung' and 'no_dev_tty' so
that gcc can see they won't be clobbered by the longjmp -
changes object.
- use Size_t type - n/c.
- menu.c:
- removed redundant prototype for 'do_hangup()' -- n/c.
- renamed 'time' parameters to avoid gcc -Wshadow warning - n/c
- menu.h:
- renamed 'time' parameters to avoid gcc -Wshadow warning - n/c
- misc.c:
- corrected definition of 'HandleFocusChange()' -- changes
object
- cast parameters in call to 'TekExpose()' -- n/c
- corrected nested-extern declarations of 'term', 'toplevel',
ProgramName, and 'environ' -- n/c.
- use Size_t type - n/c.
- proto.h:
- moved definition of SIGNAL_T (and SIGNAL_RETURN) here from
main.c, resize.c to allow use of this symbol in prototypes
(mostly in xterm.h).
- added definition 'Size_t' to use as corrected type for
strncpy, malloc sizes - n/c.
- resize.c:
- moved SIGNAL_T definition to proto.h -- n/c.
- use Size_t type - n/c.
- screen.c:
- tabs.c:
- corrected nested-extern declaration of 'term' -- n/c
- util.c:
- corrected/supplied parameters to 'TekExpose()' -- changes
object (note: 'TekExpose()' doesn't use its parameters).
- corrected nested-extern declaration of
'waiting_for_initial_map' -- n/c.
- renamed 'term' parameters to avoid gcc -Wshadow warning - n/c
- xterm.h:
- prototype 'do_hangup()', 'HandleFocusChange()',
'TekExpose()', 'Error()', 'Exit()' - forces changes in
various places.
- adjusted prototypes that pass 'Boolean' arguments to use
'int' (this is the "correct" ANSI approach to extended
compiles; it's worth mentioning that gcc doesn't meet the
ANSI spec here). I used gcc -Wconversion to find these, but
there's a lot of unrelated warnings that are due to setting
NARROWPROTO in the config - n/c.
- renamed 'term' parameters to avoid gcc -Wshadow warning - n/c
This is my first cleanup patch for xterm. It addresses all of the gcc warnings
for -Wall, -Wmissing-prototypes and -Wstrict-prototypes that I can change
without modifying the object code. (I'm compiling this with gcc 2.7.0 for an
aout target, which makes it simple to compare objects. When I do ELF-only,
I've got a tool that compares that sort of thing as well).
Briefly, this patch adds (and uses) two header files in the xterm directory:
proto.h
xterm.h
I expect this to be the biggest patch by far. However (barring a misplaced
prototype), it shouldn't break anything, since the intent of the patch is to
provide missing declarations.