reindent-20030715
[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 RCSID
18     ("$Header$");
19
20 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
21 #define __HP_CURSES
22 #endif
23
24 #include <curses.h>
25
26 #include "AFS_component_version_number.c"
27
28 main(argc, argv)
29      int argc;
30      char **argv;
31
32 {                               /*main */
33
34     WINDOW *mainscr;
35     char str[128];
36     int i;
37
38     mainscr = initscr();
39     scrollok(stdscr, TRUE);
40     clear();
41     addstr("This is my first curses string ever!\n");
42     refresh();
43     box(stdscr, '|', '-');
44     standout();
45     addstr("This is a standout string\n");
46     refresh();
47     standend();
48
49 #if 0
50     box addstr("Enter a string and a number: ");
51     refresh();
52     scanw(stdscr, "%s %d", str, &i);
53     wprintw(stdscr, "String was '%s', number was %d\n", str, i);
54     refresh();
55 #endif /* 0 */
56
57     endwin();
58
59 }                               /*main */