diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-29 14:53:31 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-29 14:53:31 +0000 |
commit | 8e25f248df0dc1385f91b1da975e220bd25e4c34 (patch) | |
tree | 2c2f9a601f450969482355c97ce7d698615fc0f2 /roff.c | |
parent | 9864cb8baea0db37f74a5bca120318017b215c1f (diff) | |
download | mandoc-8e25f248df0dc1385f91b1da975e220bd25e4c34.tar.gz |
Add handling for `T&', which restarts a table except for its options.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -59,6 +59,7 @@ enum rofft { ROFF_tr, ROFF_TS, ROFF_TE, + ROFF_T_, ROFF_cblock, ROFF_ccond, /* FIXME: remove this. */ ROFF_USERDEF, @@ -143,6 +144,7 @@ static void roff_setstr(struct roff *, static enum rofferr roff_so(ROFF_ARGS); static enum rofferr roff_TE(ROFF_ARGS); static enum rofferr roff_TS(ROFF_ARGS); +static enum rofferr roff_T_(ROFF_ARGS); static enum rofferr roff_userdef(ROFF_ARGS); /* See roff_hash_find() */ @@ -175,6 +177,7 @@ static struct roffmac roffs[ROFF_MAX] = { { "tr", roff_line_ignore, NULL, NULL, 0, NULL }, { "TS", roff_TS, NULL, NULL, 0, NULL }, { "TE", roff_TE, NULL, NULL, 0, NULL }, + { "T&", roff_T_, NULL, NULL, 0, NULL }, { ".", roff_cblock, NULL, NULL, 0, NULL }, { "\\}", roff_ccond, NULL, NULL, 0, NULL }, { NULL, roff_userdef, NULL, NULL, 0, NULL }, @@ -1123,6 +1126,19 @@ roff_TE(ROFF_ARGS) /* ARGSUSED */ static enum rofferr +roff_T_(ROFF_ARGS) +{ + + if (NULL == r->tbl) + (*r->msg)(MANDOCERR_NOSCOPE, r->data, ln, ppos, NULL); + else + tbl_restart(r->tbl); + + return(ROFF_IGN); +} + +/* ARGSUSED */ +static enum rofferr roff_TS(ROFF_ARGS) { |