version 1.178, 2011/11/18 14:58:24 |
version 1.181, 2011/12/03 16:58:54 |
Line 1693 post_rs(POST_ARGS) |
|
Line 1693 post_rs(POST_ARGS) |
|
mdoc_node_delete(mdoc, nn); |
mdoc_node_delete(mdoc, nn); |
} |
} |
|
|
/* Bail out early if a plain text node is found inside .Rs. */ |
/* |
|
* Nothing to sort if only invalid nodes were found |
|
* inside the `Rs' body. |
|
*/ |
|
|
if (NULL == mdoc->last->child) |
if (NULL == mdoc->last->child) |
return(1); |
return(1); |
|
|
|
|
post_sh_head(POST_ARGS) |
post_sh_head(POST_ARGS) |
{ |
{ |
char buf[BUFSIZ]; |
char buf[BUFSIZ]; |
|
struct mdoc_node *n; |
enum mdoc_sec sec; |
enum mdoc_sec sec; |
int c; |
int c; |
|
|
Line 1856 post_sh_head(POST_ARGS) |
|
Line 1861 post_sh_head(POST_ARGS) |
|
|
|
mdoc->lastsec = sec; |
mdoc->lastsec = sec; |
|
|
|
/* |
|
* Set the section attribute for the current HEAD, for its |
|
* parent BLOCK, and for the HEAD children; the latter can |
|
* only be TEXT nodes, so no recursion is needed. |
|
* For other blocks and elements, including .Sh BODY, this is |
|
* done when allocating the node data structures, but for .Sh |
|
* BLOCK and HEAD, the section is still unknown at that time. |
|
*/ |
|
|
|
mdoc->last->parent->sec = sec; |
|
mdoc->last->sec = sec; |
|
for (n = mdoc->last->child; n; n = n->next) |
|
n->sec = sec; |
|
|
/* We don't care about custom sections after this. */ |
/* We don't care about custom sections after this. */ |
|
|
if (SEC_CUSTOM == sec) |
if (SEC_CUSTOM == sec) |
Line 2080 post_dt(POST_ARGS) |
|
Line 2099 post_dt(POST_ARGS) |
|
* arch = NULL |
* arch = NULL |
*/ |
*/ |
|
|
cp = mdoc_a2msec(nn->string); |
cp = mandoc_a2msec(nn->string); |
if (cp) { |
if (cp) { |
mdoc->meta.vol = mandoc_strdup(cp); |
mdoc->meta.vol = mandoc_strdup(cp); |
mdoc->meta.msec = mandoc_strdup(nn->string); |
mdoc->meta.msec = mandoc_strdup(nn->string); |