]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20210116
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 17 Jan 2021 01:35:02 +0000 (01:35 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 17 Jan 2021 01:35:02 +0000 (01:35 +0000)
+ add comment for linux2.6 regarding CONFIG_CONSOLE_TRANSLATIONS
  (report by Patrick McDermott) -TD
+ make opts extension for getcchar work as documented for ncurses 6.1,
  adding "-g" flag to test/demo_new_pair to illustrate.

13 files changed:
NEWS
VERSION
dist.mk
misc/terminfo.src
ncurses/widechar/lib_cchar.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec
test/demo_new_pair.c

diff --git a/NEWS b/NEWS
index 9a19b964fc7adc05ccfa48b2194c549d5926f563..c04424f4ffbf88a71206ea4f1f6f0bb48b2904ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3616 2021/01/09 11:03:34 tom Exp $
+-- $Id: NEWS,v 1.3619 2021/01/17 00:50:16 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,12 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20210116
+       + add comment for linux2.6 regarding CONFIG_CONSOLE_TRANSLATIONS
+         (report by Patrick McDermott) -TD
+       + make opts extension for getcchar work as documented for ncurses 6.1,
+         adding "-g" flag to test/demo_new_pair to illustrate.
+
 20210109
        + fix errata in man/ncurses.3x from recent updates.
        + improve quoting/escaping in configure script, uses some features of
diff --git a/VERSION b/VERSION
index f008600faef55adb1f5f33b34da20dd877403902..75a9a0756cf5e4ae858879882cdcc4526291fcc6 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20210109
+5:0:10 6.2     20210116
diff --git a/dist.mk b/dist.mk
index f1a41302679cf95d3ee1dc83dfb36af72fdb4877..a070f9667288c522ee2da831ea84957fc2a5fa8b 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1395 2021/01/09 09:49:29 tom Exp $
+# $Id: dist.mk,v 1.1396 2021/01/16 10:31:57 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 2
-NCURSES_PATCH = 20210109
+NCURSES_PATCH = 20210116
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 3b683c657f8332e3c64a64e135f52a79505b4993..3f235b1efcdeb3d3330eef3e1c304c6538a26efa 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.840 $
-#      $Date: 2020/12/28 00:40:10 $
+#      $Revision: 1.841 $
+#      $Date: 2021/01/17 00:39:21 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -1028,6 +1028,24 @@ linux2.2|linux 2.2.x console,
 #      'p' scan line 3
 #      'r' scan line 7
 #      '_' scan line 9
+#
+# The fix for SI/SO is part of a configurable (i.e., "optional") kernel feature
+# misleadingly called CONFIG_CONSOLE_TRANSLATIONS.  Disabling that not only
+# omits the line-drawing using SI/SO, but also part/all of the Unicode feature:
+#
+#    https://cateee.net/lkddb/web-lkddb/CONSOLE_TRANSLATIONS.html
+#      "This enables support for font mapping and Unicode translation on virtual consoles."
+#
+# This mailing list thread in July 2008 illustrates:
+#
+#    https://marc.info/?t=121734656700005&r=1&w=4
+#      "commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1"
+#
+# The change which made it configurable was to reduce the size for use in
+# embedded systems.  Some background is found in
+#
+#    https://lwn.net/Articles/284767/
+#      "An interview with the new embedded maintainers"
 linux2.6|linux 2.6.x console,
        acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy
             yzz{{||}}~~,
@@ -26778,4 +26796,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 2020-12-27
 #      + update terminology to 1.8.1 -TD
 #
+# 2021-01-16
+#      + add comment for linux2.6 regarding CONFIG_CONSOLE_TRANSLATIONS
+#        (report by Patrick McDermott) -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index 322fe85563151020bebe2cef1b25eebd0056c3bf..62a1113ecaa61e7bb8e375024605b1f2acd5f613 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 2001-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -37,7 +37,7 @@
 #include <curses.priv.h>
 #include <wchar.h>
 
-MODULE_ID("$Id: lib_cchar.c,v 1.34 2020/07/11 22:55:08 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.35 2021/01/17 00:04:08 tom Exp $")
 
 /* 
  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
@@ -56,7 +56,7 @@ setcchar(cchar_t *wcval,
     int color_pair = pair_arg;
     unsigned len;
 
-    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
+    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,attrs=%lu,pair=%d,%p)"),
                      (void *) wcval, _nc_viswbuf(wch),
                      (unsigned long) attrs, color_pair, opts));
 
@@ -114,7 +114,12 @@ getcchar(const cchar_t *wcval,
                      (void *) pair_arg,
                      opts));
 
-    if (opts == NULL && wcval != NULL) {
+#if !NCURSES_EXT_COLORS
+    if (opts != NULL) {
+       ;                       /* empty */
+    } else
+#endif
+    if (wcval != NULL) {
        wchar_t *wp;
        int len;
 
@@ -131,6 +136,8 @@ getcchar(const cchar_t *wcval,
        } else if (attrs == 0 || pair_arg == 0) {
            code = ERR;
        } else if (len >= 0) {
+           TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
+                             _tracecchar_t(wcval)));
            *attrs = AttrOf(*wcval) & A_ATTRIBUTES;
            color_pair = GetPair(*wcval);
            get_extended_pair(opts, color_pair);
index fcb7c07ecad3d09a1640ecd9243008d02ed0625c..2350bbde4df802f58e4da4dfcdab05faff8e026b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210109) unstable; urgency=low
+ncurses6 (6.2+20210116) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 04 Jan 2021 03:45:02 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jan 2021 05:31:57 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index fcb7c07ecad3d09a1640ecd9243008d02ed0625c..2350bbde4df802f58e4da4dfcdab05faff8e026b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210109) unstable; urgency=low
+ncurses6 (6.2+20210116) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 04 Jan 2021 03:45:02 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jan 2021 05:31:57 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index be6c77b6c444894626c5b61e254812fa85af5a6e..f413bc679a5b038c9a6a17e93cd180dd22bb0e8e 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210109) unstable; urgency=low
+ncurses6 (6.2+20210116) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 04 Jan 2021 03:45:02 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jan 2021 05:31:57 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index b55e9a9a01c7e072f2d32c8911580fcb39754282..542a0cef1364bc648166e2bbf2ab004aa4cfe866 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.438 2021/01/09 09:49:29 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.439 2021/01/16 10:31:57 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "2"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "0109"\r
+!define VERSION_MMDD  "0116"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 3be9cacdcee22b355350c73ce2ec7d42ae14d448..45d8b6bc33df1e652b3e895863a1af78eee46ab4 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210109
+Release: 20210116
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 23ef62449e4568bafed45f974222e31846787098..a2ee5190d5e1db6af454852b53e8613cedf9fa71 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210109
+Release: 20210116
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 537322a97a4458d938ff041fa27b0f2330c0b6d8..b7a5843353ff0e8888e0d5dcd45ecedca5ff83f5 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210109
+Release: 20210116
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index bd62a089741ff6d9f768068a5517335eb29d672b..909423e2f531ccd325922725c0ac3e84d532b6c5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_new_pair.c,v 1.21 2020/02/02 23:34:34 tom Exp $
+ * $Id: demo_new_pair.c,v 1.23 2021/01/17 00:11:09 tom Exp $
  *
  * Demonstrate the alloc_pair() function.
  */
@@ -136,6 +136,7 @@ usage(void)
        "Repeatedly print using all possible color combinations.",
        "",
        "Options:",
+       " -g       use getcchar to check setcchar",
        " -i       use init_pair rather than alloc_pair",
        " -p       start in paged-mode",
        " -s       start in single-step mode",
@@ -186,6 +187,7 @@ main(int argc, char *argv[])
     };
 
     bool done = FALSE;
+    bool check_set = FALSE;
     bool clobber = FALSE;
     bool hascolor = FALSE;
     bool use_init = FALSE;
@@ -202,8 +204,11 @@ main(int argc, char *argv[])
 
     setlocale(LC_ALL, "");
 
-    while ((ch = getopt(argc, argv, "ipsw")) != -1) {
+    while ((ch = getopt(argc, argv, "gipsw")) != -1) {
        switch (ch) {
+       case 'g':
+           check_set = TRUE;
+           break;
        case 'i':
            use_init = TRUE;
            break;
@@ -317,7 +322,7 @@ main(int argc, char *argv[])
                           : make_color(current));
            }
        } else {
-           my_attrs = next_attr(current);
+           my_attrs = next_attr(current); 
            my_pair = 0;
        }
        if (my_pair < 0)
@@ -327,6 +332,39 @@ main(int argc, char *argv[])
        setcchar(&temp, wch, my_attrs,
                 (short) my_pair,
                 (use_init ? NULL : (void *) &my_pair));
+
+       if (check_set) {
+           int problem = 0;
+           wchar_t chk_wch[2];
+           attr_t chk_attrs = 0;
+           short chk_pair = 0;
+           int chk_pair2 = 0;
+
+#define AllButColor(a) ((a) & (A_ATTRIBUTES & ~A_COLOR))
+
+           if (getcchar(&temp, NULL, &chk_attrs, &chk_pair,
+                        (use_init ? NULL : (void *) &chk_pair2)) != 2) {
+               problem = 1;
+           } else if (getcchar(&temp, chk_wch, &chk_attrs, &chk_pair,
+                        (use_init ? NULL : (void *) &chk_pair2)) != OK) {
+               problem = 2;
+           } else if (chk_wch[0] != wch[0]) {
+               problem = 3;
+           } else if (AllButColor(my_attrs) != AllButColor(chk_attrs)) {
+               problem = 4;
+           } else if (my_pair != chk_pair) {
+               problem = 4;
+           } else if (!use_init && (my_pair != chk_pair2)) {
+               problem = 5;
+           }
+           if (problem) {
+               wch[0] = problem + '0';
+               setcchar(&temp, wch, my_attrs,
+                        (short) my_pair,
+                        (use_init ? NULL : (void *) &my_pair));
+           }
+       }
+
        /*
         * At the end of a page, move the cursor to the home position.
         */