version 1.99, 2011/02/06 22:05:20 |
version 1.100, 2011/02/08 07:40:23 |
Line 48 static struct man_node *man_node_alloc(struct man *, i |
|
Line 48 static struct man_node *man_node_alloc(struct man *, i |
|
enum man_type, enum mant); |
enum man_type, enum mant); |
static int man_node_append(struct man *, |
static int man_node_append(struct man *, |
struct man_node *); |
struct man_node *); |
static int man_span_alloc(struct man *, |
|
const struct tbl_span *); |
|
static void man_node_free(struct man_node *); |
static void man_node_free(struct man_node *); |
static void man_node_unlink(struct man *, |
static void man_node_unlink(struct man *, |
struct man_node *); |
struct man_node *); |
Line 300 man_block_alloc(struct man *m, int line, int pos, enum |
|
Line 298 man_block_alloc(struct man *m, int line, int pos, enum |
|
return(1); |
return(1); |
} |
} |
|
|
static int |
|
man_span_alloc(struct man *m, const struct tbl_span *span) |
|
{ |
|
struct man_node *n; |
|
|
|
n = man_node_alloc(m, span->line, 0, MAN_TBL, MAN_MAX); |
|
n->span = span; |
|
|
|
if ( ! man_node_append(m, n)) |
|
return(0); |
|
|
|
m->next = MAN_NEXT_SIBLING; |
|
return(1); |
|
} |
|
|
|
int |
int |
man_word_alloc(struct man *m, int line, int pos, const char *word) |
man_word_alloc(struct man *m, int line, int pos, const char *word) |
{ |
{ |
Line 367 man_node_delete(struct man *m, struct man_node *p) |
|
Line 350 man_node_delete(struct man *m, struct man_node *p) |
|
int |
int |
man_addspan(struct man *m, const struct tbl_span *sp) |
man_addspan(struct man *m, const struct tbl_span *sp) |
{ |
{ |
|
struct man_node *n; |
|
|
assert( ! (MAN_HALT & m->flags)); |
assert( ! (MAN_HALT & m->flags)); |
if ( ! man_span_alloc(m, sp)) |
|
|
n = man_node_alloc(m, sp->line, 0, MAN_TBL, MAN_MAX); |
|
n->span = sp; |
|
|
|
if ( ! man_node_append(m, n)) |
return(0); |
return(0); |
|
|
|
m->next = MAN_NEXT_SIBLING; |
return(man_descope(m, sp->line, 0)); |
return(man_descope(m, sp->line, 0)); |
} |
} |
|
|