summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 14:40:07 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 14:40:07 +0000
commitc9b7739a74541dbef4f181b528747683621fdc59 (patch)
tree570c01e9c2c506103b9cf83cee13696dc9d3dc16
parent7685bccd7870b0115cddd02fd4f417334d295158 (diff)
downloadmandoc-c9b7739a74541dbef4f181b528747683621fdc59.tar.gz
Added support for traditional `Ds' width.
-rw-r--r--action.c7
-rw-r--r--validate.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/action.c b/action.c
index f1986718..38ec2dd4 100644
--- a/action.c
+++ b/action.c
@@ -392,10 +392,11 @@ post_bl_width(struct mdoc *mdoc)
* the macro's width as set in share/tmac/mdoc/doc-common.
*/
- if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
+ if (xstrcmp(*p, "Ds"))
+ width = 6;
+ else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
return(1);
-
- if (0 == (width = mdoc_macro2len(tok)))
+ else if (0 == (width = mdoc_macro2len(tok)))
return(mdoc_warn(mdoc, WARN_SYNTAX,
"-%s macro has no length",
mdoc_argnames[MDOC_Width]));
diff --git a/validate.c b/validate.c
index 197397dd..1d5d7122 100644
--- a/validate.c
+++ b/validate.c
@@ -491,8 +491,8 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p)
p += (int)c - 1;
continue;
}
- return(mdoc_perr(mdoc, line, pos,
- "invalid escape sequence"));
+ return(mdoc_perr(mdoc, line, pos,
+ "invalid escape sequence"));
}
return(1);