1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#include <ncurses.h>
main(int argc, char **argv)
{
WINDOW *w, *x;
initscr();
w = newwin(0, 0, 0, 0);
if (argc > 2)
x = newwin(0, 0, 0, 0);
scrollok(w, TRUE);
if (argc > 2)
scrollok(x, TRUE);
idlok(w, TRUE);
if (argc > 2)
idlok(x, TRUE);
wmove(w, LINES - 1, 0);
waddstr(w, "test 1 in w");
wrefresh(w);
sleep(1);
if (argc == 2 || argc == 4)
{
waddch(w, '\n');
sleep(1);
waddch(w, '\n');
sleep(1);
waddch(w, '\n');
sleep(1);
beep();
wrefresh(w);
}
sleep(1);
if (argc > 2)
{
wmove(x, LINES - 1, 0);
waddstr(x, "test 2 in x");
sleep(1);
waddch(x, '\n');
sleep(1);
waddch(x, '\n');
sleep(1);
waddch(x, '\n');
sleep(1);
beep();
wrefresh(w);
sleep(1);
}
endwin();
return 0;
}
|