122665Sdist /* 234677Sbostic * Copyright (c) 1981 Regents of the University of California. 334677Sbostic * All rights reserved. 434677Sbostic * 542653Sbostic * %sccs.include.redist.c% 622665Sdist */ 722665Sdist 822665Sdist #ifndef lint 9*56238Selan static char sccsid[] = "@(#)getstr.c 5.6 (Berkeley) 09/14/92"; 1055960Sbostic #endif /* not lint */ 1122665Sdist 1255960Sbostic #include <curses.h> 132250Sarnold 142250Sarnold /* 1555960Sbostic * wgetstr -- 16*56238Selan * Get a string starting at (cury, curx). 172250Sarnold */ 1855960Sbostic int 1955960Sbostic wgetstr(win, str) 2055960Sbostic register WINDOW *win; 2155960Sbostic register char *str; 2255960Sbostic { 2313223Sarnold while ((*str = wgetch(win)) != ERR && *str != '\n') 242250Sarnold str++; 253497Sarnold if (*str == ERR) { 263639Sarnold *str = '\0'; 2755960Sbostic return (ERR); 283497Sarnold } 292250Sarnold *str = '\0'; 3055960Sbostic return (OK); 312250Sarnold } 32