summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-04 02:05:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-04 02:05:42 +0000
commit281d416eceffce59e0fae5083eda1dd251311db9 (patch)
tree50a03ece295858bcbd515f42e7a9ad21af83c2c4
parent57d8fc7a691e257be60520488da95ba925631ee2 (diff)
downloadmandoc-281d416eceffce59e0fae5083eda1dd251311db9.tar.gz
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
-rw-r--r--man_html.c2
-rw-r--r--man_term.c2
-rw-r--r--out.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/man_html.c b/man_html.c
index 75517854..efcaa51f 100644
--- a/man_html.c
+++ b/man_html.c
@@ -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 f6e778fc..2d988720 100644
--- a/man_term.c
+++ b/man_term.c
@@ -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 6396afa0..139e90bc 100644
--- a/out.c
+++ b/out.c
@@ -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;