summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/groff/tmac/doc-common36
-rw-r--r--contrib/groff/tmac/doc-syms4
-rw-r--r--contrib/groff/tmac/doc.tmac10
-rw-r--r--contrib/groff/tmac/groff_mdoc.man18
4 files changed, 57 insertions, 11 deletions
diff --git a/contrib/groff/tmac/doc-common b/contrib/groff/tmac/doc-common
index 30f16bc..0d819ced 100644
--- a/contrib/groff/tmac/doc-common
+++ b/contrib/groff/tmac/doc-common
@@ -339,12 +339,18 @@
..
.
.
-.\" NS doc-operating-system global string
-.\" NS the exact version of the operating system
+.\" NS doc-default-operating-system global string
+.\" NS the exact (default) version of the operating system
.\" NS
.\" NS override this in `mdoc.local', if necessary
.
-.ds doc-operating-system BSD
+.ds doc-default-operating-system BSD
+.
+.
+.\" NS doc-operating-system global string
+.\" NS the exact version of the operating system
+.
+.ds doc-operating-system
.
.
.\" NS Os user macro (not parsed, not callable)
@@ -434,10 +440,9 @@
.ds doc-operating-system-FreeBSD-5.0 5.0
.
.de Os
-. if "\$1"" \
-. return
-.
-. ie "\$1"ATT" \{\
+. ie "\$1"" \
+. ds doc-operating-system "\*[doc-default-operating-system]
+. el \{ .ie "\$1"ATT" \{\
. ds doc-operating-system AT&T
. if \A\$2 \{\
. ie d doc-operating-system-ATT-\$2 \
@@ -472,7 +477,7 @@
. ds doc-operating-system \$1
. if !"\$2"" \
. as doc-operating-system " \$2
-. \}\}\}\}
+. \}\}\}\}\}
..
.
.
@@ -696,6 +701,12 @@
.nr doc-in-synopsis-section 0
.
.
+.\" NS doc-in-library-section global register (bool)
+.\" NS whether we are in the `library' section
+.
+.nr doc-in-library-section 0
+.
+.
.\" NS doc-in-see-also-section global register (bool)
.\" NS whether we are in the `see also' section
.
@@ -733,6 +744,7 @@
.\" NS doc-func-count
.\" NS doc-in-authors-section
.\" NS doc-in-files-section
+.\" NS doc-in-library-section
.\" NS doc-in-see-also-section
.\" NS doc-in-synopsis-section
.\" NS doc-indent-synopsis
@@ -749,6 +761,7 @@
.
.ds doc-section-name NAME
.ds doc-section-synopsis SYNOPSIS
+.ds doc-section-library LIBRARY
.ds doc-section-description DESCRIPTION
.ds doc-section-see-also SEE
.ds doc-section-files FILES
@@ -795,6 +808,7 @@
. \}
. el \{\
. nr doc-in-synopsis-section 0
+. nr doc-in-library-section 0
. nr doc-in-see-also-section 0
. nr doc-in-files-section 0
. nr doc-in-authors-section 0
@@ -806,6 +820,9 @@
. nr doc-indent-synopsis 0
. nr doc-indent-synopsis-active 0
. \}
+. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-library]" \{\
+. nr doc-in-library-section 1
+. \}
. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
. nr doc-is-func 0
. nr doc-func-count 0
@@ -821,7 +838,7 @@
. nr doc-in-files-section 1
. el .if "\*[doc-str-dfp]"\*[doc-section-authors]" \
. nr doc-in-authors-section 1
-. \}\}\}
+. \}\}\}\}
.
. in 0
. nr doc-have-author 0
@@ -1058,6 +1075,7 @@
. tm doc-display-vertical == \n[doc-display-vertical]
. tm doc-header-string == `\*[doc-header-string]'
. tm doc-in-synopsis-section == \n[doc-in-synopsis-section]
+. tm doc-in-library-section == \n[doc-in-library-section]
. tm doc-in-see-also-section == \n[doc-in-see-also-section]
. tm doc-in-files-section == \n[doc-in-files-section]
. tm doc-in-authors-section == \n[doc-in-authors-section]
diff --git a/contrib/groff/tmac/doc-syms b/contrib/groff/tmac/doc-syms
index f4d3d6e..2c4d56b 100644
--- a/contrib/groff/tmac/doc-syms
+++ b/contrib/groff/tmac/doc-syms
@@ -716,7 +716,11 @@
. \" replacing argument with result
. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Lb]
.
+. if \n[doc-in-library-section] \
+. br
. doc-print-recursive
+. if \n[doc-in-library-section] \
+. br
. \}
. el \{\
. tm Usage: .Lb library_name ... (#\n[.c])
diff --git a/contrib/groff/tmac/doc.tmac b/contrib/groff/tmac/doc.tmac
index 059534c..b578307 100644
--- a/contrib/groff/tmac/doc.tmac
+++ b/contrib/groff/tmac/doc.tmac
@@ -3321,6 +3321,7 @@
. nr doc-curr-font-saved \n[doc-curr-font]
. nr doc-curr-size-saved \n[doc-curr-size]
. nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
+. nr doc-in-library-section-saved \n[doc-in-library-section]
. nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
. nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
. nr doc-have-decl-saved \n[doc-have-decl]
@@ -3460,6 +3461,7 @@
. nr doc-curr-font \n[doc-curr-font-saved]
. nr doc-curr-size \n[doc-curr-size-saved]
. nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
+. nr doc-in-library-section \n[doc-in-library-section-saved]
. nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
. nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
. nr doc-have-decl \n[doc-have-decl-saved]
@@ -5164,11 +5166,14 @@
.\" NS doc-issue-count
.\" NS doc-issue-name
.\" NS doc-journal-count
-.\" NS doc-journam-name
+.\" NS doc-journal-name
.\" NS doc-optional-count
.\" NS doc-optional-string
.\" NS doc-page-number-count
.\" NS doc-page-number-string
+.\" NS doc-publisher-count
+.\" NS doc-publisher-name
+.\" NS doc-reference-count
.\" NS doc-reference-title-count
.\" NS doc-reference-title-name
.\" NS doc-reference-title-name-for-book
@@ -5192,6 +5197,8 @@
. nr doc-date-count 0
. nr doc-page-number-count 0
. nr doc-book-count 0
+. nr doc-publisher-count 0
+. nr doc-reference-count 0
.
. ds doc-journal-name
. ds doc-issue-name
@@ -5204,6 +5211,7 @@
. ds doc-date
. ds doc-page-number-string
. ds doc-book-name
+. ds doc-publisher-name
..
.
.
diff --git a/contrib/groff/tmac/groff_mdoc.man b/contrib/groff/tmac/groff_mdoc.man
index 6ad2100..7af5914 100644
--- a/contrib/groff/tmac/groff_mdoc.man
+++ b/contrib/groff/tmac/groff_mdoc.man
@@ -786,7 +786,7 @@ In the following examples, the left (which is identical to the right) and
the middle part of the manual page header strings are shown.
Note how
.Ql \e&
-prevents the digit\~1 from being a valid numeric expression.
+prevents the digit\~7 from being a valid numeric expression.
.
.Bd -ragged
.Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent
@@ -1108,6 +1108,15 @@ distinguishing it from the argument strings.
To remove the special meaning from a punctuation character escape it with
.Ql \e& .
.Pp
+The following punctuation characters are recognized by
+.Nm \-mdoc :
+.
+.Bl -column -offset indent-two XXXXXX XXXXXX XXXXXX XXXXXX
+.It Li .\& Ta Li ,\& Ta Li :\& Ta Li ;\& Ta Li (\&
+.It Li )\& Ta Li [\& Ta Li ]\& Ta Li ?\& Ta Li !\&
+.El
+.Pp
+.
.Xr Troff
is limited as a macro language, and has difficulty when presented with a
string containing a member of the mathematical, logical or quotation set:
@@ -1693,6 +1702,13 @@ look for strings named
then denotes the keyword to be used with the
.Ql .Lb
macro.
+.Pp
+In the
+.Sx LIBRARY
+section an
+.Ql .Lb
+command causes a line break before and after its arguments are printed.
+.Pp
.
.Ss Literals
.
OpenPOWER on IntegriCloud