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.
|
|
|
|
*/
|
|
|
|
|
2001-07-05 16:20:00 +00:00
|
|
|
#include <afsconfig.h>
|
2001-07-12 20:58:15 +00:00
|
|
|
#include <afs/param.h>
|
2001-07-05 16:20:00 +00:00
|
|
|
|
2003-07-16 00:28:24 +00:00
|
|
|
RCSID
|
|
|
|
("$Header$");
|
2001-07-05 16:20:00 +00:00
|
|
|
|
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)
|
2003-07-16 00:28:24 +00:00
|
|
|
int argc;
|
|
|
|
char **argv;
|
2000-11-04 02:13:13 +00:00
|
|
|
|
2003-07-16 00:28:24 +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
|
2003-07-16 00:28:24 +00:00
|
|
|
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();
|
2003-07-16 00:28:24 +00:00
|
|
|
#endif /* 0 */
|
2000-11-04 02:13:13 +00:00
|
|
|
|
|
|
|
endwin();
|
|
|
|
|
2003-07-16 00:28:24 +00:00
|
|
|
} /*main */
|