X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/4d1bc0c8c120742600a57c849edf1b2481c45e26..9231a839239554f8028f87f33c910ce0a9ddba79:/mdoc_term.c diff --git a/mdoc_term.c b/mdoc_term.c index 893935f2..0603b721 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.227 2011/04/29 22:18:12 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 = mchars_init(MCHARS_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)); }