summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-11 00:39:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-11 00:39:58 +0000
commitb245e76978c72e7237d90485531acee7d3caa4fc (patch)
treefdf44540f6b1904b7f26b0b008bceccff7ab2be5 /term.c
parent3a26b8088d5978b9e623c51df0dcaf7206eae3e4 (diff)
downloadmandoc-b245e76978c72e7237d90485531acee7d3caa4fc.tar.gz
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.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/term.c b/term.c
index a3122948..47f8f924 100644
--- a/term.c
+++ b/term.c
@@ -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);
}