DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Simple input and output

getstr

SYNOPSIS

   #include <ocurses.h>
   

int getstr(str) char *str;

NOTES

EXAMPLE

   #include <ocurses.h>
   

main() { char str[256];

initscr(); cbreak(); /* Explained later in the section "Input Options" */ addstr("Enter a character string terminated by <Return>:\n\n"); refresh(); getstr(str); printw("\n\n\nThe string entered was \n'%s'\n", str); refresh(); endwin(); }

Assume you entered the string 'I enjoy learning about the UNIX system'. The final screen (after entering RETURN) would appear as follows:

   Enter a character string terminated by <Return>:
   

I enjoy learning about the UNIX system.

The string entered was ´I enjoy learning about the UNIX system.'

$[]


Next topic: scanw
Previous topic: getch

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004