about summary refs log tree commit diff
path: root/Src/params.c
Commit message (Collapse)AuthorAgeFilesLines
* Finish merging arrcachelen() changes, I think.Barton E. Schaefer2017-05-301-9/+31
|
* Fix remaining IPDEF macros for addition of param.lengthBarton E. Schaefer2017-05-301-8/+23
|
* Merge branch 'mikachu/badarrays' into schaefer/badarraysBarton E. Schaefer2017-05-281-15/+67
|\
| * Add typeset -C to control whether to assert the cached length mikachu/badarraysMikael Magnusson2016-05-081-11/+18
| |
| * Add typeset -c to control when cached length is usedMikael Magnusson2016-05-081-35/+101
| |
| * Assert on problemsMikael Magnusson2016-05-081-2/+12
| |
| * UNREVIEWED: Further optimizationsDaniel Shahaf2016-05-081-12/+16
| |
| * CPU SPINNER AND OUT-OF-MEMORY BUGS - DO NOT USEDaniel Shahaf2016-05-081-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | % make -s check ./B08shift.ztst: starting. *** /tmp/zsh.ztst.out.20779 Sun Dec 13 16:15:26 2015 --- /tmp/zsh.ztst.tout.20779 Sun Dec 13 16:15:26 2015 *************** *** 1,4 **** ! tether mether pip azer sezar akker conter dick ! mether pip azer sezar akker conter dick ! mether pip azer sezar ! mether pip azer --- 1,4 ---- ! yan tan tether mether pip azer sezar akker conter dick ! yan tan tether mether pip azer sezar akker conter dick ! yan tan tether mether pip azer sezar akker conter dick ! yan tan tether mether pip azer sezar akker conter dick Test ./B08shift.ztst failed: output differs from expected as shown above for: array=(yan tan tether mether pip azer sezar akker conter dick) shift 2 array print $array shift array print $array shift -p 3 array print $array shift -p array print $array Error output: (eval):shift:2: shift count must be <= $# (eval):shift:4: shift count must be <= $# (eval):shift:6: shift count must be <= $# (eval):shift:8: shift count must be <= $# Was testing: shifting array ./B08shift.ztst: test failed. ./D04parameter.ztst: starting. *** /tmp/zsh.ztst.out.22016 Sun Dec 13 16:15:49 2015 --- /tmp/zsh.ztst.tout.22016 Sun Dec 13 16:15:49 2015 *************** *** 1,10 **** ! a 1 b 2 c 3 ! a 1 b 2 c 3 ! a 1 b 2 ! a 1 b 2 c 1 d 2 ! a a b ! 1 ! a a ! 1 ! b ! 2 2 --- 1,6 ---- ! ! a b c ! ! a b c d ! ! Test ./D04parameter.ztst failed: output differs from expected as shown above for: foo=(a b c) bar=(1 2 3) print ${foo:^bar} print ${foo:^^bar} foo=(a b c d) bar=(1 2) print ${foo:^bar} print ${foo:^^bar} foo=('a a' b) bar=(1 '2 2') print -l "${foo:^bar}" print -l "${(@)foo:^bar}" Was testing: Zipping arrays, correct output ./D04parameter.ztst: test failed. ./X02zlevi.ztst: starting. comptesteval:6: fatal error: out of heap memory ./X03zlebindkey.ztst: starting. comptesteval:6: fatal error: out of heap memory ./Y01completion.ztst: starting. comptesteval:6: fatal error: out of heap memory ./Y02compmatch.ztst: starting. comptesteval:6: fatal error: out of heap memory ./Y03arguments.ztst: starting. comptesteval:6: fatal error: out of heap memory ************************************** 41 successful test scripts, 7 failures, 0 skipped **************************************
| * UncontroversialDaniel Shahaf2016-05-081-1/+7
| | | | | | | | | | | | Changes from Mikael's bcf975a2ea3ebc6ba1ed8150b376bef45e527cda: - paramsubst: Change setting of 'ziplen'
* | 40990: Fix crash with bogus path in sh emaulation.Peter Stephenson2017-04-211-14/+37
| | | | | | | | | | | | When startying in sh emulation don't link PATH-style parameters to array equivalents. To allow this to function, don't check for the linkage when exporting the colon-separated parameter.
* | 40932: Parameter subscripts need to count parentheses.Peter Stephenson2017-04-031-3/+8
| | | | | | | | Otherwise they can terminate in the middle of an expression.
* | 40799: fix $- expansion partly broken by 40760Barton E. Schaefer2017-03-081-1/+3
| |
* | 40745 + 40753: Fix 'unset ZLE_RPROMPT_INDENT' not restoring the default ↵Daniel Shahaf2017-03-081-1/+19
| | | | | | | | | | | | | | | | | | | | behaviour. To reproduce: RPS1=foo ZLE_RPROMPT_INDENT=42 unset ZLE_RPROMPT_INDENT
* | 40781: optimize array assignment, similar to 39995 for string assignmentSebastian Gniazdowski2017-03-041-15/+48
| |
* | 40486: Don't warn on creation of MATCH etc. in regex.Peter Stephenson2017-02-021-5/+32
| | | | | | | | | | This because they are created implicitly rather than by explicit user request, so the warning may not be useful.
* | 40460: WARN_NESTED_VAR: Don't warn when assigning to a slice of an existing ↵Daniel Shahaf2017-02-011-6/+13
| | | | | | | | array
* | 40423: WARN_NESTED_VARS, conversion the other wayPeter Stephenson2017-01-261-8/+8
| |
* | 40422: More WARN_NESTED_VAR cases.Peter Stephenson2017-01-261-8/+9
| | | | | | | | | | Converting type when using a calling scope was broken in the original patch.
* | 40413: WARN_NESTED_VAR subscripted variable fix.Peter Stephenson2017-01-251-1/+5
| | | | | | | | | | No warning needed on paramter that's created temporarily to help assignment.
* | 40391: Add WARN_NESTED_VAR option and functions -W.Peter Stephenson2017-01-231-23/+43
| | | | | | | | | | These are companions to WARN_CREATED_GLOBAL, warning when a variable from an enclosing scope is altered.
* | 40270 (after 39995): Add cross-reference for robustness.Daniel Shahaf2017-01-051-0/+2
| |
* | 40231: Optimise setarrvalue().Sebastian Gniazdowski2016-12-281-16/+34
| |
* | 40068: Abort execution when setuid/setgid fail.Daniel Shahaf2016-12-031-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 %
* | 40067: internal: Document 'cmatcher', parse_cmatcher(), 'comptoend', ↵Daniel Shahaf2016-12-031-1/+17
| | | | | | | | unsetparam_pm(), and getindex().
* | 40032: consistency in handling of subscript slices outside the bounds of an ↵Barton E. Schaefer2016-11-291-2/+9
| | | | | | | | | | | | array parameter unposted: README: example describing 40032
* | 39900: Add TERMINFO_DIRS special like TERMINFO.Guillaume Maudoux2016-11-201-0/+31
| | | | | | | | Although this is a colon-separated array there is no tied array.
* | 39995 (from 39977): Optimise string parameter assignment.Peter Stephenson2016-11-201-8/+31
| | | | | | | | | | If setter is the standard one and string length is unchnaged we can copy into place.
* | 39992: setarrvalue: Allocate a correctly-sized array.Daniel Shahaf2016-11-201-2/+10
| | | | | | | | | | No memory was lost; the array was allocated with room for one (char *) element more than was required.
* | 39937: fix a problem introduced by 39886.Jun-ichi Takimoto2016-11-151-3/+4
| | | | | | | | $a[i,j] should become an empty array if i>j.
* | 39893: use arrdup_max() to show explicitly the difference in two code branchesBarton E. Schaefer2016-11-101-3/+2
| | | | | | | | no functional change
* | 39874/0001: setarrvalue: Remove needless initialization.Daniel Shahaf2016-11-111-2/+2
| |
* | 39887: no need to conditionalise assignment of strlen()Peter Stephenson2016-11-091-6/+2
| |
* | 39886 based on 39877: Optimise arrdup to arrdup_max.Peter Stephenson2016-11-091-7/+17
| | | | | | | | Only duplicate as much of the array as is needed.
* | 39875: add dupstring_glen to avoid redundant strlen callsSebastian Gniazdowski2016-11-091-2/+2
| |
* | 39871: cut down number of strlen()s in getstrvalue()Sebastian Gniazdowski2016-11-081-4/+13
| |
* | 39869: can transfer ownership of core of array when assigningSebastian Gniazdowski2016-11-081-3/+8
| |
* | 39758: revise 39704 for array and hash parameters; more POSIXBUITINS tweaks forBarton E. Schaefer2016-10-291-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).
* | "typeset -p" uses "export" commands or the "-g" option for parameters that ↵Barton E. Schaefer2016-10-241-5/+17
| | | | | | | | are not local to the current scope
* | 39545: Add some missing unqueue_signals().Peter Stephenson2016-10-031-0/+2
| | | | | | | | All of these are added simply to fit existing logic in other branches.
* | 39519: restore missing PM_EXPORT flags.Peter Stephenson2016-09-301-0/+1
| | | | | | | | This was missing when exporting using USE_SET_UNSET_ENV coce variant.
* | 39498: use PRIVILEGED option to decide on problematic parameter importsPeter Stephenson2016-09-301-3/+3
| |
* | unposted: change '\0' to NULL to silence spurious compile warning.Bart Schaefer2016-09-281-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';
* | 39460: Don't import PS4 if running as root.Peter Stephenson2016-09-281-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.
* | 39332: support ksh's [[ -v varname ]] condition for checking if variables ↵Oliver Kiddle2016-09-161-0/+30
| | | | | | | | are set
* | 39046 + 39061: New :P history modifier.Daniel Shahaf2016-08-221-1/+1
| |
* | 38971: Start using the new arrlen_ge() / arrlen_le() helpers.Daniel Shahaf2016-08-011-2/+2
| |
* | 38973: Optimize indexing array parameters.Daniel Shahaf2016-08-011-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
* | 38692: IFS can't be changed in restricted modePeter Stephenson2016-06-211-1/+1
| |
* | unposted (cf. 38612): remove overeager DPUTS()Barton E. Schaefer2016-06-041-1/+0
|/
* 38086: shuffle init code to localize a global, add $ZSH_ARGZERO, refine ↵Greg Klanderman2016-03-061-4/+2
| | | | | | $ZSH_SCRIPT (also a couple of ChangeLog typos corrected -- Bart)