-/* $OpenBSD: man_html.c,v 1.137 2022/07/06 16:02:52 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.138 2023/04/28 20:14:19 schwarze Exp $ */
/*
* Copyright (c) 2013-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
static int man_SM_pre(MAN_ARGS);
static int man_SY_pre(MAN_ARGS);
static int man_UR_pre(MAN_ARGS);
-static int man_abort_pre(MAN_ARGS);
static int man_alt_pre(MAN_ARGS);
static int man_ign_pre(MAN_ARGS);
static int man_in_pre(MAN_ARGS);
{ man_SH_pre, NULL }, /* SS */
{ man_IP_pre, NULL }, /* TP */
{ man_IP_pre, NULL }, /* TQ */
- { man_abort_pre, NULL }, /* LP */
+ { man_PP_pre, NULL }, /* LP */
{ man_PP_pre, NULL }, /* PP */
- { man_abort_pre, NULL }, /* P */
+ { man_PP_pre, NULL }, /* P */
{ man_IP_pre, NULL }, /* IP */
{ man_PP_pre, NULL }, /* HP */
{ man_SM_pre, NULL }, /* SM */
if (n->child != NULL &&
(n->child->flags & NODE_NOFILL) == 0)
print_otag(h, TAG_P, "c",
- n->tok == MAN_PP ? "Pp" : "Pp HP");
+ n->tok == MAN_HP ? "Pp HP" : "Pp");
break;
default:
abort();
print_man_nodelist(man, n->child, h);
return 0;
}
-
-static int
-man_abort_pre(MAN_ARGS)
-{
- abort();
-}
-/* $OpenBSD: man_term.c,v 1.194 2022/08/28 09:55:58 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.195 2023/04/28 20:14:19 schwarze Exp $ */
/*
* Copyright (c) 2010-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
static int pre_SY(DECL_ARGS);
static int pre_TP(DECL_ARGS);
static int pre_UR(DECL_ARGS);
-static int pre_abort(DECL_ARGS);
static int pre_alternate(DECL_ARGS);
static int pre_ign(DECL_ARGS);
static int pre_in(DECL_ARGS);
{ pre_SS, post_SH, 0 }, /* SS */
{ pre_TP, post_TP, 0 }, /* TP */
{ pre_TP, post_TP, 0 }, /* TQ */
- { pre_abort, NULL, 0 }, /* LP */
+ { pre_PP, NULL, 0 }, /* LP */
{ pre_PP, NULL, 0 }, /* PP */
- { pre_abort, NULL, 0 }, /* P */
+ { pre_PP, NULL, 0 }, /* P */
{ pre_IP, post_IP, 0 }, /* IP */
{ pre_HP, post_HP, 0 }, /* HP */
{ NULL, NULL, 0 }, /* SM */
term_vspace(p);
}
-
-static int
-pre_abort(DECL_ARGS)
-{
- abort();
-}
-
static int
pre_ign(DECL_ARGS)
{
-/* $OpenBSD: man_validate.c,v 1.127 2022/08/02 11:55:51 schwarze Exp $ */
+/* $OpenBSD: man_validate.c,v 1.128 2023/04/28 20:14:19 schwarze Exp $ */
/*
* Copyright (c) 2010, 2012-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
typedef void (*v_check)(CHKARGS);
-static void check_abort(CHKARGS) __attribute__((__noreturn__));
static void check_par(CHKARGS);
static void check_part(CHKARGS);
static void check_root(CHKARGS);
post_SH, /* SS */
post_TP, /* TP */
post_TP, /* TQ */
- check_abort,/* LP */
+ check_par, /* LP */
check_par, /* PP */
- check_abort,/* P */
+ check_par, /* P */
post_IP, /* IP */
NULL, /* HP */
NULL, /* SM */
struct roff_node *n;
const v_check *cp;
- /*
- * Translate obsolete macros such that later code
- * does not need to look for them.
- */
-
- n = man->last;
- switch (n->tok) {
- case MAN_LP:
- case MAN_P:
- n->tok = MAN_PP;
- break;
- default:
- break;
- }
-
/*
* Iterate over all children, recursing into each one
* in turn, depth-first.
*/
+ n = man->last;
man->last = man->last->child;
while (man->last != NULL) {
man_validate(man);
"(OpenBSD)" : "(NetBSD)");
}
-static void
-check_abort(CHKARGS)
-{
- abort();
-}
-
/*
* Skip leading whitespace, dashes, backslashes, and font escapes,
* then create a tag if the first following byte is a letter.
return;
}
- if (nc->tok == MAN_PP && nc->body->child != NULL) {
+ if ((nc->tok == MAN_LP || nc->tok == MAN_PP || nc->tok == MAN_P) &&
+ nc->body->child != NULL) {
while (nc->body->last != NULL) {
man->next = ROFF_NEXT_CHILD;
roff_node_relink(man, nc->body->last);
}
}
- if (nc->tok == MAN_PP || nc->tok == ROFF_sp || nc->tok == ROFF_br) {
+ if (nc->tok == MAN_LP || nc->tok == MAN_PP || nc->tok == MAN_P ||
+ nc->tok == ROFF_sp || nc->tok == ROFF_br) {
mandoc_msg(MANDOCERR_PAR_SKIP, nc->line, nc->pos,
"%s after %s", roff_name[nc->tok], roff_name[n->tok]);
roff_node_delete(man, nc);