aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--html.c23
-rw-r--r--html.h8
-rw-r--r--man_html.c4
-rw-r--r--mandoc.127
-rw-r--r--mdoc_html.c4
5 files changed, 22 insertions, 44 deletions
diff --git a/html.c b/html.c
index 5a29eb0e..696a5437 100644
--- a/html.c
+++ b/html.c
@@ -1,6 +1,6 @@
-/* $Id: html.c,v 1.171 2014/09/27 10:56:18 kristaps Exp $ */
+/* $Id: html.c,v 1.172 2014/09/27 11:17:19 kristaps Exp $ */
/*
- * 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 5b67eca7..6b52f077 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.61 2014/09/27 10:56:18 kristaps Exp $ */
+/* $Id: html.h,v 1.62 2014/09/27 11:17:19 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 69daf4d7..6fe40a97 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,6 +1,6 @@
-/* $Id: man_html.c,v 1.103 2014/09/27 10:56:18 kristaps Exp $ */
+/* $Id: man_html.c,v 1.104 2014/09/27 11:17:19 kristaps Exp $ */
/*
- * 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 966c97e7..75a8b8c2 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.113 2014/09/12 00:54:10 schwarze Exp $
+.\" $Id: mandoc.1,v 1.114 2014/09/27 11:17:19 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 12 2014 $
+.Dd $Mdocdate: September 27 2014 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -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 e9f66206..c9772f4a 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,6 +1,6 @@
-/* $Id: mdoc_html.c,v 1.206 2014/09/27 10:56:18 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.207 2014/09/27 11:17:19 kristaps Exp $ */
/*
- * 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