From 47e7075a5f140929a14ebcfba234c319f9e9a675 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 4 Dec 2014 02:05:42 +0000 Subject: fix handling of roff requests having a default scale other than "n", in particular .sp which uses "v", when the scale is not specified; cures groff-mandoc differences in about a dozen Xenocara manuals --- man_html.c | 4 ++-- man_term.c | 4 ++-- out.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/man_html.c b/man_html.c index e9f93e73..1455e1e4 100644 --- a/man_html.c +++ b/man_html.c @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.106 2014/12/02 10:08:06 schwarze Exp $ */ +/* $Id: man_html.c,v 1.107 2014/12/04 02:05:42 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014 Ingo Schwarze @@ -282,7 +282,7 @@ a2width(const struct man_node *n, struct roffsu *su) if (MAN_TEXT != n->type) return(0); - if (a2roffsu(n->string, su, SCALE_BU)) + if (a2roffsu(n->string, su, SCALE_EN)) return(1); return(0); diff --git a/man_term.c b/man_term.c index a42d8cf3..9a9abafd 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.158 2014/12/04 01:33:42 schwarze Exp $ */ +/* $Id: man_term.c,v 1.159 2014/12/04 02:05:42 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -201,7 +201,7 @@ a2width(const struct termp *p, const char *cp) { struct roffsu su; - if ( ! a2roffsu(cp, &su, SCALE_BU)) + if ( ! a2roffsu(cp, &su, SCALE_EN)) return(-1); return((int)term_hspan(p, &su)); diff --git a/out.c b/out.c index 5b08a09a..7a61b399 100644 --- a/out.c +++ b/out.c @@ -1,4 +1,4 @@ -/* $Id: out.c,v 1.53 2014/10/14 18:18:05 schwarze Exp $ */ +/* $Id: out.c,v 1.54 2014/12/04 02:05:42 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2014 Ingo Schwarze @@ -110,7 +110,7 @@ a2roffsu(const char *src, struct roffsu *dst, enum roffscale def) case '\0': if (SCALE_MAX == def) return(0); - unit = SCALE_EN; + unit = def; break; case 'u': unit = SCALE_BU; -- cgit v1.2.3-56-ge451