=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_man.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- src/usr.bin/mandoc/mdoc_man.c 2012/07/08 18:38:07 1.21 +++ src/usr.bin/mandoc/mdoc_man.c 2012/07/08 22:48:38 1.22 @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.21 2012/07/08 18:38:07 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.22 2012/07/08 22:48:38 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Ingo Schwarze * @@ -66,6 +66,7 @@ static int pre_ft(DECL_ARGS); static int pre_in(DECL_ARGS); static int pre_it(DECL_ARGS); +static int pre_lk(DECL_ARGS); static int pre_nm(DECL_ARGS); static int pre_ns(DECL_ARGS); static int pre_pp(DECL_ARGS); @@ -195,7 +196,7 @@ { NULL, pre_ux, NULL, "currently under development.", NULL }, /* Ud */ { NULL, NULL, post_lb, NULL, NULL }, /* Lb */ { NULL, pre_pp, NULL, NULL, NULL }, /* Lp */ - { NULL, NULL, NULL, NULL, NULL }, /* _Lk */ + { NULL, pre_lk, NULL, NULL, NULL }, /* Lk */ { NULL, NULL, NULL, NULL, NULL }, /* _Mt */ { cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */ { cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */ @@ -824,6 +825,34 @@ if (SEC_LIBRARY == n->sec) outflags |= MMAN_br; +} + +static int +pre_lk(DECL_ARGS) +{ + const struct mdoc_node *link, *descr; + + if (NULL == (link = n->child)) + return(0); + + if (NULL != (descr = link->next)) { + print_word("\\fI"); + outflags &= ~MMAN_spc; + while (NULL != descr) { + print_word(descr->string); + descr = descr->next; + } + print_word(":"); + outflags &= ~MMAN_spc; + print_word("\\fP"); + } + + print_word("\\fB"); + outflags &= ~MMAN_spc; + print_word(link->string); + outflags &= ~MMAN_spc; + print_word("\\fP"); + return(0); } static int