about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-04-22 14:46:59 +0000
committerClint Adams <clint@users.sourceforge.net>2001-04-22 14:46:59 +0000
commit961564dddade3a3877e8039e8f87b18ae664ce61 (patch)
tree18ad295e6412a6495f3014686cd6ba4e57e78909
parent6bf2ff17175946b9c038f041f8828bceb59565aa (diff)
downloadzsh-961564dddade3a3877e8039e8f87b18ae664ce61.tar.gz
zsh-961564dddade3a3877e8039e8f87b18ae664ce61.tar.xz
zsh-961564dddade3a3877e8039e8f87b18ae664ce61.zip
14065: decrease termcap/terminfo parameter fishiness
-rw-r--r--ChangeLog6
-rw-r--r--Src/Modules/termcap.c4
-rw-r--r--Src/Modules/terminfo.c4
-rw-r--r--Src/params.c2
4 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f9d01ef5b..b14b6ef1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-22  Clint Adams  <schizo@debian.org>
+
+	* 14065: Src/params.c, Src/Modules/termcap.c,
+	Src/Modules/terminfo.c: handle numeric capabilities
+	properly within the termcap/terminfo parameters.
+
 2001-04-21  Bart Schaefer  <schaefer@zsh.org>
 
 	* 14062: Src/Modules/termcap.c: Avoid including both old-style
diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c
index fbaf887c1..1b4107248 100644
--- a/Src/Modules/termcap.c
+++ b/Src/Modules/termcap.c
@@ -208,6 +208,8 @@ gettermcap(HashTable ht, char *name)
     pm->flags = PM_READONLY;
     pm->sets.cfn = NULL;
     pm->gets.cfn = strgetfn;
+    pm->sets.ifn = NULL;
+    pm->gets.ifn = intgetfn;
     pm->unsetfn = NULL;
     pm->ct = 0;
     pm->env = NULL;
@@ -305,6 +307,8 @@ scantermcap(HashTable ht, ScanFunc func, int flags)
     pm = (Param) zhalloc(sizeof(struct param));
     pm->sets.cfn = NULL;
     pm->gets.cfn = strgetfn;
+    pm->sets.ifn = NULL;
+    pm->gets.ifn = intgetfn;
     pm->unsetfn = NULL;
     pm->ct = 0;
     pm->env = NULL;
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index 0bd318fc6..3e70bf279 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -181,6 +181,8 @@ getterminfo(HashTable ht, char *name)
     pm->flags = PM_READONLY;
     pm->sets.cfn = NULL;
     pm->gets.cfn = strgetfn;
+    pm->sets.ifn = NULL;
+    pm->gets.ifn = intgetfn;
     pm->unsetfn = NULL;
     pm->ct = 0;
     pm->env = NULL;
@@ -291,6 +293,8 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
     pm = (Param) zhalloc(sizeof(struct param));
     pm->sets.cfn = NULL;
     pm->gets.cfn = strgetfn;
+    pm->sets.ifn = NULL;
+    pm->gets.ifn = intgetfn;
     pm->unsetfn = NULL;
     pm->ct = 0;
     pm->env = NULL;
diff --git a/Src/params.c b/Src/params.c
index 48b514008..f2fac0546 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2153,7 +2153,7 @@ stdunsetfn(Param pm, int exp)
 /* Function to get value of an integer parameter */
 
 /**/
-static zlong
+mod_export zlong
 intgetfn(Param pm)
 {
     return pm->u.val;