summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2014-09-27 11:17:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2014-09-27 11:17:19 +0000
commit86875efb7e6c423982e1c28043040c4954cf81f1 (patch)
treef8572c807f8571f3464f82e8609794d81eaf68ac
parent1e0106049651efecd327e66ecae055684d84001d (diff)
downloadmandoc-86875efb7e6c423982e1c28043040c4954cf81f1.tar.gz
Don't pretend we have a separate XHTML and HTML mode any more.
-rw-r--r--html.c21
-rw-r--r--html.h6
-rw-r--r--man_html.c2
-rw-r--r--mandoc.123
-rw-r--r--mdoc_html.c2
5 files changed, 16 insertions, 38 deletions
diff --git a/html.c b/html.c
index c666cd81..c22a86dc 100644
--- a/html.c
+++ b/html.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2008, 2009, 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -108,11 +108,11 @@ static int print_escape(char);
static int print_encode(struct html *, const char *, int);
static void print_metaf(struct html *, enum mandoc_esc);
static void print_attr(struct html *, const char *, const char *);
-static void *ml_alloc(char *, enum htmltype);
+static void *ml_alloc(char *);
static void *
-ml_alloc(char *outopts, enum htmltype type)
+ml_alloc(char *outopts)
{
struct html *h;
const char *toks[5];
@@ -126,7 +126,6 @@ ml_alloc(char *outopts, enum htmltype type)
h = mandoc_calloc(1, sizeof(struct html));
- h->type = type;
h->tags.head = NULL;
h->symtab = mchars_alloc();
@@ -155,14 +154,14 @@ void *
html_alloc(char *outopts)
{
- return(ml_alloc(outopts, HTML_HTML_4_01_STRICT));
+ return(ml_alloc(outopts));
}
void *
xhtml_alloc(char *outopts)
{
- return(ml_alloc(outopts, HTML_XHTML_1_0_STRICT));
+ return(ml_alloc(outopts));
}
void
@@ -494,16 +493,10 @@ print_otag(struct html *h, enum htmltag tag,
for (i = 0; i < sz; i++)
print_attr(h, htmlattrs[p[i].key], p[i].val);
- /* Accommodate for XML "well-formed" singleton escaping. */
+ /* Accommodate for "well-formed" singleton escaping. */
if (HTML_AUTOCLOSE & htmltags[tag].flags)
- switch (h->type) {
- case HTML_XHTML_1_0_STRICT:
- putchar('/');
- break;
- default:
- break;
- }
+ putchar('/');
putchar('>');
diff --git a/html.h b/html.h
index 8c90d7b9..21c924b0 100644
--- a/html.h
+++ b/html.h
@@ -100,11 +100,6 @@ struct htmlpair {
#define PAIR_HREF_INIT(p, v) PAIR_INIT(p, ATTR_HREF, v)
#define PAIR_STYLE_INIT(p, h) PAIR_INIT(p, ATTR_STYLE, (h)->buf)
-enum htmltype {
- HTML_HTML_4_01_STRICT,
- HTML_XHTML_1_0_STRICT
-};
-
struct html {
int flags;
#define HTML_NOSPACE (1 << 0) /* suppress next space */
@@ -128,7 +123,6 @@ struct html {
struct tag *metaf; /* current open font scope */
enum htmlfont metal; /* last used font */
enum htmlfont metac; /* current font mode */
- enum htmltype type; /* output media type */
int oflags; /* output options */
#define HTML_FRAGMENT (1 << 0) /* don't emit HTML/HEAD/BODY */
};
diff --git a/man_html.c b/man_html.c
index dce71178..705d98ac 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
diff --git a/mandoc.1 b/mandoc.1
index 04902e35..593ff91d 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -233,7 +233,7 @@ This is the default.
See
.Sx ASCII Output .
.It Fl T Ns Cm html
-Produce strict CSS1/HTML-4.01 output.
+Produce CSS1/HTML5 output.
See
.Sx HTML Output .
.It Fl T Ns Cm lint
@@ -265,9 +265,8 @@ Encode output in the UTF\-8 multi-byte format.
See
.Sx UTF\-8 Output .
.It Fl T Ns Cm xhtml
-Produce strict CSS1/XHTML-1.0 output.
-See
-.Sx XHTML Output .
+This is a synonym for
+.Fl T Ns Cm html .
.El
.Pp
If multiple input files are specified, these will be processed by the
@@ -320,7 +319,7 @@ which will normalise to \(>=60.
.Ss HTML Output
Output produced by
.Fl T Ns Cm html
-conforms to HTML-4.01 strict.
+conforms to HTML5 using optional self-closing tags.
.Pp
The
.Pa example.style.css
@@ -328,7 +327,8 @@ file documents style-sheet classes available for customising output.
If a style-sheet is not specified with
.Fl O Ns Ar style ,
.Fl T Ns Cm html
-defaults to simple output readable in any graphical or text-based web
+defaults to simple output (via an embedded style-sheet)
+readable in any graphical or text-based web
browser.
.Pp
Special characters are rendered in decimal-encoded UTF\-8.
@@ -471,15 +471,6 @@ to force a UTF\-8 locale.
See
.Sx Locale Output
for details and options.
-.Ss XHTML Output
-Output produced by
-.Fl T Ns Cm xhtml
-conforms to XHTML-1.0 strict.
-.Pp
-See
-.Sx HTML Output
-for details; beyond generating XHTML tags instead of HTML tags, these
-output modes are identical.
.Sh ENVIRONMENT
.Bl -tag -width MANPAGER
.It Ev MANPAGER
@@ -1529,7 +1520,7 @@ has no effect.
.It
Words aren't hyphenated.
.El
-.Ss HTML/XHTML Compatibility
+.Ss HTML Compatibility
.Bl -bullet -compact
.It
The
diff --git a/mdoc_html.c b/mdoc_html.c
index a9f880f6..fa9d1ba0 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2008, 2009, 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any