X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/144a953361b31d61aa5ffd0785aad13f5469f3d6..04ec167793e3dfd1707ea22132ce12f5b7b45e85:/action.c?ds=sidebyside diff --git a/action.c b/action.c index 58307907..f18bb780 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.26 2009/02/28 19:15:28 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -392,12 +392,17 @@ 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")) { + if ( ! mdoc_warn(mdoc, WARN_COMPAT, + "%s argument deprecated", + mdoc_argnames[MDOC_Width])) + return(0); + width = 8; + } 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", + "%s macro has no length", mdoc_argnames[MDOC_Width])); mdoc_msg(mdoc, "re-writing %s argument: %s -> %zun",