Add proper casts and fix a small error
This commit is contained in:
parent
09704afc24
commit
0f90528df7
8
tr.c
8
tr.c
@ -26,7 +26,7 @@ static struct {
|
|||||||
{ "digit", iswdigit },
|
{ "digit", iswdigit },
|
||||||
{ "graph", iswgraph },
|
{ "graph", iswgraph },
|
||||||
{ "lower", iswlower },
|
{ "lower", iswlower },
|
||||||
{ "print", iswlower },
|
{ "print", iswprint },
|
||||||
{ "punct", iswpunct },
|
{ "punct", iswpunct },
|
||||||
{ "space", iswspace },
|
{ "space", iswspace },
|
||||||
{ "upper", iswupper },
|
{ "upper", iswupper },
|
||||||
@ -227,7 +227,7 @@ read:
|
|||||||
goto write;
|
goto write;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (set1check && set1check(r)) {
|
if (set1check && set1check((wint_t)r)) {
|
||||||
if (dflag && !cflag)
|
if (dflag && !cflag)
|
||||||
goto read;
|
goto read;
|
||||||
if (sflag) {
|
if (sflag) {
|
||||||
@ -237,9 +237,9 @@ read:
|
|||||||
goto write;
|
goto write;
|
||||||
}
|
}
|
||||||
if (set1check == iswupper && set2check == iswlower)
|
if (set1check == iswupper && set2check == iswlower)
|
||||||
r = towlower(r);
|
r = towlower((wint_t)r);
|
||||||
if (set1check == iswlower && set2check == iswupper)
|
if (set1check == iswlower && set2check == iswupper)
|
||||||
r = towupper(r);
|
r = towupper((wint_t)r);
|
||||||
}
|
}
|
||||||
if (dflag && cflag)
|
if (dflag && cflag)
|
||||||
goto read;
|
goto read;
|
||||||
|
Loading…
Reference in New Issue
Block a user