122665Sdist /* 234677Sbostic * Copyright (c) 1981 Regents of the University of California. 334677Sbostic * All rights reserved. 434677Sbostic * 5*42653Sbostic * %sccs.include.redist.c% 622665Sdist */ 722665Sdist 822665Sdist #ifndef lint 9*42653Sbostic static char sccsid[] = "@(#)getstr.c 5.4 (Berkeley) 06/01/90"; 1034677Sbostic #endif /* not lint */ 1122665Sdist 122250Sarnold # include "curses.ext" 132250Sarnold 142250Sarnold /* 152250Sarnold * This routine gets a string starting at (_cury,_curx) 162250Sarnold * 172250Sarnold */ 182250Sarnold wgetstr(win,str) 192250Sarnold reg WINDOW *win; 202250Sarnold reg char *str; { 212250Sarnold 2213223Sarnold while ((*str = wgetch(win)) != ERR && *str != '\n') 232250Sarnold str++; 243497Sarnold if (*str == ERR) { 253639Sarnold *str = '\0'; 263497Sarnold return ERR; 273497Sarnold } 282250Sarnold *str = '\0'; 292250Sarnold return OK; 302250Sarnold } 31