Make use of doesclrscrafterexit().

This commit is contained in:
Oliver Schmidt
2016-06-18 23:35:57 +02:00
parent 520641890d
commit 9bc096d9b0
8 changed files with 57 additions and 20 deletions

View File

@@ -14,6 +14,11 @@
#include <string.h>
#include <zlib.h>
#ifdef __CC65__
#include <stdlib.h>
#include <cc65.h>
#endif
#ifndef __CC65__
/*
** Emulate inflatemem() if using original zlib.
@@ -191,6 +196,13 @@ int main(void)
FILE* fp;
unsigned length;
#ifdef __CC65__
/* allow user to read exit messages */
if (doesclrscrafterexit()) {
atexit((void (*)) getchar);
}
#endif /* __CC65__ */
/* read GZIP file */
puts("GZIP file name:");
fp = fopen(get_fname(), "rb");