From 36248d304d0cd340a36617e890ac2fd541ad2563 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 13 Sep 2023 22:30:14 -0400 Subject: Yeah this tracks --- src/basic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/basic.c b/src/basic.c index d823ec7..9c71374 100644 --- a/src/basic.c +++ b/src/basic.c @@ -51,6 +51,8 @@ static inline enum zx_basic_token_type zx_basic_token_type_get(uint8_t b) { return ZX81_BASIC_TOKEN_INTEGRAL; } else if (ZX81_CHAR_TOKEN_FLOAT(b)) { return ZX81_BASIC_TOKEN_FLOAT; + } else if (ZX81_CHAR_NEWLINE(b)) { + return ZX81_BASIC_TOKEN_NEWLINE; } return ZX81_BASIC_TOKEN_UNKNOWN; @@ -158,6 +160,9 @@ ssize_t zx81_basic_dump(int fd, FILE *stream) { i += 5; break; + case ZX81_BASIC_TOKEN_NEWLINE: + break; + case ZX81_BASIC_TOKEN_UNKNOWN: continue; } @@ -172,10 +177,6 @@ ssize_t zx81_basic_dump(int fd, FILE *stream) { last = c; } - - if (fputc('\n', stream) < 0) { - goto error_io; - } } free(buf); -- cgit v1.2.3