=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.158 retrieving revision 1.159 diff -u -p -r1.158 -r1.159 --- mandoc/mdoc_term.c 2010/06/26 15:36:37 1.158 +++ mandoc/mdoc_term.c 2010/06/27 01:26:20 1.159 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.158 2010/06/26 15:36:37 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.159 2010/06/27 01:26:20 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -73,6 +73,7 @@ static void termp____post(DECL_ARGS); static void termp_an_post(DECL_ARGS); static void termp_aq_post(DECL_ARGS); static void termp_bd_post(DECL_ARGS); +static void termp_bk_post(DECL_ARGS); static void termp_bl_post(DECL_ARGS); static void termp_bq_post(DECL_ARGS); static void termp_brq_post(DECL_ARGS); @@ -97,6 +98,7 @@ static int termp_ap_pre(DECL_ARGS); static int termp_aq_pre(DECL_ARGS); static int termp_bd_pre(DECL_ARGS); static int termp_bf_pre(DECL_ARGS); +static int termp_bk_pre(DECL_ARGS); static int termp_bl_pre(DECL_ARGS); static int termp_bold_pre(DECL_ARGS); static int termp_bq_pre(DECL_ARGS); @@ -236,7 +238,7 @@ static const struct termact termacts[MDOC_MAX] = { { NULL, NULL }, /* Fc */ { termp_op_pre, termp_op_post }, /* Oo */ { NULL, NULL }, /* Oc */ - { NULL, NULL }, /* Bk */ + { termp_bk_pre, termp_bk_post }, /* Bk */ { NULL, NULL }, /* Ek */ { termp_bt_pre, NULL }, /* Bt */ { NULL, NULL }, /* Hf */ @@ -2101,6 +2103,24 @@ termp_lk_pre(DECL_ARGS) return(0); } + +/* ARGSUSED */ +static int +termp_bk_pre(DECL_ARGS) +{ + + p->flags |= TERMP_PREKEEP; + return(1); +} + + +/* ARGSUSED */ +static void +termp_bk_post(DECL_ARGS) +{ + + p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP); +} /* ARGSUSED */ static int