summaryrefslogtreecommitdiff
path: root/lib/yesno.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-07-21 22:48:41 +0000
committerJim Meyering <jim@meyering.net>1996-07-21 22:48:41 +0000
commitccd0e2e27a55b82395db40efa74d054ee1fb5950 (patch)
treebbce39fdd0a7f0f5506464d0e16b7a5840c18f71 /lib/yesno.c
parent96a39fa3f67efbd3c85b28e1bfbea254a05d91ee (diff)
downloadcoreutils-ccd0e2e27a55b82395db40efa74d054ee1fb5950.tar.xz
(yesno) [!HAVE_RPMATCH]: Remove function since we'll
always use the rpmatch-based version. Declare rpmatch.
Diffstat (limited to 'lib/yesno.c')
-rw-r--r--lib/yesno.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/yesno.c b/lib/yesno.c
index f69954d1d..44c437caf 100644
--- a/lib/yesno.c
+++ b/lib/yesno.c
@@ -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 @@ yesno ()
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