OH NO I FLATTENED THE CODE A BIT, WANNA FIGHT ME?

This commit is contained in:
XANTRONIX Development 2023-09-10 23:42:26 -04:00
parent bd5268cd62
commit 011f5e89b7

30
main.c
View file

@ -113,23 +113,21 @@ static ssize_t dump_line(off_t offset, void *buf, size_t len, int tty) {
if (zx_putchar(c) < 0) { if (zx_putchar(c) < 0) {
goto error_io; goto error_io;
} }
} else if (c >= 0xa0 && c <= 0xbf) {
if (tty && printf("\033[7m") < 0) {
goto error_io;
}
if (zx_putchar(c - 0xa0) < 0) {
goto error_io;
}
if (tty && printf("\033[27m") < 0) {
goto error_io;
}
} else { } else {
if (c >= 0xa0 && c <= 0xbf) { if (putchar('.') < 0) {
if (tty && printf("\033[7m") < 0) { goto error_io;
goto error_io;
}
if (zx_putchar(c - 0xa0) < 0) {
goto error_io;
}
if (tty && printf("\033[27m") < 0) {
goto error_io;
}
} else {
if (putchar('.') < 0) {
goto error_io;
}
} }
} }
} }