aboutsummaryrefslogtreecommitdiff
path: root/listamsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'listamsb.c')
-rw-r--r--listamsb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/listamsb.c b/listamsb.c
index f833987..268aae6 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -42,6 +42,7 @@ int check_only = 0; /* -c */
int need_pclose = 0;
int bytes_read = 0;
int warnings = 0;
+int proglen = 0;
FILE *infile;
FILE *outfile;
@@ -83,10 +84,8 @@ int read_word(void) {
return w;
}
-/* return value is program length */
-int read_header(void) {
+void read_header(void) {
unsigned char b;
- int proglen;
b = read_byte();
if(b) die2("not an AMSB file: first byte not $00");
@@ -112,8 +111,6 @@ int read_header(void) {
exit(2);
}
}
-
- return proglen;
}
void unknown_token(int lineno, unsigned char byte, int ext) {
@@ -306,7 +303,7 @@ void open_output() {
}
int main(int argc, char **argv) {
- int proglen, rv = 0, linecount = 0;
+ int rv = 0, linecount = 0;
set_self(argv[0]);
@@ -314,7 +311,7 @@ int main(int argc, char **argv) {
open_output();
- proglen = read_header();
+ read_header();
while(next_line())
linecount++;