1*22665Sdist /* 2*22665Sdist * Copyright (c) 1980 Regents of the University of California. 3*22665Sdist * All rights reserved. The Berkeley software License Agreement 4*22665Sdist * specifies the terms and conditions for redistribution. 5*22665Sdist */ 6*22665Sdist 7*22665Sdist #ifndef lint 8*22665Sdist static char sccsid[] = "@(#)getstr.c 5.1 (Berkeley) 06/07/85"; 9*22665Sdist #endif not lint 10*22665Sdist 112250Sarnold # include "curses.ext" 122250Sarnold 132250Sarnold /* 142250Sarnold * This routine gets a string starting at (_cury,_curx) 152250Sarnold * 162250Sarnold */ 172250Sarnold wgetstr(win,str) 182250Sarnold reg WINDOW *win; 192250Sarnold reg char *str; { 202250Sarnold 2113223Sarnold while ((*str = wgetch(win)) != ERR && *str != '\n') 222250Sarnold str++; 233497Sarnold if (*str == ERR) { 243639Sarnold *str = '\0'; 253497Sarnold return ERR; 263497Sarnold } 272250Sarnold *str = '\0'; 282250Sarnold return OK; 292250Sarnold } 30