summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-10 13:41:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-10 13:41:58 +0000
commite4c3f51da30c67c5fb30b0b90af2f55a8631af37 (patch)
tree16f9b89ca563ecf456a0ea40ebc31036c0afe0b4 /roff.c
parent4787a4142e096d18cc8d1664421833e0e38bcb83 (diff)
downloadmandoc-e4c3f51da30c67c5fb30b0b90af2f55a8631af37.tar.gz
Sx to Sh anchors work.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/roff.c b/roff.c
index 8420b597..218b362c 100644
--- a/roff.c
+++ b/roff.c
@@ -38,7 +38,6 @@
/* TODO: (warn) some sections need specific elements. */
/* TODO: (warn) NAME section has particular order. */
/* TODO: macros with a set number of arguments? */
-/* TODO: validate Dt macro arguments. */
/* FIXME: Bl -diag supposed to ignore callable children. */
struct roffnode {
@@ -1166,7 +1165,7 @@ static int
roff_layout(ROFFCALL_ARGS)
{
int i, c, argcp[ROFF_MAXLINEARG];
- char *argvp[ROFF_MAXLINEARG];
+ char *argvp[ROFF_MAXLINEARG], *p;
/*
* The roff_layout function is for multi-line macros. A layout
@@ -1192,7 +1191,7 @@ roff_layout(ROFFCALL_ARGS)
return((*tree->cb.roffblkout)(tree->arg, tok));
}
- argv++;
+ p = *argv++;
assert( ! (ROFF_CALLABLE & tokens[tok].flags));
if ( ! roffparseopts(tree, tok, &argv, argcp, argvp))
@@ -1249,6 +1248,10 @@ roff_layout(ROFFCALL_ARGS)
return(0);
tree->asec |= tree->csec;
+
+ if ( ! roffspecial(tree, tok, p, argcp,
+ (const char **)argvp, 0, argv))
+ return(0);
break;
default:
break;