aboutsummaryrefslogtreecommitdiff
path: root/listamsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'listamsb.c')
-rw-r--r--listamsb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/listamsb.c b/listamsb.c
index 88c465a..ed2f813 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -90,6 +90,7 @@ int proglen = 0;
int linecount = 0;
int header_read = 0;
int printing = 0;
+int spacecount = 0;
FILE *infile;
FILE *outfile;
@@ -180,6 +181,10 @@ void finish(int rv) {
}
}
+ verbose(2, "spaces outside strings/comments: %d (%.1f%%)",
+ spacecount,
+ (float)(spacecount) / (float)(bytes_read) * 100.0);
+
verbose(1, "exit status: %d (%s)", rv, (rv ? "ERROR" : "OK"));
exit(rv);
@@ -413,6 +418,7 @@ int next_line(void) {
warn("line %d has character %d outside of a string, maybe Atari BASIC?",
lineno, byte);
}
+ if(byte == ' ') spacecount++;
list_char(byte);
}
}