=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/Attic/mdoc_action.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/mandoc/Attic/mdoc_action.c 2009/06/14 23:00:57 1.2 --- src/usr.bin/mandoc/Attic/mdoc_action.c 2009/06/18 01:19:02 1.3 *************** *** 1,4 **** ! /* $Id: mdoc_action.c,v 1.2 2009/06/14 23:00:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: mdoc_action.c,v 1.3 2009/06/18 01:19:02 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 56,61 **** --- 56,62 ---- static int post_dd(POST_ARGS); static int post_display(POST_ARGS); static int post_dt(POST_ARGS); + static int post_lk(POST_ARGS); static int post_nm(POST_ARGS); static int post_os(POST_ARGS); static int post_prol(POST_ARGS); *************** *** 179,185 **** { NULL, NULL }, /* Lb */ { NULL, NULL }, /* Ap */ { NULL, NULL }, /* Lp */ ! { NULL, NULL }, /* Lk */ { NULL, NULL }, /* Mt */ { NULL, NULL }, /* Brq */ { NULL, NULL }, /* Bro */ --- 180,186 ---- { NULL, NULL }, /* Lb */ { NULL, NULL }, /* Ap */ { NULL, NULL }, /* Lp */ ! { NULL, post_lk }, /* Lk */ { NULL, NULL }, /* Mt */ { NULL, NULL }, /* Brq */ { NULL, NULL }, /* Bro */ *************** *** 532,538 **** * width if a macro. */ ! if ((n = m->last->body->child)) { assert(MDOC_BLOCK == n->type); assert(MDOC_It == n->tok); n = n->head->child; --- 533,540 ---- * width if a macro. */ ! n = m->last->body->child; ! if (n) { assert(MDOC_BLOCK == n->type); assert(MDOC_It == n->tok); n = n->head->child; *************** *** 659,664 **** --- 661,687 ---- if ( ! post_bl_width(m)) return(0); + return(1); + } + + + static int + post_lk(POST_ARGS) + { + struct mdoc_node *n; + + if (m->last->child) + return(1); + + n = m->last; + m->next = MDOC_NEXT_CHILD; + /* FIXME: this isn't documented anywhere! */ + if ( ! mdoc_word_alloc(m, m->last->line, + m->last->pos, "~")) + return(0); + + m->last = n; + m->next = MDOC_NEXT_SIBLING; return(1); }