From a3e57ca7008cbaf612675b9de3dd18109f8150de Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Wed, 19 Apr 2000 03:38:01 +0000 Subject: make ps accept (and ignore) all options (--help works of course). tar now works with or without the leading "-" on the options. -Erik --- archival/tar.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'archival/tar.c') diff --git a/archival/tar.c b/archival/tar.c index 9b3cb7d81..2284fd06d 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -70,13 +70,13 @@ static const char tar_usage[] = #endif "\tx\t\textract\n" "\tt\t\tlist\n" - "File selection:\n" + "\nFile selection:\n" "\tf\t\tname of tarfile or \"-\" for stdin\n" "\tO\t\textract to stdout\n" #if defined BB_FEATURE_TAR_EXCLUDE "\t--exclude\tfile to exclude\n" #endif - "Informative output:\n" + "\nInformative output:\n" "\tv\t\tverbosely list files processed\n" ; @@ -184,7 +184,7 @@ extern int tar_main(int argc, char **argv) usage(tar_usage); /* Parse any options */ - while (--argc > 0 && **(++argv) == '-') { + while (--argc > 0 && (**(++argv) != '\0')) { stopIt=FALSE; while (stopIt==FALSE && *(++(*argv))) { switch (**argv) { @@ -245,7 +245,6 @@ extern int tar_main(int argc, char **argv) break; } #endif - usage(tar_usage); break; default: -- cgit v1.2.3