=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/Attic/man_action.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/mandoc/Attic/man_action.c 2009/08/22 20:14:37 1.6 --- src/usr.bin/mandoc/Attic/man_action.c 2009/08/22 23:17:40 1.7 *************** *** 1,4 **** ! /* $Id: man_action.c,v 1.6 2009/08/22 20:14:37 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: man_action.c,v 1.7 2009/08/22 23:17:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 27,35 **** int (*post)(struct man *); }; - static int post_TH(struct man *); ! static time_t man_atotime(const char *); const struct actions man_actions[MAN_MAX] = { { NULL }, /* br */ --- 27,35 ---- int (*post)(struct man *); }; static int post_TH(struct man *); ! static int post_fi(struct man *); ! static int post_nf(struct man *); const struct actions man_actions[MAN_MAX] = { { NULL }, /* br */ *************** *** 56,67 **** { NULL }, /* na */ { NULL }, /* i */ { NULL }, /* sp */ ! { NULL }, /* nf */ ! { NULL }, /* fi */ ! { NULL }, /* r*/ }; int man_action_post(struct man *m) { --- 56,72 ---- { NULL }, /* na */ { NULL }, /* i */ { NULL }, /* sp */ ! { post_nf }, /* nf */ ! { post_fi }, /* fi */ ! { NULL }, /* r */ ! { NULL }, /* RE */ ! { NULL }, /* RS */ ! { NULL }, /* DT */ }; + static time_t man_atotime(const char *); + int man_action_post(struct man *m) { *************** *** 72,85 **** switch (m->last->type) { case (MAN_TEXT): ! break; case (MAN_ROOT): ! break; default: ! if (NULL == man_actions[m->last->tok].post) ! break; ! return((*man_actions[m->last->tok].post)(m)); } return(1); } --- 77,115 ---- switch (m->last->type) { case (MAN_TEXT): ! /* FALLTHROUGH */ case (MAN_ROOT): ! return(1); default: ! break; } + + if (NULL == man_actions[m->last->tok].post) + return(1); + return((*man_actions[m->last->tok].post)(m)); + } + + + static int + post_fi(struct man *m) + { + + if ( ! (MAN_LITERAL & m->flags)) + if ( ! man_nwarn(m, m->last, WNLITERAL)) + return(0); + m->flags &= ~MAN_LITERAL; + return(1); + } + + + static int + post_nf(struct man *m) + { + + if (MAN_LITERAL & m->flags) + if ( ! man_nwarn(m, m->last, WOLITERAL)) + return(0); + m->flags |= MAN_LITERAL; return(1); }