]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20220806
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Aug 2022 09:47:59 +0000 (09:47 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Aug 2022 09:47:59 +0000 (09:47 +0000)
+ amend end_of_stream() to allow for input files without a final
  newline.
+ check for non-textfiles to tic.

NEWS
VERSION
dist.mk
ncurses/tinfo/comp_scan.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

diff --git a/NEWS b/NEWS
index 5c10a3939b484f10b16031e7d7d0e580be6f1655..9b1a9040415ceb783522cdffeebfb56875209752 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.3839 2022/07/28 20:18:34 tom Exp $
+-- $Id: NEWS,v 1.3841 2022/08/06 19:13:14 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,11 @@ 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.
 
+20220806
+       + amend end_of_stream() to allow for input files without a final
+         newline.
+       + check for non-textfiles to tic.
+
 20220729
        + fixes to build with dietlibc:
          + add configure check for fpathconf (report by Georg Lehner).
diff --git a/VERSION b/VERSION
index af24f36fc4543bf92d318afec1d668cfabf33892..f473b9bf6a185122727a776cec56e5f62de0125a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20220729
+5:0:10 6.3     20220806
diff --git a/dist.mk b/dist.mk
index ee53cc5421496726b562dba303e066d5504c199f..f3390b9a90fbddaf0399047576514d3234c528b0 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.1495 2022/07/29 19:45:25 tom Exp $
+# $Id: dist.mk,v 1.1496 2022/08/06 10:14:36 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 = 20220729
+NCURSES_PATCH = 20220806
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 1d9a99852544e1ea8c55c4280d23271d186bc9b8..71361c5080d6f9c92a220661a4bc2cb09183db79 100644 (file)
@@ -51,7 +51,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: comp_scan.c,v 1.116 2022/05/08 00:11:44 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.119 2022/08/07 00:20:26 tom Exp $")
 
 /*
  * Maximum length of string capability we'll accept before raising an error.
@@ -149,6 +149,32 @@ last_char(int from_end)
     return result;
 }
 
+/*
+ * Read, like fgets(), but error-out if the input contains nulls.
+ */
+static int
+get_text(char *buffer, int length)
+{
+    int count = 0;
+    int limit = length - 1;
+
+    while (limit-- > 0) {
+       int ch = fgetc(yyin);
+
+       if (ch == '\0') {
+           _nc_err_abort("This is not a text-file");
+       } else if (ch == EOF) {
+           break;
+       }
+       ++count;
+       *buffer++ = (char) ch;
+       if (ch == '\n')
+           break;
+    }
+    *buffer = '\0';
+    return count;
+}
+
 /*
  *     int next_char()
  *
@@ -214,7 +240,7 @@ next_char(void)
                if (used == 0)
                    _nc_curr_file_pos = ftell(yyin);
 
-               if (fgets(result + used, (int) (allocated - used), yyin) != 0) {
+               if (get_text(result + used, (int) (allocated - used))) {
                    bufstart = result;
                    if (used == 0) {
                        if (_nc_curr_line == 0
@@ -292,7 +318,9 @@ static bool
 end_of_stream(void)
 /* are we at end of input? */
 {
-    return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0'))
+    return ((yyin
+            ? (feof(yyin) && (bufptr == NULL || *bufptr == '\0'))
+            : (bufptr && *bufptr == '\0'))
            ? TRUE : FALSE);
 }
 
index 4cd745f878fd1182d888071bda9de95b84b1f525..1e32b6caaa2b9ca6aebd09905dd7fd5635d5daed 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220729) unstable; urgency=low
+ncurses6 (6.3+20220806) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 26 Jul 2022 10:04:04 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Aug 2022 06:14:36 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 4cd745f878fd1182d888071bda9de95b84b1f525..1e32b6caaa2b9ca6aebd09905dd7fd5635d5daed 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220729) unstable; urgency=low
+ncurses6 (6.3+20220806) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 26 Jul 2022 10:04:04 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Aug 2022 06:14:36 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 2851ee062b8c581676654e121c6073f4c7adde40..c0d2c646a056beef3c4a7b0987b71c98aa95e512 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220729) unstable; urgency=low
+ncurses6 (6.3+20220806) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 26 Jul 2022 10:04:04 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Aug 2022 06:14:36 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index d0d244cb05aac8c8b400b68c011cf0b2c2176a8f..f3bfa13994026c2bf2d636985c25b9cf3ec19f9f 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.535 2022/07/26 14:04:04 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.536 2022/08/06 10:14:36 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  "2022"\r
-!define VERSION_MMDD  "0729"\r
+!define VERSION_MMDD  "0806"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 9a4303bdd35909b56ed415c2d624bf5bbbcea2f8..ae2e3ca9f4c3b4ee5dcc0a97422f2d0ead835e40 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20220729
+Release: 20220806
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index ed4a8af20651efe377f811eef0b5dfc1bc0f6142..812e7abec0d11c888e1cc59b6dc3376ef148a9df 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20220729
+Release: 20220806
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 8e9932118b5ec453072d918853f3ef6233382489..c2f80db5630b54a2c27ca4e301ba7cb55fe899e8 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20220729
+Release: 20220806
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz