diff options
author | wosch <wosch@FreeBSD.org> | 1996-02-18 19:00:59 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-02-18 19:00:59 +0000 |
commit | b98f58422c31a10a530d4b17491c21e3cccc3e05 (patch) | |
tree | a67eafd56bd46424d7f77ce174bf6a3a3e00ab89 /bin | |
parent | ef875dfa9a1d918f8cf335f5de089dc8f80c2c3d (diff) | |
download | FreeBSD-src-b98f58422c31a10a530d4b17491c21e3cccc3e05.zip FreeBSD-src-b98f58422c31a10a530d4b17491c21e3cccc3e05.tar.gz |
update usage string
all flag variables initialized with zero
respond `Y' is equal to `y'
Diffstat (limited to 'bin')
-rw-r--r-- | bin/rm/rm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 1a74378..d7a5bf7f 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: rm.c,v 1.5 1994/09/24 02:57:02 davidg Exp $ + * $Id: rm.c,v 1.6 1995/04/13 13:35:09 ache Exp $ */ #ifndef lint @@ -81,8 +81,9 @@ main(argc, argv) { int ch, rflag; - Pflag = rflag = 0; - while ((ch = getopt(argc, argv, "dfiPRr")) != EOF) + dflag = fflag = iflag = Pflag = rflag = 0; + stdin_ok = 0; + while ((ch = getopt(argc, argv, "dfiPRr?")) != EOF) switch(ch) { case 'd': dflag = 1; @@ -378,7 +379,7 @@ check(path, name, sp) first = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); - return (first == 'y'); + return (first == 'y' || first == 'Y'); } #define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2]))) @@ -410,6 +411,6 @@ void usage() { - (void)fprintf(stderr, "usage: rm [-dfiRr] file ...\n"); + (void)fprintf(stderr, "usage: rm [-dfiPRr] file ...\n"); exit(1); } |