From 85201fb67296429954e5c0a7784ec2c21a900c1d Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Tue, 28 Jul 2009 23:10:32 +0000 Subject: [PATCH 1/1] ncurses 5.7 - patch 20090728 + correct logic in tigetnum(), which caused tput program to treat all string capabilities as numeric (report by Rajeev V Pillai, cf: 20090711). --- NEWS | 7 ++++++- dist.mk | 4 ++-- ncurses/tinfo/lib_ti.c | 12 +++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index c3da4581..8de8c2c8 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1410 2009/07/25 15:50:22 tom Exp $ +-- $Id: NEWS,v 1.1411 2009/07/28 22:22:43 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. +20090728 + + correct logic in tigetnum(), which caused tput program to treat all + string capabilities as numeric (report by Rajeev V Pillai, + cf: 20090711). + 20090725 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). diff --git a/dist.mk b/dist.mk index f5a7b069..2c5636db 100644 --- 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.710 2009/07/25 15:38:47 tom Exp $ +# $Id: dist.mk,v 1.711 2009/07/28 21:17:07 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 = 7 -NCURSES_PATCH = 20090725 +NCURSES_PATCH = 20090728 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c index 76001d2c..6c94772a 100644 --- a/ncurses/tinfo/lib_ti.c +++ b/ncurses/tinfo/lib_ti.c @@ -37,7 +37,7 @@ #include #include -MODULE_ID("$Id: lib_ti.c,v 1.26 2009/07/11 18:14:21 tom Exp $") +MODULE_ID("$Id: lib_ti.c,v 1.27 2009/07/28 22:03:36 tom Exp $") #if 0 static bool @@ -123,10 +123,12 @@ NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str) } } #endif - if (j >= 0 && VALID_NUMERIC(tp->Numbers[j])) - result = tp->Numbers[j]; - else - result = ABSENT_NUMERIC; + if (j >= 0) { + if (VALID_NUMERIC(tp->Numbers[j])) + result = tp->Numbers[j]; + else + result = ABSENT_NUMERIC; + } } returnCode(result); -- 2.44.0