clock-test.c: do doesclrscrafterexit() handling the canonical way.
This commit is contained in:
committed by
Oliver Schmidt
parent
b1ca01f720
commit
1203e9e0c4
@@ -12,11 +12,6 @@
|
|||||||
#ifdef __CC65__
|
#ifdef __CC65__
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#include <cc65.h>
|
#include <cc65.h>
|
||||||
|
|
||||||
static void exitfn(void)
|
|
||||||
{
|
|
||||||
if (doesclrscrafterexit()) cgetc();
|
|
||||||
}
|
|
||||||
#endif /* #ifdef __CC65__ */
|
#endif /* #ifdef __CC65__ */
|
||||||
|
|
||||||
static void print_time(void)
|
static void print_time(void)
|
||||||
@@ -42,7 +37,9 @@ int main(int argc, char **argv)
|
|||||||
static struct timespec new_time;
|
static struct timespec new_time;
|
||||||
|
|
||||||
#ifdef __CC65__
|
#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
|
#endif
|
||||||
|
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user