From ae5f77f4afb4eacc8500ded5455086d6242ae946 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 27 Nov 2014 16:20:31 +0000 Subject: Fix the obsolete .Db (toggle debug mode) macro to ignore its arguments and not trigger an assertion when there is more than one argument; the latter found by jsg@ with afl. --- mdoc_man.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'mdoc_man.c') diff --git a/mdoc_man.c b/mdoc_man.c index 75b68e62..33e8b2cb 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.74 2014/11/19 22:00:37 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.75 2014/11/27 16:20:31 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze * @@ -84,7 +84,7 @@ static int pre_dl(DECL_ARGS); static int pre_en(DECL_ARGS); static int pre_enc(DECL_ARGS); static int pre_em(DECL_ARGS); -static int pre_es(DECL_ARGS); +static int pre_skip(DECL_ARGS); static int pre_ex(DECL_ARGS); static int pre_fa(DECL_ARGS); static int pre_fd(DECL_ARGS); @@ -183,7 +183,7 @@ static const struct manact manacts[MDOC_MAX + 1] = { { cond_body, pre_enc, post_enc, "[", "]" }, /* Bq */ { NULL, pre_ux, NULL, "BSD/OS", NULL }, /* Bsx */ { NULL, pre_bx, NULL, NULL, NULL }, /* Bx */ - { NULL, NULL, NULL, NULL, NULL }, /* Db */ + { NULL, pre_skip, NULL, NULL, NULL }, /* Db */ { NULL, NULL, NULL, NULL, NULL }, /* Dc */ { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Do */ { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Dq */ @@ -235,7 +235,7 @@ static const struct manact manacts[MDOC_MAX + 1] = { { cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */ { NULL, NULL, NULL, NULL, NULL }, /* Brc */ { NULL, NULL, post_percent, NULL, NULL }, /* %C */ - { NULL, pre_es, NULL, NULL, NULL }, /* Es */ + { NULL, pre_skip, NULL, NULL, NULL }, /* Es */ { cond_body, pre_en, post_en, NULL, NULL }, /* En */ { NULL, pre_ux, NULL, "DragonFly", NULL }, /* Dx */ { NULL, NULL, post_percent, NULL, NULL }, /* %Q */ @@ -1131,13 +1131,6 @@ post_eo(DECL_ARGS) outflags &= ~MMAN_spc; } -static int -pre_es(DECL_ARGS) -{ - - return(0); -} - static int pre_fa(DECL_ARGS) { @@ -1677,6 +1670,13 @@ pre_rv(DECL_ARGS) return(0); } +static int +pre_skip(DECL_ARGS) +{ + + return(0); +} + static int pre_sm(DECL_ARGS) { -- cgit v1.2.3