summaryrefslogtreecommitdiffstats
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-18 02:08:27 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-18 02:08:27 +0000
commit0dca371a35715658277a48885367f1eb97158c75 (patch)
treef0e4615581362ce6003973c6573dc0743f516feb /man_html.c
parenta55868d2cb7c07237689f307d3a55b33b257de09 (diff)
downloadmandoc-0dca371a35715658277a48885367f1eb97158c75.tar.gz
implement the GNU man-ext .SY/.YS (synopsis block) macro in man(7),
used in most manual pages of the groff package
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/man_html.c b/man_html.c
index 2d451a51..3c91d068 100644
--- a/man_html.c
+++ b/man_html.c
@@ -61,6 +61,7 @@ static int man_RS_pre(MAN_ARGS);
static int man_SH_pre(MAN_ARGS);
static int man_SM_pre(MAN_ARGS);
static int man_SS_pre(MAN_ARGS);
+static int man_SY_pre(MAN_ARGS);
static int man_UR_pre(MAN_ARGS);
static int man_alt_pre(MAN_ARGS);
static int man_ign_pre(MAN_ARGS);
@@ -101,6 +102,8 @@ static const struct man_html_act man_html_acts[MAN_MAX - MAN_TH] = {
{ man_ign_pre, NULL }, /* PD */
{ man_ign_pre, NULL }, /* AT */
{ man_in_pre, NULL }, /* in */
+ { man_SY_pre, NULL }, /* SY */
+ { NULL, NULL }, /* YS */
{ man_OP_pre, NULL }, /* OP */
{ NULL, NULL }, /* EX */
{ NULL, NULL }, /* EE */
@@ -622,6 +625,27 @@ man_RS_pre(MAN_ARGS)
}
static int
+man_SY_pre(MAN_ARGS)
+{
+ switch (n->type) {
+ case ROFFT_BLOCK:
+ print_otag(h, TAG_TABLE, "c", "Nm");
+ print_otag(h, TAG_TR, "");
+ break;
+ case ROFFT_HEAD:
+ print_otag(h, TAG_TD, "");
+ print_otag(h, TAG_CODE, "cT", "Nm");
+ break;
+ case ROFFT_BODY:
+ print_otag(h, TAG_TD, "");
+ break;
+ default:
+ abort();
+ }
+ return 1;
+}
+
+static int
man_UR_pre(MAN_ARGS)
{
char *cp;