diff options
| author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2026-04-12 23:09:19 +0300 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-04-16 10:42:13 +0100 |
| commit | b5e7ae5e8a8632f03d08a0e000818e49b1e6fb70 (patch) | |
| tree | a363cdcfe3fd92e9bad7ed463f5e5de532a9c386 /scripts | |
| parent | 40dafb7439931779d73f2db3e74e971cef108b6c (diff) | |
| download | busybox-w32-b5e7ae5e8a8632f03d08a0e000818e49b1e6fb70.tar.gz busybox-w32-b5e7ae5e8a8632f03d08a0e000818e49b1e6fb70.tar.bz2 busybox-w32-b5e7ae5e8a8632f03d08a0e000818e49b1e6fb70.zip | |
win32: coreutils/tr.c: use actail/isactype
tr implements its own char classes setup, using index_in_strings and
"precompiling" the various classes chars. We can replace the lot with
a single loop of actail/isactype, which saves about 500 bytes.
Additionally, for unclear reasons, it didn't support [:graph:] and
[:print:], maybe because isgraph and isprint are disabled in libbb.h
because they're locale-dependent.
The new implementation using ac* does add support for these, and so tr
on windows now supports e.g. 'tr [:print:] X' which it didn't before.
This is the first use of actail, and demonstrates the usecases for it
(win32/fnmatch.c could use it as well, but the current code is too
branched to use it while keeping identical behavior, and regcomp.c
extracts the name from [:NAME:] on its own).
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
