summaryrefslogtreecommitdiffstats
path: root/usr.bin/soelim
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-11 07:29:17 +0000
committercharnier <charnier@FreeBSD.org>1997-08-11 07:29:17 +0000
commit9cf0d924dd2f91d3527a26c4cd14887d0f982be8 (patch)
treef6c3b41cdacfb516aba2d66de42da3c6e2869f68 /usr.bin/soelim
parent12409694bd9cd25a5d6e5f676f6794ebcb19dc6e (diff)
downloadFreeBSD-src-9cf0d924dd2f91d3527a26c4cd14887d0f982be8.zip
FreeBSD-src-9cf0d924dd2f91d3527a26c4cd14887d0f982be8.tar.gz
Use err(3). Add prototype.
Diffstat (limited to 'usr.bin/soelim')
-rw-r--r--usr.bin/soelim/soelim.16
-rw-r--r--usr.bin/soelim/soelim.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/usr.bin/soelim/soelim.1 b/usr.bin/soelim/soelim.1
index 68575aa..bd4764e 100644
--- a/usr.bin/soelim/soelim.1
+++ b/usr.bin/soelim/soelim.1
@@ -38,8 +38,8 @@
.Nm soelim
.Nd eliminate \&.so's from nroff input
.Sh SYNOPSIS
-.Nm soelim
-.Op Ar file ...
+.Nm
+.Op Ar
.Sh DESCRIPTION
.Nm Soelim
reads the specified files or the standard input and performs the textual
@@ -69,7 +69,7 @@ i.e.
.Dl \'so /usr/lib/tmac.s
.Pp
A sample usage of
-.Nm soelim
+.Nm
would be
.Pp
.Bd -literal -offset indent -compact
diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c
index fab07c3..635088a 100644
--- a/usr.bin/soelim/soelim.c
+++ b/usr.bin/soelim/soelim.c
@@ -32,15 +32,20 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1980, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)soelim.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
+#include <err.h>
#include <stdio.h>
/*
* soelim - a filter to process n/troff input eliminating .so's
@@ -60,6 +65,9 @@ static char sccsid[] = "@(#)soelim.c 8.1 (Berkeley) 6/6/93";
*/
#define STDIN_NAME "-"
+int process __P((char *));
+
+int
main(argc, argv)
int argc;
char *argv[];
@@ -79,7 +87,8 @@ main(argc, argv)
exit(0);
}
-int process(file)
+int
+process(file)
char *file;
{
register char *cp;
@@ -93,7 +102,7 @@ int process(file)
} else {
soee = fopen(file, "r");
if (soee == NULL) {
- perror(file);
+ warn(file);
return(-1);
}
}
OpenPOWER on IntegriCloud