diff options
| author | Philippe Charnier <charnier@FreeBSD.org> | 1997-08-04 06:48:25 +0000 |
|---|---|---|
| committer | Philippe Charnier <charnier@FreeBSD.org> | 1997-08-04 06:48:25 +0000 |
| commit | ee461acc1a024bd51a3936790b1cb452534bf2db (patch) | |
| tree | d17d1d357524ca997281141350768336c226643b | |
| parent | 9d63ad4978e0e1539652482619e149f6915a6702 (diff) | |
Notes
| -rw-r--r-- | usr.bin/ranlib/build.c | 5 | ||||
| -rw-r--r-- | usr.bin/ranlib/misc.c | 10 | ||||
| -rw-r--r-- | usr.bin/ranlib/ranlib.1 | 6 | ||||
| -rw-r--r-- | usr.bin/ranlib/ranlib.1aout | 6 | ||||
| -rw-r--r-- | usr.bin/ranlib/ranlib.5 | 4 | ||||
| -rw-r--r-- | usr.bin/ranlib/ranlib.c | 15 | ||||
| -rw-r--r-- | usr.bin/ranlib/touch.c | 18 |
7 files changed, 40 insertions, 24 deletions
diff --git a/usr.bin/ranlib/build.c b/usr.bin/ranlib/build.c index 3b70630c5798..eedb7215d08d 100644 --- a/usr.bin/ranlib/build.c +++ b/usr.bin/ranlib/build.c @@ -35,11 +35,14 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)build.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/types.h> -#include <sys/errno.h> #include <sys/stat.h> #include <a.out.h> diff --git a/usr.bin/ranlib/misc.c b/usr.bin/ranlib/misc.c index 600e49eff8b1..97e970de1140 100644 --- a/usr.bin/ranlib/misc.c +++ b/usr.bin/ranlib/misc.c @@ -35,17 +35,22 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/param.h> #include <sys/signal.h> +#include <err.h> #include <errno.h> -#include <unistd.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include "pathnames.h" extern char *archive; /* archive name */ @@ -105,6 +110,5 @@ void error(name) char *name; { - (void)fprintf(stderr, "ranlib: %s: %s\n", name, strerror(errno)); - exit(1); + err(1, "%s", name); } diff --git a/usr.bin/ranlib/ranlib.1 b/usr.bin/ranlib/ranlib.1 index bb419d6c5d9d..2d37924b7668 100644 --- a/usr.bin/ranlib/ranlib.1 +++ b/usr.bin/ranlib/ranlib.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ranlib.1 8.1 (Berkeley) 6/6/93 -.\" $Id$ +.\" $Id: ranlib.1,v 1.5 1997/02/22 19:56:39 peter Exp $ .\" .Dd June 6, 1993 .Dt RANLIB 1 @@ -39,7 +39,7 @@ .Nm ranlib .Nd table-of-contents for archive libraries .Sh SYNOPSIS -.Nm ranlib +.Nm .Op Fl t .Ar file ... .Sh DESCRIPTION @@ -84,6 +84,6 @@ Temporary file names. .Xr ranlib 5 .Sh HISTORY A -.Nm ranlib +.Nm command appeared in .At v7 . diff --git a/usr.bin/ranlib/ranlib.1aout b/usr.bin/ranlib/ranlib.1aout index bb419d6c5d9d..2d37924b7668 100644 --- a/usr.bin/ranlib/ranlib.1aout +++ b/usr.bin/ranlib/ranlib.1aout @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ranlib.1 8.1 (Berkeley) 6/6/93 -.\" $Id$ +.\" $Id: ranlib.1,v 1.5 1997/02/22 19:56:39 peter Exp $ .\" .Dd June 6, 1993 .Dt RANLIB 1 @@ -39,7 +39,7 @@ .Nm ranlib .Nd table-of-contents for archive libraries .Sh SYNOPSIS -.Nm ranlib +.Nm .Op Fl t .Ar file ... .Sh DESCRIPTION @@ -84,6 +84,6 @@ Temporary file names. .Xr ranlib 5 .Sh HISTORY A -.Nm ranlib +.Nm command appeared in .At v7 . diff --git a/usr.bin/ranlib/ranlib.5 b/usr.bin/ranlib/ranlib.5 index e953c51056df..132d2814fae9 100644 --- a/usr.bin/ranlib/ranlib.5 +++ b/usr.bin/ranlib/ranlib.5 @@ -41,7 +41,7 @@ .Fd #include <ranlib.h> .Sh DESCRIPTION The archive table-of-contents command -.Nm ranlib +.Nm creates a table of contents for archives, containing object files, to be used by the link-editor .Xr ld 1 . @@ -49,7 +49,7 @@ It operates on archives created with the utility .Xr ar 1 . .Pp The -.Nm Ranlib +.Nm function prepends a new file to the archive which has three separate parts. The first part is a standard archive header, which has a special name diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index d58a4cf4367a..0b60eb1c68cc 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -35,24 +35,29 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1990, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)ranlib.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/types.h> #include <dirent.h> #include <stdio.h> #include <stdlib.h> -#include <archive.h> +#include <unistd.h> +#include "archive.h" extern int build __P(( void )); extern int touch __P(( void )); -void usage __P((void)); +static void usage __P((void)); CHDR chdr; u_int options; /* UNUSED -- keep open_archive happy */ @@ -87,8 +92,8 @@ main(argc, argv) exit(eval); } -void -usage(void) +static void +usage() { (void)fprintf(stderr, "usage: ranlib [-t] archive ...\n"); exit(1); diff --git a/usr.bin/ranlib/touch.c b/usr.bin/ranlib/touch.c index 68a86a4bf86f..93670b39b696 100644 --- a/usr.bin/ranlib/touch.c +++ b/usr.bin/ranlib/touch.c @@ -35,19 +35,24 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/types.h> -#include <fcntl.h> +#include <ar.h> #include <dirent.h> +#include <err.h> +#include <fcntl.h> #include <ranlib.h> -#include <ar.h> -#include <time.h> -#include <unistd.h> #include <stdio.h> #include <string.h> -#include <archive.h> +#include <time.h> +#include <unistd.h> +#include "archive.h" extern CHDR chdr; /* converted header */ extern char *archive; /* archive name */ @@ -65,8 +70,7 @@ touch(void) if (!get_arobj(afd) || strncmp(RANLIBMAG, chdr.name, sizeof(RANLIBMAG) - 1)) { - (void)fprintf(stderr, - "ranlib: %s: no symbol table.\n", archive); + warnx("%s: no symbol table", archive); return(1); } settime(afd); |
