Hello community,

here is the log from the commit of package xterm for openSUSE:Factory checked 
in at 2016-02-09 16:48:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xterm (Old)
 and      /work/SRC/openSUSE:Factory/.xterm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xterm"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xterm/xterm.changes      2015-09-08 
17:37:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xterm.new/xterm.changes 2016-02-09 
16:48:55.000000000 +0100
@@ -1,0 +2,85 @@
+Mon Jan 25 10:58:33 UTC 2016 - [email protected]
+
+- Patch #322 - 2016/01/02
+  * fix regression due to incorrect fix for compiler warning when
+    allocating storage for /etc/shells (reports by Ashish Shukla,
+    Debian #809646).
+- Patch #321 - 2015/12/31
+  * add resource keepClipboard, escape sequence and action
+    keep-clipboard.
+  * add optional feature to capture text copied to clipboard at
+    the time of copying rather than at the time the clipboard
+    contents are requested for pasting (patch by Milan Mehner).
+  * improve a special case where the -e option was used to pass a
+    single-quoted command via luit, by wrapping it in a “sh -c”
+    (report by Keith Hedger).
+  * minor fix for type-cleanliness when allocating storage for
+    /etc/shells (Tobias Stoeckmann).
+  * fix a typo in manual page (Dan Church).
+  * fix minor file-descriptor leak; after calling openpty, the
+    slave's file descriptor is not needed (report by Juha
+    Nurmela).
+  * editorial change to ctlseqs.ms (report by David Gomboc).
+  * minor updates for autoconf macros.
+  * update config.guess, config.sub
+- vttest 20140305
+  * save/restore color enable-flag for menu 11.6 in a couple of
+    places so that the ISO-6429 tests do not reset it
+    unexpectedly.
+  * amend the REP test to not reset colors if it happens to be
+    run via the menu entry for BCE-related tests.
+- vttest 20140116
+  * cosmetic changes (suggested by Itay Chamiel):
+    + clear screen just before resetting SCS in menu #3 character
+      sets, in case a VT100 emulator does not simply ignore VT220
+      G2/G3 selections when it does not implement them.
+    + add check for maximum operating level before deciding
+      whether to send a DECSCL to set it to VT100-level.
+    + adjust starting point of items for menu #9 "Test of known
+      bugs" to avoid overwriting part of the description of the
+      test.
+  * add configure check for -Wlogical-op to gcc-warnings
+  * update config.guess, config.sub
+- vttest 20130915
+  * when NRCS is active, suppress ISO Latin-1 from menu to avoid
+    confusion with British NRCS.
+  * do not highlight ISO Latin-1 for NRCS, since it is a
+    96-character set, not applicable to NRCS.
+  * correct position of ruler for SD and REP screens, which
+    obscured the result.
+  * expand menu 11.6.6 to demonstrate bce with top-level menus 1
+    and 2 in addition to the existing menu 8.
+  * correct description for DA response 24; it denotes VT320.
+  * correct highlighting for French NRC mapping; "`" is not
+    mapped.
+  * add port-files from FreeBSD for test-builds.
+  * add highlighting information for VT320 Portuguese NRC
+    mapping.
+  * add highlighting information for VT220 DEC Supplemental NRC
+    mapping.
+  * updated configure-macros to add msys changes from ncurses
+    20130907.
+  * update config.guess, config.sub
+- vttest 20130818
+  * modify character-sets screens to optionally highlight the
+    characters which do not correspond to ISO-8859-1.  This makes
+    the National Replacement Characters easier to see.
+  * modify DSR cursor-position report to check if the terminal
+    accounts for origin-mode.
+  * support --datarootdir option in makefile.in, to match
+    configure script updates.
+  * updated configure macros:
+    + change from byacc for autoheader
+    + improved checks for gcc attributes
+    + improved checks for gcc version
+    + miscellaneous fixes in CF_XOPEN_SOURCE
+  * update config.guess, config.sub
+- vttest 20120603
+  * change cursor-position before IL/DL in "Test of VT102-style
+    features with BCE (Insert/Delete Char/Line)" to demonstrate
+    whether the terminal sets the cursor to the first column as a
+    side-effect, as noted in VT220 reference manual.
+- remove vttest-config_update_aarch64.patch since the current
+  vttest sports newer config version
+
+-------------------------------------------------------------------

Old:
----
  vttest-20120506.tgz
  vttest-20120506.tgz.asc
  vttest-config_update_aarch64.patch
  xterm-320.tgz
  xterm-320.tgz.asc

New:
----
  vttest-20140305.tgz
  vttest-20140305.tgz.asc
  xterm-322.tgz
  xterm-322.tgz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xterm.spec ++++++
--- /var/tmp/diff_new_pack.pQgltA/_old  2016-02-09 16:48:56.000000000 +0100
+++ /var/tmp/diff_new_pack.pQgltA/_new  2016-02-09 16:48:56.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xterm
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,10 @@
 #
 
 
-%define vttest_version 20120506
+%define vttest_version 20140305
 %define splitbin 0%{?suse_version} >= 1300
 Name:           xterm
-Version:        320
+Version:        322
 Release:        0
 Summary:        The basic X terminal program
 License:        MIT
@@ -48,7 +48,6 @@
 Patch7:         xterm-allow_iso-utf_fonts_in_menu.patch
 Patch8:         xterm-decomposed_bitmaps.patch
 Patch9:         xterm-desktop-item-in-gnome-utilities-appfolder.patch
-Patch101:       vttest-config_update_aarch64.patch
 BuildRequires:  freetype2-devel
 BuildRequires:  ncurses-devel
 BuildRequires:  update-desktop-files
@@ -115,7 +114,6 @@
 cp -t . %{SOURCE8} %{SOURCE9}
 bunzip2 %{basename:%{SOURCE8}} %{basename:%{SOURCE9}}
 cd ../vttest-%{vttest_version}
-%patch101 -p1
 
 %build
 # suse 10.x uses older X11 directory structure




++++++ vttest-20120506.tgz -> vttest-20140305.tgz ++++++
++++ 6903 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/.vilerc new/vttest-20140305/.vilerc
--- old/vttest-20120506/.vilerc 1999-07-12 12:11:45.000000000 +0200
+++ new/vttest-20140305/.vilerc 1999-07-12 12:11:45.000000000 +0200
@@ -1,5 +1,5 @@
 ; Maintain the C/H code w/o tabs
-source ~tom/.vilerc
+source ~/.vilerc
 store-procedure my_read_hook
        ~if &loc cmode
        setl sw=2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/CHANGES new/vttest-20140305/CHANGES
--- old/vttest-20120506/CHANGES 2012-05-06 21:52:00.000000000 +0200
+++ new/vttest-20140305/CHANGES 2014-03-06 01:28:40.000000000 +0100
@@ -1,6 +1,86 @@
--- $Id: CHANGES,v 1.157 2012/05/06 19:52:00 tom Exp $
+-- $Id: CHANGES,v 1.180 2014/03/06 00:28:40 tom Exp $
 -------------------------------------------------------------------------------
 
+20140305
+       + save/restore color enable-flag for menu 11.6 in a couple of places
+         so that the ISO-6429 tests do not reset it unexpectedly.
+
+       + amend the REP test to not reset colors if it happens to be run via
+         the menu entry for BCE-related tests.
+
+20140116
+       + cosmetic changes (suggested by Itay Chamiel):
+
+         + clear screen just before resetting SCS in menu #3 character sets,
+           in case a VT100 emulator does not simply ignore VT220 G2/G3
+           selections when it does not implement them.
+
+         + add check for maximum operating level before deciding whether
+           to send a DECSCL to set it to VT100-level.
+
+         + adjust starting point of items for menu #9 "Test of known bugs"
+           to avoid overwriting part of the description of the test.
+
+       + add configure check for -Wlogical-op to gcc-warnings
+
+       + update config.guess, config.sub
+
+20130915
+       + when NRCS is active, suppress ISO Latin-1 from menu to avoid
+         confusion with British NRCS.
+
+       + do not highlight ISO Latin-1 for NRCS, since it is a 96-character
+         set, not applicable to NRCS.
+
+       + correct position of ruler for SD and REP screens, which obscured the
+         result.
+
+       + expand menu 11.6.6 to demonstrate bce with top-level menus 1 and 2
+         in addition to the existing menu 8.
+
+       + correct description for DA response 24; it denotes VT320.
+
+       + correct highlighting for French NRC mapping; "`" is not mapped.
+
+       + add port-files from FreeBSD for test-builds.
+
+       + add highlighting information for VT320 Portuguese NRC mapping.
+
+       + add highlighting information for VT220 DEC Supplemental NRC mapping.
+
+       + updated configure-macros to add msys changes from ncurses 20130907.
+
+       + update config.guess, config.sub
+
+20130818
+       + modify character-sets screens to optionally highlight the characters
+         which do not correspond to ISO-8859-1.  This makes the National
+         Replacement Characters easier to see.
+
+       + modify DSR cursor-position report to check if the terminal 
+         accounts for origin-mode.
+
+       + support --datarootdir option in makefile.in, to match configure
+         script updates.
+
+       + updated configure macros:
+
+         + change from byacc for autoheader
+
+         + improved checks for gcc attributes
+
+         + improved checks for gcc version
+
+         + miscellaneous fixes in CF_XOPEN_SOURCE
+
+       + update config.guess, config.sub
+
+20120603
+       + change cursor-position before IL/DL in 
+         "Test of VT102-style features with BCE (Insert/Delete Char/Line)"
+         to demonstrate whether the terminal sets the cursor to the first
+         column as a side-effect, as noted in VT220 reference manual.
+
 20120506
        + build-fix in case compiler does not recognize gcc's __attribute__.
 
@@ -349,7 +429,7 @@
 
          + use 96-character control sequences only for character sets
            (Latin 1), and 94-character control sequences for the
-           National Replacement character sets.
+           National Replacement Characters.
 
          + add ISO Latin-1 as a font option
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/COPYING new/vttest-20140305/COPYING
--- old/vttest-20120506/COPYING 2010-01-02 16:04:04.000000000 +0100
+++ new/vttest-20140305/COPYING 2014-01-16 22:32:06.000000000 +0100
@@ -1,7 +1,7 @@
-$Id: COPYING,v 1.6 2010/01/02 15:04:04 tom Exp $
+$Id: COPYING,v 1.9 2014/01/16 21:32:06 tom Exp $
 -----------------------------------------------------------------------------
 
-Copyright 1996-2009,2010 by Thomas E. Dickey
+Copyright 1996-2013,2014 by Thomas E. Dickey
 
                         All Rights Reserved
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/MANIFEST new/vttest-20140305/MANIFEST
--- old/vttest-20120506/MANIFEST        2010-01-01 00:18:49.000000000 +0100
+++ new/vttest-20140305/MANIFEST        2014-03-06 01:28:40.000000000 +0100
@@ -1,4 +1,4 @@
-MANIFEST for vttest-20091231, version d20091231
+MANIFEST for vttest-20140305, version t20140305
 
--------------------------------------------------------------------------------
 MANIFEST                        this file
 BUGS                            current bug-list
@@ -13,7 +13,6 @@
 config.sub                      configure utility script
 configure                       generated autoconf script
 configure.in                    template for configure script
-configure                       Configuration script for UNIX
 descrip.mms                     VAX MMS script for VTTEST
 draw.c                          utilities for drawing boxes and their contents
 draw.h                          interface of draw.c
@@ -23,7 +22,6 @@
 keyboard.c                      test keyboard functions
 main.c                          main-program & most tests, for VTTEST
 makefile.in                     template for makefile
-mkdirs.sh                       mkinstalldirs script, from X11
 mouse.c                         mouse tests for xterm
 nonvt100.c                      non-VT100 tests
 patchlev.h                      patch-level of VTTEST
@@ -38,12 +36,30 @@
 ttymodes.c                      module for changing tty modes
 ttymodes.h                      interface of ttymodes.c
 unix_io.c                       UNIX-specific I/O support
+utf8.c                          convert to/from UTF-8
 vms_io.c                        VMS I/O routines
 vmsbuild.com                    VMS DCL script for building VTTEST
 vt220.c                         vt220 tests
 vt320.c                         vt320 tests
 vt420.c                         vt420 tests
 vt52.c                          tests for VT52
+vt520.c                         vt520-specific tests
 vttest.1                        manual-page for VTTEST
 vttest.h                        renamed from header.h, common definitions of 
VTTEST
 xterm.c                         tests for xterm and clones
+package/debian                  subdirectory
+package/debian/changelog        build-script
+package/debian/compat           build-script
+package/debian/control          build-script
+package/debian/copyright        build-script
+package/debian/docs             build-script
+package/debian/postinst         build-script
+package/debian/preinst          build-script
+package/debian/prerm            build-script
+package/debian/rules            build-script
+package/debian/source           subdirectory
+package/debian/source/format    build-script
+package/debian                  subdirectory
+package/debian/watch            build-script
+package                         subdirectory
+package/vttest.spec             build-script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/charsets.c new/vttest-20140305/charsets.c
--- old/vttest-20120506/charsets.c      2012-04-21 01:22:11.000000000 +0200
+++ new/vttest-20140305/charsets.c      2014-01-16 21:50:17.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: charsets.c,v 1.37 2012/04/20 23:22:11 tom Exp $ */
+/* $Id: charsets.c,v 1.59 2014/01/16 20:50:17 tom Exp $ */
 
 /*
  * Test character-sets (e.g., SCS control, DECNRCM mode)
@@ -28,6 +28,8 @@
   Hebrew = 17,
   British_Latin_1,
   Cyrillic,
+  DEC_Alt_Chars,
+  DEC_Alt_Graphics,
   DEC_Spec_Graphic,
   DEC_Supp,
   DEC_Supp_Graphic,
@@ -42,83 +44,192 @@
   SCS_NRCS,
   Unknown
 } National;
+
+typedef struct {
+  National code;                /* internal name (chosen to sort 'name' 
member) */
+  int allow96;                  /* flag for 96-character sets (e.g., GR 
mapping) */
+  int order;                    /* check-column so we can mechanically-sort 
this table */
+  int first;                    /* first model: 0=base, 2=vt220, 3=vt320, etc. 
*/
+  int last;                     /* lastmodel: 0=base, 2=vt220, 3=vt320, etc. */
+  const char *final;            /* end of SCS string */
+  const char *name;             /* the string we'll show the user */
+  const char *not11;            /* cells which are not 1-1 with ISO-8859-1 */
+} CHARSETS;
 /* *INDENT-OFF* */
-static const struct {
-  National code;  /* internal name (chosen to sort 'name' member) */
-  int allow96;    /* flag for 96-character sets (e.g., GR mapping) */
-  int order;      /* check-column so we can mechanically-sort this table */
-  int model;      /* 0=base, 2=vt220, 3=vt320, etc. */
-  const char *final;    /* end of SCS string */
-  const char *name;     /* the string we'll show the user */
-} KnownCharsets[] = {
-  { ASCII,             0, 0, 0, "B",    "US ASCII" },
-  { British,           0, 0, 0, "A",    "British" },
-  { British_Latin_1,   1, 0, 3, "A",    "ISO Latin-1" },
-  { Cyrillic,          0, 0, 5, "&4",   "Cyrillic (DEC)" },
-  { DEC_Spec_Graphic,  0, 0, 0, "0",    "DEC Special Graphics" },
-  { DEC_Supp,          0, 0, 2, "<",    "DEC Supplemental" },
-  { DEC_Supp_Graphic,  0, 0, 3, "%5",   "DEC Supplemental Graphic" },
-  { DEC_Tech,          0, 0, 3, ">",    "DEC Technical" },
-  { Dutch,             0, 0, 2, "4",    "Dutch" },
-  { Finnish,           0, 0, 2, "5",    "Finnish" },
-  { Finnish,           0, 1, 2, "C",    "Finnish" },
-  { French,            0, 0, 2, "R",    "French" },
-  { French,            0, 1, 2, "f",    "French" }, /* Kermit (vt340 model?) */
-  { French_Canadian,   0, 0, 2, "Q",    "French Canadian" },
-  { French_Canadian,   0, 1, 3, "9",    "French Canadian" },
-  { German,            0, 0, 2, "K",    "German" },
-  { Greek,             0, 0, 5, "\"?",  "Greek (DEC)" },
-  { Greek_Supp,        1, 0, 5, "F",    "ISO Greek Supplemental" },
-  { Hebrew,            0, 0, 5, "\"4",  "Hebrew (DEC)" },
-  { Hebrew,            0, 1, 5, "%=",   "Hebrew NRCS" },
-  { Hebrew_Supp,       1, 0, 5, "H",    "ISO Hebrew Supplemental" },
-  { Italian,           0, 0, 2, "Y",    "Italian" },
-  { Latin_5_Supp,      1, 0, 5, "M",    "ISO Latin-5 Supplemental" },
-  { Latin_Cyrillic,    1, 0, 5, "L",    "ISO Latin-Cyrillic" },
-  { Norwegian_Danish,  0, 0, 3, "`",    "Norwegian/Danish" },
-  { Norwegian_Danish,  0, 1, 2, "E",    "Norwegian/Danish" },
-  { Norwegian_Danish,  0, 2, 2, "6",    "Norwegian/Danish" },
-  { Portugese,         0, 0, 3, "%6",   "Portugese" },
-  { Russian,           0, 0, 5, "&5",   "Russian" },
-  { SCS_NRCS,          0, 0, 5, "%3",   "SCS NRCS" },
-  { Spanish,           0, 0, 2, "Z",    "Spanish" },
-  { Swedish,           0, 0, 2, "7",    "Swedish" },
-  { Swedish,           0, 1, 2, "H",    "Swedish" },
-  { Swiss,             0, 0, 2, "=",    "Swiss" },
-  { Turkish,           0, 0, 5, "%0",   "Turkish (DEC)" },
-  { Turkish,           0, 1, 5, "%2",   "Turkish NRCS" },
-  { Unknown,           0, 0, 0, "?",    "Unknown" }
+
+/* compare mappings using only 7-bits */
+#define Not11(a,b) (((a) & 0x7f) == ((b) & 0x7f))
+
+/*
+ * The VT220 and VT340 reference manuals show tables and details for the
+ * character sets.  The VT520 reference manual does not show these details, so
+ * mappings for the VT5xx character sets are not highlighted by this program.
+ */
+static const char map_pound[] = "#";
+static const char map_all94[] = 
"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+static const char map_DEC_Supp[] = "$&,-./48>GHIJKLMNOPW^pw}~";
+static const char map_Spec_Graphic[] = "`abcdefghijklmnopqrstuvwxyz{|}~";
+static const char map_Supp_Graphic[] = "$&,-./48>PW^p}~\177";
+static const char map_Dutch[] = "#@[\\]{|}~";
+static const char map_Finnish[] = "`[\\]^{|}~";
+static const char map_French[] = "#@[\\]{|}~";
+static const char map_French_Canadian[] = "@`[\\]^{|}~";
+static const char map_German[] = "@[\\]{|}~";
+static const char map_Italian[] = "#@`[\\]{|}~";
+static const char map_Norwegian[] = "@`[\\]^{|}~";
+static const char map_Portuguese[] = "[\\]{|}";
+static const char map_Spanish[] = "@[\\]{|}";
+static const char map_Swedish[] = "@`[\\]^{|}~";
+static const char map_Swiss[] = "#@`[\\]^_{|}~";
+
+static const CHARSETS KnownCharsets[] = {
+  { ASCII,             0, 0, 0, 9, "B",    "US ASCII", 0 },
+  { British,           0, 0, 0, 9, "A",    "British", map_pound },
+  { British_Latin_1,   1, 0, 3, 9, "A",    "ISO Latin-1", 0 },
+  { Cyrillic,          0, 0, 5, 9, "&4",   "Cyrillic (DEC)", 0 },
+  { DEC_Spec_Graphic,  0, 0, 0, 9, "0",    "DEC Special graphics and line 
drawing", map_Spec_Graphic },
+  { DEC_Alt_Chars,     0, 0, 0, 0, "1",    "DEC Alternate character ROM 
standard characters", 0 },
+  { DEC_Alt_Graphics,  0, 0, 0, 0, "2",    "DEC Alternate character ROM 
special graphics", 0 },
+  { DEC_Supp,          0, 0, 2, 9, "<",    "DEC Supplemental", map_DEC_Supp },
+  { DEC_Supp_Graphic,  0, 0, 3, 9, "%5",   "DEC Supplemental Graphic", 
map_Supp_Graphic },
+  { DEC_Tech,          0, 0, 3, 9, ">",    "DEC Technical", map_all94 },
+  { Dutch,             0, 0, 2, 9, "4",    "Dutch", map_Dutch },
+  { Finnish,           0, 0, 2, 9, "5",    "Finnish", map_Finnish },
+  { Finnish,           0, 1, 2, 9, "C",    "Finnish", map_French },
+  { French,            0, 0, 2, 9, "R",    "French", map_French },
+  { French,            0, 1, 2, 9, "f",    "French", map_French }, /* Kermit 
(vt340 model?) */
+  { French_Canadian,   0, 0, 2, 9, "Q",    "French Canadian", 
map_French_Canadian },
+  { French_Canadian,   0, 1, 3, 9, "9",    "French Canadian", 
map_French_Canadian },
+  { German,            0, 0, 2, 9, "K",    "German", map_German },
+  { Greek,             0, 0, 5, 9, "\"?",  "Greek (DEC)", 0 },
+  { Greek_Supp,        1, 0, 5, 9, "F",    "ISO Greek Supplemental", 0 },
+  { Hebrew,            0, 0, 5, 9, "\"4",  "Hebrew (DEC)", 0 },
+  { Hebrew,            0, 1, 5, 9, "%=",   "Hebrew NRCS", 0 },
+  { Hebrew_Supp,       1, 0, 5, 9, "H",    "ISO Hebrew Supplemental", 0 },
+  { Italian,           0, 0, 2, 9, "Y",    "Italian", map_Italian },
+  { Latin_5_Supp,      1, 0, 5, 9, "M",    "ISO Latin-5 Supplemental", 0 },
+  { Latin_Cyrillic,    1, 0, 5, 9, "L",    "ISO Latin-Cyrillic", 0 },
+  { Norwegian_Danish,  0, 0, 3, 9, "`",    "Norwegian/Danish", map_Norwegian },
+  { Norwegian_Danish,  0, 1, 2, 9, "E",    "Norwegian/Danish", map_Norwegian },
+  { Norwegian_Danish,  0, 2, 2, 9, "6",    "Norwegian/Danish", map_Norwegian },
+  { Portugese,         0, 0, 3, 9, "%6",   "Portugese", map_Portuguese },
+  { Russian,           0, 0, 5, 9, "&5",   "Russian", 0 },
+  { SCS_NRCS,          0, 0, 5, 9, "%3",   "SCS NRCS", 0 },
+  { Spanish,           0, 0, 2, 9, "Z",    "Spanish", map_Spanish },
+  { Swedish,           0, 0, 2, 9, "7",    "Swedish", map_Swedish },
+  { Swedish,           0, 1, 2, 9, "H",    "Swedish", map_Swedish },
+  { Swiss,             0, 0, 2, 9, "=",    "Swiss", map_Swiss },
+  { Turkish,           0, 0, 5, 9, "%0",   "Turkish (DEC)", 0 },
+  { Turkish,           0, 1, 5, 9, "%2",   "Turkish NRCS", 0 },
+  { Unknown,           0, 0,-1,-1, "?",    "Unknown", 0 }
 };
 /* *INDENT-ON* */
 
+static int hilite_not11;
 static int national;
 static int cleanup;
 
+static char sgr_hilite[10];
+static char sgr_reset[10];
+
 static int current_Gx[4];
 
+static int
+lookupCode(National code)
+{
+  int n;
+  for (n = 0; n < TABLESIZE(KnownCharsets); n++) {
+    if (KnownCharsets[n].code == code)
+      return n;
+  }
+  return lookupCode(ASCII);
+}
+
+static const CHARSETS *
+lookupCharset(int g, int n)
+{
+  const CHARSETS *result = 0;
+  if (n >= 0 && n < TABLESIZE(KnownCharsets)) {
+    if (!strcmp(KnownCharsets[n].final, "A")) {
+      if (national || (g == 0)) {
+        n = lookupCode(British);
+      } else {
+        n = lookupCode(British_Latin_1);
+      }
+    }
+    result = &KnownCharsets[n];
+  }
+  return result;
+}
+
+static const char *
+charset_name(int g, int n)
+{
+  return lookupCharset(g, n)->name;
+}
+
+static int
+append_sgr(char *buffer, int used, const char *sgr_string)
+{
+  strcpy(buffer + used, sgr_string);
+  used += (int) strlen(sgr_string);
+  return used;
+}
+
 static void
-send32(int row, int upper)
+send32(int row, int upper, const char *not11)
 {
   int col;
-  char buffer[33];
-
+  int used = 0;
+  int hilited = 0;
+  char buffer[33 * 8];
+
+  if (LOG_ENABLED) {
+    fprintf(log_fp, "Note: send32 row %d, upper %d, not11:%s\n",
+            row, upper, not11 ? not11 : "");
+  }
   for (col = 0; col <= 31; col++) {
-    buffer[col] = (char) (row * 32 + upper + col);
+    char ch = (char) (row * 32 + upper + col);
+    if (not11 != 0 && hilite_not11) {
+      const char *p;
+      int found = 0;
+      for (p = not11; *p; ++p) {
+        if (Not11(*p, ch)) {
+          found = 1;
+          break;
+        }
+      }
+      if (found) {
+        if (!hilited) {
+          used = append_sgr(buffer, used, sgr_hilite);
+          hilited = 1;
+        }
+      } else {
+        if (hilited) {
+          used = append_sgr(buffer, used, sgr_reset);
+          hilited = 0;
+        }
+      }
+    }
+    buffer[used++] = ch;
   }
-  buffer[32] = 0;
+  if (hilited) {
+    used = append_sgr(buffer, used, sgr_reset);
+  }
+  buffer[used] = 0;
   tprintf("%s", buffer);
 }
 
 static char *
 scs_params(char *dst, int g)
 {
-  int n = current_Gx[g];
+  const CHARSETS *tbl = lookupCharset(g, current_Gx[g]);
 
   sprintf(dst, "%c%s",
-          ((KnownCharsets[n].allow96 && get_level() > 2)
+          ((tbl->allow96 && get_level() > 2)
            ? "?-./"[g]
            : "()*+"[g]),
-          KnownCharsets[n].final);
+          tbl->final);
   return dst;
 }
 
@@ -130,17 +241,6 @@
   esc(scs_params(buffer, g));
 }
 
-static int
-lookupCode(National code)
-{
-  int n;
-  for (n = 0; n < TABLESIZE(KnownCharsets); n++) {
-    if (KnownCharsets[n].code == code)
-      return n;
-  }
-  return lookupCode(ASCII);
-}
-
 /* reset given Gg back to sane setting */
 static int
 sane_cs(int g)
@@ -213,9 +313,13 @@
     the_list[n] = 0;
     if (!strcmp(KnownCharsets[n].final, "?"))
       continue;
-    if (get_level() < KnownCharsets[n].model)
+    if (get_level() < KnownCharsets[n].first)
+      continue;
+    if (get_level() > KnownCharsets[n].last)
+      continue;
+    if (((g == 0) || national) && KnownCharsets[n].allow96)
       continue;
-    if ((g == 0) && KnownCharsets[n].allow96)
+    if (((g != 0) && !national) && (KnownCharsets[n].code == British))
       continue;
     if (m && !strcmp(my_menu[m - 1].description, KnownCharsets[n].name))
       continue;
@@ -237,6 +341,17 @@
 }
 
 static int
+toggle_hilite(MENU_ARGS)
+{
+  hilite_not11 = !hilite_not11;
+  if (hilite_not11) {
+    sprintf(sgr_hilite, "%s7m", csi_output());
+    sprintf(sgr_reset, "%sm", csi_output());
+  }
+  return MENU_NOHOLD;
+}
+
+static int
 toggle_nrc(MENU_ARGS)
 {
   national = !national;
@@ -285,39 +400,33 @@
   /* Test of:
    * SCS    (Select character Set)
    */
-  /* *INDENT-OFF* */
-  static const struct { char code; const char *msg; } table[] = {
-    { 'A', "UK / national" },
-    { 'B', "US ASCII" },
-    { '0', "Special graphics and line drawing" },
-    { '1', "Alternate character ROM standard characters" },
-    { '2', "Alternate character ROM special graphics" },
-  };
-  /* *INDENT-ON* */
-
-  int i, g, cset;
+  int i, g, count, cset;
 
   __(cup(1, 10), printf("Selected as G0 (with SI)"));
   __(cup(1, 48), printf("Selected as G1 (with SO)"));
-  for (cset = 0; cset < TABLESIZE(table); cset++) {
-    int row = 3 + (4 * cset);
-
-    scs(1, 'B');
-    cup(row, 1);
-    sgr("1");
-    tprintf("Character set %c (%s)", table[cset].code, table[cset].msg);
-    sgr("0");
-    for (g = 0; g <= 1; g++) {
-      int set_nrc = (get_level() >= 2 && table[cset].code == 'A');
-      if (set_nrc)
-        decnrcm(TRUE);
-      scs(g, (int) table[cset].code);
-      for (i = 1; i <= 3; i++) {
-        cup(row + i, 10 + 38 * g);
-        send32(i, 0);
+  for (count = cset = 0; count < TABLESIZE(KnownCharsets); count++) {
+    const CHARSETS *tbl = KnownCharsets + count;
+    if (tbl->first == 0) {
+      int row = 3 + (4 * cset);
+
+      scs(1, 'B');
+      cup(row, 1);
+      sgr("1");
+      tprintf("Character set %s (%s)", tbl->final, tbl->name);
+      sgr("0");
+      for (g = 0; g <= 1; g++) {
+        int set_nrc = (get_level() >= 2 && tbl->final[0] == 'A');
+        if (set_nrc)
+          decnrcm(TRUE);
+        scs(g, (int) tbl->final[0]);
+        for (i = 1; i <= 3; i++) {
+          cup(row + i, 10 + 38 * g);
+          send32(i, 0, tbl->not11);
+        }
+        if (set_nrc != national)
+          decnrcm(national);
       }
-      if (set_nrc != national)
-        decnrcm(national);
+      ++cset;
     }
   }
   scs_normal();
@@ -341,14 +450,13 @@
 
   __(cup(1, 10), printf("These are the G0 and G1 character sets."));
   for (cset = 0; cset < 2; cset++) {
+    const CHARSETS *tbl = lookupCharset(cset, current_Gx[cset]);
     int row = 3 + (4 * cset);
 
     scs(cset, 'B');
     cup(row, 1);
     sgr("1");
-    tprintf("Character set %s (%s)",
-            KnownCharsets[current_Gx[cset]].final,
-            KnownCharsets[current_Gx[cset]].name);
+    tprintf("Character set %s (%s)", tbl->final, tbl->name);
     sgr("0");
 
     cup(row, 48);
@@ -357,7 +465,7 @@
     esc(scs_params(buffer, cset));
     for (i = 1; i <= 3; i++) {
       cup(row + i, 10);
-      send32(i, 0);
+      send32(i, 0, tbl->not11);
     }
     scs(cset, 'B');
   }
@@ -392,14 +500,13 @@
   for (cset = 0; cset < TABLESIZE(table); cset++) {
     int row = 3 + (4 * cset);
     int map = table[cset].mapped;
+    const CHARSETS *tbl = lookupCharset(map, current_Gx[map]);
+    int map_gl = (strstr(table[cset].msg, "into GL") != 0);
 
     scs_normal();
     cup(row, 1);
     sgr("1");
-    tprintf("Character set %s (%s) in G%d",
-            KnownCharsets[current_Gx[map]].final,
-            KnownCharsets[current_Gx[map]].name,
-            map);
+    tprintf("Character set %s (%s) in G%d", tbl->final, tbl->name, map);
     sgr("0");
 
     cup(row, 48);
@@ -414,7 +521,7 @@
         esc(table[cset].code);
       }
       cup(row + i, 5);
-      send32(i, 0);
+      send32(i, 0, map_gl ? tbl->not11 : 0);
 
       if (table[cset].upper) {
         do_scs(map);
@@ -424,7 +531,7 @@
         map_g1_to_gr();
       }
       cup(row + i, 40);
-      send32(i, 128);
+      send32(i, 128, map_gl ? 0 : tbl->not11);
     }
     reset_scs(cset);
   }
@@ -440,23 +547,39 @@
 
   for (pass = 0; pass < 2; pass++) {
     int g = pass + 2;
+    const CHARSETS *tbl = lookupCharset(g, current_Gx[g]);
 
     vt_clear(2);
     cup(1, 1);
     tprintf("Testing single-shift G%d into GL (SS%d) with NRC %s\n",
             g, g, STR_ENABLED(national));
-    tprintf("G%d is %s", g, KnownCharsets[current_Gx[g]].name);
+    tprintf("G%d is %s", g, tbl->name);
 
     do_scs(g);
     for (y = 0; y < 16; y++) {
       for (x = 0; x < 6; x++) {
         int ch = y + (x * 16) + 32;
+        int hilited = 0;
+
         cup(y + 5, (x * 12) + 5);
         tprintf("%3d: (", ch);
         esc(pass ? "O" : "N");  /* SS3 or SS2 */
+        if (tbl->not11 && hilite_not11) {
+          const char *p;
+          for (p = tbl->not11; *p; ++p) {
+            if (Not11(*p, ch)) {
+              tprintf("%s", sgr_hilite);
+              hilited = 1;
+              break;
+            }
+          }
+        }
         tprintf("%c", ch);
-        if (ch == 127 && !KnownCharsets[current_Gx[g]].allow96)
+        if (ch == 127 && !tbl->allow96)
           tprintf(" ");   /* DEL should have been eaten - skip past */
+        if (hilited) {
+          tprintf("%s", sgr_reset);
+        }
         tprintf(")");
       }
     }
@@ -532,11 +655,13 @@
 tst_characters(MENU_ARGS)
 {
   static char whatis_Gx[4][80];
+  static char hilite_mesg[80];
   static char nrc_mesg[80];
   /* *INDENT-OFF* */
   static MENU my_menu[] = {
       { "Exit",                                              0 },
       { "Reset (ASCII for G0, G1, no NRC mode)",             reset_charset },
+      { hilite_mesg,                                         toggle_hilite },
       { nrc_mesg,                                            toggle_nrc },
       { whatis_Gx[0],                                        specify_G0 },
       { whatis_Gx[1],                                        specify_G1 },
@@ -555,20 +680,26 @@
   int n;
 
   cleanup = 0;
+  hilite_not11 = 1;
+  toggle_hilite(PASS_ARGS);
   reset_charset(PASS_ARGS);   /* make the menu consistent */
   if (get_level() > 1 || input_8bits || output_8bits) {
     do {
       vt_clear(2);
       __(title(0), printf("Character-Set Tests"));
       __(title(2), println("Choose test type:"));
+      sprintf(hilite_mesg, "%s highlighting of non-ISO-8859-1 mapping",
+              STR_ENABLE(hilite_not11));
       sprintf(nrc_mesg, "%s National Replacement Character (NRC) mode",
               STR_ENABLE(national));
       for (n = 0; n < 4; n++) {
         sprintf(whatis_Gx[n], "Specify G%d (now %s)",
-                n, KnownCharsets[current_Gx[n]].name);
+                n, charset_name(n, current_Gx[n]));
       }
     } while (menu(my_menu));
     cleanup = 1;
+    /* tidy in case a "vt100" emulator does not ignore SCS */
+    vt_clear(1);
     return reset_charset(PASS_ARGS);
   } else {
     return tst_vt100_charsets(PASS_ARGS);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/color.c new/vttest-20140305/color.c
--- old/vttest-20120506/color.c 2012-04-27 01:11:39.000000000 +0200
+++ new/vttest-20140305/color.c 2014-03-06 00:13:52.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: color.c,v 1.35 2012/04/26 23:11:39 tom Exp $ */
+/* $Id: color.c,v 1.38 2014/03/05 23:13:52 tom Exp $ */
 
 #include <vttest.h>
 #include <draw.h>
@@ -179,7 +179,7 @@
     printf("   row %3d: this is some text", row);
   }
   for (row = 7; row <= max_lines; row += 2 /* 3 - deletion */ ) {
-    cup(row, 1);
+    cup(row, 8);
     dl(1);
     putchar('*');   /* cursor should be in column 1 */
   }
@@ -202,7 +202,7 @@
     printf("   row %3d: this is some text", row);
   }
   for (row = 7; row <= max_lines; row += 3 /* 2 + insertion */ ) {
-    cup(row, 1);
+    cup(row, 8);
     il(1);
     putchar('*');   /* cursor should be in column 1 */
   }
@@ -456,6 +456,29 @@
   return MENU_NOHOLD;
 }
 
+static int
+test_color_movements(MENU_ARGS)
+{
+  set_test_colors();
+
+  tst_movements(PASS_ARGS);
+  reset_all_colors();
+  return MENU_NOHOLD;
+}
+
+static int
+test_color_screen(MENU_ARGS)
+{
+  set_test_colors();
+
+  /* The rest of the test can be done nicely with the standard vt100 test
+   * for insert/delete, since it doesn't modify SGR.
+   */
+  tst_screen(PASS_ARGS);
+  reset_all_colors();
+  return MENU_NOHOLD;
+}
+
 /*
  * Test the insert/delete line/character operations for color (bce) terminals
  * We'll test insert/delete line operations specially, because it is very hard
@@ -491,7 +514,7 @@
 }
 
 static int
-test_color_screen(MENU_ARGS)
+test_bce_color(MENU_ARGS)
 {
   set_test_colors();
 
@@ -628,6 +651,38 @@
 }
 
 /*
+ * VT100s of course never did colors, ANSI or otherwise.  This test is for
+ * xterm.
+ */
+static int
+test_vt100_colors(MENU_ARGS)
+{
+  /* *INDENT-OFF* */
+  static MENU colormenu[] = {
+    { "Exit",                                                0 },
+    { "Test of cursor movements",                            
test_color_movements },
+    { "Test of screen features",                             test_color_screen 
},
+    { "Test Insert/Delete Char/Line",                        
test_color_insdel, },
+    { "", 0 }
+  };
+  /* *INDENT-ON* */
+
+  int save_colors = do_colors;
+
+  do_colors = TRUE;
+
+  do {
+    vt_clear(2);
+    __(title(0), println("Test VT102-style features with BCE"));
+    __(title(2), println("Choose test type:"));
+  } while (menu(colormenu));
+
+  do_colors = save_colors;
+
+  return MENU_NOHOLD;
+}
+
+/*
  * For terminals that support ANSI/ISO colors, work through a graduated
  * set of tests that first display colors (if the terminal does indeed
  * support them), then exercise the associated reset, clear operations.
@@ -643,14 +698,16 @@
     { "Test SGR-0 color reset",                              test_SGR_0, },
     { "Test BCE-style clear line/display (ED, EL)",          simple_bce_test, 
},
     { "Test BCE-style clear line/display (ECH, Indexing)",   fancy_bce_test, },
-    { "Test of VT102-style features with BCE (Insert/Delete Char/Line)", 
test_color_insdel, },
+    { "Test of VT102-style features with BCE",               
test_vt100_colors, },
     { "Test other ISO-6429 features with BCE",               test_ecma48_misc 
},
-    { "Test of screen features with BCE",                    
test_color_screen, },
-    { "Test of screen features with ISO 6429 SGR 22-27 codes", 
test_iso_6429_sgr, },
+    { "Test screen features with BCE",                       test_bce_color, },
+    { "Test screen features with ISO 6429 SGR 22-27 codes",  
test_iso_6429_sgr, },
     { "", 0 }
   };
   /* *INDENT-ON* */
 
+  int save_colors = do_colors;
+
   do_colors = TRUE;
 
   do {
@@ -660,7 +717,7 @@
     __(title(2), println("Choose test type:"));
   } while (menu(colormenu));
 
-  do_colors = FALSE;
+  do_colors = save_colors;
 
   return MENU_NOHOLD;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/configure.in new/vttest-20140305/configure.in
--- old/vttest-20120506/configure.in    2010-08-26 12:53:17.000000000 +0200
+++ new/vttest-20140305/configure.in    2014-01-16 21:30:05.000000000 +0100
@@ -1,6 +1,6 @@
 dnl Process this file with 'autoconf' to produce a 'configure' script
-dnl $Id: configure.in,v 1.21 2010/08/26 10:53:17 tom Exp $
-AC_REVISION($Revision: 1.21 $)
+dnl $Id: configure.in,v 1.23 2014/01/16 20:30:05 tom Exp $
+AC_REVISION($Revision: 1.23 $)
 
 AC_INIT(esc.c)
 AC_CONFIG_HEADER(config.h:config.hin)
@@ -8,9 +8,8 @@
 CF_CHECK_CACHE
 
 AC_ARG_PROGRAM
-AC_PROG_CC
+CF_PROG_CC
 CF_INTEL_COMPILER
-CF_PROG_EXT
 
 AC_PROG_INSTALL
 CF_MAKE_TAGS
@@ -53,3 +52,4 @@
 
 ###    output makefile and config.h
 AC_OUTPUT(makefile)
+CF_MAKE_DOCS(['$(THIS)'],[$(manext)])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/keyboard.c new/vttest-20140305/keyboard.c
--- old/vttest-20120506/keyboard.c      2011-12-06 10:47:39.000000000 +0100
+++ new/vttest-20140305/keyboard.c      2014-01-16 21:53:07.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: keyboard.c,v 1.34 2011/12/06 09:47:39 tom Exp $ */
+/* $Id: keyboard.c,v 1.35 2014/01/16 20:53:07 tom Exp $ */
 
 #include <vttest.h>
 #include <ttymodes.h>
@@ -213,8 +213,6 @@
     {{{0,  ""},  {0,  ""},  {0,  "" }}, 0,  0, "",      "" }
   },
   *curkeytab;
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
 static struct fnckey {
     CTLKEY fnkeymsg[2];
     int  fnkeyrow;
@@ -256,8 +254,6 @@
     {{{CSI,"6~"}, {0,""}}, 7, 38, "Next",   "Next"   },
     {{{0,  ""},   {0,""}}, 0,  0, "",       ""   }
   };
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
 static struct fnkey {
     CTLKEY fnkeymsg[4];
     int  fnkeyrow;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/main.c new/vttest-20140305/main.c
--- old/vttest-20120506/main.c  2012-05-04 22:57:12.000000000 +0200
+++ new/vttest-20140305/main.c  2014-01-16 22:15:19.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.104 2012/05/04 20:57:12 tom Exp $ */
+/* $Id: main.c,v 1.105 2014/01/16 21:15:19 tom Exp $ */
 
 /*
                                VTTEST.C
@@ -966,7 +966,7 @@
       println(hmsg[i]);
     println("");
     println("          Choose bug test number:");
-  } while (menu(menutable));
+  } while (menu2(menutable, i + 1));
   return MENU_NOHOLD;
 }
 
@@ -1453,7 +1453,7 @@
 }
 
 int
-menu(MENU *table)
+menu2(MENU *table, int top)
 {
   int i, tablesize, choice;
   char c;
@@ -1469,7 +1469,7 @@
   tablesize--;
 
   for (;;) {
-    vt_move(6, 1);
+    vt_move(top, 1);
     vt_clear(0);
 
     println("");
@@ -1545,6 +1545,12 @@
   }
 }
 
+int
+menu(MENU *table)
+{
+  return menu2(table, 6);
+}
+
 /*
  * Return updated row-number based on the number of characters printed to the
  * screen, e.g., for test_report_ops() to handle very long results.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/makefile.in new/vttest-20140305/makefile.in
--- old/vttest-20120506/makefile.in     2010-08-28 14:16:45.000000000 +0200
+++ new/vttest-20140305/makefile.in     2014-01-16 21:31:58.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: makefile.in,v 1.43 2010/08/28 12:16:45 tom Exp $
+# $Id: makefile.in,v 1.45 2014/01/16 20:31:58 tom Exp $
 # Makefile-template for 'vttest'
 
 THIS = vttest
@@ -30,10 +30,14 @@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
 
-bindir         = $(DESTDIR)@bindir@
-mandir         = $(DESTDIR)@mandir@/man$(manext)
+bindir         = @bindir@
+datarootdir    = @datarootdir@
+mandir         = @mandir@
 manext         = 1
 
+BINDIR         = $(DESTDIR)$(bindir)
+MANDIR         = $(DESTDIR)$(mandir)/man$(manext)
+
 #### End of system configuration section. ####
 
 SHELL          = /bin/sh
@@ -41,7 +45,7 @@
 CPPFLAGS       = -DHAVE_CONFIG_H -I. -I$(srcdir) @CPPFLAGS@
 
 
################################################################################
-.SUFFIXES : $o .i .html .$(manext) .cat .ps .pdf .txt
+.SUFFIXES : $o .i .cat
 
 .c$o:
        @RULE_CC@
@@ -54,17 +58,6 @@
 .$(manext).cat :
        - nroff -man $(srcdir)/$(THIS).$(manext) >$@
 
-.$(manext).html :
-       GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" 
>$@
-
-.$(manext).ps :
-       $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@
-
-.$(manext).txt :
-       GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man 
| col -bx" >$@
-
-.ps.pdf :
-       ps2pdf $*.ps
 
################################################################################
 
 C_SRC = \
@@ -148,28 +141,28 @@
 $(OBJS): config.h $(THIS).h patchlev.h
 
 install: all installdirs
-       $(INSTALL_PROGRAM) $(PROG) $(bindir)/$(actual_bin)
-       $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
+       $(INSTALL_PROGRAM) $(PROG) $(BINDIR)/$(actual_bin)
+       $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(MANDIR)/$(actual_man)
 
-installdirs: $(bindir) $(mandir)
+installdirs: $(BINDIR) $(MANDIR)
 
-$(bindir) $(mandir) :
+$(BINDIR) $(MANDIR) :
        mkdir -p $@
 
 uninstall:
-       rm -f $(bindir)/$(actual_bin)
-       rm -f $(mandir)/$(actual_man)
+       rm -f $(BINDIR)/$(actual_bin)
+       rm -f $(MANDIR)/$(actual_man)
 
-mostlyclean:
+mostlyclean ::
        rm -f *.[oi] core *~ *.BAK *.trace *.atac
 
-clean: mostlyclean
+clean :: mostlyclean
        rm -f $(PROG)
 
-distclean: clean
+distclean :: clean
        rm -f makefile config.log config.cache config.status config.h
 
-realclean: distclean
+realclean :: distclean
        rm -f tags TAGS # don't remove configure!
 
 @MAKE_LOWER_TAGS@tags: $(C_SRC) $(HDRS)
@@ -209,15 +202,6 @@
 $(THIS)$o:     config.h
 
 
################################################################################
-docs :: $(THIS).html \
-       $(THIS).pdf \
-       $(THIS).ps \
-       $(THIS).txt
-$(THIS).html : $(THIS).$(manext)
-$(THIS).pdf : $(THIS).ps
-$(THIS).ps : $(THIS).$(manext)
-$(THIS).txt : $(THIS).$(manext)
-################################################################################
 
 lint:
        $(LINT) $(CPPFLAGS) $(C_SRC)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/mouse.c new/vttest-20140305/mouse.c
--- old/vttest-20120506/mouse.c 2011-12-10 16:19:15.000000000 +0100
+++ new/vttest-20140305/mouse.c 2014-01-16 23:04:01.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: mouse.c,v 1.32 2011/12/10 15:19:15 tom Exp $ */
+/* $Id: mouse.c,v 1.33 2014/01/16 22:04:01 tom Exp $ */
 
 #include <vttest.h>
 #include <esc.h>
@@ -663,7 +663,6 @@
   unsigned start_x, end_x;
   unsigned start_y, end_y;
   unsigned mouse_y, mouse_x;
-  int pos;
 
 first:
   vt_move(1, 1);
@@ -697,7 +696,6 @@
 
     if (parse_mouse_M(report, &b, &x, &y) != 0) {
       b &= 7;
-      pos = 2;
       if (b != 3) {
         /* send the xterm the highlighting range (it MUST be done first) */
         do_csi("1;%u;%u;%d;%d;T", x, y, 10, 20);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/nonvt100.c new/vttest-20140305/nonvt100.c
--- old/vttest-20120506/nonvt100.c      2012-05-05 00:09:34.000000000 +0200
+++ new/vttest-20140305/nonvt100.c      2014-01-16 23:04:56.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: nonvt100.c,v 1.62 2012/05/04 22:09:34 tom Exp $ */
+/* $Id: nonvt100.c,v 1.64 2014/01/16 22:04:56 tom Exp $ */
 
 /*
  * The list of non-VT320 codes was compiled using the list of non-VT320 codes
@@ -30,18 +30,14 @@
   int count;
   int last = max_lines - 3;
   int row;
-  int top;
   int lft;
-  int bot;
   int rgt;
   char temp[80];
 
   test_with_margins(TRUE);
 
-  top = get_top_margin();
   lft = get_left_margin();
   rgt = get_right_margin();
-  bot = get_bottom_margin(last);
 
   /* ignore left/right margins unless origin mode is set */
   if (origin_mode) {
@@ -166,17 +162,13 @@
   int n;
   int last_tab;
   int last = max_lines - 4;
-  int top;
   int lft;
-  int bot;
   int rgt;
 
   test_with_margins(TRUE);
 
   set_colors(WHITE_ON_BLUE);
 
-  top = get_top_margin();
-  bot = get_bottom_margin(last);
   lft = get_left_margin();
   rgt = get_right_margin();
   last_tab = ((rgt * 2 - lft + 1) + (TABWIDTH - 1)) / TABWIDTH;
@@ -458,7 +450,7 @@
   for (n = 1; n <= min_cols; n++)
     printf("%c", (n == last || n == last + 1) ? '+' : '*');
   vt_move(last + 1, 1);
-  ruler(last, min_cols);
+  ruler(last + 1, min_cols);
   println(the_title);
   println("There should be a diagonal of 2 +'s down to the row of *'s above 
this message.");
   println("The ++ in the row of *'s is the target.  If there are 11 +'s, 
ECMA-48 does");
@@ -486,7 +478,7 @@
     sd(1);
   }
   vt_move(last + 1, 1);
-  ruler(last, min_cols);
+  ruler(last + 1, min_cols);
   vt_clear(0);
   println(the_title);
   println("There should be a horizontal row of *'s above, just above the 
message.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/debian/changelog 
new/vttest-20140305/package/debian/changelog
--- old/vttest-20120506/package/debian/changelog        2012-05-06 
22:01:34.000000000 +0200
+++ new/vttest-20140305/package/debian/changelog        2014-03-06 
01:28:40.000000000 +0100
@@ -1,3 +1,34 @@
+vttest-cur (2.7.20140305) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Wed, 05 Mar 2014 19:28:40 
-0500
+
+vttest-cur (2.7.20140116) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Thu, 16 Jan 2014 15:20:29 
-0500
+
+vttest-cur (2.7.20130915) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Sun, 15 Sep 2013 09:38:13 
-0400
+
+vttest-cur (2.7.20130818) unstable; urgency=low
+
+  * optionally highlight NRC mappings in character set tests.
+  * minor change to show if cursor-position report accounts for origin-mode
+
+ -- Thomas E. Dickey <[email protected]>  Fri, 09 Aug 2013 18:17:35 
-0400
+
+vttest-cur (2.7.20120603) unstable; urgency=low
+
+  * minor change to show if cursor goes to first column on IL/DL
+
+ -- Thomas E. Dickey <[email protected]>  Sun, 03 Jun 2012 12:55:59 
-0400
+
 vttest-cur (2.7.20120506) unstable; urgency=low
 
   * Add tests for DECLRMM left/right margin mode.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/debian/copyright 
new/vttest-20140305/package/debian/copyright
--- old/vttest-20120506/package/debian/copyright        2010-08-27 
00:38:22.000000000 +0200
+++ new/vttest-20140305/package/debian/copyright        2014-01-16 
22:33:38.000000000 +0100
@@ -1,7 +1,7 @@
 Upstream source http://invisible-island.net/vttest/vttest.html
 
 -------------------------------------------------------------------------------
-Copyright 1996-2009,2010 by Thomas E. Dickey
+Copyright 1996-2013,2014 by Thomas E. Dickey
 
                         All Rights Reserved
 
@@ -25,7 +25,7 @@
 
 Files: aclocal.m4
 Licence: other-BSD
-Copyright:  1997-2009,2010 by Thomas E. Dickey
+Copyright:  1997-2013,2014 by Thomas E. Dickey
     Permission is hereby granted, free of charge, to any person obtaining a
     copy of this software and associated documentation files (the
     "Software"), to deal in the Software without restriction, including
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/freebsd/Makefile 
new/vttest-20140305/package/freebsd/Makefile
--- old/vttest-20120506/package/freebsd/Makefile        1970-01-01 
01:00:00.000000000 +0100
+++ new/vttest-20140305/package/freebsd/Makefile        2014-03-06 
01:28:40.000000000 +0100
@@ -0,0 +1,25 @@
+# New ports collection makefile for:   vttest
+# Date created:                2005-07-21
+# Whom:                        Nicola Vitale <[email protected]>
+#
+# $FreeBSD: ports/sysutils/vttest/Makefile,v 1.8 2012/11/17 06:01:49 svnexp 
Exp $
+#
+
+PORTNAME=      vttest
+PORTVERSION=   2014.03.05
+CATEGORIES=    sysutils
+MASTER_SITES=  ftp://invisible-island.net/vttest/
+DISTNAME=      ${PORTNAME}-${PORTVERSION:S,.,,g}
+EXTRACT_SUFX=  .tgz
+
+MAINTAINER=    [email protected]
+COMMENT=       A program to test "VT100-compatibility" of terminals
+
+GNU_CONFIGURE= yes
+
+MAKEFILE=      makefile
+
+MAN1=          vttest.1
+PLIST_FILES=   bin/vttest
+
+.include <bsd.port.mk>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/freebsd/distinfo 
new/vttest-20140305/package/freebsd/distinfo
--- old/vttest-20120506/package/freebsd/distinfo        1970-01-01 
01:00:00.000000000 +0100
+++ new/vttest-20140305/package/freebsd/distinfo        2012-06-30 
14:50:55.000000000 +0200
@@ -0,0 +1,2 @@
+SHA256 (vttest-20120506.tgz) = 
9c03e8e917ab5b06f934c45923dd00a5943c6b36f0a32c38392f8f864d6b39e4
+SIZE (vttest-20120506.tgz) = 183236
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/freebsd/pkg-descr 
new/vttest-20140305/package/freebsd/pkg-descr
--- old/vttest-20120506/package/freebsd/pkg-descr       1970-01-01 
01:00:00.000000000 +0100
+++ new/vttest-20140305/package/freebsd/pkg-descr       2007-01-09 
17:56:34.000000000 +0100
@@ -0,0 +1,5 @@
+This is a program to test the compatibility (or to demonstrate the
+non-compatibility) of so-called "VT100-compatible" terminals.
+
+Author:        Thomas E. Dickey
+WWW:   http://invisible-island.net/vttest/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/package/vttest.spec new/vttest-20140305/package/vttest.spec
--- old/vttest-20120506/package/vttest.spec     2012-05-06 22:01:24.000000000 
+0200
+++ new/vttest-20140305/package/vttest.spec     2014-03-06 01:28:40.000000000 
+0100
@@ -1,8 +1,8 @@
 Summary: vttest - test VT100-type terminal
 %define AppProgram vttest
-%define AppPatched 20120506
+%define AppPatched 20140305
 %define AppVersion 2.7.%{AppPatched}
-# $XTermId: vttest.spec,v 1.15 2012/05/06 20:01:24 tom Exp $
+# $XTermId: vttest.spec,v 1.21 2014/03/06 00:28:40 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/patchlev.h new/vttest-20140305/patchlev.h
--- old/vttest-20120506/patchlev.h      2012-05-06 22:01:17.000000000 +0200
+++ new/vttest-20140305/patchlev.h      2014-03-06 01:28:40.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: patchlev.h,v 1.51 2012/05/06 20:01:17 tom Exp $ */
+/* $Id: patchlev.h,v 1.57 2014/03/06 00:28:40 tom Exp $ */
 #define RELEASE 2
 #define PATCHLEVEL 7
-#define PATCH_DATE 20120506
+#define PATCH_DATE 20140305
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/reports.c new/vttest-20140305/reports.c
--- old/vttest-20120506/reports.c       2012-04-04 11:24:44.000000000 +0200
+++ new/vttest-20140305/reports.c       2013-09-15 16:25:38.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: reports.c,v 1.33 2012/04/04 09:24:44 tom Exp $ */
+/* $Id: reports.c,v 1.35 2013/09/15 14:25:38 tom Exp $ */
 
 #include <vttest.h>
 #include <ttymodes.h>
@@ -268,7 +268,7 @@
     {  1,  "VT220" },
     { 18,  "VT330" },
     { 19,  "VT340" },
-    { 24,  "kermit" },
+    { 24,  "VT320" },
     { 28,  "DECterm" },
     { 41,  "VT420" },
     { 64,  "VT520" },
@@ -452,6 +452,7 @@
 tst_DSR(MENU_ARGS)
 {
   int found;
+  int origin;
   char *report, *cmp;
 
   set_tty_raw(TRUE);
@@ -481,24 +482,45 @@
   vt_move(4, 1);
   println("Test of Device Status Report 6 (report cursor position).");
 
-  vt_move(5, 1);
-  dsr(6);
-  report = get_reply();
-
-  vt_move(5, 1);
-  vt_el(0);
-  printf("Report is: ");
-  chrprint(report);
+  for (origin = 0; origin < 2; ++origin) {
+    if (origin) {
+      sm("?6");
+      decstbm(4, max_lines - 6);
+    }
+    vt_move(5, 1);
+    dsr(6);
+    report = get_reply();
+
+    vt_move(5, 1);
+    vt_el(0);
+    printf("Report is: ");
+    chrprint(report);
+
+    if ((cmp = skip_csi(report)) != 0) {
+      found = (!strcmp(cmp, "5;1R")
+               ? 1
+               : ((!strcmp(cmp, "8;1R") && origin)
+                  ? 2
+                  : 0));
+    } else {
+      found = 0;
+    }
 
-  if ((cmp = skip_csi(report)) != 0)
-    found = !strcmp(cmp, "5;1R");
-  else
-    found = 0;
+    switch (found) {
+    case 2:
+      show_result(" -- Ignores origin mode");
+      break;
+    case 1:
+      show_result(" -- OK");
+      break;
+    default:
+      show_result(" -- Unknown response!");
+      break;
+    }
+  }
 
-  if (found)
-    show_result(" -- OK");
-  else
-    show_result(" -- Unknown response!");
+  rm("?6");
+  decstbm(0, 0);
 
   vt_move(max_lines - 1, 1);
   restore_ttymodes();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/setup.c new/vttest-20140305/setup.c
--- old/vttest-20120506/setup.c 2012-04-22 16:48:15.000000000 +0200
+++ new/vttest-20140305/setup.c 2014-01-16 22:03:24.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.32 2012/04/22 14:48:15 tom Exp $ */
+/* $Id: setup.c,v 1.33 2014/01/16 21:03:24 tom Exp $ */
 
 #include <vttest.h>
 #include <esc.h>
@@ -229,10 +229,12 @@
         input_8bits = FALSE;
         output_8bits = FALSE;
       }
-      if (request > 1)
-        do_csi("6%d;%d\"p", request, !input_8bits);
-      else
-        do_csi("61\"p");
+      if (max_level > 1) {
+        if (request > 1)
+          do_csi("6%d;%d\"p", request, !input_8bits);
+        else
+          do_csi("61\"p");
+      }
     }
     padding(5); /* FIXME: may not be needed */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/unix_io.c new/vttest-20140305/unix_io.c
--- old/vttest-20120506/unix_io.c       2012-04-04 11:02:07.000000000 +0200
+++ new/vttest-20140305/unix_io.c       2014-01-16 23:11:39.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: unix_io.c,v 1.28 2012/04/04 09:02:07 tom Exp $ */
+/* $Id: unix_io.c,v 1.29 2014/01/16 22:11:39 tom Exp $ */
 
 #include <stdarg.h>
 #include <unistd.h>
@@ -214,7 +214,6 @@
   reading = TRUE;
   do {
     if (read(0, &one_byte, (size_t) 1) < 0) {
-      ch = EOF;
       break;
     } else {
       ch = (int) one_byte;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/vt420.c new/vttest-20140305/vt420.c
--- old/vttest-20120506/vt420.c 2012-05-06 16:25:44.000000000 +0200
+++ new/vttest-20140305/vt420.c 2014-03-04 22:56:46.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: vt420.c,v 1.160 2012/05/06 14:25:44 tom Exp $ */
+/* $Id: vt420.c,v 1.163 2014/03/04 21:56:46 tom Exp $ */
 
 /*
  * Reference:  Installing and Using the VT420 Video Terminal (North American
@@ -294,7 +294,8 @@
     fprintf(log_fp, "Note: filling outside margins with '%c'\n", ch);
   }
 
-  set_colors("0");
+  if (!do_colors)
+    set_colors("0");
 
   if (origin_mode)
     decom(FALSE);
@@ -1173,9 +1174,7 @@
   int last = max_lines - 3;
   int base_row;
   int base_col;
-  int left_col;
   int last_row;
-  int last_col;
   int real_col;
   int top;
   int bot;
@@ -1203,7 +1202,6 @@
       base_col = rgt - (bot - top) - 2;
       if (base_col < 0)
         base_col = 0;
-      last_col = rgt - 1;
       switch (tb_marg_flag) {
       default:
         last_row = bot;
@@ -1217,26 +1215,21 @@
     } else {
       last_row = last;
       base_col = (2 * last);
-      last_col = min_cols - 1;
       real_col = rgt;
     }
   } else {
     switch (lr_marg_flag) {
     default:
       base_col = (2 * last);
-      last_col = min_cols - 1;
       break;
     case marFirst:
       base_col = 0;
-      last_col = min_cols / 2 - 1;
       break;
     case marMiddle:
       base_col = min_cols / 4;
-      last_col = (3 * min_cols) / 4 - 1;
       break;
     case marLast:
       base_col = (min_cols / 2);
-      last_col = min_cols - 1;
       break;
     }
     if (tb_marg_flag == marLast) {
@@ -1297,7 +1290,6 @@
   if (origin_mode) {
     base_row = 0;
     if (lrmm_flag) {
-      left_col = 1;
       switch (tb_marg_flag) {
       default:
         last_row = bot;
@@ -1316,26 +1308,21 @@
     } else {
       last_row = last;
       base_col = (2 * last);
-      left_col = 1;
       real_col = lft;
     }
   } else {
     switch (lr_marg_flag) {
     default:
       base_col = (2 * last);
-      left_col = 1;
       break;
     case marFirst:
       base_col = (min_cols / 2);
-      left_col = 1;
       break;
     case marMiddle:
       base_col = (3 * min_cols) / 4;
-      left_col = (min_cols / 4) + 1;
       break;
     case marLast:
       base_col = min_cols + 0;
-      left_col = (min_cols / 2) + 1;
       break;
     }
     if (tb_marg_flag == marLast) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/vttest-20120506/vttest.h new/vttest-20140305/vttest.h
--- old/vttest-20120506/vttest.h        2012-05-06 21:32:34.000000000 +0200
+++ new/vttest-20140305/vttest.h        2014-01-16 22:14:22.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: vttest.h,v 1.96 2012/05/06 19:32:34 tom Exp $ */
+/* $Id: vttest.h,v 1.98 2014/01/16 21:14:22 tom Exp $ */
 
 #ifndef VTTEST_H
 #define VTTEST_H 1
@@ -120,7 +120,6 @@
 #  endif
 #endif
 
-/*FIXME: really want 'extern' for errno*/
 #include <errno.h>
 
 #define LOG_ENABLED ((log_fp != (FILE *) 0) && !log_disabled)
@@ -280,6 +279,7 @@
 extern int get_top_margin(void);
 extern int main(int argc, char *argv[]);
 extern int menu(MENU *table);
+extern int menu2(MENU *table, int tp);
 extern int not_impl(MENU_ARGS);
 extern int parse_decrqss(char *report, const char *func);
 extern int rpt_DECSTBM(MENU_ARGS);

++++++ xterm-320.tgz -> xterm-322.tgz ++++++
++++ 13567 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/MANIFEST new/xterm-322/MANIFEST
--- old/xterm-320/MANIFEST      2015-08-26 23:52:20.000000000 +0200
+++ new/xterm-322/MANIFEST      2016-01-02 14:42:56.000000000 +0100
@@ -1,4 +1,4 @@
-MANIFEST for xterm-320, version xterm-320
+MANIFEST for xterm-322, version xterm-322
 
--------------------------------------------------------------------------------
 MANIFEST                        this file
 256colres.h                     resource-definitions for 256-color mode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/button.c new/xterm-322/button.c
--- old/xterm-320/button.c      2015-08-28 01:47:56.000000000 +0200
+++ new/xterm-322/button.c      2015-12-31 12:26:38.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.494 2015/08/27 23:47:56 tom Exp $ */
+/* $XTermId: button.c,v 1.498 2015/12/31 11:26:38 tom Exp $ */
 
 /*
  * Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -3829,6 +3829,8 @@
                        Atom *type,
                        XtPointer *value,
                        unsigned long *length,
+                       Char *data,
+                       unsigned long remaining,
                        int *format,
                        int (*conversion_function) (Display *,
                                                    char **, int,
@@ -3848,9 +3850,8 @@
        Display *dpy = XtDisplay(w);
        XTextProperty textprop;
        int out_n = 0;
-       unsigned long remaining = screen->selection_length;
        char *result = 0;
-       char *the_data = (char *) screen->selection_data;
+       char *the_data = (char *) data;
        char *the_next;
 
        TRACE(("converting %ld:'%s'\n",
@@ -3937,6 +3938,9 @@
     return result;
 }
 
+#define keepClipboard(atom) ((screen->keepClipboard) && \
+        (atom == XInternAtom(screen->display, "CLIPBOARD", False)))
+
 static Boolean
 ConvertSelection(Widget w,
                 Atom *selection,
@@ -3950,6 +3954,9 @@
     TScreen *screen;
     Bool result = False;
 
+    Char *data;
+    unsigned long data_length;
+
     XtermWidget xw;
 
     if ((xw = getXtermWidget(w)) == 0)
@@ -3960,7 +3967,17 @@
     TRACE(("ConvertSelection %s\n",
           visibleSelectionTarget(dpy, *target)));
 
-    if (screen->selection_data == NULL) {
+    if (keepClipboard(*selection)) {
+       TRACE(("asked for clipboard\n"));
+       data = screen->clipboard_data;
+       data_length = screen->clipboard_size;
+    } else {
+       TRACE(("asked for selection\n"));
+       data = screen->selection_data;
+       data_length = screen->selection_length;
+    }
+
+    if (data == NULL) {
        TRACE(("...FIXME: no selection_data\n"));
        return False;           /* can this happen? */
     }
@@ -4009,28 +4026,32 @@
     else if (screen->wide_chars && *target == XA_STRING) {
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    Xutf8TextListToTextProperty,
                                    XStringStyle);
        TRACE(("...Xutf8TextListToTextProperty:%d\n", result));
     } else if (screen->wide_chars && *target == XA_UTF8_STRING(dpy)) {
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    Xutf8TextListToTextProperty,
                                    XUTF8StringStyle);
        TRACE(("...Xutf8TextListToTextProperty:%d\n", result));
     } else if (screen->wide_chars && *target == XA_TEXT(dpy)) {
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    Xutf8TextListToTextProperty,
                                    XStdICCTextStyle);
        TRACE(("...Xutf8TextListToTextProperty:%d\n", result));
     } else if (screen->wide_chars && *target == XA_COMPOUND_TEXT(dpy)) {
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    Xutf8TextListToTextProperty,
                                    XCompoundTextStyle);
        TRACE(("...Xutf8TextListToTextProperty:%d\n", result));
@@ -4053,14 +4074,16 @@
     } else if (*target == XA_TEXT(dpy)) {      /* not wide_chars */
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    XmbTextListToTextProperty,
                                    XStdICCTextStyle);
        TRACE(("...XmbTextListToTextProperty(StdICC):%d\n", result));
     } else if (*target == XA_COMPOUND_TEXT(dpy)) {     /* not wide_chars */
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    XmbTextListToTextProperty,
                                    XCompoundTextStyle);
        TRACE(("...XmbTextListToTextProperty(Compound):%d\n", result));
@@ -4069,7 +4092,8 @@
     else if (*target == XA_UTF8_STRING(dpy)) { /* not wide_chars */
        result =
            _ConvertSelectionHelper(w,
-                                   type, value, length, format,
+                                   type, value, length, data,
+                                   data_length, format,
                                    XmbTextListToTextProperty,
                                    XUTF8StringStyle);
        TRACE(("...XmbTextListToTextProperty(UTF8):%d\n", result));
@@ -4203,6 +4227,16 @@
                             (int) length,
                             cutbuffer);
            }
+       } else if (keepClipboard(atoms[i])) {
+           Char *buf;
+           TRACE(("saving selection to clipboard buffer\n"));
+           if ((buf = (Char *) malloc((size_t) screen->selection_length)) == 0)
+               SysError(ERROR_BMALLOC2);
+
+           XtFree((char *) screen->clipboard_data);
+           memcpy(buf, screen->selection_data, screen->selection_length);
+           screen->clipboard_data = buf;
+           screen->clipboard_size = screen->selection_length;
        } else if (screen->selection_length == 0) {
            XtDisownSelection((Widget) xw, atoms[i], screen->selection_time);
        } else if (!screen->replyToEmacs) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/charproc.c new/xterm-322/charproc.c
--- old/xterm-320/charproc.c    2015-07-15 11:21:40.000000000 +0200
+++ new/xterm-322/charproc.c    2015-12-30 10:38:49.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1413 2015/07/15 09:21:40 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1414 2015/12/30 09:38:49 tom Exp $ */
 
 /*
  * Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -279,6 +279,7 @@
     { "set-bellIsUrgent",      HandleBellIsUrgent },
     { "set-cursesemul",                HandleCursesEmul },
     { "set-jumpscroll",                HandleJumpscroll },
+    { "set-keep-clipboard",    HandleKeepClipboard },
     { "set-keep-selection",    HandleKeepSelection },
     { "set-marginbell",                HandleMarginBell },
     { "set-old-function-keys", HandleOldFunctionKeys },
@@ -442,6 +443,7 @@
     Bres(XtNi18nSelections, XtCI18nSelections, screen.i18nSelections, True),
     Bres(XtNfastScroll, XtCFastScroll, screen.fastscroll, False),
     Bres(XtNjumpScroll, XtCJumpScroll, screen.jumpscroll, True),
+    Bres(XtNkeepClipboard, XtCKeepClipboard, screen.keepClipboard, False),
     Bres(XtNkeepSelection, XtCKeepSelection, screen.keepSelection, True),
     Bres(XtNloginShell, XtCLoginShell, misc.login_shell, False),
     Bres(XtNmarginBell, XtCMarginBell, screen.marginbell, False),
@@ -5603,6 +5605,10 @@
            set_bool_mode(screen->poponbell);
            update_poponbell();
            break;
+       case srm_KEEP_CLIPBOARD:
+           set_bool_mode(screen->keepClipboard);
+           update_keepClipboard();
+           break;
        case srm_TITE_INHIBIT:
            if (!xw->misc.titeInhibit) {
                if (IsSM())
@@ -5873,6 +5879,9 @@
        case srm_POP_ON_BELL:
            DoSM(DP_POP_ON_BELL, screen->poponbell);
            break;
+       case srm_KEEP_CLIPBOARD:
+           DoSM(DP_KEEP_CLIPBOARD, screen->keepClipboard);
+           break;
 #if OPT_TCAP_FKEYS
        case srm_TCAP_FKEYS:
            /* FALLTHRU */
@@ -6208,6 +6217,10 @@
            DoRM(DP_POP_ON_BELL, screen->poponbell);
            update_poponbell();
            break;
+       case srm_KEEP_CLIPBOARD:
+           DoRM(DP_KEEP_CLIPBOARD, screen->keepClipboard);
+           update_keepClipboard();
+           break;
 #if OPT_TCAP_FKEYS
        case srm_TCAP_FKEYS:
            /* FALLTHRU */
@@ -7955,6 +7968,7 @@
     init_Bres(screen.highlight_selection);
     init_Bres(screen.show_wrap_marks);
     init_Bres(screen.i18nSelections);
+    init_Bres(screen.keepClipboard);
     init_Bres(screen.keepSelection);
     init_Bres(screen.selectToClipboard);
     init_Bres(screen.trim_selection);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/ctlseqs.ms new/xterm-322/ctlseqs.ms
--- old/xterm-320/ctlseqs.ms    2015-08-20 01:20:41.000000000 +0200
+++ new/xterm-322/ctlseqs.ms    2015-12-30 11:02:15.000000000 +0100
@@ -1,6 +1,6 @@
 .\"#! troff -ms $1             -*- Nroff -*-
 .\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.324 2015/08/19 23:20:41 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.326 2015/12/30 10:02:15 tom Exp $
 .\"
 .\"
 .\" Copyright 1996-2014,2015 by Thomas E. Dickey
@@ -69,8 +69,8 @@
 .\"
 .ds XT XTerm
 .ds xt xterm
-.ds LF Patch #318
-.ds RF 2015/08/19
+.ds LF Patch #321
+.ds RF 2015/12/30
 .\"
 .if n .pl 9999v                \" no page breaks in nroff
 .ND
@@ -1001,6 +1001,8 @@
 (This enables the \fBbellIsUrgent\fP resource).
   \*(Ps = \*1\*0\*4\*3 \(-> Enable raising of the window when Control-G is 
received.
 (enables the \fBpopOnBell\fP resource).
+  \*(Ps = \*1\*0\*4\*4 \(-> Reuse the most recent data copied to CLIPBOARD.
+(This enables the \fBkeepClipboard\fP resource).
   \*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer.  (This may be
 disabled by the \fBtiteInhibit\fP resource).
   \*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC.  (This may be
@@ -1193,10 +1195,10 @@
 .RE
 .sP
 These ISO-8613-3 controls are supported:
-  \*(Ps = \*3\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set foreground color to 
the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
-  \*(Ps = \*3\*8\*;\*5\*;\*(Ps \(-> Set foreground color to the second \*(Ps.
-  \*(Ps = \*4\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set background color to 
the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
-  \*(Ps = \*4\*8\*;\*5\*;\*(Ps \(-> Set background color to the second \*(Ps.
+  \*(Pm = \*3\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set foreground color to 
the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
+  \*(Pm = \*3\*8\*;\*5\*;\*(Ps \(-> Set foreground color to the second \*(Ps.
+  \*(Pm = \*4\*8\*;\*2\*;\*(Pr\*;\*(Pg\*;\*(Pb \(-> Set background color to 
the closest match in \fIxterm\fP's palette for the given RGB \*(Pr/\*(Pg/\*(Pb.
+  \*(Pm = \*4\*8\*;\*5\*;\*(Ps \(-> Set background color to the second \*(Ps.
 .sp
 .
 .IP \\*(Cs\\*>\\*(Ps\\*;\\*(Ps\\*s\\*m
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/ctlseqs.txt new/xterm-322/ctlseqs.txt
--- old/xterm-320/ctlseqs.txt   2015-08-20 01:21:25.000000000 +0200
+++ new/xterm-322/ctlseqs.txt   2015-12-30 11:02:56.000000000 +0100
@@ -21,7 +21,7 @@
                              Thomas Dickey
                       XFree86 Project (1996-2006)
                     invisible-island.net (2006-2015)
-               updated for XTerm Patch #318 (2015/08/19)
+               updated for XTerm Patch #321 (2015/12/30)
 
 
 
@@ -491,6 +491,8 @@
           resource).
             Ps = 1 0 4 3  -> Enable raising of the window when Control-G
           is received.  (enables the popOnBell resource).
+            Ps = 1 0 4 4  -> Reuse the most recent data copied to CLIP-
+          BOARD.  (This enables the keepClipboard resource).
             Ps = 1 0 4 7  -> Use Alternate Screen Buffer.  (This may be
           disabled by the titeInhibit resource).
             Ps = 1 0 4 8  -> Save cursor as in DECSC.  (This may be dis-
@@ -678,12 +680,12 @@
             colons (but after the first colon, colons must be used).
 
           These ISO-8613-3 controls are supported:
-            Ps = 3 8 ; 2 ; Pr; Pg; Pb -> Set foreground color to the
+            Pm = 3 8 ; 2 ; Pr; Pg; Pb -> Set foreground color to the
           closest match in xterm's palette for the given RGB Pr/Pg/Pb.
-            Ps = 3 8 ; 5 ; Ps -> Set foreground color to the second Ps.
-            Ps = 4 8 ; 2 ; Pr; Pg; Pb -> Set background color to the
+            Pm = 3 8 ; 5 ; Ps -> Set foreground color to the second Ps.
+            Pm = 4 8 ; 2 ; Pr; Pg; Pb -> Set background color to the
           closest match in xterm's palette for the given RGB Pr/Pg/Pb.
-            Ps = 4 8 ; 5 ; Ps -> Set background color to the second Ps.
+            Pm = 4 8 ; 5 ; Ps -> Set background color to the second Ps.
 
 CSI > Ps; Ps m
           Set or reset resource-values used by xterm to decide whether
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/main.c new/xterm-322/main.c
--- old/xterm-320/main.c        2015-08-27 01:39:36.000000000 +0200
+++ new/xterm-322/main.c        2016-01-02 15:12:19.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: main.c,v 1.773 2015/08/26 23:39:36 tom Exp $ */
+/* $XTermId: main.c,v 1.777 2016/01/02 14:12:19 tom Exp $ */
 
 /*
- * Copyright 2002-2014,2015 by Thomas E. Dickey
+ * Copyright 2002-2015,2016 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -1947,6 +1947,23 @@
 #endif
 #endif /* HAVE_POSIX_SAVED_IDS */
 
+#if OPT_LUIT_PROG
+static Boolean
+complex_command(char **args)
+{
+    Boolean result = False;
+    if (x_countargv(args) == 1) {
+       char *check = xtermFindShell(args[0], False);
+       if (check == 0) {
+           result = True;
+       } else {
+           free(check);
+       }
+    }
+    return result;
+}
+#endif
+
 int
 main(int argc, char *argv[]ENVP_ARG)
 {
@@ -2448,10 +2465,15 @@
        }
        command_length_with_luit = x_countargv(command_to_exec_with_luit);
        if (count_exec) {
+           static char *fixup_shell[] =
+           {"sh", "-c", 0};
            char *delimiter[2];
            delimiter[0] = x_strdup("--");
            delimiter[1] = 0;
            x_appendargv(command_to_exec_with_luit, delimiter);
+           if (complex_command(command_to_exec)) {
+               x_appendargv(command_to_exec_with_luit, fixup_shell);
+           }
            x_appendargv(command_to_exec_with_luit, command_to_exec);
        }
        TRACE_ARGV("luit command", command_to_exec_with_luit);
@@ -2628,6 +2650,10 @@
 
 #if defined(USE_OPENPTY)
     result = openpty(pty, &opened_tty, ttydev, NULL, NULL);
+    if (opened_tty >= 0) {
+       close(opened_tty);
+       opened_tty = -1;
+    }
 #elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && 
defined(HAVE_GRANTPT_PTY_ISATTY)
     if ((*pty = posix_openpt(O_RDWR)) >= 0) {
        char *name = ptsname(*pty);
@@ -2783,12 +2809,6 @@
        seteuid(save_ruid);
        TRACE_IDS;
 
-#ifdef USE_OPENPTY
-       if (opened_tty >= 0) {
-           close(opened_tty);
-           opened_tty = -1;
-       }
-#endif
     } else if (m_pty != -1) {
        *pty = m_pty;
        result = 0;
@@ -2800,6 +2820,12 @@
           ptydev != 0 ? ptydev : "?",
           result ? "FAIL" : "OK",
           pty != 0 ? *pty : -1));
+#ifdef USE_OPENPTY
+    if (opened_tty >= 0) {
+       close(opened_tty);
+       opened_tty = -1;
+    }
+#endif
     return result;
 }
 #endif
@@ -3222,7 +3248,8 @@
     if (validProgram(pathname)
        && stat(ok_shells, &sb) == 0
        && (sb.st_mode & S_IFMT) == S_IFREG
-       && (sb.st_size != 0)
+       && ((size_t) sb.st_size > 0)
+       && ((size_t) sb.st_size < (((size_t) ~0) - 2))
        && (blob = calloc((size_t) sb.st_size + 2, sizeof(char))) != 0) {
        if ((fp = fopen(ok_shells, "r")) != 0) {
            rc = fread(blob, sizeof(char), (size_t) sb.st_size, fp);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/menu.c new/xterm-322/menu.c
--- old/xterm-320/menu.c        2015-04-10 03:11:52.000000000 +0200
+++ new/xterm-322/menu.c        2015-12-30 10:40:28.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: menu.c,v 1.331 2015/04/10 01:11:52 tom Exp $ */
+/* $XTermId: menu.c,v 1.332 2015/12/30 09:40:28 tom Exp $ */
 
 /*
  * Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -157,6 +157,7 @@
 static void do_hardreset       PROTO_XT_CALLBACK_ARGS;
 static void do_interrupt       PROTO_XT_CALLBACK_ARGS;
 static void do_jumpscroll      PROTO_XT_CALLBACK_ARGS;
+static void do_keepClipboard   PROTO_XT_CALLBACK_ARGS;
 static void do_keepSelection   PROTO_XT_CALLBACK_ARGS;
 static void do_kill            PROTO_XT_CALLBACK_ARGS;
 static void do_old_fkeys       PROTO_XT_CALLBACK_ARGS;
@@ -1471,6 +1472,17 @@
 }
 
 static void
+do_keepClipboard(Widget gw GCC_UNUSED,
+                XtPointer closure GCC_UNUSED,
+                XtPointer data GCC_UNUSED)
+{
+    TScreen *screen = TScreenOf(term);
+
+    ToggleFlag(screen->keepClipboard);
+    update_keepClipboard();
+}
+
+static void
 do_keepSelection(Widget gw GCC_UNUSED,
                 XtPointer closure GCC_UNUSED,
                 XtPointer data GCC_UNUSED)
@@ -2422,6 +2434,15 @@
 }
 
 void
+HandleKeepClipboard(Widget w,
+                   XEvent *event GCC_UNUSED,
+                   String *params,
+                   Cardinal *param_count)
+{
+    HANDLE_VT_TOGGLE(keepClipboard);
+}
+
+void
 HandleKeepSelection(Widget w,
                    XEvent *event GCC_UNUSED,
                    String *params,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/menu.h new/xterm-322/menu.h
--- old/xterm-320/menu.h        2014-09-04 02:17:55.000000000 +0200
+++ new/xterm-322/menu.h        2015-12-30 10:53:02.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: menu.h,v 1.135 2014/09/04 00:17:55 tom Exp $ */
+/* $XTermId: menu.h,v 1.136 2015/12/30 09:53:02 tom Exp $ */
 
 /*
- * Copyright 1999-2013,2014 by Thomas E. Dickey
+ * Copyright 1999-2014,2015 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -104,6 +104,7 @@
 extern void HandleHardReset        PROTO_XT_ACTIONS_ARGS;
 extern void HandleHpFunctionKeys   PROTO_XT_ACTIONS_ARGS;
 extern void HandleJumpscroll       PROTO_XT_ACTIONS_ARGS;
+extern void HandleKeepClipboard    PROTO_XT_ACTIONS_ARGS;
 extern void HandleKeepSelection    PROTO_XT_ACTIONS_ARGS;
 extern void HandleLogging          PROTO_XT_ACTIONS_ARGS;
 extern void HandleMarginBell       PROTO_XT_ACTIONS_ARGS;
@@ -450,6 +451,7 @@
 extern void update_bellIsUrgent(void);
 extern void update_poponbell(void);
 
+#define update_keepClipboard() /* nothing */
 #define update_marginbell() /* nothing */
 
 #if OPT_LOAD_VTFONTS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/package/debian/changelog new/xterm-322/package/debian/changelog
--- old/xterm-320/package/debian/changelog      2015-08-26 23:52:20.000000000 
+0200
+++ new/xterm-322/package/debian/changelog      2016-01-02 14:42:56.000000000 
+0100
@@ -1,3 +1,15 @@
+xterm-dev (322) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Sat, 02 Jan 2016 08:42:56 
-0500
+
+xterm-dev (321) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Sun, 27 Sep 2015 19:17:50 
-0400
+
 xterm-dev (320) unstable; urgency=low
 
   * maintenance updates
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/package/debian/copyright new/xterm-322/package/debian/copyright
--- old/xterm-320/package/debian/copyright      2015-01-02 13:53:35.000000000 
+0100
+++ new/xterm-322/package/debian/copyright      2016-01-02 15:16:21.000000000 
+0100
@@ -35,7 +35,7 @@
 Files: * */*
 License: MIT-X11
 
-Copyright 1996-2014,2015 by Thomas E. Dickey
+Copyright 1996-2015,2016 by Thomas E. Dickey
 
 (date ranges vary, depending on when the respective files were first changed
 significantly, and run through the most recent change date).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/package/freebsd/Makefile new/xterm-322/package/freebsd/Makefile
--- old/xterm-320/package/freebsd/Makefile      2015-08-26 23:52:20.000000000 
+0200
+++ new/xterm-322/package/freebsd/Makefile      2016-01-02 14:42:56.000000000 
+0100
@@ -5,7 +5,7 @@
 # and "make makesum".
 
 PORTNAME=      xterm
-PORTVERSION=   320
+PORTVERSION=   322
 CATEGORIES=    x11
 MASTER_SITES=  ftp://invisible-island.net/xterm/ \
                CRITICAL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/package/xterm.spec new/xterm-322/package/xterm.spec
--- old/xterm-320/package/xterm.spec    2015-08-26 23:52:20.000000000 +0200
+++ new/xterm-322/package/xterm.spec    2016-01-02 14:42:56.000000000 +0100
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.85 2015/08/26 21:52:20 tom Exp $
+# $XTermId: xterm.spec,v 1.87 2016/01/02 13:42:56 tom Exp $
 Summary: X terminal emulator (development version)
 %global my_middle xterm
 %global my_suffix -dev
 %global fullname %{my_middle}%{my_suffix}
 %global my_class XTermDev
 Name: %{fullname}
-Version: 320
+Version: 322
 Release: 1
 License: X11
 Group: User Interface/X
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/ptyx.h new/xterm-322/ptyx.h
--- old/xterm-320/ptyx.h        2015-02-16 01:25:27.000000000 +0100
+++ new/xterm-322/ptyx.h        2015-12-30 03:07:03.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.823 2015/02/16 00:25:27 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.825 2015/12/30 02:07:03 tom Exp $ */
 
 /*
  * Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -1067,6 +1067,7 @@
     ,srm_SELECT_TO_CLIPBOARD = 1041
     ,srm_BELL_IS_URGENT = 1042
     ,srm_POP_ON_BELL = 1043
+    ,srm_KEEP_CLIPBOARD = 1044
     ,srm_TITE_INHIBIT = 1048
 #if OPT_TCAP_FKEYS
     ,srm_TCAP_FKEYS = 1050
@@ -1661,6 +1662,7 @@
        DP_DECTCEM,
        DP_DELETE_IS_DEL,
        DP_EIGHT_BIT_META,
+       DP_KEEP_CLIPBOARD,
        DP_KEEP_SELECTION,
        DP_KEYBOARD_TYPE,
        DP_POP_ON_BELL,
@@ -2320,11 +2322,14 @@
        Boolean         trim_selection; /* controls trimming of selection */
        Boolean         i18nSelections;
        Boolean         brokenSelections;
+       Boolean         keepClipboard;  /* retain data sent to clipboard */
        Boolean         keepSelection;  /* do not lose selection on output */
        Boolean         replyToEmacs;   /* Send emacs escape code when done 
selecting or extending? */
        Char            *selection_data; /* the current selection */
        int             selection_size; /* size of allocated buffer */
        unsigned long   selection_length; /* number of significant bytes */
+       Char            *clipboard_data; /* the current clipboard */
+       unsigned long   clipboard_size; /*  size of allocated buffer */
        EventMode       eventMode;
        Time            selection_time; /* latest event timestamp */
        Time            lastButtonUpTime;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/version.h new/xterm-322/version.h
--- old/xterm-320/version.h     2015-08-28 10:40:40.000000000 +0200
+++ new/xterm-322/version.h     2016-01-02 15:15:49.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: version.h,v 1.418 2015/08/28 08:40:40 tom Exp $ */
+/* $XTermId: version.h,v 1.422 2016/01/02 14:15:49 tom Exp $ */
 
 /*
- * Copyright 1998-2014,2015 by Thomas E. Dickey
+ * Copyright 1998-2015,2016 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -38,8 +38,8 @@
  * version of X to which this version of xterm has been built.  The resulting
  * number in parentheses is my patch number (Thomas E. Dickey).
  */
-#define XTERM_PATCH   320
-#define XTERM_DATE    2015-08-28
+#define XTERM_PATCH   322
+#define XTERM_DATE    2016-01-02
 
 #ifndef __vendorversion__
 #define __vendorversion__ "XTerm"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/xterm.h new/xterm-322/xterm.h
--- old/xterm-320/xterm.h       2015-08-19 02:26:56.000000000 +0200
+++ new/xterm-322/xterm.h       2015-12-30 03:00:38.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.758 2015/08/19 00:26:56 tom Exp $ */
+/* $XTermId: xterm.h,v 1.759 2015/12/30 02:00:38 tom Exp $ */
 
 /*
  * Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -472,6 +472,7 @@
 #define XtNinternalBorder      "internalBorder"
 #define XtNitalicULMode                "italicULMode"
 #define XtNjumpScroll          "jumpScroll"
+#define XtNkeepClipboard       "keepClipboard"
 #define XtNkeepSelection       "keepSelection"
 #define XtNkeyboardDialect     "keyboardDialect"
 #define XtNlimitResize         "limitResize"
@@ -656,6 +657,7 @@
 #define XtCIconHint            "IconHint"
 #define XtCInitialFont         "InitialFont"
 #define XtCJumpScroll          "JumpScroll"
+#define XtCKeepClipboard       "KeepClipboard"
 #define XtCKeepSelection       "KeepSelection"
 #define XtCKeyboardDialect     "KeyboardDialect"
 #define XtCLimitResize         "LimitResize"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/xterm.log.html new/xterm-322/xterm.log.html
--- old/xterm-320/xterm.log.html        2015-08-28 10:40:19.000000000 +0200
+++ new/xterm-322/xterm.log.html        2016-01-02 15:26:50.000000000 +0100
@@ -2,7 +2,7 @@
  *****************************************************************************
  * this file is part of xterm                                                *
  *                                                                           *
- * Copyright 1997-2014,2015 by Thomas E. Dickey                              *
+ * Copyright 1997-2015,2016 by Thomas E. Dickey                              *
  *                                                                           *
  * All Rights Reserved                                                       *
  *                                                                           *
@@ -30,7 +30,7 @@
  * sale, use or other dealings in this Software without prior written        *
  * authorization.                                                            *
  *****************************************************************************
-  $XTermId: xterm.log.html,v 1.1624 2015/08/28 08:40:19 tom Exp $
+  $XTermId: xterm.log.html,v 1.1638 2016/01/02 14:26:50 tom Exp $
   -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 
@@ -72,6 +72,10 @@
   CHANGELOG</a>).</p>
 
   <ul>
+    <li><a href="#xterm_322">Patch #322 - 2016/01/02</a></li>
+
+    <li><a href="#xterm_321">Patch #321 - 2015/12/31</a></li>
+
     <li><a href="#xterm_320">Patch #320 - 2015/08/28</a></li>
 
     <li><a href="#xterm_319">Patch #319 - 2015/08/19</a></li>
@@ -925,6 +929,49 @@
     <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
   </ul>
 
+  <h1><a name="xterm_322" id="xterm_322">Patch #322 -
+  2016/01/02</a></h1>
+
+  <ul>
+    <li>fix regression due to incorrect fix for compiler warning
+    when allocating storage for <code>/etc/shells</code> (reports
+    by Ashish Shukla, Debian #809646).</li>
+  </ul>
+
+  <h1><a name="xterm_321" id="xterm_321">Patch #321 -
+  2015/12/31</a></h1>
+
+  <ul>
+    <li>add resource <code>keepClipboard</code>, escape sequence
+    and action <code>keep-clipboard</code>.</li>
+
+    <li>add optional feature to capture text copied to clipboard at
+    the time of copying rather than at the time the clipboard
+    contents are requested for pasting (patch by Milan
+    Mehner).</li>
+
+    <li>improve a special case where the <code>-e</code> option was
+    used to pass a single-quoted command via <code>luit</code>, by
+    wrapping it in a &ldquo;sh -c&rdquo; (report by Keith
+    Hedger).</li>
+
+    <li>minor fix for type-cleanliness when allocating storage for
+    <code>/etc/shells</code> (Tobias Stoeckmann).</li>
+
+    <li>fix a typo in manual page (Dan Church).</li>
+
+    <li>fix minor file-descriptor leak; after calling
+    <code>openpty</code>, the slave's file descriptor is not needed
+    (report by Juha Nurmela).</li>
+
+    <li>editorial change to ctlseqs.ms (report by David
+    Gomboc).</li>
+
+    <li>minor updates for autoconf macros.</li>
+
+    <li>update config.guess, config.sub</li>
+  </ul>
+
   <h1><a name="xterm_320" id="xterm_320">Patch #320 -
   2015/08/28</a></h1>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xterm-320/xterm.man new/xterm-322/xterm.man
--- old/xterm-320/xterm.man     2015-08-28 10:48:38.000000000 +0200
+++ new/xterm-322/xterm.man     2015-12-31 13:41:07.000000000 +0100
@@ -1,5 +1,5 @@
 '\" t
-.\" $XTermId: xterm.man,v 1.617 2015/08/28 08:48:38 tom Exp $
+.\" $XTermId: xterm.man,v 1.619 2015/12/31 12:41:07 tom Exp $
 .\"
 .\" Copyright 1996-2014,2015 by Thomas E. Dickey
 .\"
@@ -423,7 +423,7 @@
 .TP 8
 .BI \-bcn " milliseconds"
 set the amount of time text cursor is on when blinking via the
-\fIcursorOffTime\fP resource.
+\fIcursorOnTime\fP resource.
 .TP 8
 .B "\-bdc"
 Set the \fIvt100\fP resource \fBcolorBDMode\fR to \*(``false\*('',
@@ -3223,6 +3223,12 @@
 The default is \*(``true\*(''.
 See \fBfastScroll\fP for a variation.
 .TP 8
+.B "keepClipboard (\fPclass\fB KeepClipboard)"
+Specifies whether \fI\*n\fR will reuse the selection data which it
+copied to the keyboard rather than asking the clipboard for its
+current contents when told to provide the selection.
+The default is \*(``false\*(''.
+.TP 8
 .B "keepSelection (\fPclass\fB KeepSelection)"
 Specifies whether \fI\*n\fR will keep the selection even after the
 selected area was touched by some output to the terminal.
@@ -6178,6 +6184,9 @@
 which controls use of the font's minimum or maximum glyph width.
 It is also invoked by the \fBfont-packed\fP entry in \fIfontMenu\fP.
 .TP 8
+.B "set-keep-clipboard(\fIon/off/toggle\fP)"
+This action sets, unsets or toggles the \fBkeepClipboard\fP resource.
+.TP 8
 .B "set-keep-selection(\fIon/off/toggle\fP)"
 This action sets, unsets or toggles the \fBkeepSelection\fP resource.
 It is also invoked by the \fBkeepSelection\fP entry in \fIvtMenu\fP.

++++++ xterm-decomposed_bitmaps.patch ++++++
--- /var/tmp/diff_new_pack.pQgltA/_old  2016-02-09 16:48:57.000000000 +0100
+++ /var/tmp/diff_new_pack.pQgltA/_new  2016-02-09 16:48:57.000000000 +0100
@@ -21,7 +21,7 @@
 diff --git a/misc.c b/misc.c
 --- a/misc.c
 +++ b/misc.c
-@@ -2216,16 +2216,18 @@ ReportAnsiColorRequest(XtermWidget xw, i
+@@ -2227,16 +2227,18 @@ ReportAnsiColorRequest(XtermWidget xw, i
  }
  
  static void

++++++ xterm-enable_libtinfo.patch ++++++
--- /var/tmp/diff_new_pack.pQgltA/_old  2016-02-09 16:48:57.000000000 +0100
+++ /var/tmp/diff_new_pack.pQgltA/_new  2016-02-09 16:48:57.000000000 +0100
@@ -22,14 +22,14 @@
  fi
  for cf_termlib in '' $cf_TERMLIB ; do
        LIBS="$cf_save_LIBS"
-       test -n "$cf_termlib" && CF_ADD_LIB($cf_termlib)
+       test -n "$cf_termlib" && { CF_ADD_LIB($cf_termlib) }
        AC_TRY_RUN([
  /* terminfo implementations ignore the buffer argument, making it useless for
   * the xterm application, which uses this information to make a new TERMCAP
 diff --git a/configure b/configure
 --- a/configure
 +++ b/configure
-@@ -5559,20 +5559,20 @@ echo "$as_me:5558: checking for $cf_test
+@@ -5562,20 +5562,20 @@ echo "$as_me:5561: checking for $cf_test
  echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
  if test "${cf_cv_lib_tgetent+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -48,7 +48,7 @@
  fi
  for cf_termlib in '' $cf_TERMLIB ; do
        LIBS="$cf_save_LIBS"
-       test -n "$cf_termlib" &&
+       test -n "$cf_termlib" && {
  cf_add_libs="-l$cf_termlib"
  # Filter out duplicates - this happens with badly-designed ".pc" files...
  for cf_add_1lib in $LIBS

++++++ xterm-forbid_window_and_font_ops.patch ++++++
--- /var/tmp/diff_new_pack.pQgltA/_old  2016-02-09 16:48:57.000000000 +0100
+++ /var/tmp/diff_new_pack.pQgltA/_new  2016-02-09 16:48:57.000000000 +0100
@@ -28,7 +28,7 @@
 diff --git a/xterm.man b/xterm.man
 --- a/xterm.man
 +++ b/xterm.man
-@@ -1894,17 +1894,17 @@ The default is \*(``false\*(''.
+@@ -1896,17 +1896,17 @@ The default is \*(``false\*(''.
  .TP
  .B "allowColorOps (\fPclass\fB AllowColorOps)"
  Specifies whether control sequences that set/query the dynamic colors should 
be allowed.

++++++ xterm-settings.patch ++++++
--- /var/tmp/diff_new_pack.pQgltA/_old  2016-02-09 16:48:57.000000000 +0100
+++ /var/tmp/diff_new_pack.pQgltA/_new  2016-02-09 16:48:57.000000000 +0100
@@ -284,7 +284,7 @@
 diff --git a/xterm.man b/xterm.man
 --- a/xterm.man
 +++ b/xterm.man
-@@ -4267,19 +4267,23 @@ This option specifies the font to be use
+@@ -4275,19 +4275,23 @@ This option specifies the font to be use
  in the \*(``OverTheSpot\*('' input method.
  .IP
  In \*(``OverTheSpot\*('' preedit type, the preedit (preconversion)


Reply via email to