/*
ndemo.c

This program is a simple demonstration of the ncurses
library of window routines.  The routines included here
are only the very bare-bones of what you might want to 
use in an ncurses program:

  initscr() -- call this first
  nocbreak() -- disable character-by-character input
  echo() -- enable input character echoing

  move(x,y) -- move to location x,y on the screen. (0,0) is top left.
  clear( ) -- clear the screen.
  printw() -- like printf()
  scanw() -- like scanf()
  getnstr() -- like fgets()

  refresh() -- flush output to screen.

  endwin() -- call this last

There are many other routines for the ncurses library.  See
"man ncurses" for more information.

To compile this program:

  cc -o ndemo ndemo.c -lncurses

Ray Ontko, 1999/12/2
*/

#include <stdio.h>
#include <ncurses.h>

int main( int argc , char *argv[] )
{
  char c ;
  char s[100] ; 
  int i;
  
  WINDOW *stdscr = initscr();
  nocbreak();
  echo();
  
  move( 1 , 1 ) ;
  printw( "Welcome to my world." ) ;
  
  move( 3 , 3 ) ;
  printw( "Name: " ) ;
  /* refresh( ) ; */
  
  getnstr( s , 100 );
  
  clear( ) ;
  move( 10 , 10 ) ;
  printw("Howdy %s!", s ) ;
  
  move( 20 , 0 ) ;
  printw( "<type Enter to exit>" ) ;
  /* refresh( ) ; */

  scanw("%c", &c ) ;

  endwin( ) ;

  return( 0 ) ;
}             

