Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / gtx / curses_test.c
blob8ae19acd782e148ecd1acf1863c645fbeb34d6f8
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
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 */
11 * Test of the curses package, to make sure I really understand how to use it.
14 #include <afsconfig.h>
15 #include <afs/param.h>
17 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
18 # define __HP_CURSES
19 #endif
21 #if defined(HAVE_NCURSES_H)
22 # include <ncurses.h>
23 #elif defined(HAVE_NCURSES_NCURSES_H)
24 # include <ncurses/ncurses.h>
25 #elif defined(HAVE_CURSES_H)
26 # include <curses.h>
27 #endif
29 #include "AFS_component_version_number.c"
31 main(argc, argv)
32 int argc;
33 char **argv;
35 { /*main */
37 WINDOW *mainscr;
38 char str[128];
39 int i;
41 mainscr = initscr();
42 scrollok(stdscr, TRUE);
43 clear();
44 addstr("This is my first curses string ever!\n");
45 refresh();
46 box(stdscr, '|', '-');
47 standout();
48 addstr("This is a standout string\n");
49 refresh();
50 standend();
52 #if 0
53 box addstr("Enter a string and a number: ");
54 refresh();
55 scanw(stdscr, "%s %d", str, &i);
56 wprintw(stdscr, "String was '%s', number was %d\n", str, i);
57 refresh();
58 #endif /* 0 */
60 endwin();
62 } /*main */