aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-02-28 21:24:00 -0500
committerB. Watson <urchlay@slackware.uk>2025-02-28 21:24:00 -0500
commit9730a28fa224048914a61c869d06a34ef1dc497e (patch)
treedab1d7c5660f54032bc180d3a67a72b23d1d4959
parent2969891e182914fbd9818113465016633f5bb1df (diff)
downloadbw-atari8-tools-9730a28fa224048914a61c869d06a34ef1dc497e.tar.gz
listamsb: don't print the colon before an ELSE.
-rw-r--r--listamsb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/listamsb.c b/listamsb.c
index 6092dfa..77d9a88 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -23,6 +23,9 @@
#define TOK_SQUOTE 0x9a
#define TOK_BANG 0x9b
+/* AMSB's token for ELSE */
+#define TOK_ELSE 0x9c
+
/* good old Atari EOL character */
#define EOL 0x9b
@@ -339,8 +342,10 @@ int next_line(void) {
continue;
}
- if(was_colon && byte != TOK_SQUOTE && byte != TOK_BANG) {
- if(printing) putc(':', outfile);
+ if(was_colon) {
+ if(byte != TOK_SQUOTE && byte != TOK_BANG && byte != TOK_ELSE) {
+ if(printing) putc(':', outfile);
+ }
was_colon = 0;
}