summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-06-06 22:38:11 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-06-06 22:38:11 +0000
commit7c5a95c9fb1e8b1e3dbe1fafb015ae91fffef87c (patch)
tree4a36b65d22d4a497e8c30a538751fe5fe5aef24b
parentca08589faa3f5c9d01d6e436c42eccad1fc0eefa (diff)
update .Vt (variable type) macro:
- .Vt now parsed and callable - do not cause line break/insert vertical space outside SYNOPSIS - respect punctuation the hard work from jared yanovich; ok millert@
-rw-r--r--share/tmac/mdoc/doc56
-rw-r--r--share/tmac/mdoc/doc-common3
-rw-r--r--share/tmac/mdoc/doc-ditroff3
-rw-r--r--share/tmac/mdoc/doc-nroff3
4 files changed, 41 insertions, 24 deletions
diff --git a/share/tmac/mdoc/doc b/share/tmac/mdoc/doc
index 49872d66d45..3873ead45a9 100644
--- a/share/tmac/mdoc/doc
+++ b/share/tmac/mdoc/doc
@@ -1,4 +1,4 @@
-.\" $OpenBSD: doc,v 1.14 2004/02/20 10:29:05 jmc Exp $
+.\" $OpenBSD: doc,v 1.15 2004/06/06 22:38:09 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -2484,30 +2484,44 @@
.in \\n(.iu-\\n(Dsu
..
.\"
-.\" NS Vt macro - Variable type (for forcing old style variable declarations)
-.\" this is not done in the same manner as .Ot for fortrash - clean up later
+.\" NS Vt macro - Variable type
.de Vt
-.\" if a function declaration was the last thing given, want vertical space
-.if \\n(fD>0 \{\
-. Pp
-. nr fD 0
+.if \\n(aC==0 \{\
+. ie \\n(.$==0 .tm Usage: .Vt variable_type ... \\*(Pu (#\\n(.c)
+. el \{\
+. ds mN Vt
+. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+. \}
.\}
-.\" if a subroutine was the last thing given, want vertical space
-.if \\n(fZ>0 \{\
-. ie \\n(fX==0 \{\
-. Pp
-. rs
+.if \\n(aC>\\n(aP \{\
+. if \\n(nS>0 \{\
+. \" if a function declaration was the last
+. \" thing given, want vertical space
+. if \\n(fD>0 \{\
+. Pp
+. nr fD 0
+. \}
+. \" if a subroutine was the last thing
+. \" given, want vertical space
+. if \\n(fZ>0 \{\
+. ie \\n(fX==0 \{\
+. Pp
+.\" rs
+. \}
+. el .br
+. \}
+. nr fX 1
+. \}
+. as b1 \\*(vY
+. nr aP \\n(aP+1
+. nr cF \\n(.f
+. nr cZ \\n(.s
+. nR
+. if \\n(nS>0 \{\
+. ie \\n(oT==0 .br
+. el \&\ \&
. \}
-. el .br
.\}
-.nr fX \\n(fX+1
-.nr cF \\n(.f
-.nr cZ \\n(.s
-\\*(fT\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.ie \\n(oT==0 .br
-.el \&\ \&
-.ft \\n(cF
-.fs \\n(cZ
..
.\"
.\" NS Ft macro - Function type
diff --git a/share/tmac/mdoc/doc-common b/share/tmac/mdoc/doc-common
index f843d5d5be9..aa5f8a363e0 100644
--- a/share/tmac/mdoc/doc-common
+++ b/share/tmac/mdoc/doc-common
@@ -1,4 +1,4 @@
-.\" $OpenBSD: doc-common,v 1.37 2004/04/21 15:58:24 miod Exp $
+.\" $OpenBSD: doc-common,v 1.38 2004/06/06 22:38:10 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -98,6 +98,7 @@
.nr Tv 1
.nr Tx 22n
.nr Va 12n
+.nr Vt 12n
.nr Xc 3
.nr Xo 1
.nr Xr 10n
diff --git a/share/tmac/mdoc/doc-ditroff b/share/tmac/mdoc/doc-ditroff
index 5c9aec5fd66..5127f6785ab 100644
--- a/share/tmac/mdoc/doc-ditroff
+++ b/share/tmac/mdoc/doc-ditroff
@@ -1,4 +1,4 @@
-.\" $OpenBSD: doc-ditroff,v 1.4 2003/09/02 19:04:58 jmc Exp $
+.\" $OpenBSD: doc-ditroff,v 1.5 2004/06/06 22:38:10 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -72,6 +72,7 @@
.ds vA \fI\s10
.ds Vs \fR\s10
.ds vT \f(CB\s10
+.ds vY \fC\s10
.ds xR \fC\s10
.tr *\(**
.nr sI \w\fC,u*5
diff --git a/share/tmac/mdoc/doc-nroff b/share/tmac/mdoc/doc-nroff
index a504dbb31c3..8d1229fcd9b 100644
--- a/share/tmac/mdoc/doc-nroff
+++ b/share/tmac/mdoc/doc-nroff
@@ -1,4 +1,4 @@
-.\" $OpenBSD: doc-nroff,v 1.6 2003/09/02 19:04:58 jmc Exp $
+.\" $OpenBSD: doc-nroff,v 1.7 2004/06/06 22:38:10 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -71,6 +71,7 @@
.ds vA \fI
.ds Vs \fR
.ds vT \fB
+.ds vY \fI
.ds xR \fR
.\" MISCELLANEOUS
.nr sI .5i