summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 14:43:35 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 14:43:35 +0000
commitcdf9be249b67e8fce433f914030a005720a128e2 (patch)
treef9572f0aeac4bda421308976554bdef5f179ee97
parentc9b7739a74541dbef4f181b528747683621fdc59 (diff)
downloadmandoc-cdf9be249b67e8fce433f914030a005720a128e2.tar.gz
Made `Ds' emit a warning.
Default width is 78.
-rw-r--r--action.c10
-rw-r--r--mdocterm.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/action.c b/action.c
index 38ec2dd4..e5d88d74 100644
--- a/action.c
+++ b/action.c
@@ -392,13 +392,17 @@ post_bl_width(struct mdoc *mdoc)
* the macro's width as set in share/tmac/mdoc/doc-common.
*/
- if (xstrcmp(*p, "Ds"))
+ if (xstrcmp(*p, "Ds")) {
+ if ( ! mdoc_warn(mdoc, WARN_COMPAT,
+ "%s argument deprecated",
+ mdoc_argnames[MDOC_Width]))
+ return(0);
width = 6;
- else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
+ } else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
return(1);
else if (0 == (width = mdoc_macro2len(tok)))
return(mdoc_warn(mdoc, WARN_SYNTAX,
- "-%s macro has no length",
+ "%s macro has no length",
mdoc_argnames[MDOC_Width]));
mdoc_msg(mdoc, "re-writing %s argument: %s -> %zun",
diff --git a/mdocterm.c b/mdocterm.c
index 79db7723..ca695ab8 100644
--- a/mdocterm.c
+++ b/mdocterm.c
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
if (NULL == (mdoc = mmain_mdoc(p)))
mmain_exit(p, 1);
- termp.maxrmargin = 80; /* XXX */
+ termp.maxrmargin = 78; /* XXX */
termp.rmargin = termp.maxrmargin;
termp.maxcols = 1024;
termp.offset = termp.col = 0;