=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_man.c,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** src/usr.bin/mandoc/mdoc_man.c 2012/07/10 20:36:33 1.30 --- src/usr.bin/mandoc/mdoc_man.c 2012/07/11 16:18:08 1.31 *************** *** 1,4 **** ! /* $Id: mdoc_man.c,v 1.30 2012/07/10 20:36:33 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Ingo Schwarze * --- 1,4 ---- ! /* $Id: mdoc_man.c,v 1.31 2012/07/11 16:18:08 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Ingo Schwarze * *************** *** 750,758 **** static int pre_bl(DECL_ARGS) { ! if (LIST_enum == n->norm->Bl.type) n->norm->Bl.count = 0; return(1); } --- 750,773 ---- static int pre_bl(DECL_ARGS) { + size_t icol; ! switch (n->norm->Bl.type) { ! case (LIST_enum): n->norm->Bl.count = 0; + return(1); + case (LIST_column): + break; + default: + return(1); + } + + outflags |= MMAN_nl; + print_word(".TS"); + outflags |= MMAN_nl; + for (icol = 0; icol < n->norm->Bl.ncols; icol++) + print_word("l"); + print_word("."); return(1); } *************** *** 760,768 **** post_bl(DECL_ARGS) { ! outflags |= MMAN_br; ! if (LIST_enum == n->norm->Bl.type) n->norm->Bl.count = 0; } static int --- 775,792 ---- post_bl(DECL_ARGS) { ! switch (n->norm->Bl.type) { ! case (LIST_enum): n->norm->Bl.count = 0; + break; + case (LIST_column): + outflags |= MMAN_nl; + print_word(".TE"); + break; + default: + break; + } + outflags |= MMAN_br; } static int *************** *** 1071,1078 **** { const struct mdoc_node *bln; ! if (MDOC_HEAD == n->type) { ! bln = n->parent->parent; switch (bln->norm->Bl.type) { case (LIST_diag): outflags &= ~MMAN_spc; --- 1095,1104 ---- { const struct mdoc_node *bln; ! bln = n->parent->parent; ! ! switch (n->type) { ! case (MDOC_HEAD): switch (bln->norm->Bl.type) { case (LIST_diag): outflags &= ~MMAN_spc; *************** *** 1084,1089 **** --- 1110,1125 ---- default: break; } + break; + case (MDOC_BODY): + if (LIST_column == bln->norm->Bl.type && + NULL != n->next) { + putchar('\t'); + outflags &= ~MMAN_spc; + } + break; + default: + break; } }