Commit Graph

97 Commits (master)

Author SHA1 Message Date
Bart Schaefer ce8909b494 unposted: Record as comments some notes about namespace usage exceptions. 4 months ago
Peter Stephenson aa8e4a0290 52008: Pattern bug with branches + exclusion
Add tests.
10 months ago
Oliver Kiddle a73c705b0c 51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
1 year ago
Jun-ichi Takimoto 09ad15b986 50081: reset global mbstate_t variables when LC_CTYPE changes 2 years ago
Bart Schaefer 408a830483 47913: implement CASE_PATHS option to make NO_CASE_GLOB more sensible 3 years ago
Felipe Contreras 94b5446838 47784: silence a compiler waring from pattern.c 3 years ago
Jens Schleusener 11dbe4c286 45269: Fix misspellings in completions and elsewhere. 4 years ago
Martijn Dekker c578f0a08b 45004: Fix typos in comments 5 years ago
Peter Stephenson 4b85edface 44361: Initialise variables in pattern matching.
These are used recursively and it's a bit obscure if there
are case where the value can leak.
5 years ago
Stephane Chazelas 5ac1c6f555 42790: make [[:blank:]] match non-ASCII blanks 6 years ago
Jun-ichi Takimoto 171e7fa4c1 41090: Replace iswprint() if unicode9 is enabled.
If wcwidth() or iswprint() is broken, force enable unicode9.
7 years ago
Peter Stephenson f3f8537cfa 40760: Always tokenize unquoted - to Dash.
This fixes use of pattern match character ranges in unusual contexts.

Attempt to detect a tokenized - in cases where we don't care.
7 years ago
Peter Stephenson e90a512aa6 40265: Fix problems with pure string in patterns with Meta.
Copy instead of relying on jiggery pokery with memory reallocation.

Problem was triggering with string ending with Dash converted to -.
7 years ago
Peter Stephenson 11343d89ef 39688: Skip out of P_EXACTLY pattern loop if P_PURES.
If it's really a pure string, there's only one exact match.  We could
overwrite the next pointer; usually this didn't matter because
we'd hit a termination, but if we reallocated we might be looking
at garbage.
8 years ago
Peter Stephenson d2c9f85f59 39683: Update scan pointers after possible alloc.
Problem could cause next scan index to point into an invalid block
when handling meta characters.
8 years ago
Barton E. Schaefer 09e991a20a 38188: signal re-entrancy, maybe
Crams several globals into a struct so they can be saved/restored as one,
and then tries pushing the signal queue management down into patmatch()
from pattryrefs().
8 years ago
Barton E. Schaefer ef6f1eb1c5 38142: signal re-entrancy, maybe 8 years ago
Peter Stephenson ad16356e19 37689: ! and ^ need to be tokenised in character sets 8 years ago
Peter Stephenson 8eb9070d67 37678: Now possible to quote "-" in pattern range 8 years ago
Peter Stephenson b498bd7ce5 36982: Fix bug with (#cN) patterns and remove redundant description.
We need to restore the current count of matches when returning to
match at the point where we previously matched.
9 years ago
Peter Stephenson faeb9555d3 36760: more care with already unmetafied pattern trial strings 9 years ago
Peter Stephenson 807a8338a3 36737: Ensure we don't dreference unterminated zero-length string 9 years ago
Peter Stephenson 5336587307 36711: Allocate unmetafied pattern trial string on the heap 9 years ago
Peter Stephenson d07783628e 36700: unmetafy early for parameter match 9 years ago
Peter Stephenson f9d7651c25 36682: expand pattern interface to optimise unmetafication 9 years ago
Peter Stephenson df0d86b847 36559: test earlier for overflow in pattern range 9 years ago
Peter Stephenson e86b3cce47 36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests. 9 years ago
Peter Stephenson 938c4c1e4a 36421: fix breakage in pattern change in 36415 9 years ago
Peter Stephenson f52795ea3e 36415: remap bytes from invalid multibyte characters.
These now go to 0xdc00 + index.  If wchar_t is a Unicode code point,
this is by construction an invalid character within the Unicode range.
If it isn't, we would hope the result was no worse than the current
fudge.
9 years ago
Barton E. Schaefer df5f825538 36033: a few more queue_signals() to protect global state changes 9 years ago
Han Pingtian 77130df674 35514: [[:foo:]] tests in completion should be more specific 9 years ago
Peter Stephenson 2abba7243a 35386: expand tabs where useful in builtins outputing function.
Also add to zed -f.

Option is -x <numm>.
9 years ago
Peter Stephenson e86720190e 35131: allow "[]" to match empty character set.
This only works if there's no further "]" in the pattern,
since if there is the first "]" has to match a literal character.
9 years ago
Jun-ichi Takimoto a6db0b41ca 35064: rename ISPRINT to ZISPRINT to avoid conflict 9 years ago
Jun-ichi Takimoto 4bc554bb8b 34636: replace broken isprint() on Mac OS X 9 years ago
Peter Stephenson 8bf3595e3a users/19059 based on users/19058: remove ineffiency with multiple * matches 10 years ago
Barton E. Schaefer 8672d19f0c 32500: handle interrupts during pattern matching 10 years ago
Peter Stephenson db23c63005 32136: fix problem with kshglob.
Non-pattern characters that could be followed by "(" to introduce
a ksh glob but weren't caused failures.
11 years ago
Peter Stephenson 375115c7df unposted: updates for 4.0.2-test-1.
Update references to 4.0.2 to 4.0.3.
Additional mod_export declarations.
Additions to .distfiles.
11 years ago
Peter Stephenson 1c172cb080 31877: fix behaviour of disable -p with parentheses 11 years ago
Mikael Magnusson fa03332635 31805: Add $patchars and $dis_patchars to zsh/parameter module 11 years ago
Peter Stephenson 60debf388f 31764: Dewreakify havoc caused by pattern disables on glob qualifiers.
Don't use the zpc_specials array before it's defined, it's rude.
11 years ago
Peter Stephenson 347a63da0c 31465: fix basic completion and globbing uses of disabled patterns 11 years ago
Peter Stephenson fdf2867e5f 31444: Basic code for enable/disable -p 11 years ago
Peter Stephenson 68d0d76db5 31441: use array to decide which forms of pattern are enabled 11 years ago
Bart Schaefer 0c226a6282 31158: following a wildcard with a repetition produces a bad pattern error 11 years ago
Peter Stephenson f0287c6e17 users/14723: invalid converted characters should never match valid ones 15 years ago
Peter Stephenson 71865fd36d 27021: fix length of saved glob flags in pattern matching 15 years ago
Peter Stephenson 85c513894d 26047: convert lower levels of completion matching to use
multibyte strings and wide characters
16 years ago
Peter Stephenson b4d336aaca 25845: fix pattern but with backslashed and metafied charaters 16 years ago