aboutsummaryrefslogtreecommitdiff
path: root/listamsb.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-09 16:07:38 -0400
committerB. Watson <urchlay@slackware.uk>2025-03-09 16:07:38 -0400
commitc087edf854a1c4b6c47ca69a2118754726b7c8cd (patch)
tree66fe13d86de83cdc9836e7446f916ac5035fe059 /listamsb.c
parentb8b371b94cb982466c2db34fc24f9e0ea082e63e (diff)
downloadbw-atari8-tools-master.tar.gz
listbas: -D, warn if the input didn't look crunched.HEAD0.2.1master
Diffstat (limited to 'listamsb.c')
-rw-r--r--listamsb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/listamsb.c b/listamsb.c
index 066b80c..a3614c6 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -671,6 +671,8 @@ int decrunch_line(void) {
byte = read_prog_byte();
if(byte != 0) {
+ if(byte == ' ' || is_comment_start(byte)) spacecount++;
+
if(in_string) {
if(byte == '|')
in_string = 0;
@@ -754,6 +756,9 @@ void crunch_program(void) {
newproglen,
percent < 0 ? -percent : percent,
percent < 0 ? "larger" : "smaller");
+
+ if(decrunch && spacecount)
+ warn("%d spaces/comments, are you sure it was crunched?", spacecount);
}
void print_help(void) {