tr: 32-bit rune fixes

R=rsc
http://codereview.appspot.com/3761044
This commit is contained in:
Russ Cox 2011-01-02 18:42:25 -05:00
parent 2bde567347
commit 3e899d0203

View file

@ -88,7 +88,7 @@ delete(void)
SETBIT(t, c);
}
last = 0x10000;
last = Runemax+1;
while (readrune(0, &c) > 0) {
if(!BITSET(f, c) && (c != last || !BITSET(t,c))) {
last = c;
@ -128,7 +128,7 @@ complement(void)
else p[i] = i;
}
if (sflag){
lastc = 0x10000;
lastc = Runemax+1;
while (readrune(0, &from) > 0) {
if (from > high)
from = to;
@ -182,7 +182,7 @@ translit(void)
SETBIT(t,to);
}
if (sflag){
lastc = 0x10000;
lastc = Runemax+1;
while (readrune(0, &from) > 0) {
if (from <= high)
from = p[from];