diff options
author | ache <ache@FreeBSD.org> | 2003-08-05 07:59:46 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-08-05 07:59:46 +0000 |
commit | e771f430842e56c960f36debec578fb2e85d444d (patch) | |
tree | 4eb15d6f29eaf560d0b025476895356173a8f888 /usr.bin/tr | |
parent | 1bdac03b078a556f1b2ec3f9a092587d0e14bb79 (diff) | |
download | FreeBSD-src-e771f430842e56c960f36debec578fb2e85d444d.zip FreeBSD-src-e771f430842e56c960f36debec578fb2e85d444d.tar.gz |
Back out [:upper:] and [:lower:] classes sorting, it is not required
by POSIX and gains nothing with current code.
Diffstat (limited to 'usr.bin/tr')
-rw-r--r-- | usr.bin/tr/str.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index 9461997..3365caf 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -198,7 +198,7 @@ genclass(s) { int cnt, (*func)(int); CLASS *cp, tmp; - int *p, n; + int *p; tmp.name = s->str; if ((cp = (CLASS *)bsearch(&tmp, classes, sizeof(classes) / @@ -211,18 +211,15 @@ genclass(s) if ((func)(cnt)) *p++ = cnt; *p = OOBCH; - n = p - cp->set; s->cnt = 0; s->set = cp->set; if (strcmp(s->str, "upper") == 0) s->state = SET_UPPER; - else if (strcmp(s->str, "lower") == 0) { + else if (strcmp(s->str, "lower") == 0) s->state = SET_LOWER; - } else + else s->state = SET; - if ((s->state == SET_LOWER || s->state == SET_UPPER) && n > 1) - mergesort(s->set, n, sizeof(*(s->set)), charcoll); } static int |