From 5625aa32a7011e20289ada22bc5924810dc97ce0 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 11 Mar 2009 00:39:58 +0000 Subject: 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. --- term.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 7f506cd4..181864c4 100644 --- a/term.c +++ b/term.c @@ -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 * @@ -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; @@ -1522,6 +1526,31 @@ 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) @@ -1529,7 +1558,7 @@ 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); } -- cgit v1.2.3