]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20231104
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 5 Nov 2023 00:24:54 +0000 (00:24 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 5 Nov 2023 00:24:54 +0000 (00:24 +0000)
+ modify reset command to avoid altering clocal if the terminal uses a
  modem (prompted by discussion with Werner Fink, Michal Suchanek,
  OpenSUSE #1201384, Debian #60377).
+ build-fixes for --with-caps variations.
+ correct a couple of section-references in INSTALL.

17 files changed:
INSTALL
NEWS
VERSION
dist.mk
include/curses.events
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_tparm.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/reset_cmd.c
progs/tabs.c
progs/tic.c

diff --git a/INSTALL b/INSTALL
index 9dabaa89ee4d279f3bc6912c62539cb9efa831fd..281107825bdf2a414acfd6f3585d7bae02a97c75 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: INSTALL,v 1.251 2023/10/28 16:54:24 tom Exp $
+-- $Id: INSTALL,v 1.253 2023/11/03 20:55:47 tom Exp $
 ---------------------------------------------------------------------
              How to install Ncurses/Terminfo on your system
 ---------------------------------------------------------------------
@@ -47,7 +47,7 @@ If you are converting from BSD curses and do not have root access, be sure
 to read the BSD CONVERSION NOTES section below.
 
 If you are trying to build applications using gpm with ncurses,
-read the USING NCURSES WITH GPM section below.
+read the USING GPM section below.
 
 If you are cross-compiling, see the note below on
 BUILDING WITH A CROSS-COMPILER.
@@ -80,7 +80,7 @@ INSTALLATION PROCEDURE:
     The --prefix option to configure changes the root directory for installing
     ncurses.  The default is normally in subdirectories of /usr/local, except
     for systems where ncurses is normally installed as a system library (see
-    "IF YOU ARE A SYSTEM INTEGRATOR").  Use --prefix=/usr to replace your
+    "FOR SYSTEM INTEGRATORS").  Use --prefix=/usr to replace your
     default curses distribution.
 
     The package gets installed beneath the --prefix directory as follows:
@@ -177,7 +177,7 @@ INSTALLATION PROCEDURE:
     You can make curses and terminfo fall back to an existing file of termcap
     definitions by configuring with --enable-termcap.  If you do this, the
     library will search /etc/termcap before the terminfo database, and will
-    also interpret the contents of the TERM environment variable.  See the
+    also interpret the contents of the $TERM environment variable.  See the
     section BSD CONVERSION NOTES below.
 
 3.  Type 'make'.  Ignore any warnings; no error messages should be produced.
@@ -1275,7 +1275,7 @@ CONFIGURE OPTIONS:
        Specify a search-list of terminfo directories which will be compiled
        into the ncurses library (default: DATADIR/terminfo)
 
-       This is a colon-separated list, like the TERMINFO_DIRS environment
+       This is a colon-separated list, like the $TERMINFO_DIRS environment
        variable.
 
     --with-termlib[=XXX]
diff --git a/NEWS b/NEWS
index 4c04caf1683083a203020348ad7f026a0e3ff6ad..f953ea86092c04d36f7cd7cd97abcc8772822947 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.4022 2023/10/28 18:20:39 tom Exp $
+-- $Id: NEWS,v 1.4025 2023/11/04 21:45:02 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,13 @@ 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.
 
+20231104
+       + modify reset command to avoid altering clocal if the terminal uses a
+         modem (prompted by discussion with Werner Fink, Michal Suchanek,
+         OpenSUSE #1201384, Debian #60377).
+       + build-fixes for --with-caps variations.
+       + correct a couple of section-references in INSTALL.
+
 20231028
        + move xterm focus mode 1004 from xterm+sm+1006 into xterm+focus as
          fe/fd capabilities, like vim (vim-pr #13440).
diff --git a/VERSION b/VERSION
index c2f4c9b4f234468a8cb294226ca551f29d69677c..786852eae33261d7766452c79e956c451436cf8b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20231028
+5:0:10 6.4     20231104
diff --git a/dist.mk b/dist.mk
index b80fe3c1ce72712211d6f4a258707c558919f2b3..5a7c559c76b939bf393cc74cdd5ace0ae95a4b40 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.1574 2023/10/28 09:18:03 tom Exp $
+# $Id: dist.mk,v 1.1575 2023/11/04 10:01:01 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 = 20231028
+NCURSES_PATCH = 20231104
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 25a2583fc9b5b28e221d4332eb5000b83d1ccf4b..468bde18ee702aa5b596dbed41d12a3d3e68684a 100644 (file)
@@ -50,6 +50,6 @@ typedef struct
 extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
 extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
 
-#define KEY_EVENT      0633            /* We were interrupted by an event */
+#define KEY_EVENT      0634            /* We were interrupted by an event */
 
 #endif /* NCURSES_WGETCH_EVENTS */
index 71db2a8d431043a6479a5e381420233b4ff9b87e..f2d2bb36344ca9f9d0bc18bb9c58fb01f9321887 100644 (file)
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.229 2023/10/16 23:05:28 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.230 2023/11/04 21:02:27 tom Exp $")
 
 /****************************************************************************
  *
@@ -293,7 +293,7 @@ _nc_default_screensize(TERMINAL *termp, int *linep, int *colp)
     }
 }
 
-#ifdef USE_CHECK_SIZE
+#if defined(USE_CHECK_SIZE) && defined(user6) && defined(user7)
 static const char *
 skip_csi(const char *value)
 {
@@ -408,7 +408,7 @@ _nc_check_screensize(TERMINAL *termp, int *linep, int *colp)
     _nc_default_screensize(termp, linep, colp);
 }
 #else /* !USE_CHECK_SIZE */
-#define _nc_check_screensize(termp, linep, colp) /* nothing */
+#define _nc_check_screensize(termp, linep, colp)       /* nothing */
 #endif
 #endif /* !(defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER)) */
 
index 1353eb3f2c9a60b9209eb369c3e4fcaecce67907..5666b27b7e098abace692da8f75276eb2b404543 100644 (file)
@@ -53,7 +53,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.152 2023/09/16 16:30:27 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.153 2023/11/04 19:28:41 tom Exp $")
 
 /*
  *     char *
@@ -1120,8 +1120,10 @@ check_string_caps(TPARM_DATA *data, const char *string)
            want_type = 2;      /* function key #1, transmit string #2 */
        else if (CHECK_CAP(plab_norm))
            want_type = 2;      /* label #1, show string #2 */
+#ifdef pkey_plab
        else if (CHECK_CAP(pkey_plab))
            want_type = 6;      /* function key #1, type string #2, show string #3 */
+#endif
 #if NCURSES_XNAMES
        else {
            char *check;
index 150f79c03552440273debb7a7611868d705a8618..104374a503970d2c63d5058b1f45f69dedb4b853 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231028) unstable; urgency=low
+ncurses6 (6.4+20231104) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Oct 2023 05:18:03 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 30 Oct 2023 19:59:49 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 150f79c03552440273debb7a7611868d705a8618..104374a503970d2c63d5058b1f45f69dedb4b853 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231028) unstable; urgency=low
+ncurses6 (6.4+20231104) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Oct 2023 05:18:03 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 30 Oct 2023 19:59:49 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 574d7da92e715f8f7c3c10521035581978cf4f1f..be5d0827b84c4cee02b5b1c3551421fb07893d70 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231028) unstable; urgency=low
+ncurses6 (6.4+20231104) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Oct 2023 05:18:03 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 30 Oct 2023 19:59:49 -0400
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index e775dd848b0145f21b75aa452f6c62aaad2255b6..623826e85598fc925d1fa75fe5bdd6bd98a6887d 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.614 2023/10/28 09:18:03 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.615 2023/11/03 07:58:06 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  "2023"\r
-!define VERSION_MMDD  "1028"\r
+!define VERSION_MMDD  "1104"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 7ca63175cede1a32167bf89b329ad88f7b18b467..f546b373d5119929dd0e02034ad906db236efd56 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20231028
+Release: 20231104
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 03709863a5af6f24fc4bdcb4eb8c5e0dc34ced2a..bf12676562d61938e16c66175d6bacbe3b626704 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20231028
+Release: 20231104
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index c97e5bb36f4cbde728ac9763645f73f4fcd36da2..0a3db841e4b9c232a5dc2f9bc28300e0e660a2ab 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20231028
+Release: 20231104
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 50bfd2cd0630d3a5be4e59000ef6c914712db9f8..d706c45730a0a5f05fc958fb5663506cd796a65f 100644 (file)
@@ -53,7 +53,7 @@
 #include <sys/ptem.h>
 #endif
 
-MODULE_ID("$Id: reset_cmd.c,v 1.29 2023/01/07 21:50:34 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.35 2023/11/05 00:02:37 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -75,6 +75,9 @@ MODULE_ID("$Id: reset_cmd.c,v 1.29 2023/01/07 21:50:34 tom Exp $")
 # endif
 #endif
 
+#define set_flags(target, mask)    target |= mask
+#define clear_flags(target, mask)  target &= ~((unsigned)(mask))
+
 static FILE *my_file;
 
 static bool use_reset = FALSE; /* invoked as reset */
@@ -188,6 +191,79 @@ out_char(int c)
 #define reset_char(item, value) \
     tty_settings->c_cc[item] = CHK(tty_settings->c_cc[item], value)
 
+/*
+ * Simplify ifdefs
+ */
+#ifndef BSDLY
+#define BSDLY 0
+#endif
+#ifndef CRDLY
+#define CRDLY 0
+#endif
+#ifndef ECHOCTL
+#define ECHOCTL 0
+#endif
+#ifndef ECHOKE
+#define ECHOKE 0
+#endif
+#ifndef ECHOPRT
+#define ECHOPRT 0
+#endif
+#ifndef FFDLY
+#define FFDLY 0
+#endif
+#ifndef IMAXBEL
+#define IMAXBEL 0
+#endif
+#ifndef IUCLC
+#define IUCLC 0
+#endif
+#ifndef IXANY
+#define IXANY 0
+#endif
+#ifndef NLDLY
+#define NLDLY 0
+#endif
+#ifndef OCRNL
+#define OCRNL 0
+#endif
+#ifndef OFDEL
+#define OFDEL 0
+#endif
+#ifndef OFILL
+#define OFILL 0
+#endif
+#ifndef OLCUC
+#define OLCUC 0
+#endif
+#ifndef ONLCR
+#define ONLCR 0
+#endif
+#ifndef ONLRET
+#define ONLRET 0
+#endif
+#ifndef ONOCR
+#define ONOCR 0
+#endif
+#ifndef OXTABS
+#define OXTABS 0
+#endif
+#ifndef TAB3
+#define TAB3 0
+#endif
+#ifndef TABDLY
+#define TABDLY 0
+#endif
+#ifndef TOSTOP
+#define TOSTOP 0
+#endif
+#ifndef VTDLY
+#define VTDLY 0
+#endif
+#ifndef XCASE
+#define XCASE 0
+#endif
+
 /*
  * Reset the terminal mode bits to a sensible state.  Very useful after
  * a child program dies in raw mode.
@@ -195,6 +271,11 @@ out_char(int c)
 void
 reset_tty_settings(int fd, TTY * tty_settings, int noset)
 {
+    unsigned mask;
+#ifdef TIOCMGET
+    int modem_bits;
+#endif
+
     GET_TTY(fd, tty_settings);
 
 #ifdef TERMIOS
@@ -231,106 +312,65 @@ reset_tty_settings(int fd, TTY * tty_settings, int noset)
     reset_char(VWERASE, CWERASE);
 #endif
 
-    tty_settings->c_iflag &= ~((unsigned) (IGNBRK
-                                          | PARMRK
-                                          | INPCK
-                                          | ISTRIP
-                                          | INLCR
-                                          | IGNCR
-#ifdef IUCLC
-                                          | IUCLC
-#endif
-#ifdef IXANY
-                                          | IXANY
-#endif
-                                          | IXOFF));
-
-    tty_settings->c_iflag |= (BRKINT
-                             | IGNPAR
-                             | ICRNL
-                             | IXON
-#ifdef IMAXBEL
-                             | IMAXBEL
-#endif
-       );
-
-    tty_settings->c_oflag &= ~((unsigned) (0
-#ifdef OLCUC
-                                          | OLCUC
-#endif
-#ifdef OCRNL
-                                          | OCRNL
-#endif
-#ifdef ONOCR
-                                          | ONOCR
-#endif
-#ifdef ONLRET
-                                          | ONLRET
-#endif
-#ifdef OFILL
-                                          | OFILL
-#endif
-#ifdef OFDEL
-                                          | OFDEL
-#endif
-#ifdef NLDLY
-                                          | NLDLY
-#endif
-#ifdef CRDLY
-                                          | CRDLY
-#endif
-#ifdef TABDLY
-                                          | TABDLY
-#endif
-#ifdef BSDLY
-                                          | BSDLY
-#endif
-#ifdef VTDLY
-                                          | VTDLY
-#endif
-#ifdef FFDLY
-                                          | FFDLY
-#endif
-                              ));
-
-    tty_settings->c_oflag |= (OPOST
-#ifdef ONLCR
-                             | ONLCR
-#endif
-       );
-
-    tty_settings->c_cflag &= ~((unsigned) (CSIZE
-                                          | CSTOPB
-                                          | PARENB
-                                          | PARODD
-                                          | CLOCAL));
-    tty_settings->c_cflag |= (CS8 | CREAD);
-    tty_settings->c_lflag &= ~((unsigned) (ECHONL
-                                          | NOFLSH
-#ifdef TOSTOP
-                                          | TOSTOP
-#endif
-#ifdef ECHOPTR
-                                          | ECHOPRT
-#endif
-#ifdef XCASE
-                                          | XCASE
-#endif
-                              ));
-
-    tty_settings->c_lflag |= (ISIG
-                             | ICANON
-                             | ECHO
-                             | ECHOE
-                             | ECHOK
-#ifdef ECHOCTL
-                             | ECHOCTL
-#endif
-#ifdef ECHOKE
-                             | ECHOKE
-#endif
-       );
-#endif
+    clear_flags(tty_settings->c_iflag, (IGNBRK
+                                       | PARMRK
+                                       | INPCK
+                                       | ISTRIP
+                                       | INLCR
+                                       | IGNCR
+                                       | IUCLC
+                                       | IXANY
+                                       | IXOFF));
+
+    set_flags(tty_settings->c_iflag, (BRKINT
+                                     | IGNPAR
+                                     | ICRNL
+                                     | IXON
+                                     | IMAXBEL));
+
+    clear_flags(tty_settings->c_oflag, (0
+                                       | OLCUC
+                                       | OCRNL
+                                       | ONOCR
+                                       | ONLRET
+                                       | OFILL
+                                       | OFDEL
+                                       | NLDLY
+                                       | CRDLY
+                                       | TABDLY
+                                       | BSDLY
+                                       | VTDLY
+                                       | FFDLY));
+
+    set_flags(tty_settings->c_oflag, (OPOST
+                                     | ONLCR));
+
+    mask = (CSIZE | CSTOPB | PARENB | PARODD);
+#ifdef TIOCMGET
+    /* leave clocal alone if this appears to use a modem */
+    if (ioctl(fd, TIOCMGET, &modem_bits) == -1)
+       mask |= CLOCAL;
+#else
+    /* cannot check - use the behavior from tset */
+    mask |= CLOCAL;
+#endif
+    clear_flags(tty_settings->c_cflag, mask);
+
+    set_flags(tty_settings->c_cflag, (CS8 | CREAD));
+    clear_flags(tty_settings->c_lflag, (ECHONL
+                                       | NOFLSH
+                                       | TOSTOP
+                                       | ECHOPRT
+                                       | XCASE));
+
+    set_flags(tty_settings->c_lflag, (ISIG
+                                     | ICANON
+                                     | ECHO
+                                     | ECHOE
+                                     | ECHOK
+                                     | ECHOCTL
+                                     | ECHOKE));
+#endif /* TERMIOS */
 
     if (!noset) {
        SET_TTY(fd, tty_settings);
@@ -405,29 +445,23 @@ set_conversions(TTY * tty_settings)
 #if defined(EXP_WIN32_DRIVER)
     /* FIXME */
 #else
-#ifdef ONLCR
-    tty_settings->c_oflag |= ONLCR;
-#endif
-    tty_settings->c_iflag |= ICRNL;
-    tty_settings->c_lflag |= ECHO;
-#ifdef OXTABS
-    tty_settings->c_oflag |= OXTABS;
-#endif /* OXTABS */
+    set_flags(tty_settings->c_oflag, ONLCR);
+    set_flags(tty_settings->c_iflag, ICRNL);
+    set_flags(tty_settings->c_lflag, ECHO);
+    set_flags(tty_settings->c_oflag, OXTABS);
 
     /* test used to be tgetflag("NL") */
     if (VALID_STRING(newline) && newline[0] == '\n' && !newline[1]) {
        /* Newline, not linefeed. */
-#ifdef ONLCR
-       tty_settings->c_oflag &= ~((unsigned) ONLCR);
-#endif
-       tty_settings->c_iflag &= ~((unsigned) ICRNL);
+       clear_flags(tty_settings->c_oflag, ONLCR);
+       clear_flags(tty_settings->c_iflag, ICRNL);
     }
-#ifdef OXTABS
+#if OXTABS
     /* test used to be tgetflag("pt") */
     if (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs))
-       tty_settings->c_oflag &= ~OXTABS;
+       clear_flags(tty_settings->c_oflag, OXTABS);
 #endif /* OXTABS */
-    tty_settings->c_lflag |= (ECHOE | ECHOK);
+    set_flags(tty_settings->c_lflag, (ECHOE | ECHOK));
 #endif
 }
 
@@ -493,7 +527,7 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings)
     bool need_flush = FALSE;
 
     (void) old_settings;
-#ifdef TAB3
+#if TAB3
     if (old_settings != 0 &&
        old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) {
        old_settings->c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET);
@@ -515,22 +549,22 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings)
 
        if (VALID_STRING(clear_margins)) {
            need_flush |= sent_string(clear_margins);
-       } else
+       }
 #if defined(set_lr_margin)
-       if (VALID_STRING(set_lr_margin)) {
+       else if (VALID_STRING(set_lr_margin)) {
            need_flush |= sent_string(TIPARM_2(set_lr_margin, 0, columns - 1));
-       } else
+       }
 #endif
 #if defined(set_left_margin_parm) && defined(set_right_margin_parm)
-           if (VALID_STRING(set_left_margin_parm)
-               && VALID_STRING(set_right_margin_parm)) {
+       else if (VALID_STRING(set_left_margin_parm)
+                && VALID_STRING(set_right_margin_parm)) {
            need_flush |= sent_string(TIPARM_1(set_left_margin_parm, 0));
            need_flush |= sent_string(TIPARM_1(set_right_margin_parm,
                                               columns - 1));
-       } else
+       }
 #endif
-           if (VALID_STRING(set_left_margin)
-               && VALID_STRING(set_right_margin)) {
+       else if (VALID_STRING(set_left_margin)
+                && VALID_STRING(set_right_margin)) {
            need_flush |= to_left_margin();
            need_flush |= sent_string(set_left_margin);
            if (VALID_STRING(parm_right_cursor)) {
index c852eb858f5c80d97db25c996f24369250c95acf..a630b044e0cc027049bf3e4a9223d00b6988edcc 100644 (file)
@@ -39,7 +39,7 @@
 #include <progs.priv.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tabs.c,v 1.52 2023/05/27 20:13:10 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.53 2023/11/04 20:46:09 tom Exp $")
 
 static GCC_NORETURN void usage(void);
 
@@ -370,7 +370,9 @@ do_set_margin(int margin, bool no_op)
            }
            tputs(set_left_margin, 1, putch);
        }
-    } else if (VALID_STRING(set_left_margin_parm)) {
+    }
+#if defined(set_left_margin_parm) && defined(set_right_margin_parm)
+    else if (VALID_STRING(set_left_margin_parm)) {
        result = TRUE;
        if (!no_op) {
            if (VALID_STRING(set_right_margin_parm)) {
@@ -379,12 +381,16 @@ do_set_margin(int margin, bool no_op)
                tputs(TIPARM_2(set_left_margin_parm, margin, max_cols), 1, putch);
            }
        }
-    } else if (VALID_STRING(set_lr_margin)) {
+    }
+#endif
+#if defined(set_lr_margin)
+    else if (VALID_STRING(set_lr_margin)) {
        result = TRUE;
        if (!no_op) {
            tputs(TIPARM_2(set_lr_margin, margin, max_cols), 1, putch);
        }
     }
+#endif
     return result;
 }
 
index 474e93d8edf2dc5d53eb2be09b2d7c9e6f0936dc..ae65e6317f0a625186724001cd346eb809a58d5f 100644 (file)
@@ -49,7 +49,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.323 2023/09/30 21:17:23 Branden.Robinson Exp $")
+MODULE_ID("$Id: tic.c,v 1.324 2023/11/04 19:43:43 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -3149,6 +3149,7 @@ guess_ANSI_VTxx(TERMTYPE2 *tp)
  * In particular, any ECMA-48 terminal should support these, though the details
  * for u9 are implementation dependent.
  */
+#if defined(user6) && defined(user7) && defined(user8) && defined(user9)
 static void
 check_user_6789(TERMTYPE2 *tp)
 {
@@ -3184,6 +3185,9 @@ check_user_6789(TERMTYPE2 *tp)
        break;
     }
 }
+#else
+#define check_user_6789(tp)    /* nothing */
+#endif
 
 /* other sanity-checks (things that we don't want in the normal
  * logic that reads a terminfo entry)