X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/d55bfd383bfba54aa683c72139b1ae02de2c3b9a..b041ccece3687baa46a947a5695b634ef113edfd:/usr/src/usr.bin/mt/mt.c diff --git a/usr/src/usr.bin/mt/mt.c b/usr/src/usr.bin/mt/mt.c index fe9195634a..40d301ab0f 100644 --- a/usr/src/usr.bin/mt/mt.c +++ b/usr/src/usr.bin/mt/mt.c @@ -1,4 +1,19 @@ -static char *sccsid = "@(#)mt.c 4.6 (Berkeley) 83/02/08"; +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1980 Regents of the University of California.\n\ + All rights reserved.\n"; +#endif not lint + +#ifndef lint +static char sccsid[] = "@(#)mt.c 5.1 (Berkeley) %G%"; +#endif not lint + /* * mt -- * magnetic tape manipulation program @@ -41,17 +56,17 @@ main(argc, argv) register char *cp; register struct commands *comp; - if (argc < 2) { - fprintf(stderr, "usage: mt [ -f device ] command [ count ]\n"); - exit(1); - } - if ((equal(argv[1], "-t") || equal(argv[1], "-f")) && argc > 2) { + if (argc > 2 && (equal(argv[1], "-t") || equal(argv[1], "-f"))) { argc -= 2; tape = argv[2]; argv += 2; } else if ((tape = getenv("TAPE")) == NULL) tape = DEFTAPE; + if (argc < 2) { + fprintf(stderr, "usage: mt [ -f device ] command [ count ]\n"); + exit(1); + } cp = argv[1]; for (comp = com; comp->c_name != NULL; comp++) if (strncmp(cp, comp->c_name, strlen(cp)) == 0) @@ -97,8 +112,8 @@ main(argc, argv) #endif #ifdef sun -#include -#include +#include +#include #endif struct tape_desc { @@ -116,7 +131,7 @@ struct tape_desc { #endif #ifdef sun { MT_ISCPC, "TapeMaster", TMS_BITS, 0 }, - { MT_ISARCH, "Archive", ARCH_CTRL_BITS, ARCH_BITS }, + { MT_ISAR, "Archive", ARCH_CTRL_BITS, ARCH_BITS }, #endif { 0 } };