diff options
Diffstat (limited to 'lib/libcurses/getstr.c')
| -rw-r--r-- | lib/libcurses/getstr.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/libcurses/getstr.c b/lib/libcurses/getstr.c index ec3af26fe7ae..97305b807110 100644 --- a/lib/libcurses/getstr.c +++ b/lib/libcurses/getstr.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 1981 Regents of the University of California. - * All rights reserved. + * Copyright (c) 1981, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,24 +32,26 @@ */ #ifndef lint -static char sccsid[] = "@(#)getstr.c 5.4 (Berkeley) 6/1/90"; -#endif /* not lint */ +static char sccsid[] = "@(#)getstr.c 8.1 (Berkeley) 6/4/93"; +#endif /* not lint */ -# include "curses.ext" +#include <curses.h> /* - * This routine gets a string starting at (_cury,_curx) - * + * wgetstr -- + * Get a string starting at (cury, curx). */ -wgetstr(win,str) -reg WINDOW *win; -reg char *str; { +int +wgetstr(win, str) + register WINDOW *win; + register char *str; +{ int c; while ((c = wgetch(win)) != ERR && c != EOF && c != '\n') *str++ = c; - *str = '\0'; + *str = '\0'; if (c == ERR) - return ERR; - return OK; + return (ERR); + return (OK); } |
