summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-04-10 13:33:32 +0000
committerwlemb <wlemb>2001-04-10 13:33:32 +0000
commit620edff2a2e9827f9ea704a5d4901f1ccf402e06 (patch)
tree4251faadc32a48a2a47fc067c09a6337b9d0fc6e
parent3eba6c39c3d6e7fd573a1c3f74063a35f9861407 (diff)
downloadgroff-620edff2a2e9827f9ea704a5d4901f1ccf402e06.tar.gz
Added skeleton macro for defunct macros.
Updated documentation. * tmac/doc.tmac (doc-defunct-macro): New macro. (Db, Ds, Ex, Or, Sf): Reimplemented using this macro. (doc-restore-global-vars): Fixed typo. * tmac/doc-common: Removed `Or' and `Sf' registers. Moved obsolete `Ds' macro to doc.tmac. * tmac/groff_mdoc.man: Bump document date. Document `.Vt' under ``Variable Types''. Removed documentation for obsolete `.Or' macro.
-rw-r--r--ChangeLog17
-rw-r--r--tmac/doc-common11
-rw-r--r--tmac/doc.tmac71
-rw-r--r--tmac/groff_mdoc.man62
4 files changed, 73 insertions, 88 deletions
diff --git a/ChangeLog b/ChangeLog
index 80a78805..b0f00c29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2001-04-10 Ruslan Ermilov <ru@FreeBSD.org>
+
+ Added skeleton macro for defunct macros.
+
+ Updated documentation.
+
+ * tmac/doc.tmac (doc-defunct-macro): New macro.
+ (Db, Ds, Ex, Or, Sf): Reimplemented using this macro.
+ (doc-restore-global-vars): Fixed typo.
+
+ * tmac/doc-common: Removed `Or' and `Sf' registers.
+ Moved obsolete `Ds' macro to doc.tmac.
+
+ * tmac/groff_mdoc.man: Bump document date.
+ Document `.Vt' under ``Variable Types''.
+ Removed documentation for obsolete `.Or' macro.
+
2001-04-10 Werner LEMBERG <wl@gnu.org>
* NEWS: Updated.
diff --git a/tmac/doc-common b/tmac/doc-common
index 0936dc4e..8e788ebd 100644
--- a/tmac/doc-common
+++ b/tmac/doc-common
@@ -76,6 +76,7 @@
.nr Dt 8n\" ?
.nr Do 12n
.nr Dq 12n
+.nr Ds 6n\" many manpages still use this as a -width value
.nr Dv 12n
.nr Ec 3
.nr Ef 8n\" ?
@@ -115,7 +116,6 @@
.nr Oc 3
.nr Oo 10n
.nr Op 14n
-.nr Or 6n\" ?
.nr Os 6n\" ?
.nr Ox 1
.nr Pa 32n
@@ -130,7 +130,6 @@
.nr Qq 12n
.nr Rv 1
.nr Sc 3
-.nr Sf 8n\" ?
.nr Sh 8n
.nr Sm 8n\" ?
.nr So 12n
@@ -193,14 +192,6 @@
.nr doc-punct! 3
.
.
-.\" obsolete commands
-.
-.de Ds
-. tm mdoc error: .Ds defunct (#\n[.c])
-..
-.nr Ds 6n
-.
-.
.\" header assembly macros
.
.\" NS doc-document-title global string
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index da546a27..a280a099 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -71,14 +71,6 @@
.eo
.
.
-.\" NS Db macro
-.\" NS defunct
-.
-.de Db
-. tm mdoc error: .Db defunct (#\n[.c])
-..
-.
-.
.\" NS doc-macro-name global string
.\" NS name of calling request (set in each user-requestable macro)
.
@@ -875,21 +867,6 @@
.ds doc-Li-usage argument
.
.
-.\" NS Or user macro
-.\" NS pipe symbol (OR)
-.\" NS
-.\" NS this function uses the `Ic' font
-.\" NS
-.\" NS width register `Or' set in doc-common
-.\"
-.\" XXX: What is this function good for? It sets a font but does not print
-.\" a pipe symbol. And it isn't documented.
-.
-.als Or doc-generic-macro
-.ds doc-Or-usage
-.als doc-Or-font doc-Ic-font
-.
-.
.\" NS Ms user macro
.\" NS math symbol
.\" NS
@@ -3388,7 +3365,6 @@
. nr doc-reg-drgv 0
. while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
. ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-have-indent-stack\n[doc-reg-drgv] \n[doc-display-have-indent-stack\n[doc-reg-drgv]-saved]
. nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
. nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
. nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
@@ -3409,6 +3385,7 @@
. nr doc-reg-drgv 1
. while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
. ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
+. nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
. nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
. nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
. ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
@@ -4357,14 +4334,6 @@
..
.
.
-.\" NS Ex user macro
-.\" NS defunct
-.
-.de Ex
-. tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
-..
-.
-.
.\" NS Vt user macro
.\" NS variable type (for forcing old style variable declarations);
.\" NS this is not done in the same manner as .Ot for fortrash --
@@ -6066,16 +6035,6 @@
..
.
.
-.\" NS Sf user macro
-.\" NS defunct
-.\" NS
-.\" NS width register `Sf' set in doc-common
-.
-.de Sf
-. tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
-..
-.
-.
.\" NS Rv user macro
.\" NS return values
.\" NS
@@ -6172,6 +6131,34 @@
..
.
.
+.\" NS doc-defunct-macro macro
+.\" NS this is the skeleton for defunct macros
+.\" NS
+.
+.de doc-defunct-macro
+. tmc mdoc error: .\$0 defunct
+. if d doc-\$0-usage \
+. tmc , \*[doc-\$0-usage]
+. tm1 " (#\n[.c])
+..
+.
+.
+.\" obsolete macros
+.
+.als Db doc-defunct-macro
+.
+.als Ds doc-defunct-macro
+.
+.als Ex doc-defunct-macro
+.ds doc-Ex-usage use .D1
+.
+.als Or doc-defunct-macro
+.ds doc-Or-usage use `|'
+.
+.als Sf doc-defunct-macro
+.ds doc-Sf-usage use .Pf or .Ns
+.
+.
.rn em e@
.
.de em
diff --git a/tmac/groff_mdoc.man b/tmac/groff_mdoc.man
index 4c0f6f24..11446369 100644
--- a/tmac/groff_mdoc.man
+++ b/tmac/groff_mdoc.man
@@ -46,7 +46,7 @@
.\" for an already extremely slow package.
.\"
.
-.Dd January 1, 2001
+.Dd April 10, 2001
.Os
.Dt GROFF_MDOC 7
.
@@ -171,6 +171,7 @@ as follows:
. It "Options"
. It "Pathnames"
. It "Standards"
+. It "Variable Types"
. It "Variables"
. It "Manual Page Cross References"
. El
@@ -1888,6 +1889,24 @@ Miscellaneous
.St -iso8802-3
.El
.
+.Ss "Variable Types"
+.
+The
+.Ql .Vt
+macro may be used whenever a type is referenced.
+In the
+.Sx SYNOPSIS
+section, it causes a line break (useful for old style variable declarations).
+.Pp
+.Dl Usage: .Vt Ao type Ac ...
+.Pp
+.Bl -tag -xwidth ".Li .Vt\ extern\ char\ *optarg\ ;" -compact -offset 15n
+.It Li ".Vt extern char *optarg ;"
+.Vt extern char *optarg ;
+.It Li ".Vt FILE *"
+.Vt FILE *
+.El
+.
.Ss Variables
.
Generic variable reference.
@@ -3341,8 +3360,10 @@ The message says all.
.
produces
.
-.Pp
-.Sy "You can't use Sy here" . "\ " No "The message says all" .
+.Bl -diag
+.It You can't use Sy here.
+The message says all.
+.El
.Pp
.
.It Fl hang
@@ -3631,11 +3652,9 @@ Suppress insertion of vertical space before the list and between list items.
Here a list of the remaining macros which do not fit well into one of the
above sections.
We couldn't find real examples for the following macros:
-.Ql .Me ,
-.Ql .Or ,
-.Ql .Ot ,
+.Ql .Me
and
-.Ql .Vt .
+.Ql .Ot .
They are documented here for completeness \- if you know how to use them
properly please send a mail to
.Mt bug-groff@gnu.org
@@ -3688,28 +3707,6 @@ Its default width is 6n.
.It Li .Mt
To be written.
.
-.It Li .Or
-This macro does nothing (probably a bug in the old
-.Nm \-mdoc
-implementation) \- it should output a
-.Dq pipe symbol (OR)
-according to the documentation in the
-.Nm \-mdoc
-source.
-We do not have an example for its intended use.
-Note that a pipe symbol can always be produced by using
-.Ql | ;
-if you do not use
-.Tn GNU
-.Xr troff
-requests directly, it will never interfere with the absolute position
-operator of troff.
-Alternatively, the string
-.Ql \e*[ba]
-is available.
-.Pp
-As a consequence, this macro is obsolete.
-.
.It Li .Ot
Exact usage unknown.
The documentation in the
@@ -3738,13 +3735,6 @@ prints
.Ed
.Pp
It is neither callable nor parsed and takes no arguments.
-.
-.It Li .Vt
-Exact usage unknown.
-The documentation in the
-.Nm \-mdoc
-source file describes it as
-.Dq "variable type (for forcing old style variable declarations)" .
.El
.
.