mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-11 20:31:11 +01:00
Made SAVEHIST a special parameter.
This commit is contained in:
parent
cbc7abb006
commit
c5015e19de
1 changed files with 20 additions and 0 deletions
20
Src/params.c
20
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' */
|
||||
|
||||
/**/
|
||||
|
|
Loading…
Reference in a new issue