m0viefreak
d82604843b
38150: fix off-by-one error in matcher spec parsing
2021-12-24 13:09:25 -08:00
Dimitris Apostolou
356dcb20ce
github #82 : Fix typos
2021-11-12 23:54:34 +01:00
Oliver Kiddle
8764cba90b
49516: bail out early from matching control if command line content is too short for the coanchor
2021-10-26 18:25:38 +02:00
Mikael Magnusson
e6fa0b3b65
Fix typos reported by codespell in Src/
2020-01-09 14:49:55 +01:00
Barton E. Schaefer
071017965f
40763: count wide characters and Cmatcher pointers more sanely in 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-08 21:26:55 -08:00
Barton E. Schaefer
efd3baf2a2
40134: silence spurious compiler warnings.
2016-12-10 19:13:53 -08:00
Daniel Shahaf
2df02212b0
39310/0010: internals: match_str: Simplify expression.
...
In the first hunk we actually know that ind==0 since sfx==0, but keep it identical
to the last hunk.
Also add a comment (unrelated).
2016-09-16 03:54:19 +00:00
Daniel Shahaf
a182afe2f2
39310/0009: internals: match_str: Downscope local variable 't'.
...
Remove needless initialization (it is written to again before it is ever read).
Note there was another 't' variable at the end of the function that shadowed
the int 't'.
2016-09-16 03:54:18 +00:00
Daniel Shahaf
f37fa9293f
39310/0008: internals: match_str: Document several local variables.
2016-09-16 03:54:03 +00:00
Daniel Shahaf
31665068c1
39310/0007: internals: match_str: Rename and constify local variables 'oll', 'olw'.
2016-09-16 03:53:04 +00:00
Daniel Shahaf
09a6e96cc0
39310/0006: internals: match_str: Downscope local variable 'bpc'.
2016-09-16 03:53:00 +00:00
Daniel Shahaf
c5f165a525
39310/0005: internals: match_str: Constify some local variables.
2016-09-16 03:52:50 +00:00
Daniel Shahaf
a08f8a4c29
39310/0004: internals: match_str: Document 'savl'.
2016-09-16 03:52:45 +00:00
Daniel Shahaf
59aabe483c
39310/0003: internals: match_str: Document 'savw'. Avoid magic number.
...
All callees checked to ensure that they only check that parameter for nonzeroness.
2016-09-16 03:52:37 +00:00
Daniel Shahaf
14989cea4a
39310/0002: internals: match_str: Simplify by removing 'zoff'.
...
'zoff' was only used within 'if (sfx)' blocks, in which case it was initialized
to 'alen', so simply s/zoff/alen/g. 'alen' is not const but it first changes
on line 794, after the last use of 'zoff'.
2016-09-16 03:52:31 +00:00
Daniel Shahaf
2656b8c293
39310/0001: internals: match_str: Document some local variables. See 39123.
2016-09-16 03:52:29 +00:00
Daniel Shahaf
1b5987cdb1
unposted: Followup to 36586: Change C99 comment syntax to the C89 syntax.
2015-09-23 21:41:13 +00:00
Han Pingtian
acf5bd766a
36586: fix completion match right anchor
2015-09-22 10:18:41 +01:00
Peter Stephenson
729f6ddfff
36580: don't copy empty buffer in compmatch.
...
Also check if length is non-zero when buffer is empty.
2015-09-21 20:33:58 +01:00
Barton E. Schaefer
b6921a2b44
33515: suppress parser error messages in comp_match()
2014-10-22 20:21:10 -07:00
Peter Stephenson
d89361739a
29165: use term.h globally if needed at all.
2011-05-09 09:49:08 +00:00
Peter Stephenson
e92801a2c0
26466: suffix in certain matcher modes mishandled pattern
2009-01-29 11:08:04 +00:00
Peter Stephenson
14231691e1
26061: fix clash between process subst and numeric glob
...
26062: additional compmatch change, missed from 26047
2008-11-18 10:07:31 +00:00
Peter Stephenson
85c513894d
26047: convert lower levels of completion matching to use
...
multibyte strings and wide characters
2008-11-15 21:27:45 +00:00
Peter Stephenson
7ce5beb5be
25975: bad tests for pattern match when building up a completion line string
2008-10-30 22:04:03 +00:00
Peter Stephenson
b9500900b1
25972: leaked and uninitialised memory found by valgrind
2008-10-30 20:29:55 +00:00
Clint Adams
430e54ddc4
25860: avoid possible NULL dereferencing in bld_parts.
2008-10-12 19:28:10 +00:00
Clint Adams
96fc1bb149
25638: remove unnecessary ternary expression in match_str.
2008-09-10 18:33:32 +00:00
Clint Adams
29680850a0
25612: remove dead code.
2008-09-05 00:18:11 +00:00
Peter Stephenson
26ca3a4ec6
Mikael: 25146: export pattern_match_equivalence()
2008-06-10 19:12:57 +00:00
Peter Stephenson
deab7d6642
unposted: silence compiler in pattern_match_restrict()
2008-06-09 08:41:26 +00:00
Peter Stephenson
bb68ee8db7
25138(? mailing list stuck): rewrite of completion matching.
...
Will one day use multibyte/wide characters, doesn't yet.
2008-06-08 17:53:53 +00:00
Peter Stephenson
dae7a27fff
24406: use deep copy of Cline structure to avoid recursion problem
2008-01-18 16:41:36 +00:00
Peter Stephenson
9cfdf38906
24127: bug in matcher specs with left anchor and partial words
2007-11-28 21:14:14 +00:00
Peter Stephenson
4860917a49
23693: _match completion tried to match the quoted form of filenames
2007-07-23 13:24:44 +00:00
Andrey Borzenkov
21c1e9a346
fix thinko in 22787
2006-09-30 06:53:15 +00:00
Andrey Borzenkov
9f2bf1f0f2
22787: fix calling convention of pattern_match
2006-09-29 17:40:41 +00:00
Wayne Davison
542797377a
- When mbrtowc() returns -2 when given all the remaining chars in a
...
string, set an end-of-line flag and avoid calling mbrtowc() again
for any of the incomplete characters that remain in the string.
- Use "mbs" for the multi-byte state variable name (for consistency).
- Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t
-1 and -2 values (respectively).
2006-01-12 00:51:50 +00:00
Wayne Davison
90f7b1e173
A test for (size_t)-1 needed to check for (size_t)-2 too.
2006-01-09 17:39:44 +00:00
Wayne Davison
5750513c00
The return value of mbrtowc() is a size_t (unsigned), so don't
...
assign it to an int and then check if it's < 0, as that won't
work on a system where an int is larger than a size_t. Also,
the code that handled partial multibyte characters (that were
assembled from multiple bytes of a metafied string) was not
advancing past all the assembled bytes, nor was it handling the
decoding of a '\0' char (it looks like it could have infinite
looped in that case).
2006-01-09 01:09:55 +00:00
Peter Stephenson
aea7715261
21943, 21945: ZLE_UNICODE_SUPPORT -> MULTIBYTE_SUPPORT;
...
use multibyte versions of nicechar wherever possible.
2005-10-28 17:34:33 +00:00
Peter Stephenson
dcc48ad81b
minor tidy-ups
2005-10-02 19:13:44 +00:00
Peter Stephenson
75f853f2e3
21402: Fix crash with case-insensitive matching.
2005-07-06 10:01:19 +00:00
Felix Rosencrantz
ba2415ce67
20002 -- fix for matching spec core dump
2004-06-04 06:00:32 +00:00
Wayne Davison
ba827bb22b
Another fix in sub_match() to avoid allowing a partial-meta match
...
to occur (this time in the backwards scan).
2004-02-10 02:30:14 +00:00
Wayne Davison
6fd883c737
Optimized the check for a widowed Meta character.
2004-02-09 05:49:52 +00:00
Peter Stephenson
0167f8d036
19385: NULL dereference in add_match_part
2004-01-20 10:55:24 +00:00
Peter Stephenson
66329cbe4c
19336: Src/Zle/compmatch.c: Bug with metafied characters in length of
...
completion prefix
2004-01-05 17:28:49 +00:00
Wayne Davison
21dba96cd6
Silence "might be used uninitialized" warning.
2001-08-08 07:41:01 +00:00
Sven Wischnowsky
51503a87a2
(only the patch to compmatch.c from the mail); improve merging cline lists coming from different IPREFIX/PREFIX combinations and such by avoiding to generate cline structs for empty parts after a match spec anchor cline struct (15123)
2001-06-27 13:18:38 +00:00