From 011f5e89b7dee4b306504e243052bfaf933b2685 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 10 Sep 2023 23:42:26 -0400 Subject: OH NO I FLATTENED THE CODE A BIT, WANNA FIGHT ME? --- main.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/main.c b/main.c index 72a7d09..3b8c8c0 100644 --- a/main.c +++ b/main.c @@ -113,23 +113,21 @@ static ssize_t dump_line(off_t offset, void *buf, size_t len, int tty) { if (zx_putchar(c) < 0) { 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 { - 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 { - if (putchar('.') < 0) { - goto error_io; - } + if (putchar('.') < 0) { + goto error_io; } } } -- cgit v1.2.3