X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/8cd14fd71e9c955ff37349652f455dca31e49c36..34111478132fd94d00d020f0fc5d1db62e12686a:/mdoc_term.c?ds=inline diff --git a/mdoc_term.c b/mdoc_term.c index 47c21248..0603b721 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.226 2011/04/04 16:27:03 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.233 2011/07/22 10:50:46 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -264,14 +264,7 @@ terminal_mdoc(void *arg, const struct mdoc *mdoc) p->tabwidth = term_len(p, 5); if (NULL == p->symtab) - switch (p->enc) { - case (TERMENC_ASCII): - p->symtab = chars_init(CHARS_ASCII); - break; - default: - abort(); - /* NOTREACHED */ - } + p->symtab = mchars_alloc(); n = mdoc_node(mdoc); m = mdoc_meta(mdoc); @@ -358,7 +351,7 @@ print_mdoc_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; break; case (MDOC_EQN): - term_word(p, n->eqn->data); + term_eqn(p, n->eqn); break; case (MDOC_TBL): term_tbl(p, n->span); @@ -530,9 +523,10 @@ a2height(const struct termp *p, const char *v) { struct roffsu su; + assert(v); if ( ! a2roffsu(v, &su, SCALE_VS)) - SCALE_VS_INIT(&su, term_len(p, 1)); + SCALE_VS_INIT(&su, atoi(v)); return(term_vspan(p, &su)); }