summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-07 22:17:50 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-07 22:17:50 +0000
commit15e39b823c89c1b1efe80a4f936af3195e854283 (patch)
treea5ea3fca75072ed54f7e28603b93aff808bc8536
parent3935c99a5b494407f554b2ae1521df7f9f43e06b (diff)
Split bcd(6), morse(6), and ppt(6) into three separate manuals
since most of the text is different. Improve the SYNOPSIS according to suggestions by jmc@, tweaked by me. Delete a few redundant words, applying a patch from jmc@. Intentionally not doing any other text changes in this commit; for further tweaking in the tree. jmc@, tedu@, and millert@ agree with the general direction, and deraadt@ suspects we are "all grey beard fanatics" (in all caps).
-rw-r--r--games/bcd/Makefile3
-rw-r--r--games/bcd/bcd.6108
-rw-r--r--games/bcd/bcd.c5
-rw-r--r--games/morse/Makefile4
-rw-r--r--games/morse/morse.673
-rw-r--r--games/ppt/Makefile4
-rw-r--r--games/ppt/ppt.668
-rw-r--r--games/ppt/ppt.c5
8 files changed, 166 insertions, 104 deletions
diff --git a/games/bcd/Makefile b/games/bcd/Makefile
index d05058e0f5d..2636b8cbb9c 100644
--- a/games/bcd/Makefile
+++ b/games/bcd/Makefile
@@ -1,7 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/16 20:00:14 okan Exp $
+# $OpenBSD: Makefile,v 1.5 2014/11/07 22:17:49 schwarze Exp $
PROG= bcd
MAN= bcd.6
-MLINKS= bcd.6 morse.6 bcd.6 ppt.6
.include <bsd.prog.mk>
diff --git a/games/bcd/bcd.6 b/games/bcd/bcd.6
index 5548861068b..d94f8212a8a 100644
--- a/games/bcd/bcd.6
+++ b/games/bcd/bcd.6
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bcd.6,v 1.19 2014/11/06 19:42:06 tedu Exp $
+.\" $OpenBSD: bcd.6,v 1.20 2014/11/07 22:17:49 schwarze Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,106 +29,35 @@
.\"
.\" @(#)bcd.6 8.1 (Berkeley) 5/31/93
.\"
-.Dd $Mdocdate: November 6 2014 $
+.Dd $Mdocdate: November 7 2014 $
.Dt BCD 6
.Os
.Sh NAME
-.Nm bcd ,
-.Nm ppt ,
-.Nm morse
-.Nd reformat input as punch cards, paper tape or morse code
-.Sh SYNOPSIS
.Nm bcd
+.Nd reformat input as punch cards
+.Sh SYNOPSIS
+.Nm
.Op Fl l
-.Oo
-.Fl d Oc \*(Ba
-.Ar string ...
-.Oc
-.Nm ppt
-.Oo
-.Fl d Oo Fl b Oc \*(Ba
-.Ar string ...
-.Oc
-.Nm morse
-.Op Fl d | s
.Op Ar string ...
+.Nm
+.Fl d
+.Op Fl l
.Sh DESCRIPTION
The
-.Nm bcd ,
-.Nm ppt ,
-and
-.Nm morse
-commands read the given input and reformat it in the form of
-punched cards, paper tape, or morse code, respectively.
+.Nm bcd
+command reads the given input and reformats it in the form of punched cards.
Acceptable input are command line arguments or the standard input.
.Pp
-Available options for
-.Nm bcd :
+The options are as follows:
.Bl -tag -width Ds
.It Fl d
-The
-.Fl d
-option for
-.Nm bcd
-decodes punch cards on the standard input back to ASCII.
+Decode punch cards on the standard input back to ASCII.
.It Fl l
-The
-.Fl l
-option for
-.Nm bcd
-creates 80 column punch cards.
+Create 80 column punch cards.
The default is 48 columns.
.El
-.Pp
-Available options for
-.Nm ppt :
-.Bl -tag -width Ds
-.It Fl d Op Fl b
-The
-.Fl d
-option for
-.Nm ppt
-decodes paper tape on the standard input back to ASCII.
-Unprintable characters are visually encoded with
-.Xr vis 3
-unless the
-.Fl b
-flag (binary) is also specified.
-A lowercase
-.Sq x
-is printed for undecipherable input lines.
-.El
-.Pp
-Available options for
-.Nm morse :
-.Bl -tag -width Ds
-.It Fl d
-The
-.Fl d
-option for
-.Nm morse
-decodes dot-dash morse
-.Po
-as generated by using the
-.Fl s
-option
-.Pc
-back into text.
-A lowercase
-.Sq x
-is printed for undecipherable input; otherwise, text is returned uppercase.
-If the morse to be translated is given on the command line, it should be
-preceded by
-.Sq --
-to keep it from being mistaken for options.
-.It Fl s
-The
-.Fl s
-option for
-.Nm morse
-produces dots and dashes rather than words.
-.El
.Sh SEE ALSO
+.Xr ppt 6
.Rs
.%I ISO 1681:1973
.%R "Information processing--Unpunched paper cards--Specification"
@@ -137,12 +66,3 @@ produces dots and dashes rather than words.
.%I ISO 1682:1973
.%R "Information processing--80 columns punched paper cards--Dimensions and location of rectangular punched holes"
.Re
-.Rs
-.%I ECMA-10
-.%R "ECMA Standard for Data Interchange on Punched Tape"
-.Re
-.Rs
-.%I ITU-T Recommendation F.1
-.%R "Operational provisions for the international public telegram service"
-.%O Division B, I. Morse code
-.Re
diff --git a/games/bcd/bcd.c b/games/bcd/bcd.c
index 42aba7832bf..0cc64d2364b 100644
--- a/games/bcd/bcd.c
+++ b/games/bcd/bcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcd.c,v 1.19 2014/11/06 19:54:10 tedu Exp $ */
+/* $OpenBSD: bcd.c,v 1.20 2014/11/07 22:17:49 schwarze Exp $ */
/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
@@ -133,7 +133,8 @@ main(int argc, char *argv[])
columns = 80;
break;
default:
- fprintf(stderr, "unknown option");
+ fprintf(stderr, "usage: bcd [-l] [string ...]\n");
+ fprintf(stderr, "usage: bcd -d [-l]\n");
exit(1);
}
}
diff --git a/games/morse/Makefile b/games/morse/Makefile
index 3f0c1614944..f6fc0312e00 100644
--- a/games/morse/Makefile
+++ b/games/morse/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/16 20:00:14 okan Exp $
+# $OpenBSD: Makefile,v 1.5 2014/11/07 22:17:49 schwarze Exp $
PROG= morse
-NOMAN= noman
+MAN= morse.6
.include <bsd.prog.mk>
diff --git a/games/morse/morse.6 b/games/morse/morse.6
new file mode 100644
index 00000000000..18b9bcd95cf
--- /dev/null
+++ b/games/morse/morse.6
@@ -0,0 +1,73 @@
+.\" $OpenBSD: morse.6,v 1.1 2014/11/07 22:17:49 schwarze Exp $
+.\"
+.\" Copyright (c) 1988, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)bcd.6 8.1 (Berkeley) 5/31/93
+.\"
+.Dd $Mdocdate: November 7 2014 $
+.Dt MORSE 6
+.Os
+.Sh NAME
+.Nm morse
+.Nd reformat input as morse code
+.Sh SYNOPSIS
+.Nm morse
+.Op Fl d | s
+.Op Ar string ...
+.Sh DESCRIPTION
+The
+.Nm
+command reads the given input and reformats it in the form of morse code.
+Acceptable input are command line arguments or the standard input.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl d
+Decode dot-dash morse
+.Po
+as generated by the
+.Fl s
+option
+.Pc
+back into text.
+A lowercase
+.Sq x
+is printed for undecipherable input; otherwise, text is returned uppercase.
+If the morse to be translated is given on the command line, it should be
+preceded by
+.Sq --
+to keep it from being mistaken for options.
+.It Fl s
+Produce dots and dashes rather than words.
+.El
+.Sh SEE ALSO
+.Rs
+.%I ITU-T Recommendation F.1
+.%R "Operational provisions for the international public telegram service"
+.%O Division B, I. Morse code
+.Re
diff --git a/games/ppt/Makefile b/games/ppt/Makefile
index 536f251c811..c19d2b9ac5d 100644
--- a/games/ppt/Makefile
+++ b/games/ppt/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/16 20:00:14 okan Exp $
+# $OpenBSD: Makefile,v 1.5 2014/11/07 22:17:49 schwarze Exp $
PROG= ppt
-NOMAN= noman
+MAN= ppt.6
.include <bsd.prog.mk>
diff --git a/games/ppt/ppt.6 b/games/ppt/ppt.6
new file mode 100644
index 00000000000..e669b6e7024
--- /dev/null
+++ b/games/ppt/ppt.6
@@ -0,0 +1,68 @@
+.\" $OpenBSD: ppt.6,v 1.1 2014/11/07 22:17:49 schwarze Exp $
+.\"
+.\" Copyright (c) 1988, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)bcd.6 8.1 (Berkeley) 5/31/93
+.\"
+.Dd $Mdocdate: November 7 2014 $
+.Dt PPT 6
+.Os
+.Sh NAME
+.Nm ppt
+.Nd reformat input as paper tape
+.Sh SYNOPSIS
+.Nm
+.Op Ar string ...
+.Nm
+.Fl d
+.Op Fl b
+.Sh DESCRIPTION
+The
+.Nm ppt
+command reads the given input and reformats it in the form of paper tape.
+Acceptable input are command line arguments or the standard input.
+.Pp
+The options are as follows:
+.Bl -tag -width 7n
+.It Fl d Op Fl b
+Decode paper tape on the standard input back to ASCII.
+Unprintable characters are visually encoded with
+.Xr vis 3
+unless the
+.Fl b
+option (binary) is also specified.
+A lowercase
+.Sq x
+is printed for undecipherable input lines.
+.El
+.Sh SEE ALSO
+.Xr bcd 6
+.Rs
+.%I ECMA-10
+.%R "ECMA Standard for Data Interchange on Punched Tape"
+.Re
diff --git a/games/ppt/ppt.c b/games/ppt/ppt.c
index 765ceb3acc7..870f4568e97 100644
--- a/games/ppt/ppt.c
+++ b/games/ppt/ppt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppt.c,v 1.11 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: ppt.c,v 1.12 2014/11/07 22:17:49 schwarze Exp $ */
/* $NetBSD: ppt.c,v 1.4 1995/03/23 08:35:40 cgd Exp $ */
/*
@@ -49,7 +49,8 @@ void
usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-d [-b] | string ...]\n", __progname);
+ fprintf(stderr, "usage: %s [string ...]\n", __progname);
+ fprintf(stderr, "usage: %s -d [-b]\n", __progname);
exit(1);
}