]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.1 - patch 20190525
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 25 May 2019 23:00:21 +0000 (23:00 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 25 May 2019 23:00:21 +0000 (23:00 +0000)
+ modify reset_cmd.c to allow for tabstops at intervals other than 8
  (report by Vincent Huisman).

13 files changed:
NEWS
VERSION
dist.mk
man/tic.1m
man/user_caps.5
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

diff --git a/NEWS b/NEWS
index ee18e84f1e64abc8eed9fba92c04624af77d286c..1c2f43064a6988d5b3822e9caeb819e04bc632de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3320 2019/05/19 00:12:03 tom Exp $
+-- $Id: NEWS,v 1.3322 2019/05/25 19:18:23 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,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.
 
+20190525
+       + modify reset_cmd.c to allow for tabstops at intervals other than 8
+         (report by Vincent Huisman).
+
 20190518
        + update xterm-new to xterm patch #345 -TD
        + add/use xterm+keypad in xterm-new (report by Alain D D Williams) -TD
diff --git a/VERSION b/VERSION
index 0a9b1d8faca4d08e657e6eaefa3dd973de373ee6..8be7d044b2d6e91a6319fcd217bc5842b96a857f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.1     20190518
+5:0:10 6.1     20190525
diff --git a/dist.mk b/dist.mk
index dfb0b2498a9d3c02a79859e55f2915867abc0f4c..b316322f26745eab581ad1f1fa0ef0ee422333d3 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1283 2019/05/18 10:29:53 tom Exp $
+# $Id: dist.mk,v 1.1284 2019/05/25 15:39:25 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 1
-NCURSES_PATCH = 20190518
+NCURSES_PATCH = 20190525
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index a3b169173d5c1ac7530adcb422599b64c5b803cc..5295b39049ecb13d92a0bcfbe5871dd8396c7564 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tic.1m,v 1.68 2019/05/18 21:59:56 tom Exp $
+.\" $Id: tic.1m,v 1.69 2019/05/18 22:48:40 tom Exp $
 .TH @TIC@ 1M ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
index c90aee54e8f979798362af0ae97516a4ad6efe85..d819f729d0003a0450bf59cc0a789d8abe10c2ee 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
+.\" Copyright (c) 2017-2018,2019 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: user_caps.5,v 1.9 2018/07/28 22:05:23 tom Exp $
+.\" $Id: user_caps.5,v 1.10 2019/05/18 22:48:40 tom Exp $
 .TH user_caps 5
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
index c91decebb91c8622aa63e36358ccdd80a96e10af..634dbd68c13b465107230011cd7722afdcbf764f 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190518) unstable; urgency=low
+ncurses6 (6.1+20190525) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 18 May 2019 06:29:53 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 25 May 2019 11:39:25 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index c91decebb91c8622aa63e36358ccdd80a96e10af..634dbd68c13b465107230011cd7722afdcbf764f 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190518) unstable; urgency=low
+ncurses6 (6.1+20190525) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 18 May 2019 06:29:53 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 25 May 2019 11:39:25 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 159f00793dc1f23f8d425af6a5eaf055bdbdd2b2..f3c2c08bbb41e16a85ab4777b63a73078c6701ef 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190518) unstable; urgency=low
+ncurses6 (6.1+20190525) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 18 May 2019 06:29:53 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 25 May 2019 11:39:25 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 859c32e5454792733c7c84a9e7e6e9088a6cc9fa..5fdfb1d604ba2ec2c195e68478160801e24be3fb 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.329 2019/05/18 10:29:53 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.330 2019/05/25 15:39:25 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 "1"\r
 !define VERSION_YYYY  "2019"\r
-!define VERSION_MMDD  "0518"\r
+!define VERSION_MMDD  "0525"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index c0fce34274beaeeb3cbb480d525b2527b4bab94e..8e91472a9ed807df2bc8dc7ceb8b63e3464d5844 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.1
-Release: 20190518
+Release: 20190525
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index fbb47befa62bd989f02bd71d6afebec3655d5dbc..3dba222b697b0360eea31183754db2798222dcb0 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.1
-Release: 20190518
+Release: 20190525
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 1201190938bac7f01bc2bf648390a388af43e6d0..eb96c64916f9e79d4681e95a120f42472dd68f11 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.1
-Release: 20190518
+Release: 20190525
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 058ebf9c5a0ddca1df1c09c0bebc140e779e3baa..c5d96a2e82ce4f041d70267958f9f3be370968df 100644 (file)
@@ -52,7 +52,7 @@
 #include <sys/ptem.h>
 #endif
 
-MODULE_ID("$Id: reset_cmd.c,v 1.14 2019/02/23 18:33:19 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.17 2019/05/25 22:36:53 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -413,6 +413,28 @@ set_conversions(TTY * tty_settings)
     tty_settings->c_lflag |= (ECHOE | ECHOK);
 }
 
+static bool
+sent_string(const char *s)
+{
+    bool sent = FALSE;
+    if (VALID_STRING(s)) {
+       tputs(s, 0, out_char);
+       sent = TRUE;
+    }
+    return sent;
+}
+
+static bool
+to_left_margin(void)
+{
+    if (VALID_STRING(carriage_return)) {
+       sent_string(carriage_return);
+    } else {
+       out_char('\r');
+    }
+    return TRUE;
+}
+
 /*
  * Set the hardware tabs on the terminal, using the 'ct' (clear all tabs),
  * 'st' (set one tab) and 'ch' (horizontal cursor addressing) capabilities.
@@ -423,41 +445,28 @@ set_conversions(TTY * tty_settings)
 static bool
 reset_tabstops(int wide)
 {
-    if ((init_tabs != 8) && (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs))) {
+    if ((init_tabs != 8)
+       && VALID_NUMERIC(init_tabs)
+       && VALID_STRING(set_tab)
+       && VALID_STRING(clear_all_tabs)) {
        int c;
 
-       (void) putc('\r', my_file);     /* Force to left margin. */
+       to_left_margin();
        tputs(clear_all_tabs, 0, out_char);
-
-       for (c = 8; c < wide; c += 8) {
-           /* Get to the right column.  In BSD tset, this used to try a bunch
-            * of half-clever things with cup and hpa, for an average saving of
-            * somewhat less than two character times per tab stop, less than
-            * .01 sec at 2400cps.  We lost all this cruft because it seemed to
-            * be introducing some odd bugs.
-            * -----------12345678----------- */
-           (void) fputs("        ", my_file);
-           tputs(set_tab, 0, out_char);
+       if (init_tabs > 1) {
+           if (init_tabs > wide)
+               init_tabs = (short) wide;
+           for (c = init_tabs; c < wide; c += init_tabs) {
+               fprintf(my_file, "%*s", init_tabs, " ");
+               tputs(set_tab, 0, out_char);
+           }
+           to_left_margin();
        }
-       putc('\r', my_file);
        return (TRUE);
     }
     return (FALSE);
 }
 
-static bool
-sent_string(const char *s)
-{
-    bool sent = FALSE;
-    if (VALID_STRING(s)) {
-       tputs(s, 0, out_char);
-       sent = TRUE;
-    }
-    return sent;
-}
-
-#define PUTCHAR(c) fputc(c, my_file)
-
 /* Output startup string. */
 bool
 send_init_strings(int fd GCC_UNUSED, TTY * old_settings)
@@ -504,26 +513,19 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings)
                && VALID_STRING(set_left_margin)
                && VALID_STRING(set_right_margin)) {
            need_flush |= sent_string(clear_margins);
-           if (carriage_return != 0) {
-               need_flush |= sent_string(carriage_return);
-           } else {
-               PUTCHAR('\r');
-           }
+           need_flush |= to_left_margin();
            need_flush |= sent_string(set_left_margin);
            if (VALID_STRING(parm_right_cursor)) {
                need_flush |= sent_string(TPARM_1(parm_right_cursor,
                                                  columns - 1));
            } else {
                for (i = 0; i < columns - 1; i++) {
-                   PUTCHAR(' ');
+                   out_char(' ');
+                   need_flush = TRUE;
                }
            }
            need_flush |= sent_string(set_right_margin);
-           if (VALID_STRING(carriage_return)) {
-               need_flush |= sent_string(carriage_return);
-           } else {
-               PUTCHAR('\r');
-           }
+           need_flush |= to_left_margin();
        }
 
        need_flush |= reset_tabstops(columns);