rename -s option to -T (Sys V. compatibility)
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 22 Mar 1991 04:16:05 +0000 (20:16 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 22 Mar 1991 04:16:05 +0000 (20:16 -0800)
SCCS-vsn: usr.bin/ar/ar.1 6.10
SCCS-vsn: usr.bin/ar/ar.c 5.11
SCCS-vsn: usr.bin/ar/archive.c 5.7
SCCS-vsn: usr.bin/ar/archive.h 5.7
SCCS-vsn: usr.bin/ar/misc.c 5.6

usr/src/usr.bin/ar/ar.1
usr/src/usr.bin/ar/ar.c
usr/src/usr.bin/ar/archive.c
usr/src/usr.bin/ar/archive.h
usr/src/usr.bin/ar/misc.c

index 1d08205..ba97ae9 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)ar.1        6.9 (Berkeley) %G%
+.\"    @(#)ar.1        6.10 (Berkeley) %G%
 .\"
 .TH AR 1 ""
 .AT 3
 .\"
 .TH AR 1 ""
 .AT 3
@@ -15,15 +15,15 @@ ar \- create and maintain library archives
 .SH SYNOPSIS
 .nf
 .ft B
 .SH SYNOPSIS
 .nf
 .ft B
-ar -d [-sv] archive file ...
-ar -m [-sv] archive file ...
-ar -m [-abisv] position archive file ...
-ar -p [-sv] archive [file ...]
-ar -q [-csv] archive file ...
-ar -r [-cusv] archive file ...
-ar -r [-abciusv] position archive file ...
-ar -t [-sv] archive [file ...]
-ar -x [-ousv] archive [file ...]
+ar -d [-Tv] archive file ...
+ar -m [-Tv] archive file ...
+ar -m [-abiTv] position archive file ...
+ar -p [-Tv] archive [file ...]
+ar -q [-cTv] archive file ...
+ar -r [-cuTv] archive file ...
+ar -r [-abciuTv] position archive file ...
+ar -t [-Tv] archive [file ...]
+ar -x [-ouTv] archive [file ...]
 .fi
 .ft R
 .SH DESCRIPTION
 .fi
 .ft R
 .SH DESCRIPTION
@@ -118,7 +118,7 @@ within the archive.
 New files are appended to the archive unless one of the options \-a, \-b
 or \-i is specified.
 .TP
 New files are appended to the archive unless one of the options \-a, \-b
 or \-i is specified.
 .TP
-\-s
+\-T
 Select and/or name archive members using only the first fifteen characters
 of the archive member or command line file name.
 The historic archive format had sixteen bytes for the name, but some
 Select and/or name archive members using only the first fifteen characters
 of the archive member or command line file name.
 The historic archive format had sixteen bytes for the name, but some
@@ -215,8 +215,8 @@ This implementation of
 .I ar
 is backward compatible with previous versions of
 .I ar
 .I ar
 is backward compatible with previous versions of
 .I ar
-in that it can read and write (using the \-s option) historic archives.
-The \-s option is provided for compatibility only, and will be deleted
+in that it can read and write (using the \-T option) historic archives.
+The \-T option is provided for compatibility only, and will be deleted
 in a future release.
 See
 .IR ar (5)
 in a future release.
 See
 .IR ar (5)
index aa95d27..890d473 100644 (file)
@@ -15,7 +15,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)ar.c       5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)ar.c       5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -67,7 +67,7 @@ main(argc, argv)
                argv[1] = p;
        }
 
                argv[1] = p;
        }
 
-       while ((c = getopt(argc, argv, "abcdilmopqrstuvx")) != EOF) {
+       while ((c = getopt(argc, argv, "abcdilmopqrTtuvx")) != EOF) {
                switch(c) {
                case 'a':
                        options |= AR_A;
                switch(c) {
                case 'a':
                        options |= AR_A;
@@ -105,8 +105,8 @@ main(argc, argv)
                        options |= AR_R;
                        fcall = replace;
                        break;
                        options |= AR_R;
                        fcall = replace;
                        break;
-               case 's':
-                       options |= AR_S;
+               case 'T':
+                       options |= AR_TR;
                        break;
                case 't':
                        options |= AR_T;
                        break;
                case 't':
                        options |= AR_T;
@@ -151,26 +151,26 @@ main(argc, argv)
                }
                posname = rname(posarg);
        }
                }
                posname = rname(posarg);
        }
-       /* -d only valid with -sv. */
-       if (options & AR_D && options & ~(AR_D|AR_S|AR_V))
+       /* -d only valid with -Tv. */
+       if (options & AR_D && options & ~(AR_D|AR_TR|AR_V))
                badoptions("-d");
                badoptions("-d");
-       /* -m only valid with -abisv. */
-       if (options & AR_M && options & ~(AR_A|AR_B|AR_M|AR_S|AR_V))
+       /* -m only valid with -abiTv. */
+       if (options & AR_M && options & ~(AR_A|AR_B|AR_M|AR_TR|AR_V))
                badoptions("-m");
                badoptions("-m");
-       /* -p only valid with -sv. */
-       if (options & AR_P && options & ~(AR_P|AR_S|AR_V))
+       /* -p only valid with -Tv. */
+       if (options & AR_P && options & ~(AR_P|AR_TR|AR_V))
                badoptions("-p");
                badoptions("-p");
-       /* -q only valid with -csv. */
-       if (options & AR_Q && options & ~(AR_C|AR_Q|AR_S|AR_V))
+       /* -q only valid with -cTv. */
+       if (options & AR_Q && options & ~(AR_C|AR_Q|AR_TR|AR_V))
                badoptions("-q");
                badoptions("-q");
-       /* -r only valid with -abcusv. */
-       if (options & AR_R && options & ~(AR_A|AR_B|AR_C|AR_R|AR_U|AR_S|AR_V))
+       /* -r only valid with -abcuTv. */
+       if (options & AR_R && options & ~(AR_A|AR_B|AR_C|AR_R|AR_U|AR_TR|AR_V))
                badoptions("-r");
                badoptions("-r");
-       /* -t only valid with -sv. */
-       if (options & AR_T && options & ~(AR_T|AR_S|AR_V))
+       /* -t only valid with -Tv. */
+       if (options & AR_T && options & ~(AR_T|AR_TR|AR_V))
                badoptions("-t");
                badoptions("-t");
-       /* -x only valid with -ousv. */
-       if (options & AR_X && options & ~(AR_O|AR_U|AR_S|AR_V|AR_X))
+       /* -x only valid with -ouTv. */
+       if (options & AR_X && options & ~(AR_O|AR_U|AR_TR|AR_V|AR_X))
                badoptions("-x");
 
        if (!(archive = *argv++)) {
                badoptions("-x");
 
        if (!(archive = *argv++)) {
@@ -199,14 +199,14 @@ badoptions(arg)
 static void
 usage()
 {
 static void
 usage()
 {
-       (void)fprintf(stderr, "usage:  ar -d [-sv] archive file ...\n");
-       (void)fprintf(stderr, "\tar -m [-sv] archive file ...\n");
-       (void)fprintf(stderr, "\tar -m [-abisv] position archive file ...\n");
-       (void)fprintf(stderr, "\tar -p [-sv] archive [file ...]\n");
-       (void)fprintf(stderr, "\tar -q [-csv] archive file ...\n");
-       (void)fprintf(stderr, "\tar -r [-cusv] archive file ...\n");
-       (void)fprintf(stderr, "\tar -r [-abciusv] position archive file ...\n");
-       (void)fprintf(stderr, "\tar -t [-sv] archive [file ...]\n");
-       (void)fprintf(stderr, "\tar -x [-ousv] archive [file ...]\n");
+       (void)fprintf(stderr, "usage:  ar -d [-Tv] archive file ...\n");
+       (void)fprintf(stderr, "\tar -m [-Tv] archive file ...\n");
+       (void)fprintf(stderr, "\tar -m [-abiTv] position archive file ...\n");
+       (void)fprintf(stderr, "\tar -p [-Tv] archive [file ...]\n");
+       (void)fprintf(stderr, "\tar -q [-cTv] archive file ...\n");
+       (void)fprintf(stderr, "\tar -r [-cuTv] archive file ...\n");
+       (void)fprintf(stderr, "\tar -r [-abciuTv] position archive file ...\n");
+       (void)fprintf(stderr, "\tar -t [-Tv] archive [file ...]\n");
+       (void)fprintf(stderr, "\tar -x [-ouTv] archive [file ...]\n");
        exit(1);
 }      
        exit(1);
 }      
index 6a27d51..1d4e7f5 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)archive.c  5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)archive.c  5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -189,7 +189,7 @@ put_arobj(cfp, sb)
                 * a space, use extended format 1.
                 */
                lname = strlen(name);
                 * a space, use extended format 1.
                 */
                lname = strlen(name);
-               if (options & AR_S) {
+               if (options & AR_TR) {
                        if (lname > OLDARMAXNAME) {
                                (void)fflush(stdout);
                                (void)fprintf(stderr,
                        if (lname > OLDARMAXNAME) {
                                (void)fflush(stdout);
                                (void)fprintf(stderr,
index d413432..41e0c95 100644 (file)
@@ -5,7 +5,7 @@
  * This code is derived from software contributed to Berkeley by
  * Hugh Smith at The University of Guelph.
  *
  * This code is derived from software contributed to Berkeley by
  * Hugh Smith at The University of Guelph.
  *
- *     @(#)archive.h   5.6 (Berkeley) %G%
+ *     @(#)archive.h   5.7 (Berkeley) %G%
  */
 
 /* Ar(1) options. */
  */
 
 /* Ar(1) options. */
@@ -18,8 +18,8 @@
 #define        AR_P    0x0040
 #define        AR_Q    0x0080
 #define        AR_R    0x0100
 #define        AR_P    0x0040
 #define        AR_Q    0x0080
 #define        AR_R    0x0100
-#define        AR_S    0x0200
-#define        AR_T    0x0400
+#define        AR_T    0x0200
+#define        AR_TR   0x0400
 #define        AR_U    0x0800
 #define        AR_V    0x1000
 #define        AR_X    0x2000
 #define        AR_U    0x0800
 #define        AR_V    0x1000
 #define        AR_X    0x2000
index b844d2a..cc1e015 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)misc.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)misc.c     5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -101,7 +101,7 @@ rname(path)
 compare(dest)
        char *dest;
 {
 compare(dest)
        char *dest;
 {
-       if (options & AR_S)
+       if (options & AR_TR)
                return(!strncmp(chdr.name, rname(dest), OLDARMAXNAME));
        return(!strcmp(chdr.name, rname(dest)));
 }
                return(!strncmp(chdr.name, rname(dest), OLDARMAXNAME));
        return(!strcmp(chdr.name, rname(dest)));
 }