version 1.5, 2008/12/28 00:34:20 |
version 1.6, 2008/12/28 21:25:09 |
Line 90 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
Line 90 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
{ macro_scoped_implicit, 0 }, /* Sh */ |
{ macro_scoped_implicit, 0 }, /* Sh */ |
{ macro_scoped_implicit, 0 }, /* Ss */ |
{ macro_scoped_implicit, 0 }, /* Ss */ |
{ macro_text, 0 }, /* Pp */ |
{ macro_text, 0 }, /* Pp */ |
{ NULL, 0 }, /* D1 */ |
{ macro_scoped_line, 0 }, /* D1 */ |
{ NULL, 0 }, /* Dl */ |
{ macro_scoped_line, 0 }, /* Dl */ |
{ macro_scoped_explicit, MDOC_EXPLICIT }, /* Bd */ |
{ macro_scoped_explicit, MDOC_EXPLICIT }, /* Bd */ |
{ macro_scoped_explicit, 0 }, /* Ed */ |
{ macro_scoped_explicit, 0 }, /* Ed */ |
{ macro_scoped_explicit, MDOC_EXPLICIT }, /* Bl */ |
{ macro_scoped_explicit, MDOC_EXPLICIT }, /* Bl */ |
Line 166 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
Line 166 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
{ NULL, 0 }, /* Qc */ |
{ NULL, 0 }, /* Qc */ |
{ NULL, 0 }, /* Ql */ |
{ NULL, 0 }, /* Ql */ |
{ NULL, 0 }, /* Qo */ |
{ NULL, 0 }, /* Qo */ |
{ NULL, 0 }, /* Qq */ |
{ macro_scoped_pline, MDOC_CALLABLE }, /* Qq */ |
{ NULL, 0 }, /* Re */ |
{ NULL, 0 }, /* Re */ |
{ NULL, 0 }, /* Rs */ |
{ NULL, 0 }, /* Rs */ |
{ NULL, 0 }, /* Sc */ |
{ NULL, 0 }, /* Sc */ |
Line 336 mdoc_macro(struct mdoc *mdoc, int tok, int ppos, int * |
|
Line 336 mdoc_macro(struct mdoc *mdoc, int tok, int ppos, int * |
|
return(0); |
return(0); |
} |
} |
|
|
|
/*mdoc_msg(mdoc, ppos, "calling `%s'", mdoc_macronames[tok]);*/ |
|
|
return((*mdoc_macros[tok].fp)(mdoc, tok, ppos, pos, buf)); |
return((*mdoc_macros[tok].fp)(mdoc, tok, ppos, pos, buf)); |
} |
} |
|
|
Line 407 mdoc_node_append(struct mdoc *mdoc, int pos, struct md |
|
Line 409 mdoc_node_append(struct mdoc *mdoc, int pos, struct md |
|
|
|
switch (p->type) { |
switch (p->type) { |
case (MDOC_BODY): |
case (MDOC_BODY): |
switch (mdoc->last->type) { |
p->parent = mdoc->last->parent; |
case (MDOC_BLOCK): |
mdoc->last->next = p; |
p->parent = mdoc->last; |
p->prev = mdoc->last; |
mdoc->last->child = p; |
act = "sibling"; |
act = "child"; |
|
break; |
|
case (MDOC_HEAD): |
|
p->parent = mdoc->last->parent; |
|
mdoc->last->next = p; |
|
p->prev = mdoc->last; |
|
act = "sibling"; |
|
break; |
|
default: |
|
abort(); |
|
/* NOTREACHED */ |
|
} |
|
break; |
break; |
|
|
case (MDOC_HEAD): |
case (MDOC_HEAD): |
assert(mdoc->last->type == MDOC_BLOCK); |
assert(mdoc->last->type == MDOC_BLOCK); |
p->parent = mdoc->last; |
p->parent = mdoc->last; |
mdoc->last->child = p; |
mdoc->last->child = p; |
act = "child"; |
act = "child"; |
break; |
break; |
|
|
default: |
default: |
switch (mdoc->last->type) { |
switch (mdoc->last->type) { |
case (MDOC_BODY): |
case (MDOC_BODY): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_HEAD): |
case (MDOC_HEAD): |
p->parent = mdoc->last->parent; |
p->parent = mdoc->last; |
mdoc->last->child = p; |
mdoc->last->child = p; |
act = "child"; |
act = "child"; |
break; |
break; |
Line 455 mdoc_node_append(struct mdoc *mdoc, int pos, struct md |
|
Line 447 mdoc_node_append(struct mdoc *mdoc, int pos, struct md |
|
} |
} |
|
|
|
|
|
/* FIXME: deprecate paramsz, params. */ |
void |
void |
mdoc_head_alloc(struct mdoc *mdoc, int pos, int tok, |
mdoc_head_alloc(struct mdoc *mdoc, int pos, int tok, |
size_t paramsz, const char **params) |
size_t paramsz, const char **params) |