diff options
author | Ron Yorston <rmy@pobox.com> | 2021-08-09 14:58:37 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-08-09 14:58:37 +0100 |
commit | 56e1d04ae71a05586fa3414aabdef0de720d0720 (patch) | |
tree | e06c0b37c22dd811e48b7a9886a4de2bf04b129f /win32/match_class.c | |
parent | dd10dfda5834b0e67ebab0425d0a48fbfc939d7f (diff) | |
download | busybox-w32-56e1d04ae71a05586fa3414aabdef0de720d0720.tar.gz busybox-w32-56e1d04ae71a05586fa3414aabdef0de720d0720.tar.bz2 busybox-w32-56e1d04ae71a05586fa3414aabdef0de720d0720.zip |
win32: code shrink character class detection
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.
Diffstat (limited to 'win32/match_class.c')
-rw-r--r-- | win32/match_class.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/match_class.c b/win32/match_class.c new file mode 100644 index 000000000..789e0df02 --- /dev/null +++ b/win32/match_class.c | |||
@@ -0,0 +1,7 @@ | |||
1 | #include "libbb.h" | ||
2 | #include "match_class.h" | ||
3 | |||
4 | int match_class(const char *name) | ||
5 | { | ||
6 | return index_in_strings(CHAR_CLASSES, name); | ||
7 | } | ||