]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20240414
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 14 Apr 2024 22:22:15 +0000 (22:22 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 14 Apr 2024 22:22:15 +0000 (22:22 +0000)
+ build/bug-fix for check-size feature (reports by Sam James, Gabriele
  Balducci).

NEWS
VERSION
dist.mk
ncurses/tinfo/lib_setup.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 974a2e0eb161f5fa3ee1f3ab03ea36b99a92fa94..588c4cfea7be61b455ffc074a91007217825f0ff 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.4107 2024/04/14 00:19:51 tom Exp $
+-- $Id: NEWS,v 1.4109 2024/04/14 09:43:45 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,10 @@ 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.
 
+20240414
+       + build/bug-fix for check-size feature (reports by Sam James, Gabriele
+         Balducci).
+
 20240413
        + improve formatting/style of manpages (patches by Branden Robinson).
        + provide for padding in check-size feature, using new_prescr() to
diff --git a/VERSION b/VERSION
index e327a6fecaa3ded5046f0bd061a91098dba19538..6600dc86fba36ba71822eef993bcd54caa5ec597 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20240413
+5:0:10 6.4     20240414
diff --git a/dist.mk b/dist.mk
index e5cd16916ba1def6b9d8579ed452077faf50d597..3af9726d4ea815f37b919655453bf2445277a7d2 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.1606 2024/04/13 11:28:20 tom Exp $
+# $Id: dist.mk,v 1.1607 2024/04/14 08:48:20 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 = 4
-NCURSES_PATCH = 20240413
+NCURSES_PATCH = 20240414
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 7231ac671532f6981d664142d4be7e920c8d7bba..f1e6c1a2be100c69a4b1619f6db2e44126b7d5cb 100644 (file)
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.235 2024/04/13 20:35:14 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.239 2024/04/14 17:03:40 tom Exp $")
 
 /****************************************************************************
  *
@@ -364,12 +364,25 @@ get_position(TERMINAL *termp, int fd, int *row, int *col)
 static bool
 set_position(NCURSES_SP_DCLx TERMINAL *termp, int row, int col)
 {
-    bool result = FALSE;
+    bool result;
     char *actual = TIPARM_2(cursor_address, row, col);
     T((T_CALLED("set_position %d,%d)"), row, col));
-    if (NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "set_position", actual) == OK)
-       result = TRUE;
+#if NCURSES_SP_FUNCS
+    result = (NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "set_position",
+                                        actual) == OK);
     NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
+#else
+    /* This does not support padding because without sp-funcs, we have only
+     * the interface using stdio, but we are not guaranteed that Filedes
+     * is the same as fileno(stdout).
+     */
+    result = FALSE;
+    if (actual != NULL) {
+       size_t want = strlen(actual);
+       int have = (int) write(termp->Filedes, actual, want);
+       result = ((int) want == have);
+    }
+#endif
     returnBool(result);
 }
 
@@ -390,11 +403,11 @@ set_position(NCURSES_SP_DCLx TERMINAL *termp, int row, int col)
  * So we do a simple check to exclude pseudo-terminals.
  */
 static void
-_nc_check_screensize(NCURSES_SP_DCLx TERMINAL *termp, int *linep, int *colp)
+_nc_check_screensize(SCREEN *sp, TERMINAL *termp, int *linep, int *colp)
 {
     int fd = termp->Filedes;
     TTY saved;
-    const char *name;
+    const char *name = NULL;
 
     if (IsRealTty(fd, name)
        && VALID_STRING(cursor_address)
@@ -412,9 +425,11 @@ _nc_check_screensize(NCURSES_SP_DCLx TERMINAL *termp, int *linep, int *colp)
            sp->_term = termp;
            NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);
        }
+#else
+       (void) sp;
 #endif
 
-       T(("checking screensize of %s", name));
+       T(("trying CPR (u7/u6) with %s", name));
        alter.c_lflag &= (unsigned) ~(ECHO | ICANON | ISIG | IEXTEN);
        alter.c_iflag &= (unsigned) ~(IXON | BRKINT | PARMRK);
        alter.c_cc[VMIN] = 0;
@@ -430,6 +445,9 @@ _nc_check_screensize(NCURSES_SP_DCLx TERMINAL *termp, int *linep, int *colp)
        }
        /* restore tty modes */
        SET_TTY(fd, &saved);
+    } else {
+       T(("NOT trying CPR with fd %d (%s): %s",
+          fd, NonNull(name), NC_ISATTY(fd) ? "tty" : "not a tty"));
     }
 
     _nc_default_screensize(termp, linep, colp);
@@ -510,7 +528,7 @@ _nc_get_screensize(SCREEN *sp,
 #endif
 #if HAVE_SIZECHANGE
        /* try asking the OS */
-       if (!NC_ISATTY(cur_term->Filedes)) {
+       if (NC_ISATTY(cur_term->Filedes)) {
            STRUCT_WINSIZE size;
 
            errno = 0;
@@ -561,7 +579,7 @@ _nc_get_screensize(SCREEN *sp,
 
            _nc_default_screensize(termp, linep, colp);
        } else {
-           _nc_check_screensize(NCURSES_SP_ARGx termp, linep, colp);
+           _nc_check_screensize(sp, termp, linep, colp);
        }
 
        /*
@@ -577,7 +595,7 @@ _nc_get_screensize(SCREEN *sp,
        OldNumber(termp, columns) = (short) (*colp);
 #endif
     } else {
-       _nc_check_screensize(NCURSES_SP_ARGx termp, linep, colp);
+       _nc_check_screensize(sp, termp, linep, colp);
     }
 
     T(("screen size is %dx%d", *linep, *colp));
index c1456f7faf0c512bceba8156859797a2106485b7..088ed45c34a31fd2966264a765c5f6e80237f806 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240413) unstable; urgency=low
+ncurses6 (6.4+20240414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Apr 2024 07:28:20 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 14 Apr 2024 04:48:20 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index c1456f7faf0c512bceba8156859797a2106485b7..088ed45c34a31fd2966264a765c5f6e80237f806 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240413) unstable; urgency=low
+ncurses6 (6.4+20240414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Apr 2024 07:28:20 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 14 Apr 2024 04:48:20 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 57b91b13df7879c46f9f086f9b66b17f18ad6794..3c4053019349a76434d2a2ec5a8698b0a8909e20 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240413) unstable; urgency=low
+ncurses6 (6.4+20240414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Apr 2024 07:28:20 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 14 Apr 2024 04:48:20 -0400
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 56452b69751cc9b5b42637350690c61806366148..eb57e1dc48c6ab3c0c096ddb126cadd30f8fe871 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.641 2024/04/13 11:28:20 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.642 2024/04/14 08:48:20 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 "4"\r
 !define VERSION_YYYY  "2024"\r
-!define VERSION_MMDD  "0413"\r
+!define VERSION_MMDD  "0414"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 72a9ed8c1525cea56d26247a5a5eea0301b2170d..31ce59961fd836eb10634033e63b35a766cf0582 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20240413
+Release: 20240414
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 732c3452e4ef83365fe5f0a6953ea38157707f8b..c02876c9c5892cd72f5333a84136a0b1bf0dd6c6 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20240413
+Release: 20240414
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index c1f96cb2b60e9c43b3735780cad6c40bec6ef70e..9903f058f753145174da3fcd435608965152f3fe 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20240413
+Release: 20240414
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz