diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 23:54:43 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 23:54:43 +0000 |
commit | 916a2db50757b20a937523dec30a3d21e0dbf32f (patch) | |
tree | 95a620a278992a1211051fa4b759a2897f51dbcc /mdoc_term.c | |
parent | ebd4be96b56a3d4e04046b081170572db14b80a8 (diff) | |
download | mandoc-916a2db50757b20a937523dec30a3d21e0dbf32f.tar.gz |
-Tascii correctly prints `%T' in `Rs' with quotes.
-Thtml behaves like -Tascii for printing.
Printing of `Rs' elements cross-checked with new groff.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index f5db6681..01ee3ab0 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -106,6 +106,7 @@ static void termp_sq_post(DECL_ARGS); static void termp_ss_post(DECL_ARGS); static void termp_vt_post(DECL_ARGS); +static int termp__t_pre(DECL_ARGS); static int termp_an_pre(DECL_ARGS); static int termp_ap_pre(DECL_ARGS); static int termp_aq_pre(DECL_ARGS); @@ -189,15 +190,15 @@ static const struct termact termacts[MDOC_MAX] = { { termp_under_pre, termp_vt_post }, /* Vt */ { termp_xr_pre, NULL }, /* Xr */ { NULL, termp____post }, /* %A */ - { NULL, termp____post }, /* %B */ + { termp_under_pre, termp____post }, /* %B */ { NULL, termp____post }, /* %D */ - { NULL, termp____post }, /* %I */ + { termp_under_pre, termp____post }, /* %I */ { termp_under_pre, termp____post }, /* %J */ { NULL, termp____post }, /* %N */ { NULL, termp____post }, /* %O */ { NULL, termp____post }, /* %P */ { NULL, termp____post }, /* %R */ - { termp_under_pre, termp____post }, /* %T */ + { termp__t_pre, termp____post }, /* %T */ { NULL, termp____post }, /* %V */ { NULL, NULL }, /* Ac */ { termp_aq_pre, termp_aq_post }, /* Ao */ @@ -2065,6 +2066,14 @@ termp____post(DECL_ARGS) { p->flags |= TERMP_NOSPACE; + switch (node->tok) { + case (MDOC__T): + term_word(p, "\\(rq"); + p->flags |= TERMP_NOSPACE; + break; + default: + break; + } term_word(p, node->next ? "," : "."); } @@ -2107,3 +2116,13 @@ termp_under_pre(DECL_ARGS) return(1); } + +/* ARGSUSED */ +static int +termp__t_pre(DECL_ARGS) +{ + + term_word(p, "\\(lq"); + p->flags |= TERMP_NOSPACE; + return(1); +} |