summaryrefslogtreecommitdiffstats
path: root/contrib/groff
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>1999-02-18 16:54:24 +0000
committerfenner <fenner@FreeBSD.org>1999-02-18 16:54:24 +0000
commitbb619ee8f34169e9d3d3b30d7df43274fbe1c339 (patch)
treec58f4b3567bd85dd3fdce66b240f2dda3b39592c /contrib/groff
parenta843a9216e78f7680c8a32f7219f1630ac555920 (diff)
downloadFreeBSD-src-bb619ee8f34169e9d3d3b30d7df43274fbe1c339.zip
FreeBSD-src-bb619ee8f34169e9d3d3b30d7df43274fbe1c339.tar.gz
Make .Os behave as defined (unrecognized arguments displayed as given).
Add a warning for unknown BSD versions. Make ".Os FreeBSD" work without a warning (fix bug in previous commit).
Diffstat (limited to 'contrib/groff')
-rw-r--r--contrib/groff/tmac/doc-common20
1 files changed, 8 insertions, 12 deletions
diff --git a/contrib/groff/tmac/doc-common b/contrib/groff/tmac/doc-common
index 4251a96..1e8724f 100644
--- a/contrib/groff/tmac/doc-common
+++ b/contrib/groff/tmac/doc-common
@@ -201,12 +201,7 @@
.\" .ds dD \s+4\f(CODRAFT\fP\s-4\ \ \-\-\ \ \\*(dD\ \ \-\-\ \ \s+4\f(CODRAFT\s-4
.de Os
.ds oS Null
-.if "\\$1"" \{\
-. ds oS BSD
-.\}
-.if "\\$2"" \{\
-. ds aa Non-Null
-.\}
+.if "\\$1"" .ds oS BSD
.if "\\$1"ATT" \{\
. ds oS AT&T
. if "\\$2"" .as oS \0UNIX
@@ -230,11 +225,11 @@
. if "\\$2"4.3t" .ds oS 4.3-Tahoe Berkeley Distribution
. if "\\$2"4.3r" .ds oS 4.3-Reno Berkeley Distribution
. if "\\$2"4.4" .ds oS 4.4BSD
+. if "\\*(oS"Null" .tm Unknown BSD version ``\\$2'' at line \\n(c.
.\}
.if "\\$1"FreeBSD" \{\
-. ie "\\$2"2" .ds oS FreeBSD 2.0
-. el .ds oS FreeBSD \\$2
-. ie \\n(.$==0 \c
+. if "\\$2"2" .ds oS FreeBSD 2.0
+. ie \\n(.$==1 \c
. el .ie "\\$2"2" \c
. el .ie "\\$2"2.0" \c
. el .ie "\\$2"2.0.5" \c
@@ -252,9 +247,10 @@
. el .ie "\\$2"4.0" \c
. el .tm Unknown FreeBSD version ``\\$2'' at line \\n(c.
.\}
-.if "\\*(oS"Null" .ds oS \0\\$1
-.if "\\*(aa"Non-Null" .as oS \0\\$2
-.rm aa
+.if "\\*(oS"Null" \{\
+. ds oS \&\\$1
+. if !"\\$2"" .as oS \& \\$2
+.\}
..
.de Dd
.if !"\\*(dD"" .nr gX 1
OpenPOWER on IntegriCloud