=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_term.c,v retrieving revision 1.90 retrieving revision 1.91 diff -c -r1.90 -r1.91 *** src/usr.bin/mandoc/man_term.c 2013/01/05 22:18:59 1.90 --- src/usr.bin/mandoc/man_term.c 2013/10/17 20:51:30 1.91 *************** *** 1,4 **** ! /* $Id: man_term.c,v 1.90 2013/01/05 22:18:59 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze --- 1,4 ---- ! /* $Id: man_term.c,v 1.91 2013/10/17 20:51:30 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze *************** *** 74,79 **** --- 74,80 ---- static int pre_SH(DECL_ARGS); static int pre_SS(DECL_ARGS); static int pre_TP(DECL_ARGS); + static int pre_UR(DECL_ARGS); static int pre_alternate(DECL_ARGS); static int pre_ft(DECL_ARGS); static int pre_ign(DECL_ARGS); *************** *** 87,92 **** --- 88,94 ---- static void post_SH(DECL_ARGS); static void post_SS(DECL_ARGS); static void post_TP(DECL_ARGS); + static void post_UR(DECL_ARGS); static const struct termact termacts[MAN_MAX] = { { pre_sp, NULL, MAN_NOTEXT }, /* br */ *************** *** 125,130 **** --- 127,134 ---- { pre_OP, NULL, 0 }, /* OP */ { pre_literal, NULL, 0 }, /* EX */ { pre_literal, NULL, 0 }, /* EE */ + { pre_UR, post_UR, 0 }, /* UR */ + { NULL, NULL, 0 }, /* UE */ }; *************** *** 933,938 **** --- 937,968 ---- if (--mt->lmarginsz < MAXMARGINS) mt->lmargincur = mt->lmarginsz; + } + + /* ARGSUSED */ + static int + pre_UR(DECL_ARGS) + { + + return (MAN_HEAD != n->type); + } + + /* ARGSUSED */ + static void + post_UR(DECL_ARGS) + { + + if (MAN_BLOCK != n->type) + return; + + term_word(p, "<"); + p->flags |= TERMP_NOSPACE; + + if (NULL != n->child->child) + print_man_node(p, mt, n->child->child, meta); + + p->flags |= TERMP_NOSPACE; + term_word(p, ">"); } static void