summaryrefslogtreecommitdiffstatshomepage
path: root/macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-02 14:06:16 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-02 14:06:16 +0000
commit870e7027cc4f493228db816427256127402b6b19 (patch)
tree1a47699830409386260954b47bf97f0ec72bfcb4 /macro.c
parentd8072843f9a4a4d270b86fee59886720c7f48a68 (diff)
downloadmandoc-870e7027cc4f493228db816427256127402b6b19.tar.gz
mandoc-870e7027cc4f493228db816427256127402b6b19.tar.zst
mandoc-870e7027cc4f493228db816427256127402b6b19.zip
*** empty log message ***
Diffstat (limited to 'macro.c')
-rw-r--r--macro.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/macro.c b/macro.c
index 4340e46e..79497bbf 100644
--- a/macro.c
+++ b/macro.c
@@ -1,4 +1,4 @@
-/* $Id: macro.c,v 1.16 2009/01/01 20:40:16 kristaps Exp $ */
+/* $Id: macro.c,v 1.17 2009/01/02 14:06:16 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -146,6 +146,15 @@ append_text_argv(struct mdoc *mdoc, int tok, int pos,
if ( ! mdoc_valid_pre(mdoc, tok, pos, 0, NULL, argc, argv))
return(0);
+
+ switch (tok) {
+ case (MDOC_Pf):
+ /* TODO: only use first two arguments in element. */
+ break;
+ default:
+ break;
+ }
+
mdoc_elem_alloc(mdoc, pos, tok, (size_t)argc,
argv, (size_t)sz, _CC(args));
mdoc->next = MDOC_NEXT_SIBLING;
@@ -332,6 +341,9 @@ macro_close_explicit(MACRO_PROT_ARGS)
case (MDOC_Re):
tt = MDOC_Rs;
break;
+ case (MDOC_Ef):
+ tt = MDOC_Bf;
+ break;
default:
abort();
/* NOTREACHED */
@@ -542,6 +554,10 @@ again:
}
+/*
+ * FIXME: like in with macro_constant, have the append_ routine chop the
+ * number of requisite arguments (this is ugly when done in-line).
+ */
int
macro_constant_delimited(MACRO_PROT_ARGS)
{