summaryrefslogtreecommitdiff
path: root/Src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2025-01-27github #126: Fix some typosWu, Zhenyu1-1/+1
2024-12-2653257: use monotonic clock where appropriatedana1-5/+20
update the following features to use the monotonic clock for calculating time deltas and intervals: * MAILCHECK parameter * PERIOD parameter * SECONDS parameter * %(nS.t.f) prompt-expansion sequence * time built-in's elapsed time and cpu % values * zsh/zftp ZFTP_TMOUT parameter * zsh/zprof timings also use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC on macOS
2024-03-1852750: remove ansi2knr support for old pre-ansi K&R compilersOliver Kiddle1-1/+6
2024-03-0252612: %l replacment of zwarning() does literal string outputBart Schaefer1-10/+12
2024-01-2852509: manage internals of stdio objects when performing redirections.Bart Schaefer1-0/+22
2024-01-2452468: save and restore state of correct TTY when using read -s / -dBart Schaefer1-0/+14
2023-10-2652244: Fix a batch of minor defects reported by Coverity.Bart Schaefer1-2/+2
Coverity defects 1547831, 1547826 (remove unused function), 1521551, 1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789, 1255787, 1255782, 1255750
2023-10-0152193: handle UTF8-encoded USERNAME and therefore home directory in zcompileBart Schaefer1-1/+1
Includes one unposted thinko fix ztrdup -> dupstring
2023-09-2752169: a few more improvements of (#) flagJun-ichi Takimoto1-116/+114
fix (#X) in C locale in FreeBSD, DragonFly, NetBSD. Negative values such as ${(#X):--1} are now error. UCS4 is limited to < 0x8000_0000 (in OSes without __STDC_ISO_10646__).
2023-08-2752053: whitelist capability CAP_WAKE_ALARMRobert Woods1-3/+3
Since the systemd update v254 from July 28, 2023, the capability 'CAP_WAKE_ALARM' is passed by default to some user process (especially desktop managers). Since 'CAP_WAKE_ALARM' is very narrow in focus, it is preferable that zsh does not consider it as a 'privileged' capability.
2023-06-2651884: reset IFS if it contains invalid charactersJun-ichi Takimoto1-16/+26
This happens only if MULTIBYTE option is on.
2023-05-2151769: fix compilation when HAVE_GETRUSAGE is not definedOliver Kiddle1-0/+2
Also silence compiler warning when HAVE_SETUPTERM is not defined.
2023-03-0651510: Skip namespaces in "set"/"typeset" output, add tests, fix bugBart Schaefer1-4/+4
2023-03-0551485: module for several ksh93 features, mostly enabled only in ksh emulation.Bart Schaefer1-1/+1
2023-03-0551483: Enable assignment and expansion of parameters with ksh-like namespace ↵Bart Schaefer1-2/+16
prefixes.
2023-01-1051258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle1-3/+4
in zattr
2022-12-1651212: remove STOUC() macroOliver Kiddle1-34/+34
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-09-2750668: treat 8bit chars correctly when multibyte is unsetJun-ichi Takimoto1-1/+1
The problem was found in character range, but may have existed in other occasions
2022-04-0549989: Single byte versions of nice quoting.Peter Stephenson1-34/+137
Align interfaces for "nice" printing of characters with those for multibyte to make more available in single-byte compilation.
2022-04-0449992: further unify single- and multi-byte implementations of nicechar()Bart Schaefer1-62/+0
2022-04-0449991: single-byte brace expansion handles $'\0' and control character ↵Bart Schaefer1-3/+8
output aligns with multibyte
2021-11-2849606: remove old NIS-specific code for retrieving user dataOliver Kiddle1-1/+1
2021-11-0249534, 49539: separate watch/log functionality out into a moduleOliver Kiddle1-16/+0
2021-10-3049533: add null check for preprompt functions list that could occur ↵Oliver Kiddle1-0/+3
following an error when loading a module
2021-09-2249422: improve support of --disable-dynamic-nssJun-ichi Takimoto1-5/+5
see also 49392 (Vincent) and 49412 (Axel)
2021-09-0649282: set $0 correctly when calling functions from hooksBart Schaefer1-2/+12
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