From 72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 7 May 2017 17:31:45 +0000 Subject: Basic implementation of the roff(7) .ta (define tab stops) request. This is the first feature made possible by the parser reorganization. Improves the formatting of the SYNOPSIS in many Xenocara GL manuals. Also important for ports, as reported by many, including naddy@. --- roff_term.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'roff_term.c') diff --git a/roff_term.c b/roff_term.c index ea34208e..9786e0a6 100644 --- a/roff_term.c +++ b/roff_term.c @@ -31,12 +31,14 @@ static void roff_term_pre_br(ROFF_TERM_ARGS); static void roff_term_pre_ft(ROFF_TERM_ARGS); static void roff_term_pre_ll(ROFF_TERM_ARGS); static void roff_term_pre_sp(ROFF_TERM_ARGS); +static void roff_term_pre_ta(ROFF_TERM_ARGS); static const roff_term_pre_fp roff_term_pre_acts[ROFF_MAX] = { roff_term_pre_br, /* br */ roff_term_pre_ft, /* ft */ roff_term_pre_ll, /* ft */ - roff_term_pre_sp, /* br */ + roff_term_pre_sp, /* sp */ + roff_term_pre_ta, /* ta */ }; @@ -111,3 +113,11 @@ roff_term_pre_sp(ROFF_TERM_ARGS) roff_term_pre_br(p, n); } + +static void +roff_term_pre_ta(ROFF_TERM_ARGS) +{ + term_tab_set(p, NULL); + for (n = n->child; n != NULL; n = n->next) + term_tab_set(p, n->string); +} -- cgit v1.2.3-56-ge451