summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2002-03-24 23:52:49 +0000
committerWayne Davison <wayned@users.sourceforge.net>2002-03-24 23:52:49 +0000
commitc5015e19de0a08d7e11a5b74c1c2f075c2426e0d (patch)
treedfad682dd8d09512eec6d09b32c11b8759c11b26
parentcbc7abb006e55a42f65489332b650b24e2ee7d4b (diff)
downloadzsh-c5015e19de0a08d7e11a5b74c1c2f075c2426e0d.tar.gz
zsh-c5015e19de0a08d7e11a5b74c1c2f075c2426e0d.tar.xz
zsh-c5015e19de0a08d7e11a5b74c1c2f075c2426e0d.zip
Made SAVEHIST a special parameter.
-rw-r--r--Src/params.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Src/params.c b/Src/params.c
index fa475fdbc..2e8351af7 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -140,6 +140,7 @@ IPDEF1("GID", gidgetfn, gidsetfn, PM_DONTIMPORT | PM_RESTRICTED),
 IPDEF1("EGID", egidgetfn, egidsetfn, PM_DONTIMPORT | PM_RESTRICTED),
 IPDEF1("HISTSIZE", histsizegetfn, histsizesetfn, PM_RESTRICTED),
 IPDEF1("RANDOM", randomgetfn, randomsetfn, 0),
+IPDEF1("SAVEHIST", savehistsizegetfn, savehistsizesetfn, PM_RESTRICTED),
 IPDEF1("SECONDS", secondsgetfn, secondssetfn, 0),
 IPDEF1("UID", uidgetfn, uidsetfn, PM_DONTIMPORT | PM_RESTRICTED),
 IPDEF1("EUID", euidgetfn, euidsetfn, PM_DONTIMPORT | PM_RESTRICTED),
@@ -2915,6 +2916,25 @@ histsizesetfn(Param pm, zlong v)
     resizehistents();
 }
 
+/* Function to get value for special parameter `SAVEHIST' */
+
+/**/
+zlong
+savehistsizegetfn(Param pm)
+{
+    return savehistsiz;
+}
+
+/* Function to set value of special parameter `SAVEHIST' */
+
+/**/
+void
+savehistsizesetfn(Param pm, zlong v)
+{
+    if ((savehistsiz = v) < 0)
+	savehistsiz = 0;
+}
+
 /* Function to get value for special parameter `ERRNO' */
 
 /**/