From 93fa97b1d275fbba5c0d3559dd2b4d8442f78db7 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 28 Feb 2009 14:43:35 +0000 Subject: Made `Ds' emit a warning. Default width is 78. --- action.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'action.c') diff --git a/action.c b/action.c index 0e7e87ba..c24830ad 100644 --- a/action.c +++ b/action.c @@ -1,4 +1,4 @@ -/* $Id: action.c,v 1.24 2009/02/28 14:40:07 kristaps Exp $ */ +/* $Id: action.c,v 1.25 2009/02/28 14:43:35 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -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", -- cgit v1.2.3