mirror of
git://git.suckless.org/sbase
synced 2026-01-26 05:37:54 +00:00
rev, tail: replace hardcoded code by UTF8_POINT macro
This commit is contained in:
parent
2a29857fe9
commit
3de61ef1aa
2
rev.c
2
rev.c
@ -25,7 +25,7 @@ rev(FILE *fp)
|
||||
lf = n && line[n - 1] == '\n';
|
||||
i = n -= lf;
|
||||
for (n = 0; i--;) {
|
||||
if ((line[i] & 0xC0) == 0x80) {
|
||||
if (UTF8_POINT(line[i])) {
|
||||
n++;
|
||||
} else {
|
||||
fwrite(line + i, 1, n + 1, stdout);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user