From ddc0156925673d09f73a05c596d3e70c0da01994 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 27 Sep 2014 11:17:19 +0000 Subject: Don't pretend we have a separate XHTML and HTML mode any more. --- html.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'html.c') 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 + * Copyright (c) 2008, 2009, 2010, 2011, 2014 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze * * 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('>'); -- cgit v1.2.3