summaryrefslogtreecommitdiff
path: root/Src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-2043075: Support nanosecond-precision time formattingdana1-8/+14
* Teach ztrftime() %9. and %N for nanoseconds * Update prompt expansion to pass sub-second times for time formatting * Update zsh/stat to pass sub-second times for atime/mtime/ctime Patch heavily based on Oliver's earlier work @ workers/24059
2018-04-1542650: fix 42156 for zero-sized terminalsBarton E. Schaefer1-5/+7
Also fix harmless no-op typo from hand-applying 42636 for previous commit.
2018-04-1542636: fix GLOB_DOTS for !(RM_STAR_SILENT)Barton E. Schaefer1-4/+5
Also fix paste-o in older log entry
2018-04-0742607, CVE-2018-1100: check bounds on buffer in mail checkingOliver Kiddle1-3/+5
2018-04-0742595: remove dead code flagged by coverityOliver Kiddle1-3/+1
2018-03-3042560: silence sign-compare compiler warningsOliver Kiddle1-3/+3
2018-03-2842539: prevent overflow of PATH_MAX-sized buffer in spelling correctionOliver Kiddle1-5/+9
2018-03-2742538: Temporarily set umask for here document.Martijn Dekker1-0/+4
Done while signals are queued.
2018-03-2542480: optimize $#var for single-byte character setsBarton E. Schaefer1-1/+1
2018-03-2442518, CVE-2018-1071: check bounds when copying path in hashcmd()Oliver Kiddle1-3/+3
2018-01-3142332: Special case unsigned printf formats.Peter Stephenson1-0/+61
For constants we can avoid a conversion to signed by examining the expression before passing to math eval.
2017-12-2242156: new CHECK_RUNNING_JOBS option demanded by bash groupiesPeter Stephenson1-2/+2
Also new job options. Also suppress debug error if rows or columns are reported as zero as this is normal without a physical terminal.
2017-09-21unposted (cf. 41672): checkrmall: Record the 41672 bug in a TODO.Daniel Shahaf1-0/+3
2017-09-21unposted (cf. 41707): internal: Document the count==0 case of checkrmall().Daniel Shahaf1-1/+3
2017-09-11unposted: internal: Document zreaddir().Daniel Shahaf1-0/+10
2017-08-08Revert "41499 (with one further tweak): POSIX_STRINGS behaviour."Peter Stephenson1-18/+2
This reverts commit 2eacbef91913fe967335812900d43cf2edfa54d9. Conflicts: ChangeLog
2017-08-0741499 (with one further tweak): POSIX_STRINGS behaviour.Peter Stephenson1-2/+18
Ignore a terminating delimiter when splitting as separators despite being called separators are terminators.
2017-08-0341484: Make ${(q+)...} quote backsleshes.Martijn Dekker1-1/+5
2017-07-0222760: fix partial string length reports with NO_MULTIBYTEPeter Stephenson1-1/+1
2017-05-1241090: Replace iswprint() if unicode9 is enabled.Jun-ichi Takimoto1-2/+2
If wcwidth() or iswprint() is broken, force enable unicode9.
2017-05-0940181: Fix buffer overrun in xsymlinks.Peter Stephenson1-3/+11
There was no check for copying to the internal xbuf2 for a preliminary test.
2017-04-2340994: unmeta_one() need not count MetaJun-ichi Takimoto1-8/+1
2017-04-1040935: User names need metafying.Orlov Sergey1-3/+3
On some systems they can contain 8-bit characters and on all systems this is logically correct anyway.
2017-03-0840763: count wide characters and Cmatcher pointers more sanely in ↵Barton E. Schaefer1-0/+42
cfp_matcher_pats(), and count characters in pattern_match() the same way to stay in sync Might not fix wide-char matching in completion matcher-lists but should avoid wild pointer crash
2017-03-0740760: Always tokenize unquoted - to Dash.Peter Stephenson1-3/+7
This fixes use of pattern match character ranges in unusual contexts. Attempt to detect a tokenized - in cases where we don't care.
2016-11-2439982: $SPROMPT: Don't accept a spelling correction at space/tab.Daniel Shahaf1-4/+4
The patch also downscopes a couple of local variables, with no functional change.
2016-11-1739958: Add extra byte to PATH_MAX allocations.Peter Stephenson1-6/+6
This ensures we've got enough space for a null, although this isn't always needed.
2016-11-1539943: no need to compute arrlen() in arrdup_max() when max == 0.Barton E. Schaefer1-2/+3
2016-11-1539949: Special case for "-" in directory names.Peter Stephenson1-31/+39
It can be sh-tokenized to Dash to allow for appearing in ranges after substitution, so needs to be turned back to "-" in that case.
2016-11-1439906: More multibyte optimisations for US-ASCII.Peter Stephenson1-3/+23
This treats characters 0 to 0x7f as single byte US-ASCII along the lines we already do in other places in the code.
2016-11-0939886 based on 39877: Optimise arrdup to arrdup_max.Peter Stephenson1-0/+25
Only duplicate as much of the array as is needed.
2016-11-08unposted: follow up to 39867: don't need test against zeroPeter Stephenson1-1/+1
2016-11-0839867, tweaked: Use cast to unsigned char to test character.Peter Stephenson1-1/+1
We want the unsigned variant to be <= 0x7f. Use the normal STOUC() macro and turn this into a single test.
2016-11-0439825: optimise mb_metastrlenend() for 7-bit character.Peter Stephenson1-1/+16
As the shell relies intimately on US-ASCII as a subset we can skip the multibyte functions if we are dealing with a complete 7-bit character.
2016-09-2939470: failure to open a supposedly unique temp file name should result in ↵Barton E. Schaefer1-0/+4
an error Also band-aid for signal-related race conditions in temp file name generation
2016-09-1139252: internal: quotestring: Drop the 'e' parameter, which no caller uses.Daniel Shahaf1-23/+4
2016-08-2339087: fix 'conditionally uninitialized' variablesJun-ichi Takimoto1-1/+3
2016-08-2239046 + 39061: New :P history modifier.Daniel Shahaf1-6/+8
2016-08-0138971: Start using the new arrlen_ge() / arrlen_le() helpers.Daniel Shahaf1-1/+1
2016-08-0138973: Optimize indexing array parameters.Daniel Shahaf1-0/+40
% () { 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-0221603: Make read_poll more interruptible.Peter Stephenson1-1/+1
If we interrupted the first read we still did the fallback read. This is wrong.
2016-02-1137946: make rm * warnings more informative.Peter Stephenson1-4/+27
Now count files that would be deleted up to 100.
2016-02-0337868: add 'static' to file local variablesJun-ichi Takimoto1-2/+2
2016-01-2537780: Care printing error if nothing to print.Kamil Dudka1-3/+4
2016-01-2537776: Set errflag before calls to zwarning().Peter Stephenson1-2/+2
This avoids an attempt to call zerr() or zerrnam() recusrively.
2016-01-1937678: Now possible to quote "-" in pattern rangePeter Stephenson1-1/+1
2016-01-15unposted: Extend docstring of callhookfunc().Daniel Shahaf1-0/+3
2015-12-0837348: Tests and fix for ${(q+)...}.Peter Stephenson1-1/+1
Needs dupstring() for empty string case.
2015-12-0737344: restore old printable quoting, add ${(q+)...}.Peter Stephenson1-46/+218
The \C- form is only used inside quotedzputs(). ${(q+)...} outputs a quotedzputs() representation.
2015-12-0737331: Use a single chracter to represent an MB_INCOMPLETE.Peter Stephenson1-6/+10
This is as it is likely to appear as a single character in output even if it has multiple octets.