]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20140823
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 Aug 2014 00:42:29 +0000 (00:42 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 Aug 2014 00:42:29 +0000 (00:42 +0000)
+ fix special case where double-width character overwrites a single-
  width character in the first column (report by Egmont Koblinger,
  cf: 20050813).

NEWS
dist.mk
ncurses/tty/tty_update.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec

diff --git a/NEWS b/NEWS
index 0d7b26fd040a6146255db6f5ba04fb1481b75f0a..ab79acb6367ae659fdc22b5d923fd33cce92b672 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.2260 2014/08/16 23:28:26 tom Exp $
+-- $Id: NEWS,v 1.2262 2014/08/23 19:28:39 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,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.
 
+20140823
+       + fix special case where double-width character overwrites a single-
+         width character in the first column (report by Egmont Koblinger,
+         cf: 20050813).
+
 20140816
        + fix colors in ncurses 'b' test which did not work after changing
          it to put the test-strings in subwindows (cf: 20140705).
diff --git a/dist.mk b/dist.mk
index 1eecf461f3d84660eb797497ad0af7988494cec4..e5d23620f4f3de0e508a38b59ea82a2659e8ca4d 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.1001 2014/08/14 07:59:48 tom Exp $
+# $Id: dist.mk,v 1.1002 2014/08/23 16:35:54 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 = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20140816
+NCURSES_PATCH = 20140823
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 4e314308fd0f40dc1220946521d82a5b956ce7e1..e66f71605ee27254ca40868502f2b2d946020b66 100644 (file)
@@ -82,7 +82,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.279 2014/07/12 23:16:30 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.280 2014/08/23 19:25:18 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -628,6 +628,7 @@ PutRange(NCURSES_SP_DCLx
         int first, int last)
 {
     int i, j, same;
+    int rc;
 
     TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)",
                       (void *) SP_PARM,
@@ -655,9 +656,11 @@ PutRange(NCURSES_SP_DCLx
         * Always return 1 for the next GoTo() after a PutRange() if we found
         * identical characters at end of interval
         */
-       return (same == 0 ? i : 1);
+       rc = (same == 0 ? i : 1);
+    } else {
+       rc = EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1);
     }
-    return EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1);
+    return rc;
 }
 
 /* leave unbracketed here so 'indent' works */
@@ -1492,9 +1495,17 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
            if (oLastChar < nLastChar) {
                int m = max(nLastNonblank, oLastNonblank);
 #if USE_WIDEC_SUPPORT
-               while (isWidecExt(newLine[n + 1]) && n) {
-                   --n;
-                   --oLastChar;
+               if (n) {
+                   while (isWidecExt(newLine[n + 1]) && n) {
+                       --n;
+                       --oLastChar;    /* increase cost */
+                   }
+               } else if (n >= firstChar &&
+                          isWidecBase(newLine[n])) {
+                   while (isWidecExt(newLine[n + 1])) {
+                       ++n;
+                       ++oLastChar;    /* decrease cost */
+                   }
                }
 #endif
                GoTo(NCURSES_SP_ARGx lineno, n + 1);
@@ -1514,8 +1525,9 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
                if (DelCharCost(SP_PARM, oLastChar - nLastChar)
                    > SP_PARM->_el_cost + nLastNonblank - (n + 1)) {
                    if (PutRange(NCURSES_SP_ARGx oldLine, newLine, lineno,
-                                n + 1, nLastNonblank))
-                         GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1);
+                                n + 1, nLastNonblank)) {
+                       GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1);
+                   }
                    ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
                } else {
                    /*
index 1ef5f486b656b5f0043a675f28320e1b8aea1781..fb2129820d83625bbae04cedc22a03bb0ca896d3 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140816) unstable; urgency=low
+ncurses6 (5.9-20140823) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 14 Aug 2014 03:59:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Aug 2014 12:35:54 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 1ef5f486b656b5f0043a675f28320e1b8aea1781..fb2129820d83625bbae04cedc22a03bb0ca896d3 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140816) unstable; urgency=low
+ncurses6 (5.9-20140823) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 14 Aug 2014 03:59:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Aug 2014 12:35:54 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index dcbae98bcfd16779b8b798d5eeff52c943452d50..6094abd11e415977721068e325ad2a6e0179fe99 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140816) unstable; urgency=low
+ncurses6 (5.9-20140823) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 14 Aug 2014 03:59:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Aug 2014 12:35:54 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 58c34aa8c4fce8f36938b4d260ab4e1c23b97b50..3ccd2fe0447062e95d773dcad5c7cb85f42bd190 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.56 2014/08/14 07:59:48 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.57 2014/08/23 16:35:54 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "0816"\r
+!define VERSION_MMDD  "0823"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 620fa4bbd9ba7db780410a3e9dbb9433722ded3f..cea7f9ee9c01f4b1aa9cce71928e90a4732d0b68 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20140816
+Release: 20140823
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index b2da2b16157dbe55f7f65b7647620dffcde2456e..96b563f06edf0133ed9d6a1e3919858561a19d18 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20140816
+Release: 20140823
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz