summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-06-26 11:25:17 +0000
committercharnier <charnier@FreeBSD.org>1997-06-26 11:25:17 +0000
commitd9b3513e3c222244ce0321df7ec93793f28f2d38 (patch)
treed8d5611721cc9aba3400ee029c8efef3dd67cf2e /usr.bin
parent948c4a67c32caa8d0ba4ac0c69ad4b47c4ba237e (diff)
downloadFreeBSD-src-d9b3513e3c222244ce0321df7ec93793f28f2d38.zip
FreeBSD-src-d9b3513e3c222244ce0321df7ec93793f28f2d38.tar.gz
Add usage(). Put program name in bold in the man page.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/colldef/colldef.18
-rw-r--r--usr.bin/colldef/parse.y14
2 files changed, 15 insertions, 7 deletions
diff --git a/usr.bin/colldef/colldef.1 b/usr.bin/colldef/colldef.1
index da08211..b668d1a 100644
--- a/usr.bin/colldef/colldef.1
+++ b/usr.bin/colldef/colldef.1
@@ -23,6 +23,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
+.\" $Id$
+.\"
.Dd January, 27 1995
.Dt COLLDEF 1
.Os
@@ -35,7 +37,7 @@
.Op Fl o Ar out_file
.Op Ar filename
.Sh DESCRIPTION
-.Ar colldef
+.Nm Colldef
converts a collation sequence source definition
into a format usable by the
.Fn strxfrm
@@ -56,7 +58,7 @@ or
transforms its arguments and does a
comparison.
.Pp
-.Ar colldef
+.Nm Colldef
reads the collation sequence source definition
from the standard input and stores the converted definition in filename.
The output file produced contains the
@@ -233,7 +235,7 @@ The backslash character
is used for continuation. In this case, no characters are permitted
after the backslash character.
.Sh EXIT STATUS
-.Ar colldef
+.Nm Colldef
exits with the following values:
.Ar 0
No errors were found and the output was successfully created.
diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y
index c4b51f3..8cc7836 100644
--- a/usr.bin/colldef/parse.y
+++ b/usr.bin/colldef/parse.y
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: parse.y,v 1.7 1997/02/22 19:54:31 peter Exp $
+ * $Id: parse.y,v 1.8 1997/03/11 14:40:40 peter Exp $
*/
#include <err.h>
@@ -40,6 +40,7 @@
extern int line_no;
extern FILE *yyin;
void yyerror(char *fmt, ...);
+static void usage __P((void));
char map_name[FILENAME_MAX] = ".";
@@ -233,9 +234,7 @@ main(ac, av)
break;
default:
- fprintf(stderr, "Usage: %s [-o out_file] [-I map_dir] [in_file]\n",
- av[0]);
- exit(EX_OK);
+ usage();
}
}
ac -= optind;
@@ -250,6 +249,13 @@ main(ac, av)
return 0;
}
+static void
+usage()
+{
+ fprintf(stderr, "usage: colldef [-o out_file] [-I map_dir] [filename]\n");
+ exit(EX_OK);
+}
+
void yyerror(char *fmt, ...)
{
va_list ap;
OpenPOWER on IntegriCloud