Skip to content

Commit d45112e

Browse files
committed
Show filesize on error
1 parent c05b51a commit d45112e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

m100-tokenize-main.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,19 @@ int fixup_ptrs() {
8080
ptr[nlines++] = filesize;
8181

8282
/* Double-check size of .BA file */
83-
fprintf(stderr, "file size is 0x%x\n", filesize);
8483
if ( filesize >= 0x10000 ) {
85-
fprintf(stderr, "Fatal Error. Program too large to fit in 64K RAM.\n");
86-
fprintf(stderr, "Due to 16-bit pointers in BASIC, this cannot work.\n");
84+
fprintf(stderr, "Fatal Error. %'d bytes is too large to fit in 64K RAM.\n", filesize);
85+
fprintf(stderr, "Due to 16-bit pointers in BASIC, this can never work.\n");
8786
exit(1);
8887
}
8988
else if ( filesize >= 0x8000 ) {
90-
fprintf(stderr, "Warning. Program too large to fit in 32K RAM.\n");
89+
fprintf(stderr, "Warning. %'d bytes is too large to fit in 32K RAM.\n", filesize);
9190
fprintf(stderr, "The output cannot run on any standard hardware.\n");
9291
if ( filesize+offset >= 0x10000 )
9392
offset=0;
9493
}
9594
else if ( filesize >= 0x6000 ) {
96-
fprintf(stderr, "Notice. Program too large to fit in 24K RAM.\n");
95+
fprintf(stderr, "Notice. %'d bytes is too large to fit in 24K RAM.\n", filesize);
9796
fprintf(stderr, "The output cannot run on a standard Tandy 200.\n");
9897
if ( filesize+offset >= 0x10000 )
9998
offset=0x8001;

0 commit comments

Comments
 (0)