version 1.49, 2009/11/02 06:22:45 |
version 1.53, 2010/04/06 11:33:00 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#ifndef OSNAME |
#ifndef OSNAME |
#include <sys/utsname.h> |
#include <sys/utsname.h> |
#endif |
#endif |
Line 42 static int concat(struct mdoc *, char *, |
|
Line 46 static int concat(struct mdoc *, char *, |
|
const struct mdoc_node *, size_t); |
const struct mdoc_node *, size_t); |
static inline int order_rs(int); |
static inline int order_rs(int); |
|
|
#ifdef __linux__ |
|
extern size_t strlcat(char *, const char *, size_t); |
|
#endif |
|
|
|
static int post_ar(POST_ARGS); |
static int post_ar(POST_ARGS); |
static int post_at(POST_ARGS); |
static int post_at(POST_ARGS); |
static int post_bl(POST_ARGS); |
static int post_bl(POST_ARGS); |
Line 420 post_sh(POST_ARGS) |
|
Line 420 post_sh(POST_ARGS) |
|
if ( ! concat(m, buf, n->child, BUFSIZ)) |
if ( ! concat(m, buf, n->child, BUFSIZ)) |
return(0); |
return(0); |
sec = mdoc_atosec(buf); |
sec = mdoc_atosec(buf); |
if (SEC_CUSTOM != sec) |
/* |
|
* The first section should always make us move into a non-new |
|
* state. |
|
*/ |
|
if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec) |
m->lastnamed = sec; |
m->lastnamed = sec; |
|
|
/* Some sections only live in certain manual sections. */ |
/* Some sections only live in certain manual sections. */ |
|
|
post_bl_width(POST_ARGS) |
post_bl_width(POST_ARGS) |
{ |
{ |
size_t width; |
size_t width; |
int i, tok; |
int i; |
|
enum mdoct tok; |
char buf[NUMSIZ]; |
char buf[NUMSIZ]; |
char *p; |
char *p; |
|
|
Line 724 post_bl_head(POST_ARGS) |
|
Line 729 post_bl_head(POST_ARGS) |
|
nn->string = NULL; |
nn->string = NULL; |
nnp = nn; |
nnp = nn; |
nn = nn->next; |
nn = nn->next; |
mdoc_node_free(nnp); |
mdoc_node_delete(NULL, nnp); |
} |
} |
|
|
n->nchild = 0; |
n->nchild = 0; |
Line 849 post_dd(POST_ARGS) |
|
Line 854 post_dd(POST_ARGS) |
|
static int |
static int |
post_prol(POST_ARGS) |
post_prol(POST_ARGS) |
{ |
{ |
struct mdoc_node *np; |
|
|
|
if (n->parent->child == n) |
mdoc_node_delete(m, n); |
n->parent->child = n->prev; |
|
if (n->prev) |
|
n->prev->next = NULL; |
|
|
|
np = n; |
|
assert(NULL == n->next); |
|
|
|
if (n->prev) { |
|
m->last = n->prev; |
|
m->next = MDOC_NEXT_SIBLING; |
|
} else { |
|
m->last = n->parent; |
|
m->next = MDOC_NEXT_CHILD; |
|
} |
|
|
|
mdoc_node_freelist(np); |
|
|
|
if (m->meta.title && m->meta.date && m->meta.os) |
if (m->meta.title && m->meta.date && m->meta.os) |
m->flags |= MDOC_PBODY; |
m->flags |= MDOC_PBODY; |
|
|
return(1); |
return(1); |
} |
} |
|
|