comply with ar source changes nothing else
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 13 Mar 1991 01:20:03 +0000 (17:20 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 13 Mar 1991 01:20:03 +0000 (17:20 -0800)
SCCS-vsn: usr.bin/ranlib/Makefile 5.4
SCCS-vsn: usr.bin/ranlib/build.c 5.3
SCCS-vsn: usr.bin/ranlib/touch.c 5.3

usr/src/usr.bin/ranlib/Makefile
usr/src/usr.bin/ranlib/build.c
usr/src/usr.bin/ranlib/touch.c

index cccbb9c..2e7f3d9 100644 (file)
@@ -1,7 +1,7 @@
-#      @(#)Makefile    5.3 (Berkeley) %G%
+#      @(#)Makefile    5.4 (Berkeley) %G%
 
 PROG=  ranlib
 
 PROG=  ranlib
-SRCS=  archive.c build.c header.c misc.c ranlib.c touch.c
+SRCS=  archive.c build.c misc.c ranlib.c touch.c
 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../ar
 MAN1=  ranlib.0
 VPATH= ${.CURDIR}/../ar
 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../ar
 MAN1=  ranlib.0
 VPATH= ${.CURDIR}/../ar
index e6a1bc5..21b3233 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)build.c    5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)build.c    5.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -53,14 +53,13 @@ build()
 
        /* Read through the archive, creating list of symbols. */
        pnext = &rhead;
 
        /* Read through the archive, creating list of symbols. */
        pnext = &rhead;
-       while(get_header(afd)) {
+       while(get_arobj(afd)) {
                if (!strcmp(chdr.name, RANLIBMAG)) {
                if (!strcmp(chdr.name, RANLIBMAG)) {
-                       SKIP(afd, chdr.size, archive);
+                       skip_arobj(afd);
                        continue;
                }
                rexec(afd, tfd);
                        continue;
                }
                rexec(afd, tfd);
-               put_header(&cf, (struct stat *)NULL);
-               copyfile(&cf, chdr.size);
+               put_arobj(&cf, (struct stat *)NULL);
        }
        *pnext = NULL;
 
        }
        *pnext = NULL;
 
@@ -71,7 +70,7 @@ build()
        size = lseek(tfd, (off_t)0, SEEK_CUR);
        (void)lseek(tfd, (off_t)0, SEEK_SET);
        SETCF(tfd, tname, afd, archive, RPAD|WPAD);
        size = lseek(tfd, (off_t)0, SEEK_CUR);
        (void)lseek(tfd, (off_t)0, SEEK_SET);
        SETCF(tfd, tname, afd, archive, RPAD|WPAD);
-       copyfile(&cf, size);
+       copy_ar(&cf, size);
        (void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
        (void)close(tfd);
 
        (void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
        (void)close(tfd);
 
index 7cc4d42..1ceaeb5 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)touch.c    5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)touch.c    5.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -32,7 +32,7 @@ touch()
 
        afd = open_archive(O_RDWR);
 
 
        afd = open_archive(O_RDWR);
 
-       if (!get_header(afd) ||
+       if (!get_arobj(afd) ||
            strncmp(RANLIBMAG, chdr.name, sizeof(RANLIBMAG) - 1)) {
                (void)fprintf(stderr,
                    "ranlib: %s: no symbol table.\n", archive);
            strncmp(RANLIBMAG, chdr.name, sizeof(RANLIBMAG) - 1)) {
                (void)fprintf(stderr,
                    "ranlib: %s: no symbol table.\n", archive);