tr: fix 4-byte runes fix (thanks rsc)
This commit is contained in:
parent
4468438c70
commit
6a905b4560
|
@ -92,7 +92,7 @@ delete(void)
|
||||||
SETBIT(t, c);
|
SETBIT(t, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
last = 0x10000;
|
last = Runemax+1;
|
||||||
while (readrune(0, &c) > 0) {
|
while (readrune(0, &c) > 0) {
|
||||||
if(!BITSET(f, c) && (c != last || !BITSET(t,c))) {
|
if(!BITSET(f, c) && (c != last || !BITSET(t,c))) {
|
||||||
last = c;
|
last = c;
|
||||||
|
@ -132,7 +132,7 @@ complement(void)
|
||||||
else p[i] = i;
|
else p[i] = i;
|
||||||
}
|
}
|
||||||
if (sflag){
|
if (sflag){
|
||||||
lastc = 0x10000;
|
lastc = Runemax+1;
|
||||||
while (readrune(0, &from) > 0) {
|
while (readrune(0, &from) > 0) {
|
||||||
if (from > high)
|
if (from > high)
|
||||||
from = to;
|
from = to;
|
||||||
|
@ -186,7 +186,7 @@ translit(void)
|
||||||
SETBIT(t,to);
|
SETBIT(t,to);
|
||||||
}
|
}
|
||||||
if (sflag){
|
if (sflag){
|
||||||
lastc = 0x10000;
|
lastc = Runemax+1;
|
||||||
while (readrune(0, &from) > 0) {
|
while (readrune(0, &from) > 0) {
|
||||||
if (from <= high)
|
if (from <= high)
|
||||||
from = p[from];
|
from = p[from];
|
||||||
|
|
Loading…
Reference in a new issue