From: Kristaps Dzonsons Date: Fri, 14 May 2010 17:31:25 +0000 (+0000) Subject: Backed out check for `Ex' manual sec (ok schwarze@, joerg@), in turn backing out... X-Git-Tag: VERSION_1_10_1~154 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/8c51068aee6d4e14cc03f0864dcd89e1323c6742 Backed out check for `Ex' manual sec (ok schwarze@, joerg@), in turn backing out check_msec() and deps. --- diff --git a/libmdoc.h b/libmdoc.h index 095eb5ed..f632a4e5 100644 --- a/libmdoc.h +++ b/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.43 2010/05/14 12:55:22 kristaps Exp $ */ +/* $Id: libmdoc.h,v 1.44 2010/05/14 17:31:25 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -79,7 +79,6 @@ enum merr { ENOLINE, EPROLOOO, EPROLREP, - EBADMSEC, EBADSEC, EFONT, EBADDATE, diff --git a/mdoc.7 b/mdoc.7 index 20ed132d..61190af5 100644 --- a/mdoc.7 +++ b/mdoc.7 @@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.105 2010/05/14 16:02:29 kristaps Exp $ +.\" $Id: mdoc.7,v 1.106 2010/05/14 17:31:25 kristaps Exp $ .\" .\" Copyright (c) 2009 Kristaps Dzonsons .\" @@ -1956,8 +1956,9 @@ This is not the case in mandoc. In groff, the .Sx \&Cd , .Sx \&Er , +.Sx \&Ex , and -.Sx \&Ex +.Sx \&Rv macros were stipulated only to occur in certain manual sections. mandoc does not have these restrictions. .It diff --git a/mdoc.c b/mdoc.c index 38f97ed1..de4529cc 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.130 2010/05/13 06:22:11 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.131 2010/05/14 17:31:25 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -68,7 +68,6 @@ const char *const __mdoc_merrnames[MERRMAX] = { "line arguments discouraged", /* ENOLINE */ "prologue macro out of conventional order", /* EPROLOOO */ "prologue macro repeated", /* EPROLREP */ - "invalid manual section", /* EBADMSEC */ "invalid section", /* EBADSEC */ "invalid font mode", /* EFONT */ "invalid date syntax", /* EBADDATE */ diff --git a/mdoc_validate.c b/mdoc_validate.c index 1e3a4ec3..5563055b 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.75 2010/05/14 16:02:29 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.76 2010/05/14 17:31:25 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -45,7 +45,6 @@ struct valids { }; static int check_parent(PRE_ARGS, enum mdoct, enum mdoc_type); -static int check_msec(PRE_ARGS, ...); static int check_sec(PRE_ARGS, ...); static int check_stdarg(PRE_ARGS); static int check_text(struct mdoc *, int, int, const char *); @@ -100,7 +99,6 @@ static int pre_bl(PRE_ARGS); static int pre_dd(PRE_ARGS); static int pre_display(PRE_ARGS); static int pre_dt(PRE_ARGS); -static int pre_ex(PRE_ARGS); static int pre_fd(PRE_ARGS); static int pre_it(PRE_ARGS); static int pre_lb(PRE_ARGS); @@ -139,7 +137,7 @@ static v_pre pres_d1[] = { pre_display, NULL }; static v_pre pres_dd[] = { pre_dd, NULL }; static v_pre pres_dt[] = { pre_dt, NULL }; static v_pre pres_er[] = { NULL, NULL }; -static v_pre pres_ex[] = { pre_ex, NULL }; +static v_pre pres_ex[] = { NULL, NULL }; static v_pre pres_fd[] = { pre_fd, NULL }; static v_pre pres_it[] = { pre_it, NULL }; static v_pre pres_lb[] = { pre_lb, NULL }; @@ -439,28 +437,6 @@ check_sec(PRE_ARGS, ...) } -static int -check_msec(PRE_ARGS, ...) -{ - va_list ap; - int msec; - - va_start(ap, n); - for (;;) { - /* LINTED */ - if (0 == (msec = va_arg(ap, int))) - break; - if (msec != mdoc->meta.msec) - continue; - va_end(ap); - return(1); - } - - va_end(ap); - return(mdoc_nwarn(mdoc, n, EBADMSEC)); -} - - static int check_args(struct mdoc *m, const struct mdoc_node *n) { @@ -777,16 +753,6 @@ pre_rv(PRE_ARGS) } -static int -pre_ex(PRE_ARGS) -{ - - if ( ! check_msec(mdoc, n, 1, 6, 8, 0)) - return(0); - return(check_stdarg(mdoc, n)); -} - - static int pre_dt(PRE_ARGS) {