1: # include "curses.ext" 2: 3: /* 4: * This routine gets a string starting at (_cury,_curx) 5: * 6: * 6/21/83 (Berkeley) @(#)getstr.c 1.4 7: */ 8: wgetstr(win,str) 9: reg WINDOW *win; 10: reg char *str; { 11: 12: while ((*str = wgetch(win)) != ERR && *str != '\n') 13: str++; 14: if (*str == ERR) { 15: *str = '\0'; 16: return ERR; 17: } 18: *str = '\0'; 19: return OK; 20: }