| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
|
| |
|
|
|
|
|
|
|
|
|
| |
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
|
|
|
|
|
|
|
|
|
|
|
| |
A closing bracket immediately after '[=' should not be treated as special.
Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.
PR: bin/150384
Submitted by: Richard Lowe
MFC after: 2 weeks
|
|
|
|
| |
needed.
|
|
|
|
| |
Tested with: make universe
|
|
|
|
| |
Obtained from: Slava Semushin via NetBSD
|
|
|
|
|
|
|
|
| |
check to see that a given digit is actually an octal digit. This leads to
unusual consequences if passed in values like \9.
Reported by: Joseph Davison (OpenDarwin project)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data structures that scale better with large character sets, instead of
arrays indexed by character value:
- Sets of characters to delete/squeeze are stored in a new "cset" structure,
which is implemented as a splay tree of extents. This structure has the
ability to store character classes (ala wctype(3)), but this is not
currently fully utilized.
- Mappings between characters are stored in a new "cmap" structure, which
is also a splay tree.
- The parser no longer builds arrays containing all the characters in a
particular class; instead, next() determines them on-the-fly using
nextwctype(3).
|
|
|
|
| |
by POSIX and gains nothing with current code.
|
|
|
|
|
|
| |
makes one malloc unneeded, removes two bzero's and makes code more readable.
"Bright ideas comes only _after_ commits."
|
|
|
|
|
|
|
| |
is octal sequence, range is taken in the byte values order, for non-octal
endpoints range is taken in the sorted collation order.
Implement it.
|
|
|
|
| |
2) Fix last (repeated) char after [:class:], it was \0 in original code
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1st one is relatively minor: according our own manpage, upper and lower
classes must be sorted, but currently not.
2nd one is serious:
tr '[:lower:]' '[:upper:]'
(and vice versa) currently works only if upper and lower classes
have exact the same number of elements. When it is not true, like for
many ISO8859-x locales which have bigger amount of lowercase letters,
tr may do nasty things.
See this page
http://www.opengroup.org/onlinepubs/007908799/xcu/tr.html
for detailed description of desired tr behaviour in such cases.
|
|
|
|
| |
error message.
|
|
|
|
|
| |
[:*] and [=*] are parsed as `infinitely many repetitions of :' (or *)
instead of literal characters (SUSv3)
|
|
|
|
|
| |
character in the set. tr -d '[=a=]' was deleting ]'s as well as a's.
Noticed by the textutils test suite.
|
|
|
|
| |
one-to-one (SUSv3)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Submitted by: serg@bcs1.bcs.zaporizhzhe.ua (Sergey Shkonda)
|
|
|
|
| |
works.
|
|
|
|
| |
Add setlocale LC_CTYPE
|
| |
|
| |
|
| |
|
|
|