Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / gtx / curses_test.c
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 /*
11 * Test of the curses package, to make sure I really understand how to use it.
12 */
13
14 #include <afsconfig.h>
15 #include <afs/param.h>
16
17 #include <roken.h>
18
19 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
20 # define __HP_CURSES
21 #endif
22
23 #if defined(HAVE_NCURSES_H)
24 # include <ncurses.h>
25 #elif defined(HAVE_NCURSES_NCURSES_H)
26 # include <ncurses/ncurses.h>
27 #elif defined(HAVE_CURSES_H)
28 # include <curses.h>
29 #endif
30
31 #include "AFS_component_version_number.c"
32
33 main(argc, argv)
34 int argc;
35 char **argv;
36
37 { /*main */
38
39 WINDOW *mainscr;
40 char str[128];
41 int i;
42
43 mainscr = initscr();
44 scrollok(stdscr, TRUE);
45 clear();
46 addstr("This is my first curses string ever!\n");
47 refresh();
48 box(stdscr, '|', '-');
49 standout();
50 addstr("This is a standout string\n");
51 refresh();
52 standend();
53
54 #if 0
55 box addstr("Enter a string and a number: ");
56 refresh();
57 scanw(stdscr, "%s %d", str, &i);
58 wprintw(stdscr, "String was '%s', number was %d\n", str, i);
59 refresh();
60 #endif /* 0 */
61
62 endwin();
63
64 } /*main */