diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-11 00:39:58 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-11 00:39:58 +0000 |
commit | 5625aa32a7011e20289ada22bc5924810dc97ce0 (patch) | |
tree | b4ebe9ad8a6222d508f317142ec6706cc0c1f992 /term.c | |
parent | 0bb92cdf676a4f8a32b2066037b9f54b3f587f9e (diff) | |
download | mandoc-5625aa32a7011e20289ada22bc5924810dc97ce0.tar.gz mandoc-5625aa32a7011e20289ada22bc5924810dc97ce0.tar.zst mandoc-5625aa32a7011e20289ada22bc5924810dc97ce0.zip |
Expanded perfect htab to use 27 * 26 * 3 space.
Added Brq, Bro and Brc macros.
Added lbrace and rbrace to special characters.
Fixed spacing in braces.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.52 2009/03/10 11:16:43 kristaps Exp $ */ +/* $Id: term.c,v 1.53 2009/03/11 00:39:58 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -118,6 +118,7 @@ DECL_PREPOST(termp__t); DECL_PREPOST(termp_aq); DECL_PREPOST(termp_bd); DECL_PREPOST(termp_bq); +DECL_PREPOST(termp_brq); DECL_PREPOST(termp_d1); DECL_PREPOST(termp_dq); DECL_PREPOST(termp_fd); @@ -287,6 +288,9 @@ const struct termact __termacts[MDOC_MAX] = { { termp_pp_pre, NULL }, /* Pp */ { termp_lk_pre, NULL }, /* Lk */ { termp_mt_pre, NULL }, /* Mt */ + { termp_brq_pre, termp_brq_post }, /* Brq */ + { termp_brq_pre, termp_brq_post }, /* Bro */ + { NULL, NULL }, /* Brc */ }; const struct termact *termacts = __termacts; @@ -1524,12 +1528,37 @@ termp_at_pre(DECL_ARGS) /* ARGSUSED */ static int +termp_brq_pre(DECL_ARGS) +{ + + if (MDOC_BODY != node->type) + return(1); + word(p, "\\(lC"); + p->flags |= TERMP_NOSPACE; + return(1); +} + + +/* ARGSUSED */ +static void +termp_brq_post(DECL_ARGS) +{ + + if (MDOC_BODY != node->type) + return; + p->flags |= TERMP_NOSPACE; + word(p, "\\(rC"); +} + + +/* ARGSUSED */ +static int termp_bq_pre(DECL_ARGS) { if (MDOC_BODY != node->type) return(1); - word(p, "["); + word(p, "\\(lB"); p->flags |= TERMP_NOSPACE; return(1); } @@ -1542,7 +1571,8 @@ termp_bq_post(DECL_ARGS) if (MDOC_BODY != node->type) return; - word(p, "]"); + p->flags |= TERMP_NOSPACE; + word(p, "\\(rB"); } @@ -1604,7 +1634,9 @@ termp_fo_post(DECL_ARGS) if (MDOC_BODY != node->type) return; + p->flags |= TERMP_NOSPACE; word(p, ")"); + p->flags |= TERMP_NOSPACE; word(p, ";"); newln(p); } |