=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/roff.c,v retrieving revision 1.171 retrieving revision 1.172 diff -c -r1.171 -r1.172 *** src/usr.bin/mandoc/roff.c 2017/05/05 15:16:25 1.171 --- src/usr.bin/mandoc/roff.c 2017/05/07 17:30:58 1.172 *************** *** 1,4 **** ! /* $OpenBSD: roff.c,v 1.171 2017/05/05 15:16:25 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015, 2017 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: roff.c,v 1.172 2017/05/07 17:30:58 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015, 2017 Ingo Schwarze *************** *** 179,184 **** --- 179,185 ---- static enum rofferr roff_line_ignore(ROFF_ARGS); static void roff_man_alloc1(struct roff_man *); static void roff_man_free1(struct roff_man *); + static enum rofferr roff_manyarg(ROFF_ARGS); static enum rofferr roff_nr(ROFF_ARGS); static enum rofferr roff_onearg(ROFF_ARGS); static enum roff_tok roff_parse(struct roff *, char *, int *, *************** *** 210,216 **** const char *__roff_name[MAN_MAX + 1] = { "br", "ft", "ll", "sp", ! NULL, "ab", "ad", "af", "aln", "als", "am", "am1", "ami", "ami1", "as", "as1", "asciify", --- 211,217 ---- const char *__roff_name[MAN_MAX + 1] = { "br", "ft", "ll", "sp", ! "ta", NULL, "ab", "ad", "af", "aln", "als", "am", "am1", "ami", "ami1", "as", "as1", "asciify", *************** *** 260,266 **** "shc", "shift", "sizes", "so", "spacewidth", "special", "spreadwarn", "ss", "sty", "substring", "sv", "sy", ! "T&", "ta", "tc", "TE", "TH", "ti", "tkf", "tl", "tm", "tm1", "tmc", "tr", "track", "transchar", "trf", "trimat", --- 261,267 ---- "shc", "shift", "sizes", "so", "spacewidth", "special", "spreadwarn", "ss", "sty", "substring", "sv", "sy", ! "T&", "tc", "TE", "TH", "ti", "tkf", "tl", "tm", "tm1", "tmc", "tr", "track", "transchar", "trf", "trimat", *************** *** 320,325 **** --- 321,327 ---- { roff_onearg, NULL, NULL, 0 }, /* ft */ { roff_onearg, NULL, NULL, 0 }, /* ll */ { roff_onearg, NULL, NULL, 0 }, /* sp */ + { roff_manyarg, NULL, NULL, 0 }, /* ta */ { NULL, NULL, NULL, 0 }, /* ROFF_MAX */ { roff_unsupp, NULL, NULL, 0 }, /* ab */ { roff_line_ignore, NULL, NULL, 0 }, /* ad */ *************** *** 518,524 **** { roff_line_ignore, NULL, NULL, 0 }, /* sv */ { roff_insec, NULL, NULL, 0 }, /* sy */ { roff_T_, NULL, NULL, 0 }, /* T& */ - { roff_unsupp, NULL, NULL, 0 }, /* ta */ { roff_unsupp, NULL, NULL, 0 }, /* tc */ { roff_TE, NULL, NULL, 0 }, /* TE */ { roff_TH, NULL, NULL, 0 }, /* TH */ --- 520,525 ---- *************** *** 2789,2794 **** --- 2790,2818 ---- r->parse, ln, cp - buf->buf, "%s ... %s", roff_name[tok], cp); roff_word_alloc(r->man, ln, pos, buf->buf + pos); + } + + n->flags |= NODE_LINE | NODE_VALID | NODE_ENDED; + r->man->last = n; + r->man->next = ROFF_NEXT_SIBLING; + return ROFF_IGN; + } + + static enum rofferr + roff_manyarg(ROFF_ARGS) + { + struct roff_node *n; + char *sp, *ep; + + roff_elem_alloc(r->man, ln, ppos, tok); + n = r->man->last; + + for (sp = ep = buf->buf + pos; *sp != '\0'; sp = ep) { + while (*ep != '\0' && *ep != ' ') + ep++; + while (*ep == ' ') + *ep++ = '\0'; + roff_word_alloc(r->man, ln, sp - buf->buf, sp); } n->flags |= NODE_LINE | NODE_VALID | NODE_ENDED;