summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-25 23:25:53 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-25 23:25:53 +0000
commitcd5c755deee14b76b005ec3913de8e1b13e13580 (patch)
tree5d257e644670ede849fcbf76ca30ba633c2ef4c9 /mdoc_validate.c
parent72dde2cbfd108b1a17101a36f17ed4abd72231db (diff)
downloadmandoc-cd5c755deee14b76b005ec3913de8e1b13e13580.tar.gz
Implement schwarze@'s much more elegant version of my %T/%J fix.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 89cdde0e..19215261 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1649,19 +1649,8 @@ post_rs(POST_ARGS)
{
struct mdoc_node *nn, *next, *prev;
int i, j;
- int *tj;
-#define RS_JOURNAL (1 << 0)
-#define RS_TITLE (1 << 1)
- /* Mark whether we're carrying both a %T and %J. */
-
- tj = &mdoc->last->norm->Rs.titlejournal;
-
- if (MDOC_BLOCK == mdoc->last->type) {
- if ( ! (RS_JOURNAL & *tj && RS_TITLE & *tj))
- *tj = 0;
- return(1);
- } else if (MDOC_BODY != mdoc->last->type)
+ if (MDOC_BODY != mdoc->last->type)
return(1);
/*
@@ -1677,10 +1666,8 @@ post_rs(POST_ARGS)
break;
if (i < RSORD_MAX) {
- if (MDOC__T == rsord[i])
- *tj |= RS_TITLE;
- else if (MDOC__J == rsord[i])
- *tj |= RS_JOURNAL;
+ if (MDOC__J == rsord[i])
+ mdoc->last->norm->Rs.child_J = nn;
next = nn->next;
continue;
}