Copyright 1997-2004,2005 by Thomas E. Dickey

Contents

This file contains a list of the changes that I have made for 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. Most of these are summarized in the XFree86 CHANGELOG (found in the unbundled tree, xc/programs/Xserver/hw/xfree86). Here is the latest version of this file.

Patch #200 - 2005/2/6 - XFree86 4.4.99.23

Patch #199 - 2005/1/17 - XFree86 4.4.99.22

Patch #198 - 2005/1/13 - XFree86 4.4.99.21

Patch #197 - 2004/11/30 - XFree86 4.4.99.19

Patch #196 - 2004/8/15 - XFree86 4.4.99.12

Patch #195 - 2004/8/8 - XFree86 4.4.99.11

Patch #194 - 2004/7/27 - XFree86 4.4.99.11

Patch #193 - 2004/7/19 - XFree86 4.4.99.10

Patch #192 - 2004/7/12 - XFree86 4.4.99.9

Patch #191 - 2004/6/6 - XFree86 4.4.99.7

Patch #190 - 2004/5/25 - XFree86 4.4.99.6

Patch #189 - 2004/5/16 - XFree86 4.4.99.6

Patch #188 - 2004/5/12 - XFree86 4.4.99.6

Patch #187 - 2004/4/27 - XFree86 4.4.99.4

Patch #186 - 2004/4/18 - XFree86 4.4.99.4

Patch #185 - 2004/3/3 - XFree86 4.4

Patch #184 - 2003/12/31 - XFree86 4.3.99.903

Patch #183 - 2003/12/26 - XFree86 4.3.99.903

Patch #182 - 2003/12/2 - XFree86 4.3.99.901

Patch #181 - 2003/10/26 - XFree86 4.3.99.15

Patch #180 - 2003/10/12 - XFree86 4.3.99.15

Patch #179 - 2003/5/21 - XFree86 4.3.99.5

Patch #178 - 2003/5/18 - XFree86 4.3.99.5

Patch #177 - 2003/3/23 - XFree86 4.3.0

Patch #176 - 2003/3/22 - XFree86 4.3.0

Patch #175 - 2003/3/9 - XFree86 4.3.0

Patch #174 - 2003/2/25 - XFree86 4.2.99.903

Patch #173 - 2003/2/6 - XFree86 4.2.99.902

Patch #172 - 2002/12/27 - XFree86 4.2.99.3

Patch #171 - 2002/12/12 - XFree86 4.2.99.3

Patch #170 - 2002/10/13 - XFree86 4.2.1

Patch #169 - 2002/10/5 - XFree86 4.2.1

Patch #168 - 2002/9/29 - XFree86 4.2.1

Patch #167 - 2002/8/24 - XFree86 4.2.0

Patch #166 - 2002/03/25 - XFree86 4.2.0

Patch #165 - 2002/01/05 - XFree86 4.1.0

Patch #163 - 2001/11/13 - XFree86 4.1.0

Patch #163 - 2001/11/04 - XFree86 4.1.0

Patch #162 - 2001/10/23 - XFree86 4.1.0

Patch #161 - 2001/10/10 - XFree86 4.1.0

Patch #160 - 2001/10/7 - XFree86 4.1.0

Patch #159 - 2001/9/19 - XFree86 4.1.0

Patch #158 - 2001/9/8 - XFree86 4.1.0

Patch #157 - 2001/6/18 - XFree86 4.1.0

Patch #156 - 2001/4/28 - XFree86 4.0.3

Patch #155 - 2001/4/20 - XFree86 4.0.3

Patch #154 - 2001/4/11 - XFree86 4.0.3

Patch #153 - 2001/3/29 - XFree86 4.0.3

Patch #152 - 2001/3/13 - XFree86 4.0.2

Patch #151 - 2001/3/10 - XFree86 4.0.2

Changes from XFree86 4.0.2:

Patch #150 - 2000/12/29 - XFree86 4.0.2

Patch #149 - 2000/12/6 - XFree86 4.0.1h

Patch #148 - 2000/10/31 - XFree86 4.0.1d

Patch #147 - 2000/10/26 - XFree86 4.0.1c

Patch #146 - 2000/9/12 - XFree86 4.0.1c

Patch #145 - 2000/9/11 - XFree86 4.0.1c

Patch #144 - 2000/8/23 - XFree86 4.0.1b

Patch #143 - 2000/8/19 - XFree86 4.0.1b

Patch #142 - 2000/8/18 - XFree86 4.0.1b

Patch #141 - 2000/8/14 - XFree86 4.0.1b

Patch #140 - 2000/7/23 - XFree86 4.0.1

Patch #139 - 2000/6/17 - XFree86 4.0d

Patch #138 - 2000/6/15 - XFree86 4.0c

Patch #137 - 2000/6/10 - XFree86 4.0b

Patch #136 - 2000/6/3 - XFree86 4.0b

Patch #135 - 2000/5/29 - XFree86 4.0b

Patch #134 - 2000/5/28 - XFree86 4.0b

Patch #133 - 2000/5/2 - XFree86 4.0a

Patch #132 - 2000/4/11 - XFree86 4.0a

Patch #131 - 2000/3/3 - XFree86 3.9.18b

Patch #130 - 2000/3/1 - XFree86 3.9.18a

Patch #129 - 2000/2/26 - XFree86 3.9.18a

Patch #128 - 2000/2/17 - XFree86 3.9.18

Patch #127 - 2000/2/12 - XFree86 3.9.17e

Patch #126 - 2000/2/8 - XFree86 3.9.17c

Patch #125 - 2000/1/31 - XFree86 3.9.17c

Patch #124 - 2000/1/27 - XFree86 3.9.17b

Patch #123 - 2000/1/22 - XFree86 3.9.17a

Patch #122 - 1999/12/28 - XFree86 3.9.16f

Patch #121 - 1999/11/14 - XFree86 3.9.16c

Patch #120 - 1999/10/28 - XFree86 3.9.16c

Patch #119 - 1999/10/16 - XFree86 3.9.16c

Patch #118 - 1999/10/5 - XFree86 3.9.16b

Patch #117 - 1999/9/29 - XFree86 3.9.16b

Patch #116 - 1999/9/25 - XFree86 3.9.16a

Patch #115 - 1999/9/18 - XFree86 3.9.16a

Patch #114 - 1999/9/15 - XFree86 3.9.16

Patch #113 - 1999/8/15 - XFree86 3.9.15b

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.

Patch #112 - 1999/7/17 - XFree86 3.9Pw

Patch #111 - 1999/7/10 - XFree86 3.9Pw

Patch #110 - 1999/6/29 - XFree86 3.9Pu

Patch #109 - 1999/6/23 - XFree86 3.9Pt

Patch #108 - 1999/6/19 - XFree86 3.9Ps

Patch #107 - 1999/6/12 - XFree86 3.9Pq

Patch #106 - 1999/6/9 - XFree86 3.9Pq

Patch #105 - 1999/6/5 - XFree86 3.9Pp

Patch #104 - 1999/5/30 - XFree86 3.9Pn

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).

Patch #103 - 1999/5/14 - XFree86 3.9Pm

Patch #102 - 1999/5/12 - XFree86 3.9Pm

Patch #101 - 1999/5/10 - XFree86 3.9Pm

Patch #100 - 1999/5/3 - XFree86 3.9Pl

Patch #99 - 1999/5/2 - XFree86 3.9Pk

Patch #98 - 1999/4/26 - XFree86 3.9Pk

Patch #97 - 1999/4/25 - XFree86 3.9Pk

Patch #96 - 1999/4/19 - XFree86 3.9Pj

Patch #95 - 1999/4/5 - XFree86 3.9Ph

Patch #94 - 1999/3/27 - XFree86 3.9Pf

Patch #93 - 1999/3/14 - XFree86 3.9Pd

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.

Patch #92 - 1999/2/5 - XFree86 3.9Nz

Patch #91 - 1999/1/21 - XFree86 3.9Nw

Patch #90 - 1998/12/13 - XFree86 3.9Nq

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.

Patch #89 - 1998/11/20 - XFree86 3.9Nm

This patch completes the implementation of double-sized character support for the VT100 emulation, and fixes a few minor bugs: 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.

Patch #88 - 1998/10/31 - XFree86 3.9Nk and 3.3.2h

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.

Patch #87 - 1998/10/21 - XFree86 3.9Nj and 3.3.2f

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.

Patch #86 - 1998/10/14 - XFree86 3.9Nj and 3.3.2e

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.

Patch #85 - 1998/10/12 - XFree86 3.9Nj and 3.3.2e

Some cleanup (I noticed the pixel droppings a few months ago after getting a new 17" monitor):

Patch #84 - 1998/10/9 - XFree86 3.9Ni and 3.3.2e

Several small fixes and enhancements, including a patch from Bjorn Helgaas: as well as

Resync #83 - 1998/10/7 - XFree86 3.3.2e

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.

Patch #83 - 1998/8/25 - XFree86 3.9Nb

Several small fixes and enhancements: From resync with XFree86 3.9Nb:

Patch #82 - 1998/7/15 - XFree86 3.9Aj

Bug fix for patch #81:

Patch #81 - 1998/7/14 - XFree86 3.9Aj

More bug fixes: From resync with XFree86 3.9Aj:

Patch #80 - 1998/6/29 - XFree86 3.9Ai

This fixes a couple of items leftover or introduced by patch 79:

Patch #79 - 1998/6/28 - XFree86 3.9Ai

This patch fixes several small bugs:

Patch #78 - 1998/6/3 - XFree86 3.9Ah and 3.3.2

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.

Patch #77 - 1998/5/26 - XFree86 3.9Ah and 3.3.2

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:

Patch #76 - 1998/5/8 - XFree86 3.9Ah and 3.3.2

A fix for the print-window function, and some minor cleanup:

Patch #75 - 1998/5/7 - XFree86 3.9Ah and 3.3.2

This incorporates fixes from several people, as well as some improvements that I made based on feedback from users:

Patch #74 - 1998/4/27 - XFree86 3.9Ag and 3.3.2

This corrects a couple of recent bugs and adds a new resource:

Patch #73 - 1998/4/25 - XFree86 3.9Ag and 3.3.2

This patch does the following:

Patch #72 - 1998/4/17 - XFree86 3.9Ag and 3.3.2

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.

Patch #71 - 1998/4/12 - XFree86 3.9Ag and 3.3.2

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).

Patch #70 - 1998/3/29 - XFree86 3.9Af and 3.3.2

This patch corrects some minor bugs in xterm, and fills in some more details in the VT220 emulation:

Patch #69 - 1998/3/16 - XFree86 3.9Ad and 3.3.2

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().

Patch #68 - 1998/3/4 - XFree86 3.9Ad and 3.3.1z

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.

Patch #67 - 1998/2/23 - XFree86 3.9Ad and 3.3.1e

This patch does the following:

Patch #66 - 1998/2/16 - XFree86 3.9Ad and 3.3.1d

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.

Patch #65 - 1998/2/14 - XFree86 3.9Ad and 3.3.1c

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.

Patch #64 - 1998/2/8 - XFree86 3.9Ad

This fixes the following problems with xterm:

Patch #63 - 1998/2/5 - XFree86 3.9Ad

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:

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.

Patch #62 - 1998/1/23 - XFree86 3.9Ac

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:

Patch #61 - 1998/1/17 - XFree86 3.9Ac

This patch modifies the reset behavior of xterm slightly:

Patch #60 - 1998/1/10 - XFree86 3.9Ab

This fixes some minor bugs and adds new functionality:

Patch #59 - 1998/1/5 - XFree86 3.9Ab

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).

Patch #58 - 1998/1/3 - XFree86 3.9Ab

This patch does the following:

Patch #57 - 1997/12/26 - XFree86 3.9Aa

This patch is mostly concerned with the standalone configure script; a few minor corrections are added:

Patch #56 - 1997/11/28 - XFree86 3.9x

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.

Patch #55 - 1997/11/25 - XFree86 3.9x

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.

Patch #54 - 1997/10/17 - XFree86 3.9s

This patch does the following:

Patch #53 - 1997/10/12 - XFree86 3.9r

This patch adds a fix and implements a new feature (as well as some minor typos):

Patch #52 - 1997/9/29 - XFree86 3.9q

This patch addresses bugs and requests reported by Some of the changes are interrelated (it was an unusually busy week).

Patch #51 - 1997/9/15 - XFree86 3.9p

Most of this patch is related to the standalone configure script, though there are fixes/enhancements as well: 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).

Patch #50d menu-tam (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.

    Patch #57 - 1997/12/26 - XFree86 3.9Aa

    This patch is mostly concerned with the standalone configure script; a few minor corrections are added:

    Patch #56 - 1997/11/28 - XFree86 3.9x

    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.

    Patch #55 - 1997/11/25 - XFree86 3.9x

    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.

    Patch #54 - 1997/10/17 - XFree86 3.9s

    This patch does the following:

    Patch #53 - 1997/10/12 - XFree86 3.9r

    This patch adds a fix and implements a new feature (as well as some minor typos):

    Patch #52 - 1997/9/29 - XFree86 3.9q

    This patch addresses bugs and requests reported by Some of the changes are interrelated (it was an unusually busy week).

    Patch #51 - 1997/9/15 - XFree86 3.9p

    Most of this patch is related to the standalone configure script, though there are fixes/enhancements as well: 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).

    Patch #50d menu-tam (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.

    Patch #57 - 1997/12/26 - XFree86 3.9Aa

    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

    Patch #56 - 1997/11/28 - XFree86 3.9x

    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.

    Patch #55 - 1997/11/25 - XFree86 3.9x

    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.

    Patch #54 - 1997/10/17 - XFree86 3.9s

    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

    Patch #53 - 1997/10/12 - XFree86 3.9r

    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.

    Patch #52 - 1997/9/29 - XFree86 3.9q

    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.

    Patch #51 - 1997/9/15 - XFree86 3.9p

    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).

    Patch #50d menu-tam (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.

    Patch #57 - 1997/12/26 - XFree86 3.9Aa

    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

    Patch #56 - 1997/11/28 - XFree86 3.9x

    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.

    Patch #55 - 1997/11/25 - XFree86 3.9x

    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.

    Patch #54 - 1997/10/17 - XFree86 3.9s

    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

    Patch #53 - 1997/10/12 - XFree86 3.9r

    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.

    Patch #52 - 1997/9/29 - XFree86 3.9q

    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.

    Patch #51 - 1997/9/15 - XFree86 3.9p

    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).

    Patch #50d menu-tam (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.

    Patch #57 - 1997/12/26 - XFree86 3.9Aa

    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

    Patch #56 - 1997/11/28 - XFree86 3.9x

    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.

    Patch #55 - 1997/11/25 - XFree86 3.9x

    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.

    Patch #54 - 1997/10/17 - XFree86 3.9s

    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

    Patch #53 - 1997/10/12 - XFree86 3.9r

    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.

    Patch #52 - 1997/9/29 - XFree86 3.9q

    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.

    Patch #51 - 1997/9/15 - XFree86 3.9p

    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).

    Patch #50d menu-tam (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.

    Patch #57 - 1997/12/26 - XFree86 3.9Aa

    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

    Patch #56 - 1997/11/28 - XFree86 3.9x

    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.

    Patch #55 - 1997/11/25 - XFree86 3.9x

    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.

    Patch #54 - 1997/10/17 - XFree86 3.9s

    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

    Patch #53 - 1997/10/12 - XFree86 3.9r

    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.

    Patch #52 - 1997/9/29 - XFree86 3.9q

    This patch addresses bugs and requests reported by
    • Bob Maynard <rmaynard@montana.com>,
    • Clint Olsen <olsenc@ichips.intel.com>,
    • JCHANDRA@Inf.