]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20211211
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Dec 2021 01:11:22 +0000 (01:11 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Dec 2021 01:11:22 +0000 (01:11 +0000)
+ add test/combine.c, to demo/test combining characters.

17 files changed:
Ada95/gen/gen.c
MANIFEST
NEWS
VERSION
dist.mk
ncurses/base/lib_delwin.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
progs/tic.c
test/combine.c [new file with mode: 0644]
test/modules
test/programs

index 51bc161a4685c0f6ab2843ab00e0fff31f11755c..d92fa68e5e1b8d749641fa213848fc8e4d337d11 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2014,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -35,7 +35,7 @@
 
 /*
     Version Control
-    $Id: gen.c,v 1.77 2020/08/16 18:05:05 tom Exp $
+    $Id: gen.c,v 1.78 2021/12/11 21:03:21 tom Exp $
   --------------------------------------------------------------------------*/
 /*
   This program prints on its standard output the source for the
@@ -95,7 +95,7 @@ print_size_of(FILE * fp,
              const char *name,
              size_t value)
 {
-  fprintf(fp, "   %-28s : constant := %lu;\n", name, value);
+  fprintf(fp, "   %-28s : constant := %lu;\n", name, (unsigned long)value);
 }
 
 #define PRINT_NAMED_CONSTANT(name) \
@@ -490,6 +490,7 @@ main(int argc, const char *argv[])
   print_comment(fp, "Field_Options from opts(3FORM)");
   PRINT_NAMED_BITMASK(Field_Options, O_NL_OVERLOAD);
   PRINT_NAMED_BITMASK(Field_Options, O_BS_OVERLOAD);
+
   /*  Field_Options_Size is defined below */
 
   print_comment(fp, "MEVENT structure from mouse(3NCURSES)");
index 749138c819df21314018fc8556d593737a4ede5e..9d8227f0251555ef03de388a523e426fdb977a37 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./test/color_content.c
 ./test/color_name.h
 ./test/color_set.c
+./test/combine.c
 ./test/configure
 ./test/configure.in
 ./test/demo_altkeys.c
diff --git a/NEWS b/NEWS
index 14b80105f22de2ceec3a97d5cebde9825c3184e4..38757c7375ec6dc194993919309ce3b5ee724f83 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.3753 2021/12/04 23:03:57 tom Exp $
+-- $Id: NEWS,v 1.3755 2021/12/11 21:46:44 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,9 @@ 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.
 
+20211211
+       + add test/combine.c, to demo/test combining characters.
+
 20211204
        + improve configure check for getttynam (report by Werner Fink).
 
diff --git a/VERSION b/VERSION
index ff17e157572a692ae97d72637627644103463c94..47b17ecb2049cfb9f33ad3ba3af3c89e2b85b4c8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20211204
+5:0:10 6.3     20211211
diff --git a/dist.mk b/dist.mk
index 60566f57ab7822a1aee79f8815a6686eaf2ce530..4049465d43382739f3ea94ee634179508a3f1eb6 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.1453 2021/12/04 12:21:05 tom Exp $
+# $Id: dist.mk,v 1.1454 2021/12/11 13:00:34 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 = 3
-NCURSES_PATCH = 20211204
+NCURSES_PATCH = 20211211
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index ce793e537f652e39d6b70dd134f126c8652326c5..1136305afb3e9940ad369efbec04fde86fe41816 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delwin.c,v 1.23 2021/11/15 23:05:32 tom Exp $")
+MODULE_ID("$Id: lib_delwin.c,v 1.24 2021/12/11 23:56:25 tom Exp $")
 
 static bool
 cannot_delete(WINDOW *win)
 {
-    WINDOWLIST *p;
     bool result = TRUE;
+
     if (IS_PAD(win)) {
        result = FALSE;
     } else {
+       WINDOWLIST *p;
 #ifdef USE_SP_WINDOWLIST
        SCREEN *sp = _nc_screen_of(win);
 #endif
index be050edbcbb013c76510caae07ad4966d8e528aa..15113b4fccdf51e69f1e4ecef14242bb8d92f9a4 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211204) unstable; urgency=low
+ncurses6 (6.3+20211211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Dec 2021 07:21:05 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index be050edbcbb013c76510caae07ad4966d8e528aa..15113b4fccdf51e69f1e4ecef14242bb8d92f9a4 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211204) unstable; urgency=low
+ncurses6 (6.3+20211211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Dec 2021 07:21:05 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 419ee651ad8bf3e63213c58b706621f2b0dce917..711f901d2209c3d06f8051284fd8a491d8509b2e 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211204) unstable; urgency=low
+ncurses6 (6.3+20211211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Dec 2021 07:21:05 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 377116891a9f19467e76d97d838985a2eacf325a..b341d678a15e8360539a68e0f5ea445241ab6f8e 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.495 2021/12/04 12:21:05 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.496 2021/12/11 13:00:34 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 "3"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "1204"\r
+!define VERSION_MMDD  "1211"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 2c7f93be3515252122e5c6c68bd73f6396625237..53a35c9415717530c991df97f16a644131f8aa38 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20211204
+Release: 20211211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index aef736192b25a7b8b0ebe65f00e17490f7708ac4..a77934d151f719cd61a93ac335cf27ad8fbea695 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20211204
+Release: 20211211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 0462181ce6482f262bd03f73b1e294b0de717a7d..9bae667d64f1ec4e98933838e334dacec78aaeae 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20211204
+Release: 20211211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index dba2890b34c8fe953917a2fd226ca3a7d3621037..bd83ac23f971953482719a670fa32551a11e516f 100644 (file)
@@ -49,7 +49,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.307 2021/10/05 08:07:05 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.308 2021/12/12 00:00:33 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -682,7 +682,6 @@ int
 main(int argc, char *argv[])
 {
     char my_tmpname[PATH_MAX];
-    char my_altfile[PATH_MAX];
     int v_opt = -1;
     int smart_defaults = TRUE;
     char *termcap;
@@ -933,6 +932,7 @@ main(int argc, char *argv[])
     }
 
     if (tmp_fp == NULL) {
+       char my_altfile[PATH_MAX];
        tmp_fp = open_input(source_file, my_altfile);
        if (!strcmp(source_file, "-")) {
            source_file = STDIN_NAME;
@@ -2717,12 +2717,11 @@ show_fkey_name(NAME_VALUE * data)
 static void
 check_conflict(TERMTYPE2 *tp)
 {
-    bool conflict = FALSE;
-
     if (!(_nc_syntax == SYN_TERMCAP && capdump)) {
        char *check = calloc((size_t) (NUM_STRINGS(tp) + 1), sizeof(char));
        NAME_VALUE *given = get_fkey_list(tp);
        unsigned j, k;
+       bool conflict = FALSE;
 
        if (check == NULL)
            failed("check_conflict");
diff --git a/test/combine.c b/test/combine.c
new file mode 100644 (file)
index 0000000..0a30dd6
--- /dev/null
@@ -0,0 +1,204 @@
+/****************************************************************************
+ * Copyright 2021 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      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
+/*
+ * $Id: combine.c,v 1.7 2021/12/12 01:10:28 tom Exp $
+ */
+
+#include <test.priv.h>
+
+#if USE_WIDEC_SUPPORT
+
+static int c_opt;
+static int r_opt;
+
+static int
+next_char(int value)
+{
+    do {
+       ++value;
+    } while (!iswprint((wint_t) value));
+    return value;
+}
+
+static void
+do_row(int row, int base_ch, int over_ch)
+{
+    int col = 0;
+    bool done = FALSE;
+    bool reverse = (r_opt && !(row % 2));
+
+    move(row, col);
+    printw("[U+%04X]", over_ch);
+    do {
+       if (c_opt) {
+           wchar_t source[2];
+           cchar_t target;
+           attr_t attr = reverse ? A_REVERSE : A_NORMAL;
+
+           source[1] = 0;
+
+           source[0] = base_ch;
+           setcchar(&target, source, attr, 0, NULL);
+           add_wch(&target);
+
+           source[0] = over_ch;
+           setcchar(&target, source, attr, 0, NULL);
+           add_wch(&target);
+       } else {
+           wchar_t data[3];
+
+           data[0] = base_ch;
+           data[1] = over_ch;
+           data[2] = 0;
+           if (reverse)
+               attr_on(A_REVERSE, NULL);
+           addwstr(data);
+           if (reverse)
+               attr_off(A_REVERSE, NULL);
+       }
+       col = getcurx(stdscr);
+       base_ch = next_char(base_ch);
+       done = (col + 1 >= COLS);
+    } while (!done);
+}
+
+#define LAST_OVER 0x6f
+
+static int
+next_over(int value)
+{
+    if (++value > LAST_OVER)
+       value = 0;
+    return value;
+}
+
+static int
+prev_over(int value)
+{
+    if (--value < 0)
+       value = LAST_OVER;
+    return value;
+}
+
+static void
+do_all(int over_it)
+{
+    int row;
+
+    for (row = 0; row < LINES; ++row) {
+       do_row(row, ' ', 0x300 + over_it);
+       over_it = next_over(over_it);
+    }
+}
+
+static void
+usage(void)
+{
+    static const char *msg[] =
+    {
+       "Usage: combine [options]",
+       "",
+       "Demonstrate combining-characters.",
+       "",
+       "Options:",
+       " -c       use cchar_t data rather than wchar_t string",
+       " -r       draw even-numbered rows in reverse-video",
+    };
+    unsigned n;
+    for (n = 0; n < SIZEOF(msg); ++n) {
+       fprintf(stderr, "%s\n", msg[n]);
+    }
+    ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+    int n;
+    int over_it = 0;
+    bool done = FALSE;
+
+    while ((n = getopt(argc, argv, "cr")) != -1) {
+       switch (n) {
+       case 'c':
+           c_opt = TRUE;
+           break;
+       case 'r':
+           r_opt = TRUE;
+           break;
+       default:
+           usage();
+           break;
+       }
+    }
+
+    setlocale(LC_ALL, "");
+    initscr();
+    cbreak();
+    noecho();
+    keypad(stdscr, TRUE);
+
+    do {
+       do_all(over_it);
+       switch (getch()) {
+       case 'q':
+       case QUIT:
+       case ESCAPE:
+           done = TRUE;
+           break;
+       case KEY_HOME:
+       case '0':
+           over_it = 0;
+           break;
+       case KEY_END:
+       case '$':
+           over_it = LAST_OVER;
+           break;
+       case KEY_UP:
+       case '-':
+           over_it = prev_over(over_it);
+           break;
+       case KEY_DOWN:
+       case '+':
+           over_it = next_over(over_it);
+           break;
+       }
+    } while (!done);
+
+    endwin();
+
+    ExitProgram(EXIT_SUCCESS);
+}
+#else
+int
+main(void)
+{
+    printf("This program requires wide-curses functions\n");
+    ExitProgram(EXIT_FAILURE);
+}
+#endif
index de3d140abc6e1d039db5c62626e9062fddf2f2b8..6ba90a37eb93900a575e083a7ebeb3d8f6270dd4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: modules,v 1.74 2021/02/13 16:33:43 tom Exp $
+# $Id: modules,v 1.75 2021/12/11 17:41:34 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2016,2017 Free Software Foundation, Inc.                    #
@@ -42,6 +42,7 @@ chgat         progs           $(srcdir)       $(HEADER_DEPS)  $(srcdir)/popup_msg.h
 clip_printw    progs           $(srcdir)       $(HEADER_DEPS)  $(srcdir)/popup_msg.h
 color_content  progs           $(srcdir)       $(HEADER_DEPS)
 color_set      progs           $(srcdir)       $(HEADER_DEPS)
+combine                progs           $(srcdir)       $(HEADER_DEPS)
 demo_altkeys   progs           $(srcdir)       $(HEADER_DEPS)
 demo_defkey    progs           $(srcdir)       $(HEADER_DEPS)
 demo_forms     progs           $(srcdir)       $(HEADER_DEPS)  $(srcdir)/edit_field.h
index 6946faab547f52979af7247e5d6aab5ee8edfec7..77a8241380074ea0d842acab2165e58962abd50b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: programs,v 1.49 2021/03/13 20:37:44 tom Exp $
+# $Id: programs,v 1.50 2021/12/11 17:46:18 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2016,2017 Free Software Foundation, Inc.                    #
@@ -40,6 +40,7 @@ chgat         $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   chgat popup_msg
 clip_printw    $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   clip_printw popup_msg
 color_content  $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   color_content
 color_set      $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   color_set
+combine                $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   combine popup_msg
 demo_altkeys   $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   demo_altkeys
 demo_defkey    $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   demo_defkey
 demo_forms     $(LDFLAGS_DEFAULT)      $(LOCAL_LIBS)   demo_forms edit_field popup_msg