summaryrefslogtreecommitdiff
path: root/Src/params.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-0340068: Abort execution when setuid/setgid fail.Daniel Shahaf1-4/+4
The incumbent code would print an error message and continue execution with the previous uid/gid values, not even setting lastval: % UID=42 id -u; echo $? zsh: failed to change user ID: operation not permitted 1000 0 %
2016-12-0340067: internal: Document 'cmatcher', parse_cmatcher(), 'comptoend', ↵Daniel Shahaf1-1/+17
unsetparam_pm(), and getindex().
2016-11-2940032: consistency in handling of subscript slices outside the bounds of an ↵Barton E. Schaefer1-2/+9
array parameter unposted: README: example describing 40032
2016-11-2039900: Add TERMINFO_DIRS special like TERMINFO.Guillaume Maudoux1-0/+31
Although this is a colon-separated array there is no tied array.
2016-11-2039995 (from 39977): Optimise string parameter assignment.Peter Stephenson1-8/+31
If setter is the standard one and string length is unchnaged we can copy into place.
2016-11-2039992: setarrvalue: Allocate a correctly-sized array.Daniel Shahaf1-2/+10
No memory was lost; the array was allocated with room for one (char *) element more than was required.
2016-11-1539937: fix a problem introduced by 39886.Jun-ichi Takimoto1-3/+4
$a[i,j] should become an empty array if i>j.
2016-11-1039893: use arrdup_max() to show explicitly the difference in two code branchesBarton E. Schaefer1-3/+2
no functional change
2016-11-1139874/0001: setarrvalue: Remove needless initialization.Daniel Shahaf1-2/+2
2016-11-0939887: no need to conditionalise assignment of strlen()Peter Stephenson1-6/+2
2016-11-0939886 based on 39877: Optimise arrdup to arrdup_max.Peter Stephenson1-7/+17
Only duplicate as much of the array as is needed.
2016-11-0939875: add dupstring_glen to avoid redundant strlen callsSebastian Gniazdowski1-2/+2
2016-11-0839871: cut down number of strlen()s in getstrvalue()Sebastian Gniazdowski1-4/+13
2016-11-0839869: can transfer ownership of core of array when assigningSebastian Gniazdowski1-3/+8
2016-10-2939758: revise 39704 for array and hash parameters; more POSIXBUITINS tweaks forBarton E. Schaefer1-8/+8
export 39704 was commit 0f5e670, forgot to reference article number in that log. "typeset -p" outputs "typeset" for array and hash parameters, even when exported, because those types can be marked export but are never pushed to the enviroment. For POSIXBUILTINS, "export var" does not implicitly set $var, and its export state is preserved when assigned (but not when explicitly unset).
2016-10-24"typeset -p" uses "export" commands or the "-g" option for parameters that ↵Barton E. Schaefer1-5/+17
are not local to the current scope
2016-10-0339545: Add some missing unqueue_signals().Peter Stephenson1-0/+2
All of these are added simply to fit existing logic in other branches.
2016-09-3039519: restore missing PM_EXPORT flags.Peter Stephenson1-0/+1
This was missing when exporting using USE_SET_UNSET_ENV coce variant.
2016-09-3039498: use PRIVILEGED option to decide on problematic parameter importsPeter Stephenson1-3/+3
2016-09-28unposted: change '\0' to NULL to silence spurious compile warning.Bart Schaefer1-1/+1
params.c:830:13: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion] *envp = '\0';
2016-09-2839460: Don't import PS4 if running as root.Peter Stephenson1-3/+30
There was an exploit in bash using SHELLOPTS to turn on xtrace, however this can't happen in zsh, so this is simply a precaution.
2016-09-1639332: support ksh's [[ -v varname ]] condition for checking if variables ↵Oliver Kiddle1-0/+30
are set
2016-08-2239046 + 39061: New :P history modifier.Daniel Shahaf1-1/+1
2016-08-0138971: Start using the new arrlen_ge() / arrlen_le() helpers.Daniel Shahaf1-2/+2
2016-08-0138973: Optimize indexing array parameters.Daniel Shahaf1-1/+1
% () { for 1 in $prefix/zsh/bin/zsh Src/zsh; do $1 -f -c 'a=( {1..1000000} ); repeat 3 time ( repeat 300 : $a[1] )'; done } ( repeat 300; do; : $a[1]; done; ) 1.68s user 0.01s system 98% cpu 1.718 total ( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.710 total ( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.714 total ( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total ( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total ( repeat 300; do; : $a[1]; done; ) 0.01s user 0.01s system 69% cpu 0.023 total
2016-06-2138692: IFS can't be changed in restricted modePeter Stephenson1-1/+1
2016-06-04unposted (cf. 38612): remove overeager DPUTS()Barton E. Schaefer1-1/+0
2016-03-0638086: shuffle init code to localize a global, add $ZSH_ARGZERO, refine ↵Greg Klanderman1-4/+2
$ZSH_SCRIPT (also a couple of ChangeLog typos corrected -- Bart)
2016-02-2638020: fix problems with $SECONDS.Stephane Chazelas1-3/+3
Fractions of a second were not handled correctly.
2016-02-1737988: $0 becomes read-only under POSIXARGZEROBarton E. Schaefer1-1/+3
2016-02-0737895: $ZSH_SCRIPT is POSIX $0 but always availblePeter Stephenson1-0/+1
2016-02-0337868: add 'static' to file local variablesJun-ichi Takimoto1-1/+1
2016-01-2637785: skip autoload parameters for "typeset -p"Barton E. Schaefer1-1/+2
2016-01-1537512: overeager WARN_CREATE_GLOBAL with strftimePeter Stephenson1-14/+2
2016-01-0337489, tweaked: with POSIX_IDENTIFIERS create math var as scalarPeter Stephenson1-0/+1
2015-12-0437305: typeset -p can now output arrays on one linePeter Stephenson1-26/+0
2015-12-0437202: suppress WARN_CREATE_GLOBAL warnings after a forkPeter Stephenson1-5/+6
2015-12-0337253: Constify two local variables.Daniel Shahaf1-4/+6
2015-11-3037254: No functional change: change code layout in preparation for 37253.Daniel Shahaf1-6/+6
2015-11-3037250: No functional change: rename local variables.Daniel Shahaf1-10/+13
2015-11-2337208: check for restricted parameter before changing from unset to setBarton E. Schaefer1-8/+22
Also, return NULL from setnparam() on failure to retrieve value (avoids null-pointer dereference); add some expository comments
2015-11-2337203: WARN_CREATE_GLOBAL test in wrong place for associative arrayPeter Stephenson1-2/+4
2015-11-2037168: No WARN_CREATE_GLOBAL on special parametersPeter Stephenson1-1/+1
2015-11-0837080: use paramtab abstraction more consistently, add explanatory commentsBarton E. Schaefer1-2/+4
2015-10-30unposted (after 37018): Fix typo in error message.Daniel Shahaf1-1/+1
2015-10-2937018: Make WARNCREATEGLOBAL more consistent.Peter Stephenson1-13/+39
Wd don't need separate math handling any more, and can make it output the function name in all cases.
2015-10-2937014: Improved internal parameter setting.Peter Stephenson1-2/+51
Enhance WARNCREATEGLOBAL to work in many more cases. Don't create REPLY as an integer if it didn't previously exist as one, even if the value to be set is integral, as this is likely to mess up later uses of REPLY.
2015-10-0636780: Fix crash in ksh mode with -n and $HOME.Peter Stephenson1-6/+7
If home variable is NULL ensure HOME is unset.
2015-09-0136347: Fix appending empty array to associationsMikael Magnusson1-3/+6
2015-07-2235826: add getsparam_u() to return unmetafied string, use it for a number of ↵Barton E. Schaefer1-7/+16
references to non-special params