From 67a3b6c851566d68fb74eccb2b33cb3de56b314d Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 1 Mar 2009 23:14:15 +0000 Subject: [PATCH] Backed-out warning about Ds. Backed-out assertion about Bd subtypes. --- action.c | 10 +++------- mdoc.c | 9 +++++++-- term.c | 9 +++------ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/action.c b/action.c index 74afb9fa..0733c797 100644 --- a/action.c +++ b/action.c @@ -1,4 +1,4 @@ -/* $Id: action.c,v 1.27 2009/02/28 21:50:01 kristaps Exp $ */ +/* $Id: action.c,v 1.28 2009/03/01 23:14:15 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -395,13 +395,9 @@ post_bl_width(struct mdoc *mdoc) * the macro's width as set in share/tmac/mdoc/doc-common. */ - if (xstrcmp(*p, "Ds")) { - if ( ! mdoc_warn(mdoc, WARN_COMPAT, - "%s argument deprecated", - mdoc_argnames[MDOC_Width])) - return(0); + if (xstrcmp(*p, "Ds")) width = 8; - } 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, diff --git a/mdoc.c b/mdoc.c index 23f0d7bb..af8a7fcc 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.48 2009/02/23 12:45:19 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.49 2009/03/01 23:14:15 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -191,9 +191,14 @@ mdoc_parseln(struct mdoc *mdoc, int line, char *buf) mdoc->linetok = 0; + /* + * FIXME: should puke on whitespace in non-literal displays. + */ + if ('.' != *buf) { if (SEC_PROLOGUE == mdoc->lastnamed) - return(mdoc_perr(mdoc, line, 0, "text disallowed in document prologue")); + return(mdoc_perr(mdoc, line, 0, + "no text in document prologue")); if ( ! mdoc_word_alloc(mdoc, line, 0, buf)) return(0); mdoc->next = MDOC_NEXT_SIBLING; diff --git a/term.c b/term.c index f9d60a8d..5e642620 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.31 2009/03/01 13:06:49 kristaps Exp $ */ +/* $Id: term.c,v 1.32 2009/03/01 23:14:15 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -1065,20 +1065,17 @@ termp_bd_pre(DECL_ARGS) bl = &node->parent->data.block; - i = arg_getattr(MDOC_Offset, bl->argc, bl->argv); if (-1 != i) { assert(1 == bl->argv[i].sz); p->offset += arg_offset(&bl->argv[i]); } - if ( ! arg_hasattr(MDOC_Literal, bl->argc, bl->argv)) - return(1); - p->flags |= TERMP_LITERAL; for (n = node->child; n; n = n->next) { - assert(MDOC_TEXT == n->type); /* FIXME */ + if (MDOC_TEXT != n->type) + errx(1, "non-text displays unsupported"); if ((*n->data.text.string)) { word(p, n->data.text.string); flushln(p); -- 2.47.1