ncurses 6.3 - patch 20220806

+ amend end_of_stream() to allow for input files without a final
  newline.
+ check for non-textfiles to tic.
This commit is contained in:
Thomas E. Dickey 2022-08-07 09:47:59 +00:00
parent 3183ac61c6
commit 768f77851c
11 changed files with 51 additions and 18 deletions

7
NEWS
View File

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

View File

@ -1 +1 @@
5:0:10 6.3 20220729
5:0:10 6.3 20220806

View File

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

View 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);
}

View 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

View 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

View 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

View File

@ -1,4 +1,4 @@
; $Id: mingw-ncurses.nsi,v 1.535 2022/07/26 14:04:04 tom Exp $
; $Id: mingw-ncurses.nsi,v 1.536 2022/08/06 10:14:36 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@ -10,7 +10,7 @@
!define VERSION_MAJOR "6"
!define VERSION_MINOR "3"
!define VERSION_YYYY "2022"
!define VERSION_MMDD "0729"
!define VERSION_MMDD "0806"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"

View 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

View 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

View 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