summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-21 14:40:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-21 14:40:31 +0000
commitc5d1c48d34c104bbd9da9344de31be8f08d4227a (patch)
treed116818afe86d03b1a107feb5ce8dd29658a176b
parent2126fa8ef23591ab350a0c4e5e4102fc7aba7d4a (diff)
downloadmandoc-c5d1c48d34c104bbd9da9344de31be8f08d4227a.tar.gz
mandoc-c5d1c48d34c104bbd9da9344de31be8f08d4227a.tar.zst
mandoc-c5d1c48d34c104bbd9da9344de31be8f08d4227a.zip
Removed man handling in -Thtml (for now).
Added some UTF chars to chars.in.
-rw-r--r--chars.in42
-rw-r--r--html.c55
2 files changed, 35 insertions, 62 deletions
diff --git a/chars.in b/chars.in
index 35ed72d6..d2620e31 100644
--- a/chars.in
+++ b/chars.in
@@ -1,4 +1,4 @@
-/* $Id: chars.in,v 1.5 2009/09/20 19:25:06 kristaps Exp $ */
+/* $Id: chars.in,v 1.6 2009/09/21 14:40:31 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -32,7 +32,7 @@
STRING("Am", 2, "&", 1, "&amp;", 5)
STRING("Ba", 2, "|", 1, "|", 0)
-STRING("Ge", 2, ">=", 2, "&#8804;", 7)
+STRING("Ge", 2, ">=", 2, "&#8805;", 7)
STRING("Gt", 2, ">", 1, "&gt;", 4)
STRING("If", 2, "infinity", 8, "infinity", 8)
STRING("Le", 2, "<=", 2, "&#8804;", 7)
@@ -40,27 +40,27 @@ STRING("Lq", 2, "``", 2, "&#8220;", 7)
STRING("Lt", 2, "<", 1, "&lt;", 4)
STRING("Na", 2, "NaN", 3, "NaN", 3)
STRING("Ne", 2, "!=", 2, "&#8800;", 7)
-STRING("Pi", 2, "pi", 2, "", 0)
-STRING("Pm", 2, "+-", 2, "", 0)
-STRING("R", 1, "(R)", 3, "", 0)
-STRING("Rq", 2, "\'\'", 2, "", 0)
-STRING("Tm", 2, "tm", 2, "", 0)
-STRING("left-bracket", 12, "[", 1, "", 0)
-STRING("left-parenthesis", 16, "(", 1, "", 0)
-STRING("left-singlequote", 16, "`", 1, "", 0)
-STRING("lp", 2, "(", 1, "", 0)
+STRING("Pi", 2, "pi", 2, "&#960;", 6)
+STRING("Pm", 2, "+-", 2, "&#177;", 6)
+STRING("R", 1, "(R)", 3, "&#174;", 6)
+STRING("Rq", 2, "\'\'", 2, "&#8221;", 7)
+STRING("Tm", 2, "tm", 2, "&#8424;", 7)
+STRING("left-bracket", 12, "[", 1, "[", 1)
+STRING("left-parenthesis", 16, "(", 1, "(", 1)
+STRING("left-singlequote", 16, "`", 1, "&#8216;", 7)
+STRING("lp", 2, "(", 1, "(", 1)
STRING("q", 1, "\"", 1, "&quot;", 6)
-STRING("quote-left", 10, "`", 1, "", 0)
-STRING("quote-right", 11, "\'", 1, "", 0)
-STRING("right-bracket", 13, "]", 1, "", 0)
-STRING("right-parenthesis", 17, ")", 1, "", 0)
-STRING("right-singlequote", 17, "\'", 1, "", 0)
-STRING("rp", 2, ")", 1, "", 0)
+STRING("quote-left", 10, "`", 1, "&#8216;", 7)
+STRING("quote-right", 11, "\'", 1, "&#8217;", 7)
+STRING("right-bracket", 13, "]", 1, "]", 1)
+STRING("right-parenthesis", 17, ")", 1, ")", 1)
+STRING("right-singlequote", 17, "\'", 1, "&#8217;", 7)
+STRING("rp", 2, ")", 1, ")", 1)
-BOTH("<=", 2, "<=", 2, "", 0)
-BOTH(">=", 2, ">=", 2, "", 0)
-BOTH("aa", 2, "\'", 1, "", 0)
-BOTH("ga", 2, "`", 1, "", 0)
+BOTH("<=", 2, "<=", 2, "&#8804;", 7)
+BOTH(">=", 2, ">=", 2, "&#8804;", 7)
+BOTH("aa", 2, "\'", 1, "&#180;", 6)
+BOTH("ga", 2, "`", 1, "`", 1)
BOTH("lq", 2, "``", 2, "&#8220;", 7)
BOTH("rq", 2, "\'\'", 2, "&#8221;", 7)
BOTH("ua", 2, "^", 1, "", 0)
diff --git a/html.c b/html.c
index 147d8945..2017e1a1 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.49 2009/09/21 14:08:13 kristaps Exp $ */
+/* $Id: html.c,v 1.50 2009/09/21 14:40:31 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -167,8 +167,6 @@ static void print_mdoc(MDOC_ARGS);
static void print_mdoc_head(MDOC_ARGS);
static void print_mdoc_node(MDOC_ARGS);
static void print_mdoc_nodelist(MDOC_ARGS);
-static void print_man(MAN_ARGS);
-static void print_man_head(MAN_ARGS);
static struct tag *print_otag(struct html *, enum htmltag,
int, const struct htmlpair *);
static void print_tagq(struct html *, const struct tag *);
@@ -386,20 +384,10 @@ html_mdoc(void *arg, const struct mdoc *m)
}
+/* ARGSUSED */
void
html_man(void *arg, const struct man *m)
{
- struct html *h;
- struct tag *t;
-
- h = (struct html *)arg;
-
- print_gen_doctype(h);
- t = print_otag(h, TAG_HTML, 0, NULL);
- print_man(man_meta(m), man_node(m), h);
- print_tagq(h, t);
-
- printf("\n");
}
@@ -616,10 +604,21 @@ print_gen_head(struct html *h)
static void
print_mdoc_head(MDOC_ARGS)
{
+ char b[BUFSIZ];
print_gen_head(h);
+
+ (void)snprintf(b, BUFSIZ - 1,
+ "%s(%d)", m->title, m->msec);
+
+ if (m->arch) {
+ (void)strlcat(b, " (", BUFSIZ);
+ (void)strlcat(b, m->arch, BUFSIZ);
+ (void)strlcat(b, ")", BUFSIZ);
+ }
+
print_otag(h, TAG_TITLE, 0, NULL);
- print_text(h, m->title);
+ print_text(h, b);
}
@@ -679,32 +678,6 @@ print_mdoc_node(MDOC_ARGS)
static void
-print_man(MAN_ARGS)
-{
- struct tag *t;
-
- t = print_otag(h, TAG_HEAD, 0, NULL);
- print_man_head(m, n, h);
- print_tagq(h, t);
-
- t = print_otag(h, TAG_BODY, 0, NULL);
- /*print_man_body(m, n, h);*/
- print_tagq(h, t);
-}
-
-
-/* ARGSUSED */
-static void
-print_man_head(MAN_ARGS)
-{
-
- print_gen_head(h);
- print_otag(h, TAG_TITLE, 0, NULL);
- print_text(h, m->title);
-}
-
-
-static void
print_spec(struct html *h, const char *p, int len)
{
const char *rhs;