=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_state.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/mandoc/mdoc_state.c 2017/11/29 20:04:36 1.9 --- src/usr.bin/mandoc/mdoc_state.c 2018/08/17 20:31:52 1.10 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_state.c,v 1.9 2017/11/29 20:04:36 schwarze Exp $ */ /* * Copyright (c) 2014, 2015, 2017 Ingo Schwarze * --- 1,4 ---- ! /* $OpenBSD: mdoc_state.c,v 1.10 2018/08/17 20:31:52 schwarze Exp $ */ /* * Copyright (c) 2014, 2015, 2017 Ingo Schwarze * *************** *** 36,42 **** static void state_sh(STATE_ARGS); static void state_sm(STATE_ARGS); ! static const state_handler __state_handlers[MDOC_MAX - MDOC_Dd] = { NULL, /* Dd */ NULL, /* Dt */ NULL, /* Os */ --- 36,42 ---- static void state_sh(STATE_ARGS); static void state_sm(STATE_ARGS); ! static const state_handler state_handlers[MDOC_MAX - MDOC_Dd] = { NULL, /* Dd */ NULL, /* Dt */ NULL, /* Os */ *************** *** 158,164 **** NULL, /* %U */ NULL, /* Ta */ }; - static const state_handler *const state_handlers = __state_handlers - MDOC_Dd; void --- 158,163 ---- *************** *** 170,179 **** return; assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX); ! if ( ! (mdoc_macros[n->tok].flags & MDOC_PROLOGUE)) mdoc->flags |= MDOC_PBODY; ! handler = state_handlers[n->tok]; if (*handler) (*handler)(mdoc, n); } --- 169,178 ---- return; assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX); ! if ((mdoc_macro(n->tok)->flags & MDOC_PROLOGUE) == 0) mdoc->flags |= MDOC_PBODY; ! handler = state_handlers[n->tok - MDOC_Dd]; if (*handler) (*handler)(mdoc, n); }