]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20140614
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 15 Jun 2014 00:37:21 +0000 (00:37 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 15 Jun 2014 00:37:21 +0000 (00:37 +0000)
+ fix dereference before null check found by Coverity in tic.c
  (cf: 20140524).
+ fix sign-extension bug in read_entry.c which prevented "toe" from
  reading empty "screen+italics" entry.
+ modify sgr for screen.xterm-new to support dim capability -TD
+ add dim capability to nsterm+7 -TD
+ cancel dim capability for iterm -TD
+ add dim, invis capabilities to vte-2012 -TD
+ add sitm/ritm to konsole-base and mlterm3 -TD

NEWS
dist.mk
misc/terminfo.src
ncurses/tinfo/read_entry.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
progs/tic.c

diff --git a/NEWS b/NEWS
index 971176ac72c20fd95d738f4595556b41b18972be..044b80034960ea2a0bd7b10699b16af614d41449 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2222 2014/06/09 21:56:55 tom Exp $
+-- $Id: NEWS,v 1.2226 2014/06/14 23:48:11 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,17 @@ 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.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20140614
+       + fix dereference before null check found by Coverity in tic.c 
+         (cf: 20140524).
+       + fix sign-extension bug in read_entry.c which prevented "toe" from
+         reading empty "screen+italics" entry.
+       + modify sgr for screen.xterm-new to support dim capability -TD
+       + add dim capability to nsterm+7 -TD
+       + cancel dim capability for iterm -TD
+       + add dim, invis capabilities to vte-2012 -TD
+       + add sitm/ritm to konsole-base and mlterm3 -TD
+
 20140609
        > fix regression in screen terminfo entries (reports by Christian
          Ebert, Gabriele Balducci) -TD
 20140609
        > fix regression in screen terminfo entries (reports by Christian
          Ebert, Gabriele Balducci) -TD
diff --git a/dist.mk b/dist.mk
index b1c46537e7090e2f2cdfdf150317c7620a6ff329..80fe03a5dbc40240c8c7cc5bf1444c88124f0799 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.990 2014/06/09 21:55:13 tom Exp $
+# $Id: dist.mk,v 1.991 2014/06/14 09:12:57 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # 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
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20140609
+NCURSES_PATCH = 20140614
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 2c54482a0ab78d7bc53abc6163fd37a7f703a414..8078639c796da75e3ecd91db12db9db2816041e1 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.501 $
-#      $Date: 2014/06/09 21:40:50 $
+#      $Revision: 1.508 $
+#      $Date: 2014/06/14 21:16:34 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -1052,26 +1052,26 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
-       dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
-       home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
-       invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
-       kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM,
+       dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K,
+       el1=\E[1K, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L,
+       ind=^J, invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB,
+       kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM,
        rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
        rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m,
        sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        enacs=\E(B\E)0, rmacs=^O,
        sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
 nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
        acsc=+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245,
        enacs=\E(B\E)0, rmacs=^O,
        sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
 nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
        acsc=+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
 # compare with xterm+sl-twm
        sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
 # compare with xterm+sl-twm
@@ -1246,10 +1246,11 @@ nsterm|Apple_Terminal|AppKit Terminal.app,
 #
 # NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
 # disabled.
 #
 # NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
 # disabled.
-iTerm.app|iTerm.app terminal emulator for Mac OS X,
+iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
        bce, bw@,
        bce, bw@,
-       csr@, kend=\EOF, khome=\EOH, use=xterm+256setaf,
-       use=nsterm-16color,
+       csr@, dim@, kend=\EOF, khome=\EOH,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       use=xterm+256setaf, use=nsterm-16color,
 
 # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
 #
 
 # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
 #
@@ -4611,7 +4612,10 @@ gnome-2008|GNOME Terminal snapshot 2.22.3,
 #
 # Testing with tack shows that flash does not/has not worked -TD
 vte-2012|VTE 0.34.1,
 #
 # Testing with tack shows that flash does not/has not worked -TD
 vte-2012|VTE 0.34.1,
-       flash@, ritm=\E[23m, sitm=\E[3m, use=vte-2008,
+       ncv#16,
+       dim=\E[2m, flash@, invis=\E[8m, ritm=\E[23m,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p5%t;2%;%?%p7%t;8%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e\017%;,
+       sitm=\E[3m, use=vte-2008,
 # Version 3.6.1 sets TERM to xterm-256color (still hardcoded), which has
 # 61 differences from a correct entry for gnome terminal.
 gnome-2012|GNOME Terminal 3.6.0,
 # Version 3.6.1 sets TERM to xterm-256color (still hardcoded), which has
 # 61 differences from a correct entry for gnome terminal.
 gnome-2012|GNOME Terminal 3.6.0,
@@ -4713,6 +4717,9 @@ kvt|KDE terminal,
 # Updated for konsole 1.6.6:
 #    add control-key modifiers for function-keys, etc.
 #
 # Updated for konsole 1.6.6:
 #    add control-key modifiers for function-keys, etc.
 #
+# Updated for konsole 2.12.4:
+#    add sitm/ritm
+#
 # vttest menu 1 shows that both konsole and gnome terminal do wrapping
 # different from xterm (and vt100's).  They have the same behavior in this
 # detail, but it is unclear which copies the other.
 # vttest menu 1 shows that both konsole and gnome terminal do wrapping
 # different from xterm (and vt100's).  They have the same behavior in this
 # detail, but it is unclear which copies the other.
@@ -4724,11 +4731,11 @@ konsole-base|KDE console window,
        hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1=\E[3~,
        kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@, kf15@, kf16@,
        kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@,
        hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1=\E[3~,
        kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@, kf15@, kf16@,
        kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@,
-       kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, rmam=\E[?7l,
-       rmso=\E[27m, rmul=\E[24m,
+       kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, ritm=\E[23m,
+       rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
-       sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd,
+       sgr0=\E[0m\017, sitm=\E[3m, smam=\E[?7h, vpa=\E[%i%p1%dd,
        use=ecma+color, use=xterm-r6,
 konsole-linux|KDE console window with linux keyboard,
        kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13@,
        use=ecma+color, use=xterm-r6,
 konsole-linux|KDE console window with linux keyboard,
        kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13@,
@@ -4781,8 +4788,8 @@ mlterm|multi lingual terminal emulator,
 # mlterm.ti; this entry is based on testing with tack and vttest -TD
 mlterm3|multi lingual terminal emulator,
        kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
 # mlterm.ti; this entry is based on testing with tack and vttest -TD
 mlterm3|multi lingual terminal emulator,
        kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
-       use=xterm+app, use=xterm+pcf0, use=xterm+pcc2,
-       use=xterm+pce2, use=mlterm2,
+       ritm=\E[23m, sitm=\E[3m, use=xterm+app, use=xterm+pcf0,
+       use=xterm+pcc2, use=xterm+pce2, use=mlterm2,
 
 # This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD
 #
 
 # This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD
 #
@@ -5839,7 +5846,7 @@ screen+italics|screen cannot support italics,
 screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        bce@, bw,
        invis@, kIC@, kNXT@, kPRV@, meml@, memu@,
 screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        bce@, bw,
        invis@, kIC@, kNXT@, kPRV@, meml@, memu@,
-       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;m,
        E3@, use=screen+italics, use=screen+fkeys, use=xterm-new,
 # xterm-r6 does not really support khome/kend unless it is propped up by
 # the translations resource.
        E3@, use=screen+italics, use=screen+fkeys, use=xterm-new,
 # xterm-r6 does not really support khome/kend unless it is propped up by
 # the translations resource.
@@ -23374,8 +23381,17 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #        overlooked until a few terminal emulators implemented the feature -TD
 #
 # 2014-06-09
 #        overlooked until a few terminal emulators implemented the feature -TD
 #
 # 2014-06-09
+#      > fix regression in screen terminfo entries (reports by Christian
+#        Ebert, Gabriele Balducci) -TD
 #      + revert the change to screen; see notes for why this did not work -TD
 #      + cancel sitm/ritm for entries which extend "screen", to work around
 #        screen's hardcoded behavior for SGR 3 -TD
 #
 #      + revert the change to screen; see notes for why this did not work -TD
 #      + cancel sitm/ritm for entries which extend "screen", to work around
 #        screen's hardcoded behavior for SGR 3 -TD
 #
+# 2014-06-14
+#      + modify sgr for screen.xterm-new to support dim capability -TD
+#      + add dim capability to nsterm+7 -TD
+#      + cancel dim capability for iterm -TD
+#      + add dim, invis capabilities to vte-2012 -TD
+#      + add sitm/ritm to konsole-base and mlterm3 -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index 81b8180d54854099f936c8bb8a2dcb492e75fac1..e5c26b5fa6f2415c7fbebaed3c992027aafae1bd 100644 (file)
 
 #include <tic.h>
 
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.127 2014/03/08 22:07:31 Xin.Li Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.128 2014/06/14 22:30:41 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
+#define MyNumber(n) (short) LOW_MSB(n)
+
 #if NCURSES_USE_DATABASE
 static void
 convert_shorts(char *buf, short *Numbers, int count)
 #if NCURSES_USE_DATABASE
 static void
 convert_shorts(char *buf, short *Numbers, int count)
@@ -56,7 +58,7 @@ convert_shorts(char *buf, short *Numbers, int count)
        else if (IS_NEG2(buf + 2 * i))
            Numbers[i] = CANCELLED_NUMERIC;
        else
        else if (IS_NEG2(buf + 2 * i))
            Numbers[i] = CANCELLED_NUMERIC;
        else
-           Numbers[i] = (short) LOW_MSB(buf + 2 * i);
+           Numbers[i] = MyNumber(buf + 2 * i);
        TR(TRACE_DATABASE, ("get Numbers[%d]=%d", i, Numbers[i]));
     }
 }
        TR(TRACE_DATABASE, ("get Numbers[%d]=%d", i, Numbers[i]));
     }
 }
@@ -72,10 +74,10 @@ convert_strings(char *buf, char **Strings, int count, int size, char *table)
            Strings[i] = ABSENT_STRING;
        } else if (IS_NEG2(buf + 2 * i)) {
            Strings[i] = CANCELLED_STRING;
            Strings[i] = ABSENT_STRING;
        } else if (IS_NEG2(buf + 2 * i)) {
            Strings[i] = CANCELLED_STRING;
-       } else if ((int) LOW_MSB(buf + 2 * i) > size) {
+       } else if (MyNumber(buf + 2 * i) > size) {
            Strings[i] = ABSENT_STRING;
        } else {
            Strings[i] = ABSENT_STRING;
        } else {
-           Strings[i] = (LOW_MSB(buf + 2 * i) + table);
+           Strings[i] = (MyNumber(buf + 2 * i) + table);
            TR(TRACE_DATABASE, ("Strings[%d] = %s", i, _nc_visbuf(Strings[i])));
        }
 
            TR(TRACE_DATABASE, ("Strings[%d] = %s", i, _nc_visbuf(Strings[i])));
        }
 
@@ -147,6 +149,22 @@ _nc_init_termtype(TERMTYPE *const tp)
 }
 
 #if NCURSES_USE_DATABASE
 }
 
 #if NCURSES_USE_DATABASE
+#if NCURSES_XNAMES
+static bool
+valid_shorts(char *buffer, int limit)
+{
+    bool result = FALSE;
+    int n;
+    for (n = 0; n < limit; ++n) {
+       if (MyNumber(buffer + (n * 2)) > 0) {
+           result = TRUE;
+           break;
+       }
+    }
+    return result;
+}
+#endif
+
 /*
  * Return TGETENT_YES if read, TGETENT_NO if not found or garbled.
  */
 /*
  * Return TGETENT_YES if read, TGETENT_NO if not found or garbled.
  */
@@ -170,11 +188,11 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
        return (TGETENT_NO);
     }
 
        return (TGETENT_NO);
     }
 
-    name_size = LOW_MSB(buf + 2);
-    bool_count = LOW_MSB(buf + 4);
-    num_count = LOW_MSB(buf + 6);
-    str_count = LOW_MSB(buf + 8);
-    str_size = LOW_MSB(buf + 10);
+    name_size = MyNumber(buf + 2);
+    bool_count = MyNumber(buf + 4);
+    num_count = MyNumber(buf + 6);
+    str_count = MyNumber(buf + 8);
+    str_size = MyNumber(buf + 10);
 
     TR(TRACE_DATABASE,
        ("TERMTYPE name_size=%d, bool=%d/%d, num=%d/%d str=%d/%d(%d)",
 
     TR(TRACE_DATABASE,
        ("TERMTYPE name_size=%d, bool=%d/%d, num=%d/%d str=%d/%d(%d)",
@@ -237,8 +255,9 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
     }
     convert_shorts(buf, ptr->Numbers, num_count);
 
     }
     convert_shorts(buf, ptr->Numbers, num_count);
 
-    if ((ptr->Strings = TYPE_CALLOC(char *, max(STRCOUNT, str_count))) == 0)
-         return (TGETENT_NO);
+    if ((ptr->Strings = TYPE_CALLOC(char *, max(STRCOUNT, str_count))) == 0) {
+       return (TGETENT_NO);
+    }
 
     if (str_count) {
        /* grab the string offsets */
 
     if (str_count) {
        /* grab the string offsets */
@@ -246,8 +265,9 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
            return (TGETENT_NO);
        }
        /* finally, grab the string table itself */
            return (TGETENT_NO);
        }
        /* finally, grab the string table itself */
-       if (Read(string_table, (unsigned) str_size) != str_size)
+       if (Read(string_table, (unsigned) str_size) != str_size) {
            return (TGETENT_NO);
            return (TGETENT_NO);
+       }
        convert_strings(buf, ptr->Strings, str_count, str_size, string_table);
     }
 #if NCURSES_XNAMES
        convert_strings(buf, ptr->Strings, str_count, str_size, string_table);
     }
 #if NCURSES_XNAMES
@@ -261,12 +281,12 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
      */
     even_boundary(str_size);
     TR(TRACE_DATABASE, ("READ extended_header @%d", offset));
      */
     even_boundary(str_size);
     TR(TRACE_DATABASE, ("READ extended_header @%d", offset));
-    if (_nc_user_definable && read_shorts(buf, 5)) {
-       int ext_bool_count = LOW_MSB(buf + 0);
-       int ext_num_count = LOW_MSB(buf + 2);
-       int ext_str_count = LOW_MSB(buf + 4);
-       int ext_str_size = LOW_MSB(buf + 6);
-       int ext_str_limit = LOW_MSB(buf + 8);
+    if (_nc_user_definable && read_shorts(buf, 5) && valid_shorts(buf, 5)) {
+       int ext_bool_count = MyNumber(buf + 0);
+       int ext_num_count = MyNumber(buf + 2);
+       int ext_str_count = MyNumber(buf + 4);
+       int ext_str_size = MyNumber(buf + 6);
+       int ext_str_limit = MyNumber(buf + 8);
        unsigned need = (unsigned) (ext_bool_count + ext_num_count + ext_str_count);
        int base = 0;
 
        unsigned need = (unsigned) (ext_bool_count + ext_num_count + ext_str_count);
        int base = 0;
 
@@ -277,8 +297,9 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
            || ext_num_count < 0
            || ext_str_count < 0
            || ext_str_size < 0
            || ext_num_count < 0
            || ext_str_count < 0
            || ext_str_size < 0
-           || ext_str_limit < 0)
+           || ext_str_limit < 0) {
            return (TGETENT_NO);
            return (TGETENT_NO);
+       }
 
        ptr->num_Booleans = UShort(BOOLCOUNT + ext_bool_count);
        ptr->num_Numbers = UShort(NUMCOUNT + ext_num_count);
 
        ptr->num_Booleans = UShort(BOOLCOUNT + ext_bool_count);
        ptr->num_Numbers = UShort(NUMCOUNT + ext_num_count);
@@ -296,36 +317,42 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
                            ext_bool_count, offset));
        if ((ptr->ext_Booleans = UShort(ext_bool_count)) != 0) {
            if (Read(ptr->Booleans + BOOLCOUNT, (unsigned)
                            ext_bool_count, offset));
        if ((ptr->ext_Booleans = UShort(ext_bool_count)) != 0) {
            if (Read(ptr->Booleans + BOOLCOUNT, (unsigned)
-                    ext_bool_count) != ext_bool_count)
+                    ext_bool_count) != ext_bool_count) {
                return (TGETENT_NO);
                return (TGETENT_NO);
+           }
        }
        even_boundary(ext_bool_count);
 
        TR(TRACE_DATABASE, ("READ %d extended-numbers @%d",
                            ext_num_count, offset));
        if ((ptr->ext_Numbers = UShort(ext_num_count)) != 0) {
        }
        even_boundary(ext_bool_count);
 
        TR(TRACE_DATABASE, ("READ %d extended-numbers @%d",
                            ext_num_count, offset));
        if ((ptr->ext_Numbers = UShort(ext_num_count)) != 0) {
-           if (!read_shorts(buf, ext_num_count))
+           if (!read_shorts(buf, ext_num_count)) {
                return (TGETENT_NO);
                return (TGETENT_NO);
+           }
            TR(TRACE_DATABASE, ("Before converting extended-numbers"));
            convert_shorts(buf, ptr->Numbers + NUMCOUNT, ext_num_count);
        }
 
        TR(TRACE_DATABASE, ("READ extended-offsets @%d", offset));
            TR(TRACE_DATABASE, ("Before converting extended-numbers"));
            convert_shorts(buf, ptr->Numbers + NUMCOUNT, ext_num_count);
        }
 
        TR(TRACE_DATABASE, ("READ extended-offsets @%d", offset));
-       if ((unsigned) (ext_str_count + (int) need) >= (MAX_ENTRY_SIZE / 2))
+       if ((unsigned) (ext_str_count + (int) need) >= (MAX_ENTRY_SIZE / 2)) {
            return (TGETENT_NO);
            return (TGETENT_NO);
+       }
        if ((ext_str_count || need)
        if ((ext_str_count || need)
-           && !read_shorts(buf, ext_str_count + (int) need))
+           && !read_shorts(buf, ext_str_count + (int) need)) {
            return (TGETENT_NO);
            return (TGETENT_NO);
+       }
 
        TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%d",
                            ext_str_limit, offset));
 
        if (ext_str_limit) {
            ptr->ext_str_table = typeMalloc(char, (size_t) ext_str_limit);
 
        TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%d",
                            ext_str_limit, offset));
 
        if (ext_str_limit) {
            ptr->ext_str_table = typeMalloc(char, (size_t) ext_str_limit);
-           if (ptr->ext_str_table == 0)
+           if (ptr->ext_str_table == 0) {
                return (TGETENT_NO);
                return (TGETENT_NO);
-           if (Read(ptr->ext_str_table, (unsigned) ext_str_limit) != ext_str_limit)
+           }
+           if (Read(ptr->ext_str_table, (unsigned) ext_str_limit) != ext_str_limit) {
                return (TGETENT_NO);
                return (TGETENT_NO);
+           }
            TR(TRACE_DATABASE, ("first extended-string is %s", _nc_visbuf(ptr->ext_str_table)));
        }
 
            TR(TRACE_DATABASE, ("first extended-string is %s", _nc_visbuf(ptr->ext_str_table)));
        }
 
@@ -349,10 +376,12 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
        }
 
        if (need) {
        }
 
        if (need) {
-           if (ext_str_count >= (MAX_ENTRY_SIZE / 2))
+           if (ext_str_count >= (MAX_ENTRY_SIZE / 2)) {
                return (TGETENT_NO);
                return (TGETENT_NO);
-           if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0)
-                 return (TGETENT_NO);
+           }
+           if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0) {
+               return (TGETENT_NO);
+           }
            TR(TRACE_DATABASE,
               ("ext_NAMES starting @%d in extended_strings, first = %s",
                base, _nc_visbuf(ptr->ext_str_table + base)));
            TR(TRACE_DATABASE,
               ("ext_NAMES starting @%d in extended_strings, first = %s",
                base, _nc_visbuf(ptr->ext_str_table + base)));
index a5ea208afb7ba225e44e6fb10dea4153024e4d24..132329cd2021e92dc600e925003e6fd2704be44b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140609) unstable; urgency=low
+ncurses6 (5.9-20140614) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 09 Jun 2014 17:55:13 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Jun 2014 05:12:57 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index a5ea208afb7ba225e44e6fb10dea4153024e4d24..132329cd2021e92dc600e925003e6fd2704be44b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140609) unstable; urgency=low
+ncurses6 (5.9-20140614) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 09 Jun 2014 17:55:13 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Jun 2014 05:12:57 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index e6e624ad697b0c1dbf64fb7066611a322ec6be4b..400e550c14d892436189dd249ae23b18d2495420 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140609) unstable; urgency=low
+ncurses6 (5.9-20140614) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 09 Jun 2014 17:55:13 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Jun 2014 05:12:57 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 640c13b4a40ba2c90760fd041b0843fc6eb485d8..1b5f25d515c641d05f3e744e78fdda017b8dbc6d 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.45 2014/06/09 21:55:13 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.46 2014/06/14 09:12:57 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\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_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "0609"\r
+!define VERSION_MMDD  "0614"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 1903d36607951333b9dc23890c3d44fff6b8350a..9a6550e228add2fd12a0a8c493bc0b8688ec0859 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20140609
+Release: 20140614
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 8a991c2ec3562f40a1bbbfe1312f8b93dc8d7807..aa319b2b1038435df1007846afeff3cf4c3580b3 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20140609
+Release: 20140614
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 2781bae760b13c3a219e99d43d0096655a09ef25..618419c847ce5300104f99b998de7d00a7376069 100644 (file)
@@ -48,7 +48,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.204 2014/05/24 15:47:40 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.207 2014/06/15 00:36:45 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
 
 #define STDIN_NAME "<stdin>"
 
@@ -1809,8 +1809,6 @@ parse_delay_value(const char *src, double *delays, int *always)
 static const char *
 parse_ti_delay(const char *ti, double *delays)
 {
 static const char *
 parse_ti_delay(const char *ti, double *delays)
 {
-    int star = 0;
-
     *delays = 0.0;
     while (*ti != '\0') {
        if (*ti == '\\') {
     *delays = 0.0;
     while (*ti != '\0') {
        if (*ti == '\\') {
@@ -1827,8 +1825,6 @@ parse_ti_delay(const char *ti, double *delays)
        } else {
            ++ti;
        }
        } else {
            ++ti;
        }
-       if (star)
-           *delays = -(*delays);
     }
     return ti;
 }
     }
     return ti;
 }
@@ -1902,13 +1898,13 @@ check_infotocap(TERMTYPE *tp, int i, char *value)
                  ? parametrized[i]
                  : 0);
     int to_char = 0;
                  ? parametrized[i]
                  : 0);
     int to_char = 0;
-    char *ti_value = _nc_tic_expand(value, TRUE, to_char);
-    char *tc_value = _nc_infotocap(name, ti_value, params);
+    char *ti_value;
+    char *tc_value;
     bool embedded;
 
     bool embedded;
 
-    if (ti_value == ABSENT_STRING) {
+    if ((ti_value = _nc_tic_expand(value, TRUE, to_char)) == ABSENT_STRING) {
        _nc_warning("tic-expansion of %s failed", name);
        _nc_warning("tic-expansion of %s failed", name);
-    } else if (tc_value == ABSENT_STRING) {
+    } else if ((tc_value = _nc_infotocap(name, ti_value, params)) == ABSENT_STRING) {
        _nc_warning("tic-conversion of %s failed", name);
     } else if (params > 0) {
        int limit = 5;
        _nc_warning("tic-conversion of %s failed", name);
     } else if (params > 0) {
        int limit = 5;