X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=samples%2Fgunzip65.c;h=9d21c2137c27dbfb296e426a63854adb8788877c;hb=2cd4b5109a59c3743b38369359c389cc1b9edab4;hp=2ad0294674b76443b6b95b77106d8c7278876521;hpb=a8d3b83c43e79702a41b0049d65ea51e62dacf09;p=cc65 diff --git a/samples/gunzip65.c b/samples/gunzip65.c index 2ad029467..9d21c2137 100644 --- a/samples/gunzip65.c +++ b/samples/gunzip65.c @@ -14,6 +14,11 @@ #include #include +#ifdef __CC65__ +#include +#include +#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");