summaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-17 07:41:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-17 07:41:28 +0000
commit3f648213cd789e9c307f834875f09da5e1d86ab1 (patch)
treeaa52ea85d2cdaabca340865f79a922ab1a8c21e9 /html.c
parent6f8fe1982a3b763cad6bc6f48f3dc1c2f19281d9 (diff)
downloadmandoc-3f648213cd789e9c307f834875f09da5e1d86ab1.tar.gz
mandoc-3f648213cd789e9c307f834875f09da5e1d86ab1.tar.zst
mandoc-3f648213cd789e9c307f834875f09da5e1d86ab1.zip
ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).
More html work.
Diffstat (limited to 'html.c')
-rw-r--r--html.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/html.c b/html.c
index d9fa90d5..c8a4623c 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.30 2009/09/16 22:17:27 kristaps Exp $ */
+/* $Id: html.c,v 1.31 2009/09/17 07:41:28 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -138,9 +138,11 @@ static void print_encode(const char *);
static void print_text(struct html *, const char *);
static int mdoc_root_pre(MDOC_ARGS);
+static int mdoc_ar_pre(MDOC_ARGS);
static int mdoc_fl_pre(MDOC_ARGS);
static int mdoc_nd_pre(MDOC_ARGS);
static int mdoc_nm_pre(MDOC_ARGS);
+static int mdoc_ns_pre(MDOC_ARGS);
static int mdoc_op_pre(MDOC_ARGS);
static void mdoc_op_post(MDOC_ARGS);
static int mdoc_pp_pre(MDOC_ARGS);
@@ -165,7 +167,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = {
{NULL, NULL}, /* It */
{NULL, NULL}, /* Ad */
{NULL, NULL}, /* An */
- {NULL, NULL}, /* Ar */
+ {mdoc_ar_pre, NULL}, /* Ar */
{NULL, NULL}, /* Cd */
{NULL, NULL}, /* Cm */
{NULL, NULL}, /* Dv */
@@ -222,7 +224,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = {
{NULL, NULL}, /* Fx */
{NULL, NULL}, /* Ms */
{NULL, NULL}, /* No */
- {NULL, NULL}, /* Ns */
+ {mdoc_ns_pre, NULL}, /* Ns */
{NULL, NULL}, /* Nx */
{NULL, NULL}, /* Ox */
{NULL, NULL}, /* Pc */
@@ -697,7 +699,7 @@ mdoc_nd_pre(MDOC_ARGS)
{
if (MDOC_BODY == n->type)
- print_text(h, "--");
+ print_text(h, "\\(en");
return(1);
}
@@ -785,3 +787,27 @@ mdoc_xr_pre(MDOC_ARGS)
return(0);
}
+
+
+/* ARGSUSED */
+static int
+mdoc_ns_pre(MDOC_ARGS)
+{
+
+ h->flags |= HTML_NOSPACE;
+ return(1);
+}
+
+
+/* ARGSUSED */
+static int
+mdoc_ar_pre(MDOC_ARGS)
+{
+ struct htmlpair tag;
+
+ tag.key = ATTR_CLASS;
+ tag.val = "arg";
+
+ print_otag(h, TAG_SPAN, 1, &tag);
+ return(1);
+}