mirror of
https://github.com/cc65/cc65.git
synced 2024-12-31 11:32:00 +00:00
clock-test.c: do doesclrscrafterexit() handling the canonical way.
This commit is contained in:
parent
b1ca01f720
commit
1203e9e0c4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user