summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-24 15:01:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-24 15:01:15 +0000
commitc87a07532da610224c11be712ee9d340ca5e1e80 (patch)
treee510cad4a1e10abad5aaeb03bd1a7fab6e30c49a
parent98ccea893efb125d6f75f19a4fb4ad1950990c6b (diff)
downloadmandoc-c87a07532da610224c11be712ee9d340ca5e1e80.tar.gz
mandoc-c87a07532da610224c11be712ee9d340ca5e1e80.tar.zst
mandoc-c87a07532da610224c11be712ee9d340ca5e1e80.zip
More macros filled in.
-rw-r--r--term.c109
1 files changed, 74 insertions, 35 deletions
diff --git a/term.c b/term.c
index 60a060d0..c8d39fd9 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.14 2009/02/24 14:52:55 kristaps Exp $ */
+/* $Id: term.c,v 1.15 2009/02/24 15:01:15 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -103,6 +103,7 @@ DECL_POST(name);
DECL_PREPOST(termp_aq);
DECL_PREPOST(termp_ar);
DECL_PREPOST(termp_bd);
+DECL_PREPOST(termp_bq);
DECL_PREPOST(termp_cd);
DECL_PREPOST(termp_cm);
DECL_PREPOST(termp_d1);
@@ -120,7 +121,7 @@ DECL_PREPOST(termp_nm);
DECL_PREPOST(termp_op);
DECL_PREPOST(termp_pa);
DECL_PREPOST(termp_pf);
-DECL_PREPOST(termp_qo);
+DECL_PREPOST(termp_pq);
DECL_PREPOST(termp_qq);
DECL_PREPOST(termp_sh);
DECL_PREPOST(termp_ss);
@@ -130,6 +131,7 @@ DECL_PREPOST(termp_va);
DECL_PREPOST(termp_vt);
DECL_PRE(termp_at);
+DECL_PRE(termp_bsx);
DECL_PRE(termp_bx);
DECL_PRE(termp_ex);
DECL_PRE(termp_nd);
@@ -203,13 +205,13 @@ const struct termact __termacts[MDOC_MAX] = {
{ termp_at_pre, NULL }, /* At */
{ NULL, NULL }, /* Bc */
{ NULL, NULL }, /* Bf */
- { NULL, NULL }, /* Bo */
- { NULL, NULL }, /* Bq */
- { NULL, NULL }, /* Bsx */
+ { termp_bq_pre, termp_bq_post }, /* Bo */
+ { termp_bq_pre, termp_bq_post }, /* Bq */
+ { termp_bsx_pre, NULL }, /* Bsx */
{ termp_bx_pre, NULL }, /* Bx */
{ NULL, NULL }, /* Db */
{ NULL, NULL }, /* Dc */
- { NULL, NULL }, /* Do */
+ { termp_dq_pre, termp_dq_post }, /* Do */
{ termp_dq_pre, termp_dq_post }, /* Dq */
{ NULL, NULL }, /* Ec */
{ NULL, NULL }, /* Ef */
@@ -223,16 +225,16 @@ const struct termact __termacts[MDOC_MAX] = {
{ termp_ox_pre, NULL }, /* Ox */
{ NULL, NULL }, /* Pc */
{ termp_pf_pre, termp_pf_post }, /* Pf */
- { NULL, NULL }, /* Po */
- { NULL, NULL }, /* Pq */
+ { termp_pq_pre, termp_pq_post }, /* Po */
+ { termp_pq_pre, termp_pq_post }, /* Pq */
{ NULL, NULL }, /* Qc */
{ NULL, NULL }, /* Ql */
- { termp_qo_pre, termp_qo_post }, /* Qo */
+ { termp_qq_pre, termp_qq_post }, /* Qo */
{ termp_qq_pre, termp_qq_post }, /* Qq */
{ NULL, NULL }, /* Re */
{ NULL, NULL }, /* Rs */
{ NULL, NULL }, /* Sc */
- { NULL, NULL }, /* So */
+ { termp_sq_pre, termp_sq_post }, /* So */
{ termp_sq_pre, termp_sq_post }, /* Sq */
{ NULL, NULL }, /* Sm */
{ termp_sx_pre, termp_sx_post }, /* Sx */
@@ -1078,6 +1080,16 @@ termp_qq_post(DECL_ARGS)
/* ARGSUSED */
static int
+termp_bsx_pre(DECL_ARGS)
+{
+
+ word(p, "BSDI BSD/OS");
+ return(1);
+}
+
+
+/* ARGSUSED */
+static int
termp_bx_pre(DECL_ARGS)
{
@@ -1208,31 +1220,6 @@ termp_pa_post(DECL_ARGS)
/* ARGSUSED */
static int
-termp_qo_pre(DECL_ARGS)
-{
-
- if (MDOC_BODY != node->type)
- return(1);
- word(p, "\"");
- p->flags |= TERMP_NOSPACE;
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-termp_qo_post(DECL_ARGS)
-{
-
- if (MDOC_BODY != node->type)
- return;
- p->flags |= TERMP_NOSPACE;
- word(p, "\"");
-}
-
-
-/* ARGSUSED */
-static int
termp_em_pre(DECL_ARGS)
{
@@ -1341,3 +1328,55 @@ termp_at_pre(DECL_ARGS)
word(p, mdoc_att2a(c));
return(0);
}
+
+
+/* ARGSUSED */
+static int
+termp_bq_pre(DECL_ARGS)
+{
+
+ if (MDOC_BODY != node->type)
+ return(1);
+ word(p, "[");
+ p->flags |= TERMP_NOSPACE;
+ return(1);
+}
+
+
+/* ARGSUSED */
+static void
+termp_bq_post(DECL_ARGS)
+{
+
+ if (MDOC_BODY != node->type)
+ return;
+ p->flags |= TERMP_NOSPACE;
+ word(p, "]");
+}
+
+
+/* ARGSUSED */
+static int
+termp_pq_pre(DECL_ARGS)
+{
+
+ if (MDOC_BODY != node->type)
+ return(1);
+ word(p, "(");
+ p->flags |= TERMP_NOSPACE;
+ return(1);
+}
+
+
+/* ARGSUSED */
+static void
+termp_pq_post(DECL_ARGS)
+{
+
+ if (MDOC_BODY != node->type)
+ return;
+ p->flags |= TERMP_NOSPACE;
+ word(p, ")");
+}
+
+