summaryrefslogtreecommitdiff
path: root/Src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-0648389: getkeystring() should not return ptr to local varJun-ichi Takimoto1-8/+25
Now it returns NULL if called with GETKEY_SINGLE_CHAR and next character is not found. Caller must check the return value.
2021-04-0148202 + 48366: Fix handling of NUL bytes in zexpandtabs multibyte versionMikael Magnusson1-1/+4
2021-03-2347745: Fix [:IDENT:] vs posixidentifiersStephane Chazelas1-1/+1
wcsitype(c, IIDENT) should return false for non-ASCII characters when the POSIX_IDENTIFIERS option is on, not the other way round.
2020-05-3045915: fix handling of hyphens in spckword()Bart Schaefer1-5/+11
2020-05-0345730: _arguments: Add the -0 flag, which makes $opt_args be populated sanely.Daniel Shahaf1-1/+14
Also, write/extend docstrings for sepjoin() and zjoin().
2020-04-2045708: zsh/system: Enable sub-second timeout in zsystem flockCedric Ware1-0/+36
2020-03-2545583/0008: Extend tests to prove that what remains of xsymlinks() handles ↵Daniel Shahaf1-2/+0
symlink loops gracefully.
2020-03-2545583/0007: Remove code that is now unreachable.Daniel Shahaf1-17/+4
2020-03-2545583/0006: Don't use xsymlinks() in 'whence -s'.Daniel Shahaf1-4/+14
2020-03-2545583/0004: Fix segfault on resolving symlink loopsDaniel Shahaf1-3/+3
2020-03-2245563: %z can be used for zlong in warnings and errorsPeter Stephenson1-0/+9
2020-03-1745536: fix handling of 8bit character under C-localeJun-ichi Takimoto1-2/+2
correctly escape unprintable 8bit character by using \M-
2020-02-2445487: Missing mod_export declarations for AIXPeter Stephenson1-1/+1
2019-12-26unposted: zerrmsg(): Fix macro guard missed in previous commitdana1-2/+0
2019-12-26internal: Allow %L in zerrmsg() in non-debug builds, too.Daniel Shahaf1-2/+0
This will let error messages include long integers.
2019-12-1845064: Fix the mktemp() warning, in debug builds only.Daniel Shahaf1-0/+25
On Linux, linking to mktemp() generates the following warning: . utils.o: In function `gettempname': ./Src/utils.c:2229: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' The warning cannot be disabled. Work around that by using mkstemp() instead, and massage its output so it behaves like mktemp(). See the new comment for further details.
2019-08-2944714: Take account of CDABLE_VARS while checking spellingJun-ichi Takimoto1-0/+2
2019-05-2044307: allow for atoi() returning a negative numberOliver Kiddle1-1/+1
2018-12-30unposted (per 43938): Avoid segfault when unmetafying empty stringdana1-1/+1
2018-12-2943953: Fix rounding/truncation error in %. time-format specifierdana1-6/+15
Also fixes an issue where %. couldn't be used more than once in a format string without strange results Tweaked very slightly per workers/43954
2018-11-0943790: failed mailstat could leak memoryKamil Dudka1-3/+13
2018-10-14unposted: internals: Document sepjoin().Daniel Shahaf1-0/+8
2018-09-1643464: Another attachtty() fix.Peter Stephenson1-0/+4
If list_pipe_job triggered more than once we need to know the most recent process group leader, so record that both if the attach happened in the main shell on in entersubsh(). Also don't pass back proocess group for ESUB_ASYNC subshells.
2018-08-0143227: fix memory leaks in term{cap,info}.cJun-ichi Takimoto1-0/+37
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.