summaryrefslogtreecommitdiffstatshomepage
path: root/roff.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-07 15:04:54 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-07 15:04:54 +0000
commit127029dfaf617f304350eb1202db85c428fda879 (patch)
tree2610c5b7406ae306b3004224f65f9f7711dbabad /roff.7
parent449c8db7f7b1ef43a2c73734dcab0db5ab09b97a (diff)
downloadmandoc-127029dfaf617f304350eb1202db85c428fda879.tar.gz
mandoc-127029dfaf617f304350eb1202db85c428fda879.tar.zst
mandoc-127029dfaf617f304350eb1202db85c428fda879.zip
Re-constitution of `ds' symbol processing. First, push the
roff_getstr() family of functions into roff.c with the "first_string" directly in struct roff. Second, pre-process each line for reserved words in libroff, splicing and re-running a line if it has one (this allows defined symbols to be macros). Remove term.c's invocation of the roff_getstrn() function. Removed function documentation in roff.3 and added roff.7 `ds' documentation.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.723
1 files changed, 16 insertions, 7 deletions
diff --git a/roff.7 b/roff.7
index b18c29ca..1b455217 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.12 2010/07/04 22:04:04 schwarze Exp $
+.\" $Id: roff.7,v 1.13 2010/07/07 15:04:54 kristaps Exp $
.\"
.\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 4 2010 $
+.Dd $Mdocdate: July 7 2010 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -92,11 +92,20 @@ The syntax of this macro is the same as that of
except that a leading argument must be specified.
It is ignored, as are its children.
.Ss \&ds
-Define a string.
-This macro is intended to have two arguments,
-the name of the string to define and its content.
-Currently, it is ignored including its arguments,
-and the number of arguments is not checked.
+Define a reserved word.
+Its syntax is as follows:
+.Pp
+.D1 Pf \. Sx \&ds No Cm key val
+.Pp
+The
+.Cm key
+and
+.Cm val
+strings are space-separated.
+The
+.Cm key
+values may be invoked in subsequent text by using \e*(NN for two-letter
+pairs, \e*N for one-letter, and \e*[NNN] for arbitrary-length values.
.Ss \&de1
The syntax of this macro is the same as that of
.Sx \&ig ,