summaryrefslogtreecommitdiffstatshomepage
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
commit03c35f001a80481355808b1f72c7705dbe891934 (patch)
tree900dca4706f40b4cf750215008cbab2ed5dd14aa
parent54f5d87bf86546d028af0ba0eb2a3eedc57449f8 (diff)
downloadmandoc-03c35f001a80481355808b1f72c7705dbe891934.tar.gz
mandoc-03c35f001a80481355808b1f72c7705dbe891934.tar.zst
mandoc-03c35f001a80481355808b1f72c7705dbe891934.zip
Added support for traditional `Ds' width.
-rw-r--r--action.c9
-rw-r--r--validate.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/action.c b/action.c
index 58307907..0e7e87ba 100644
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.23 2009/02/28 13:47:36 kristaps Exp $ */
+/* $Id: action.c,v 1.24 2009/02/28 14:40:07 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 5673e094..0189cee3 100644
--- a/validate.c
+++ b/validate.c
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.64 2009/02/28 13:47:36 kristaps Exp $ */
+/* $Id: validate.c,v 1.65 2009/02/28 14:40:07 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);