version 1.43, 2009/01/20 20:56:21 |
version 1.44, 2009/01/21 11:35:26 |
Line 305 mdoc_parseln(struct mdoc *mdoc, int line, char *buf) |
|
Line 305 mdoc_parseln(struct mdoc *mdoc, int line, char *buf) |
|
mdoc->linetok = 0; |
mdoc->linetok = 0; |
|
|
if ('.' != *buf) { |
if ('.' != *buf) { |
if ( ! (MDOC_BODYPARSE & mdoc->flags)) |
if (SEC_PROLOGUE == mdoc->lastnamed) |
return(mdoc_perr(mdoc, line, 0, "text disallowed")); |
return(mdoc_perr(mdoc, line, 0, "text disallowed in document prologue")); |
if ( ! mdoc_word_alloc(mdoc, line, 0, buf)) |
if ( ! mdoc_word_alloc(mdoc, line, 0, buf)) |
return(0); |
return(0); |
mdoc->next = MDOC_NEXT_SIBLING; |
mdoc->next = MDOC_NEXT_SIBLING; |
Line 407 mdoc_macro(struct mdoc *mdoc, int tok, |
|
Line 407 mdoc_macro(struct mdoc *mdoc, int tok, |
|
|
|
assert(mdoc_macros[tok].fp); |
assert(mdoc_macros[tok].fp); |
|
|
if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) && |
if (MDOC_PROLOGUE & mdoc_macros[tok].flags && |
! (MDOC_BODYPARSE & mdoc->flags)) |
SEC_PROLOGUE != mdoc->lastnamed) |
return(mdoc_perr(mdoc, ln, ppos, "macro disallowed: not in document body")); |
return(mdoc_perr(mdoc, ln, ppos, "macro disallowed in document body")); |
|
if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) && |
|
SEC_PROLOGUE == mdoc->lastnamed) |
|
return(mdoc_perr(mdoc, ln, ppos, "macro disallowed in document prologue")); |
if (1 != ppos && ! (MDOC_CALLABLE & mdoc_macros[tok].flags)) |
if (1 != ppos && ! (MDOC_CALLABLE & mdoc_macros[tok].flags)) |
return(mdoc_perr(mdoc, ln, ppos, "macro not callable")); |
return(mdoc_perr(mdoc, ln, ppos, "macro not callable")); |
return((*mdoc_macros[tok].fp)(mdoc, tok, ln, ppos, pos, buf)); |
return((*mdoc_macros[tok].fp)(mdoc, tok, ln, ppos, pos, buf)); |