Mercurial > gnulib
changeset 20357:2fb79981992b
(yesno) [!HAVE_RPMATCH]: Remove function since we'll
always use the rpmatch-based version.
Declare rpmatch.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 21 Jul 1996 22:48:41 +0000 |
parents | 7d64c62d8d9b |
children | 3fe82d4b1d82 |
files | lib/yesno.c |
diffstat | 1 files changed, 2 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/yesno.c Sun Jul 21 22:46:39 1996 +0000 +++ b/lib/yesno.c Sun Jul 21 22:48:41 1996 +0000 @@ -29,7 +29,8 @@ and return nonzero if that line begins with y or Y, otherwise return 0. */ -#ifdef HAVE_RPMATCH +int rpmatch (); + int yesno () { @@ -49,19 +50,3 @@ return rpmatch (buf) == 1; } -#else -int -yesno () -{ - int c; - int rv; - - fflush (stderr); - c = getchar (); - rv = (c == 'y') || (c == 'Y'); - while (c != EOF && c != '\n') - c = getchar (); - - return rv; -} -#endif