| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A user reports:
Here is the shell script that causes me problems:
var=foo:bar
echo ${var#*[[:space:]]}
What expect I to see echoed is foo:bar, however what I see
bar. It seems that the [[:space:]] character class is matching
the colon character in addition to whitespace characters. I
see the same problem with the [[:blank:]] character class.
This is due to a bug in the WIN32 implementation of fnmatch(3)
which is derived from an old snapshot of glibc code (glibc commit
7814856974 from 1999-09-12). The bug was fixed in glibc by commit
83b1b6d8fa of 2000-07-04.
Apply the equivalent fix to our version.
|
|
|
|
|
|
|
| |
Add a routine to detect the names of character classes. Use it
in fnmatch(3) and regcomp(3), replacing local code in the former.
Saves 216 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The glob pattern '[[:xdigit::]]*' didn't return the matches
expected. It turns out the implementation (from glibc) fails
to detect 'xdigit' as a valid character class. Changing the
definition of CHAR_CLASS_MAX_LENGTH to 7 fixes the problem.
This was never an issue in glibc because it uses a different
definition. More modern versions of fnmatch(3) in glibc and
gnulib also make CHAR_CLASS_MAX_LENGTH long enough.
The code for fnmatch(3) was taken from glibc at commit
7814856974388a856a575fa45f88d502c8a1ab29. This was the last
version before the code was rearraged to better support multibyte
characters.
|
|
|
|
|
|
|
| |
Replace several explicit string comparisons with a single call
to index_in_strings().
Saves 304 bytes.
|
|
|
|
|
|
| |
BusyBox ensures that strchrnul is always available, either from the
target platform or by including its own version. Therefore it isn't
necessary for fnmatch to use its equivalent.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It would be more straight-forward to simply #include "libbb.h" which
includes a #define getenv mingw_getenv, but that header also defines
isprint() to a function that is nowhere to be found, leading to link
problems.
So let's go the easy route.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
|
|
|
|
| |
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
|
This was extracted from commit e56b799d6ad8afba4168fffa7218d44c041a72d2
in Git repository.
|