=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.215 retrieving revision 1.218 diff -u -p -r1.215 -r1.218 --- mandoc/html.c 2017/06/23 02:32:12 1.215 +++ mandoc/html.c 2017/07/14 16:28:38 1.218 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.215 2017/06/23 02:32:12 schwarze Exp $ */ +/* $Id: html.c,v 1.218 2017/07/14 16:28:38 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011-2015, 2017 Ingo Schwarze @@ -453,7 +453,7 @@ print_encode(struct html *h, const char *p, const char (c > 0x7E && c < 0xA0)) c = 0xFFFD; if (c > 0x7E) { - (void)snprintf(numbuf, sizeof(numbuf), "&#%d;", c); + (void)snprintf(numbuf, sizeof(numbuf), "&#x%.4X;", c); print_word(h, numbuf); } else if (print_escape(h, c) == 0) print_byte(h, c); @@ -516,7 +516,7 @@ print_otag(struct html *h, enum htmltag tag, const cha print_indent(h); else if ((h->flags & HTML_NOSPACE) == 0) { if (h->flags & HTML_KEEP) - print_word(h, " "); + print_word(h, " "); else { if (h->flags & HTML_PREKEEP) h->flags |= HTML_KEEP; @@ -623,14 +623,14 @@ print_otag(struct html *h, enum htmltag tag, const cha case 'u': su = va_arg(ap, struct roffsu *); break; - case 'v': - i = va_arg(ap, int); - su = &mysu; - SCALE_VS_INIT(su, i); - break; case 'w': - if ((arg2 = va_arg(ap, char *)) == NULL) + if ((arg2 = va_arg(ap, char *)) == NULL) { + if (*fmt == '+') + fmt++; + if (*fmt == '-') + fmt++; break; + } su = &mysu; a2width(arg2, su); if (*fmt == '+') { @@ -652,9 +652,6 @@ print_otag(struct html *h, enum htmltag tag, const cha /* Second letter: style name. */ switch (*fmt++) { - case 'b': - attr = "margin-bottom"; - break; case 'h': attr = "height"; break; @@ -664,9 +661,6 @@ print_otag(struct html *h, enum htmltag tag, const cha case 'l': attr = "margin-left"; break; - case 't': - attr = "margin-top"; - break; case 'w': attr = "width"; break; @@ -779,7 +773,7 @@ print_text(struct html *h, const char *word) h->flags |= HTML_KEEP; print_endword(h); } else - print_word(h, " "); + print_word(h, " "); } assert(NULL == h->metaf);