1 /* 2 * Copyright (c) 1981 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)getstr.c 5.4 (Berkeley) 06/01/90"; 10 #endif /* not lint */ 11 12 # include "curses.ext" 13 14 /* 15 * This routine gets a string starting at (_cury,_curx) 16 * 17 */ 18 wgetstr(win,str) 19 reg WINDOW *win; 20 reg char *str; { 21 22 while ((*str = wgetch(win)) != ERR && *str != '\n') 23 str++; 24 if (*str == ERR) { 25 *str = '\0'; 26 return ERR; 27 } 28 *str = '\0'; 29 return OK; 30 } 31