=================================================================== RCS file: /cvs/mandoc/Attic/action.c,v retrieving revision 1.44 retrieving revision 1.47 diff -u -p -r1.44 -r1.47 --- mandoc/Attic/action.c 2009/03/20 15:14:01 1.44 +++ mandoc/Attic/action.c 2009/03/21 09:42:07 1.47 @@ -1,4 +1,4 @@ -/* $Id: action.c,v 1.44 2009/03/20 15:14:01 kristaps Exp $ */ +/* $Id: action.c,v 1.47 2009/03/21 09:42:07 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -57,8 +57,8 @@ static int post_ar(POST_ARGS); static int post_bl(POST_ARGS); static int post_bl_width(POST_ARGS); static int post_bl_tagwidth(POST_ARGS); -static int post_display(POST_ARGS); static int post_dd(POST_ARGS); +static int post_display(POST_ARGS); static int post_dt(POST_ARGS); static int post_nm(POST_ARGS); static int post_os(POST_ARGS); @@ -66,7 +66,8 @@ static int post_prol(POST_ARGS); static int post_sh(POST_ARGS); static int post_std(POST_ARGS); -static int pre_display(PRE_ARGS); +static int pre_bd(PRE_ARGS); +static int pre_dl(PRE_ARGS); #define merr(m, t) perr((m), (m)->last->line, (m)->last->pos, (t)) #define mwarn(m, t) pwarn((m), (m)->last->line, (m)->last->pos, (t)) @@ -80,8 +81,8 @@ const struct actions mdoc_actions[MDOC_MAX] = { { NULL, NULL }, /* Ss */ { NULL, NULL }, /* Pp */ { NULL, NULL }, /* D1 */ - { pre_display, post_display }, /* Dl */ - { pre_display, post_display }, /* Bd */ + { pre_dl, post_display }, /* Dl */ + { pre_bd, post_display }, /* Bd */ { NULL, NULL }, /* Ed */ { NULL, post_bl }, /* Bl */ { NULL, NULL }, /* El */ @@ -190,6 +191,7 @@ const struct actions mdoc_actions[MDOC_MAX] = { { NULL, NULL }, /* Es */ { NULL, NULL }, /* En */ { NULL, NULL }, /* Dx */ + { NULL, NULL }, /* %Q */ }; @@ -686,8 +688,19 @@ post_prol(POST_ARGS) static int -pre_display(PRE_ARGS) +pre_dl(PRE_ARGS) { + + if (MDOC_BODY != n->type) + return(1); + m->flags |= MDOC_LITERAL; + return(1); +} + + +static int +pre_bd(PRE_ARGS) +{ int i; if (MDOC_BODY != n->type) @@ -699,6 +712,7 @@ pre_display(PRE_ARGS) */ n = n->parent; + for (i = 0; i < (int)n->args->argc; i++) if (MDOC_Literal == n->args->argv[i].arg) break;