Check user's response against both 'Y' and 'y' --- this is really supposed

to be a locale specific regular expression.  This change hard codes POSIX
locale behavior, and will be replaced by a locale independant equivalent
as soon as locales are fully implemented.
This commit is contained in:
jtc 1993-11-09 18:57:54 +00:00
parent 14925245d3
commit 509eb263b9
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)cp.c 5.26 (Berkeley) 10/27/91";*/
static char rcsid[] = "$Id: cp.c,v 1.6 1993/10/30 13:06:46 mycroft Exp $";
static char rcsid[] = "$Id: cp.c,v 1.7 1993/11/09 18:57:54 jtc Exp $";
#endif /* not lint */
/*
@ -326,7 +326,7 @@ copy_file(fs, dne)
checkch = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (checkch != 'y') {
if (checkch != 'y' && checkch != 'Y') {
(void)close(from_fd);
return;
}

View File

@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)mv.c 5.11 (Berkeley) 4/3/91";*/
static char rcsid[] = "$Id: mv.c,v 1.6 1993/09/22 21:39:19 jtc Exp $";
static char rcsid[] = "$Id: mv.c,v 1.7 1993/11/09 18:58:03 jtc Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -158,7 +158,7 @@ do_move(from, to)
if (ask) {
if ((ch = getchar()) != EOF && ch != '\n')
while (getchar() != '\n');
if (ch != 'y')
if (ch != 'y' && ch != 'Y')
return(0);
}
}