summaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-06 21:10:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-06 21:10:31 +0000
commit413c1bdf1af371c4a4703381a78f68045d85b2fe (patch)
tree9c3f7f3b03f7aa5811df9e475eb20604d7146a73 /roff.c
parentd54afcd6206b4f4d7ffc18ab336cabe41c5bd6ab (diff)
downloadmandoc-413c1bdf1af371c4a4703381a78f68045d85b2fe.tar.gz
mandoc-413c1bdf1af371c4a4703381a78f68045d85b2fe.tar.zst
mandoc-413c1bdf1af371c4a4703381a78f68045d85b2fe.zip
.St macros in place.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/roff.c b/roff.c
index 4e115f5f..42075b02 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.46 2008/12/06 19:41:41 kristaps Exp $ */
+/* $Id: roff.c,v 1.47 2008/12/06 21:10:31 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -92,7 +92,8 @@ static int roffparse(struct rofftree *, char *);
static int textparse(struct rofftree *, char *);
static int roffdata(struct rofftree *, int, char *);
static int roffspecial(struct rofftree *, int,
- const char *, size_t, char **);
+ const char *, const int *,
+ const char **, size_t, char **);
static int roffsetname(struct rofftree *, char **);
#ifdef __linux__
@@ -618,8 +619,9 @@ roffnode_free(struct rofftree *tree)
static int
-roffspecial(struct rofftree *tree, int tok,
- const char *start, size_t sz, char **ordp)
+roffspecial(struct rofftree *tree, int tok, const char *start,
+ const int *argc, const char **argv,
+ size_t sz, char **ordp)
{
switch (tok) {
@@ -689,8 +691,8 @@ roffspecial(struct rofftree *tree, int tok,
break;
}
- return((*tree->cb.roffspecial)
- (tree->arg, tok, tree->cur, ordp));
+ return((*tree->cb.roffspecial)(tree->arg, tok,
+ tree->cur, argc, argv, ordp));
}
@@ -987,7 +989,7 @@ roff_Ns(ROFFCALL_ARGS)
first = (*argv++ == tree->cur);
morep[0] = NULL;
- if ( ! roffspecial(tree, tok, *argv, 0, morep))
+ if ( ! roffspecial(tree, tok, *argv, NULL, NULL, 0, morep))
return(0);
while (*argv) {
@@ -1199,7 +1201,8 @@ roff_ordered(ROFFCALL_ARGS)
return(0);
if (NULL == *argv)
- return(roffspecial(tree, tok, p, 0, ordp));
+ return(roffspecial(tree, tok, p, argcp,
+ (const char **)argvp, 0, ordp));
i = 0;
while (*argv && i < ROFF_MAXLINEARG) {
@@ -1215,7 +1218,9 @@ roff_ordered(ROFFCALL_ARGS)
if (ROFF_MAX == c)
break;
- if ( ! roffspecial(tree, tok, p, (size_t)i, ordp))
+ if ( ! roffspecial(tree, tok, p, argcp,
+ (const char **)argvp,
+ (size_t)i, ordp))
return(0);
return(roffcall(tree, c, argv));
@@ -1224,7 +1229,9 @@ roff_ordered(ROFFCALL_ARGS)
assert(i != ROFF_MAXLINEARG);
ordp[i] = NULL;
- if ( ! roffspecial(tree, tok, p, (size_t)i, ordp))
+ if ( ! roffspecial(tree, tok, p, argcp,
+ (const char**)argvp,
+ (size_t)i, ordp))
return(0);
/* FIXME: error if there's stuff after the punctuation. */