aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_html.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-17 15:32:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-17 15:32:43 +0000
commit6506abee45c903b6cd5093a2bf6ece5ac7aed4e3 (patch)
tree420d0dcbb8b9af88f08f2409068672f3b64b161f /mandoc_html.3
parent24fd28849fa784bd04e3f5bbdb7152253c5d68ba (diff)
downloadmandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.tar.gz
mandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.tar.zst
mandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.zip
Completely delete the buf field of struct html and all the buf*()
interfaces. Such a static buffer was a bad idea in the first place, causing unfixable truncation that was only prevented by triggering an assertion failure. Instead, let the small number of remaining users allocate and free their own, temporary dynamic buffers, or for the case of .Xr and .In, pass the original data to be assembled in print_otag().
Diffstat (limited to 'mandoc_html.3')
-rw-r--r--mandoc_html.348
1 files changed, 22 insertions, 26 deletions
diff --git a/mandoc_html.3 b/mandoc_html.3
index b9fc7f63..80b1fe69 100644
--- a/mandoc_html.3
+++ b/mandoc_html.3
@@ -1,6 +1,6 @@
-.\" $Id: mandoc_html.3,v 1.2 2017/01/17 01:47:51 schwarze Exp $
+.\" $Id: mandoc_html.3,v 1.3 2017/01/17 15:32:44 schwarze Exp $
.\"
-.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2014, 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -146,6 +146,26 @@ attribute.
Print a
.Cm href
attribute.
+This attribute letter can optionally be followed by a modifier letter.
+If followed by
+.Cm R ,
+it formats the link as a local one by prefixing a
+.Sq #
+character.
+If followed by
+.Cm I ,
+it interpretes the argument as a header file name
+and generates a link using the
+.Xr mandoc 1
+.Fl O Cm includes
+option.
+If followed by
+.Cm M ,
+it takes two arguments instead of one, a manual page name and
+section, and formats them as a link to a manual page using the
+.Xr mandoc 1
+.Fl O Cm man
+option.
.It Cm i
Print an
.Cm id
@@ -235,8 +255,6 @@ The first is the style name, the second its value.
.Pp
.Fn print_otag
uses the private function
-.Fn print_attr
-which in turn uses the private function
.Fn print_encode
to take care of HTML encoding.
If required by the element type, it remembers in
@@ -270,28 +288,6 @@ and
functions.
.Pp
The functions
-.Fn bufinit ,
-.Fn bufcat* ,
-and
-.Fn buffmt*
-do not directly produce output but buffer text in the
-.Fa buf
-member of
-.Fa h .
-They are not used internally by
-.Pa html.c
-but intended for use by the language-specific formatters
-to ease preparation of strings for the
-.Fa p
-argument of
-.Fn print_otag
-and for the
-.Fa word
-argument of
-.Fn print_text .
-Consequently, these functions do not do any HTML encoding.
-.Pp
-The functions
.Fn html_strlen ,
.Fn print_eqn ,
.Fn print_tbl ,