diff options
author | XANTRONIX Development | 2023-09-10 23:42:26 -0400 |
---|---|---|
committer | XANTRONIX Development | 2023-09-10 23:42:26 -0400 |
commit | 011f5e89b7dee4b306504e243052bfaf933b2685 (patch) | |
tree | dda58669af88e0b74315cb1968c73ec3de42fc1a | |
parent | bd5268cd628d75dcf4214e7ee40f23904964baef (diff) | |
download | zxdump-011f5e89b7dee4b306504e243052bfaf933b2685.tar.gz zxdump-011f5e89b7dee4b306504e243052bfaf933b2685.tar.bz2 zxdump-011f5e89b7dee4b306504e243052bfaf933b2685.zip |
OH NO I FLATTENED THE CODE A BIT, WANNA FIGHT ME?
-rw-r--r-- | main.c | 30 |
1 files changed, 14 insertions, 16 deletions
@@ -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; } } } |