X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/144a953361b31d61aa5ffd0785aad13f5469f3d6..67a3b6c851566d68fb74eccb2b33cb3de56b314d:/action.c diff --git a/action.c b/action.c index 58307907..0733c797 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.28 2009/03/01 23:14:15 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -259,7 +259,8 @@ post_dt(struct mdoc *mdoc) mdoc->meta.msec = mdoc_atomsec(p); if (MSEC_DEFAULT != mdoc->meta.msec) break; - return(mdoc_nerr(mdoc, n, "invalid parameter syntax")); + return(mdoc_nerr(mdoc, n, + "invalid parameter syntax")); case (2): mdoc->meta.vol = mdoc_atovol(p); if (VOL_DEFAULT != mdoc->meta.vol) @@ -267,9 +268,11 @@ post_dt(struct mdoc *mdoc) mdoc->meta.arch = mdoc_atoarch(p); if (ARCH_DEFAULT != mdoc->meta.arch) break; - return(mdoc_nerr(mdoc, n, "invalid parameter syntax")); + return(mdoc_nerr(mdoc, n, + "invalid parameter syntax")); default: - return(mdoc_nerr(mdoc, n, "too many parameters")); + return(mdoc_nerr(mdoc, n, + "too many parameters")); } } @@ -392,12 +395,13 @@ 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 = 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",