From c7a6efe93377d02246c6f8387329b2fb0d0ddbc0 Mon Sep 17 00:00:00 2001 From: wosch Date: Fri, 1 Mar 1996 06:14:13 +0000 Subject: delete unused label endarg correct indent of last new code fix usage string, option -f before option -i (alphabetic order) --- bin/mv/mv.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'bin/mv') 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); } -- cgit v1.1