122665Sdist /* 2*34677Sbostic * Copyright (c) 1981 Regents of the University of California. 3*34677Sbostic * All rights reserved. 4*34677Sbostic * 5*34677Sbostic * Redistribution and use in source and binary forms are permitted 6*34677Sbostic * provided that this notice is preserved and that due credit is given 7*34677Sbostic * to the University of California at Berkeley. The name of the University 8*34677Sbostic * may not be used to endorse or promote products derived from this 9*34677Sbostic * software without specific prior written permission. This software 10*34677Sbostic * is provided ``as is'' without express or implied warranty. 1122665Sdist */ 1222665Sdist 1322665Sdist #ifndef lint 14*34677Sbostic static char sccsid[] = "@(#)getstr.c 5.2 (Berkeley) 06/08/88"; 15*34677Sbostic #endif /* not lint */ 1622665Sdist 172250Sarnold # include "curses.ext" 182250Sarnold 192250Sarnold /* 202250Sarnold * This routine gets a string starting at (_cury,_curx) 212250Sarnold * 222250Sarnold */ 232250Sarnold wgetstr(win,str) 242250Sarnold reg WINDOW *win; 252250Sarnold reg char *str; { 262250Sarnold 2713223Sarnold while ((*str = wgetch(win)) != ERR && *str != '\n') 282250Sarnold str++; 293497Sarnold if (*str == ERR) { 303639Sarnold *str = '\0'; 313497Sarnold return ERR; 323497Sarnold } 332250Sarnold *str = '\0'; 342250Sarnold return OK; 352250Sarnold } 36