openafs/src/gtx/curses_test.c

60 lines
1.2 KiB
C
Raw Normal View History

2000-11-04 02:13:13 +00:00
/*
2000-11-04 10:01:08 +00:00
* Copyright 2000, International Business Machines Corporation and others.
2000-11-04 02:13:13 +00:00
* All Rights Reserved.
2000-11-04 10:01:08 +00:00
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
2000-11-04 02:13:13 +00:00
*/
/*
* Test of the curses package, to make sure I really understand how to use it.
*/
#include <afsconfig.h>
#include <afs/param.h>
RCSID
("$Header$");
2000-11-04 02:13:13 +00:00
#if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
#define __HP_CURSES
#endif
#include <curses.h>
#include "AFS_component_version_number.c"
main(argc, argv)
int argc;
char **argv;
2000-11-04 02:13:13 +00:00
{ /*main */
2000-11-04 02:13:13 +00:00
WINDOW *mainscr;
char str[128];
int i;
mainscr = initscr();
scrollok(stdscr, TRUE);
clear();
addstr("This is my first curses string ever!\n");
refresh();
box(stdscr, '|', '-');
standout();
addstr("This is a standout string\n");
refresh();
standend();
#if 0
box addstr("Enter a string and a number: ");
2000-11-04 02:13:13 +00:00
refresh();
scanw(stdscr, "%s %d", str, &i);
wprintw(stdscr, "String was '%s', number was %d\n", str, i);
refresh();
#endif /* 0 */
2000-11-04 02:13:13 +00:00
endwin();
} /*main */