=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.133 retrieving revision 1.137 diff -u -p -r1.133 -r1.137 --- mandoc/html.c 2011/04/29 22:18:12 1.133 +++ mandoc/html.c 2011/04/30 22:24:31 1.137 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.133 2011/04/29 22:18:12 kristaps Exp $ */ +/* $Id: html.c,v 1.137 2011/04/30 22:24:31 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -122,7 +122,7 @@ ml_alloc(char *outopts, enum htmltype type) h->type = type; h->tags.head = NULL; - h->symtab = mchars_init(MCHARS_HTML); + h->symtab = mchars_alloc(); while (outopts && *outopts) switch (getsubopt(&outopts, UNCONST(toks), &v)) { @@ -212,11 +212,10 @@ print_gen_head(struct html *h) static void print_num(struct html *h, const char *p, size_t len) { - const char *rhs; + char c; - rhs = mchars_num2char(p, len); - if (rhs) - putchar((int)*rhs); + if ('\0' != (c = mchars_num2char(p, len))) + putchar((int)c); } static void @@ -427,7 +426,7 @@ print_otag(struct html *h, enum htmltag tag, print_attr(h, "lang", "en"); } - /* Accomodate for XML "well-formed" singleton escaping. */ + /* Accommodate for XML "well-formed" singleton escaping. */ if (HTML_AUTOCLOSE & htmltags[tag].flags) switch (h->type) {