diff options
author | wosch <wosch@FreeBSD.org> | 1996-03-01 06:14:13 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-03-01 06:14:13 +0000 |
commit | c7a6efe93377d02246c6f8387329b2fb0d0ddbc0 (patch) | |
tree | d9a377609a0401635e1385a0bd5c28a5a2ac6ed9 /bin/mv | |
parent | b95fe018c13a26b94e12a1d8ac8b7c24507a0ee8 (diff) | |
download | FreeBSD-src-c7a6efe93377d02246c6f8387329b2fb0d0ddbc0.zip FreeBSD-src-c7a6efe93377d02246c6f8387329b2fb0d0ddbc0.tar.gz |
delete unused label endarg
correct indent of last new code
fix usage string, option -f before option -i (alphabetic order)
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/mv.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index f9de076..b63c4ae 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mv.c,v 1.6 1996/02/19 05:51:13 pst Exp $ + * $Id: mv.c,v 1.7 1996/02/20 23:27:57 wosch Exp $ */ #ifndef lint @@ -79,7 +79,7 @@ main(argc, argv) int ch; char path[MAXPATHLEN + 1]; - while ((ch = getopt(argc, argv, "if")) != EOF) + while ((ch = getopt(argc, argv, "fi")) != EOF) switch (ch) { case 'i': iflg = 1; @@ -92,7 +92,7 @@ main(argc, argv) default: usage(); } -endarg: argc -= optind; + argc -= optind; argv += optind; if (argc < 2) @@ -154,8 +154,8 @@ do_move(from, to) /* prompt only if source exist */ if (lstat(from, &sb) == -1) { - warn("%s", from); - return (1); + warn("%s", from); + return (1); } ask = 0; @@ -308,9 +308,8 @@ copy(from, to) void usage() { - (void)fprintf(stderr, -"\ -usage: mv [-i | -f] src target;\n\ - or: mv [-i | -f] src1 ... srcN directory\n"); + (void)fprintf(stderr, "%s\n%s\n", + "usage: mv [-f | -i] src target", + " mv [-f | -i] src1 ... srcN directory"); exit(1); } |