summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2023-09-13 22:30:14 -0400
committerXANTRONIX Development2023-09-13 22:30:14 -0400
commit36248d304d0cd340a36617e890ac2fd541ad2563 (patch)
tree396a1d321535b93a54395941f793dda7e21c525a /src
parent1b8430ae844e6465915b1841dd8863e5220e3b77 (diff)
downloadzxdump-36248d304d0cd340a36617e890ac2fd541ad2563.tar.gz
zxdump-36248d304d0cd340a36617e890ac2fd541ad2563.tar.bz2
zxdump-36248d304d0cd340a36617e890ac2fd541ad2563.zip
Yeah this tracks
Diffstat (limited to 'src')
-rw-r--r--src/basic.c9
1 files changed, 5 insertions, 4 deletions
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);