1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 00:29:31 +00:00

clock-test.c: do doesclrscrafterexit() handling the canonical way.

This commit is contained in:
Christian Groessler 2018-09-25 14:35:52 +02:00 committed by Oliver Schmidt
parent b1ca01f720
commit 1203e9e0c4

View File

@ -12,11 +12,6 @@
#ifdef __CC65__
#include <conio.h>
#include <cc65.h>
static void exitfn(void)
{
if (doesclrscrafterexit()) cgetc();
}
#endif /* #ifdef __CC65__ */
static void print_time(void)
@ -42,7 +37,9 @@ int main(int argc, char **argv)
static struct timespec new_time;
#ifdef __CC65__
atexit(exitfn);
/* if DOS will automatically clear the screen after the program exits, wait for a keypress... */
if (doesclrscrafterexit())
atexit((void (*)(void))cgetc);
#endif
if (argc <= 1) {