]> git.sur5r.net Git - cc65/blob - testcode/lib/cursor.c
Merge remote-tracking branch 'irgendwer/AtariOS_Structure' into master
[cc65] / testcode / lib / cursor.c
1 /*
2 ** test for conio cursor() function
3 ** CPG 2002
4 **
5 ** the cursor should be in the same state as mentioned in the printfs
6 */
7
8 #include <conio.h>
9
10 #if 1
11 #define NEWLINE cprintf("\r\n")
12 #define PRINTF  cprintf
13 #else
14 #include <stdio.h>
15 #define NEWLINE printf("\n")
16 #define PRINTF  printf
17 #endif
18
19 int main(void)
20 {
21         char c;
22         NEWLINE;
23
24         cursor (1);
25         PRINTF("enter key (cursor on): ");
26         c = cgetc();
27         NEWLINE;
28
29         cursor (0);
30         PRINTF("enter key (cursor off): ");
31         c = cgetc();
32         NEWLINE;
33
34         PRINTF("enter key (cursor on): ");
35         cursor (1);
36         c = cgetc();
37         NEWLINE;
38
39         PRINTF("enter key (cursor off): ");
40         cursor (0);
41         c = cgetc();
42         NEWLINE;
43
44         PRINTF("hit any key to exit...");
45         c = cgetc();
46         NEWLINE;
47
48         return(0);
49 }