tr(1): Properly handle the -dc case for character classes
I actually did that properly in the set-case but forgot to add the same logic to the character classes. Now it should work fine.
This commit is contained in:
parent
096c504d82
commit
c154ef7a03
9
tr.c
9
tr.c
|
@ -248,8 +248,12 @@ read:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (set1check && set1check(r)) {
|
if (set1check && set1check(r)) {
|
||||||
if (dflag && !cflag)
|
if (dflag) {
|
||||||
goto read;
|
if (cflag)
|
||||||
|
goto write;
|
||||||
|
else
|
||||||
|
goto read;
|
||||||
|
}
|
||||||
if (set2check) {
|
if (set2check) {
|
||||||
if (set2check == islowerrune)
|
if (set2check == islowerrune)
|
||||||
r = tolowerrune(r);
|
r = tolowerrune(r);
|
||||||
|
@ -258,6 +262,7 @@ read:
|
||||||
} else {
|
} else {
|
||||||
r = set2[set2ranges - 1].end;
|
r = set2[set2ranges - 1].end;
|
||||||
}
|
}
|
||||||
|
goto write;
|
||||||
}
|
}
|
||||||
if (!dflag && cflag) {
|
if (!dflag && cflag) {
|
||||||
if (set2check) {
|
if (set2check) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user