summaryrefslogtreecommitdiff
path: root/Src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-1836227: attempt to fix metafication problem with ztrftime.Peter Stephenson1-3/+27
fmt is treated as metafied on entry; use returned length to ensure we metafy or output the correct length if there are embedded nulls.
2015-08-0835928: '%-m' should work even if not supported by strftime(3)Jun-ichi Takimoto1-1/+1
Also clarify document.
2015-07-2535809: fix $((...)) completion by _expand widget.Peter Stephenson1-1/+19
This changes internal quoting of the form still including tokens not to add unnecessary internal backslashes.
2015-07-2335872: protect against NULL pointers in unmetaPeter Stephenson1-1/+4
2015-07-2235826: add getsparam_u() to return unmetafied string, use it for a number of ↵Barton E. Schaefer1-3/+7
references to non-special params
2015-07-0935745: ztrftime: Pass everything unhandled to the system strftime()Mikael Magnusson1-25/+54
2015-06-12Add non-metafied character length handling.Peter Stephenson1-6/+83
Use this in regex module and add test using $'\ua0'. Rename mb_metacharinit() to mb_charinit() as it does not involve metafied characters.
2015-06-0535386: expand tabs where useful in builtins outputing function.Peter Stephenson1-4/+39
Also add to zed -f. Option is -x <numm>.
2015-06-0235353: print -x and print -X expand tabsPeter Stephenson1-0/+102
2015-05-1035067: Add (b) parameter flag for pattern char backslashing.Peter Stephenson1-4/+19
Doc tweak from Daniel in 35071. Includes test.
2015-05-0935064: rename ISPRINT to ZISPRINT to avoid conflictJun-ichi Takimoto1-2/+2
2015-03-0534636: replace broken isprint() on Mac OS XJun-ichi Takimoto1-2/+2
2015-02-2034587: ensure multibyte characters don't overflow.Peter Stephenson1-0/+8
They could start incorporating tokens, with bad karma. Add test.
2015-02-0934466: Fix double unmeta in rm verificationMikael Magnusson1-1/+1
2015-01-2634403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTYBarton E. Schaefer1-2/+2
2015-01-2534399: fix polltty thinko from 34365Barton E. Schaefer1-1/+1
Also add missing ChangeLog entry for 34365.
2015-01-2534365: History lockfile backoff: randomised time.Peter Stephenson1-4/+92
Time doubles on each lock failure. zsleep() provides microsecond resolution for sleep; uses nanosleep() if available, else select via means of existing tty poll function.
2015-01-2534369: document error and warning codesDaniel Shahaf1-1/+15
2015-01-2534383: ztrdup() should be dupstring() in new cd codePeter Stephenson1-1/+1
2015-01-2234331: better handling of NULL in cd.Peter Stephenson1-4/+7
Problem was return from symbolic link expander in weird cases where there file system isn't behaving itself properly.
2015-01-1834322: bug with interface to parsestr() etc.Peter Stephenson1-1/+1
Was showing up in places like ${(e)...} where command substitution could reallocate the token string, but actually there was never any guarantee that the lexer wouldn't do that, so this was always a bit iffy.
2015-01-0634138: wcs_nicechar: only deref widthp if it was givenMikael Magnusson1-1/+1
2015-01-0634108: Don't leak ifs stuffMikael Magnusson1-2/+2
Found by Coverity (Issue 1255785).
2015-01-0434092: fix miscount of symlink resolution for "..".Peter Stephenson1-0/+2
This caused problems with expanding a path with ".." in "whence -S".
2015-01-0434091: typo with "whence -s" expansionsPeter Stephenson1-2/+2
2015-01-02users/19667: whence -S shows intermediate steps in symlink expansionPeter Stephenson1-7/+60
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-4/+4
Combination of 12 commits from interrupt_abort branch. Basic strategy is to introduce bits to errflag and to set and reset them separately. Remove interrupt status on return to main keymap. Turn off ERRFLAG_INT for always block. Restore bit thereafter: we probably need a new variable in order to allow user interrupts to be reset in the always block. Add TRY_BLOCK_INTERRUPT This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too. Ensure propagation of SIGINT from exited job. If received by foreground job, shell uses ERRFLAG_INT, not ERRFLAG_ERROR, to set the new state. Reset errflag before precmd() Add always block in _main_completion to fix ZLS_COLORS Ensures we get the right state of $ZLS_COLORS at the end of _main_complete even if there's an interrupt. However, the "right state" is a bit messy as it depends on styles.
2014-12-0933932: revise boundary check in unmeta()Jun-ichi Takimoto1-5/+3
2014-12-0733894: boundary conditions in unmeta(), unmetafy()Barton E. Schaefer1-3/+5
Check that we aren't running off the end of the string when converting the next byte after a Meta byte. This is just defensive programming in case of bad metafied strings coming through from gettokstr(), some repairs there are likely still needed.
2014-11-3033818: fix types passed to sizeof detected by coverity as being wrongOliver Kiddle1-3/+3
2014-11-2633793: add 0b binary interpretation to integer constantsPeter Stephenson1-0/+2
2014-11-13Marc Finet: problems with working directory rationalisation.Peter Stephenson1-1/+5
Ensure the length of the directory is kept up to date. Abort following symlinks as soon as there's an error.
2014-10-0233320 (cf. PWS 33311): revert 33069, fix lexing of bangchar during completionBarton E. Schaefer1-7/+37
add typtab_flags bits (replaces specialcomma boolean) to record any unusual handling of typtab entries; signal safety; make bangchar non-special during completion lexing of the command line.
2014-08-17Increase size of xbuf2 in xsymlinks to make gcc FORTIFY_SOURCE=2 happy.Barton E. Schaefer1-1/+1
2014-08-1533012: add an error return value (-1) to xsymlinks()Barton E. Schaefer1-7/+8
2014-08-0132932: add hmkarray() and use to fix leakPeter Stephenson1-0/+11
2014-07-3032918: add %. to ztrftime for use in promptsPeter Stephenson1-1/+27
2014-06-0732737, 32736 (32741), 32735, 32734, 32733, 32732 (32739): Strict compilationNikolas Garofil1-3/+5
fixes Src/utils.c: properly ifdef declarations Src/zsh_system.h: memmove() should return its dest argument Src/signals.c: define ret before use Src/mem.c: remove unused pointers Src/prototypes.h: use size_t in bcopy() Src/compat.c: fix const declaration inconsistency
2014-06-0532716: properly test iconv return values for error conditionsBarton E. Schaefer1-4/+3
2014-06-0236526: when __APPLE__ is defined at compile, normalize Unicode filenames in ↵Barton E. Schaefer1-0/+31
zreaddir()
2014-04-2932592: add CORRECT_IGNORE_FILE variableTomoki Sekiyama1-1/+10
2014-01-1932294: prevent buffer overflow when scanning very long directory paths for ↵Barton E. Schaefer1-13/+18
symbolic links
2013-11-2732061: Fix "use of uninitialized memory" in metafyBarton E. Schaefer1-2/+2
2013-11-1932023: better interrupt handling at RM_STAR_WAITBarton E. Schaefer1-0/+2
2013-08-1131650: use zlong for mailcheck parameters to ensure rangePeter Stephenson1-4/+4
2013-08-1031648: fix timing errors in mailcheckjoe M1-3/+6
2013-04-3031350: block SIGWINCH nearly all the time, exceptBart Schaefer1-0/+7
when about to calculate prompts or do synchronous read, so syscalls are not interrupted by window size changes.
2012-12-16add missing mod_exportPeter Stephenson1-1/+1
2012-09-1130647, 30649: allow underscores in numeric constantsPeter Stephenson1-9/+19
2012-06-2730530,30533: fix problems with COLUMNS or LINES < 1, and related issuesBart Schaefer1-1/+1