diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /lib/libcurses/getstr.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
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); } |
