=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man.c,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** src/usr.bin/mandoc/man.c 2010/08/20 00:53:35 1.40 --- src/usr.bin/mandoc/man.c 2010/10/15 20:45:03 1.41 *************** *** 1,4 **** ! /* $Id: man.c,v 1.40 2010/08/20 00:53:35 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: man.c,v 1.41 2010/10/15 20:45:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * *************** *** 26,31 **** --- 26,33 ---- #include "libman.h" #include "libmandoc.h" + #include "tbl.h" + const char *const __man_macronames[MAN_MAX] = { "br", "TH", "SH", "SS", "TP", "LP", "PP", "P", *************** *** 36,42 **** "nf", "fi", "r", "RE", "RS", "DT", "UC", "PD", "Sp", "Vb", "Ve", "AT", ! "in" }; const char * const *man_macronames = __man_macronames; --- 38,44 ---- "nf", "fi", "r", "RE", "RS", "DT", "UC", "PD", "Sp", "Vb", "Ve", "AT", ! "in", "TS", "TE" }; const char * const *man_macronames = __man_macronames; *************** *** 121,130 **** --- 123,142 ---- int man_parseln(struct man *m, int ln, char *buf, int offs) { + struct man_node *n; if (MAN_HALT & m->flags) return(0); + n = m->last; + + if (n && MAN_TS == n->tok && MAN_BODY == n->type && + strncmp(buf+offs, ".TE", 3)) { + n = n->parent; + return(tbl_read(n->data.TS, "", ln, buf+offs, + strlen(buf+offs)) ? 1 : 0); + } + return(('.' == buf[offs] || '\'' == buf[offs]) ? man_pmacro(m, ln, buf, offs) : man_ptext(m, ln, buf, offs)); *************** *** 322,327 **** --- 334,341 ---- if (p->string) free(p->string); + if (p->data.TS) + tbl_free(p->data.TS); free(p); }