source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Don't pretend we have a separate XHTML and HTML mode any more.
@ 2014-09-27 11:17 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2014-09-27 11:17 UTC (permalink / raw)
  To: source

Log Message:
-----------
Don't pretend we have a separate XHTML and HTML mode any more.

Modified Files:
--------------
    mdocml:
        html.c
        html.h
        man_html.c
        mandoc.1
        mdoc_html.c

Revision Data
-------------
Index: html.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -Lhtml.h -Lhtml.h -u -p -r1.61 -r1.62
--- html.h
+++ 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 */
 };
Index: mandoc.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.1,v
retrieving revision 1.113
retrieving revision 1.114
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.113 -r1.114
--- mandoc.1
+++ 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 f
 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 avail
 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
Index: man_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -Lman_html.c -Lman_html.c -u -p -r1.103 -r1.104
--- man_html.c
+++ 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
Index: html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -Lhtml.c -Lhtml.c -u -p -r1.171 -r1.172
--- html.c
+++ 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 ty
 
 	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 
 	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('>');
 
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.206
retrieving revision 1.207
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.206 -r1.207
--- mdoc_html.c
+++ 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
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-27 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-27 11:17 mdocml: Don't pretend we have a separate XHTML and HTML mode any more kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).