version 1.123, 2013/10/21 23:47:58 |
version 1.128, 2014/01/20 11:28:29 |
Line 98 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
Line 98 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Fl */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Fl */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Fn */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Fn */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ft */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ft */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ic */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ic */ |
{ in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* In */ |
{ in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* In */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Li */ |
{ in_line, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Li */ |
{ blk_full, MDOC_JOIN }, /* Nd */ |
{ blk_full, MDOC_JOIN }, /* Nd */ |
Line 561 rew_sub(enum mdoc_type t, struct mdoc *mdoc, |
|
Line 561 rew_sub(enum mdoc_type t, struct mdoc *mdoc, |
|
case (REWIND_NONE): |
case (REWIND_NONE): |
return(1); |
return(1); |
case (REWIND_THIS): |
case (REWIND_THIS): |
|
n->lastline = line - |
|
(MDOC_NEWLINE & mdoc->flags && |
|
! (MDOC_EXPLICIT & mdoc_macros[tok].flags)); |
break; |
break; |
case (REWIND_FORCE): |
case (REWIND_FORCE): |
mandoc_vmsg(MANDOCERR_SCOPEBROKEN, mdoc->parse, |
mandoc_vmsg(MANDOCERR_SCOPEBROKEN, mdoc->parse, |
Line 569 rew_sub(enum mdoc_type t, struct mdoc *mdoc, |
|
Line 572 rew_sub(enum mdoc_type t, struct mdoc *mdoc, |
|
mdoc_macronames[n->tok]); |
mdoc_macronames[n->tok]); |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (REWIND_MORE): |
case (REWIND_MORE): |
|
n->lastline = line - |
|
(MDOC_NEWLINE & mdoc->flags ? 1 : 0); |
n = n->parent; |
n = n->parent; |
continue; |
continue; |
case (REWIND_LATER): |
case (REWIND_LATER): |
Line 678 append_delims(struct mdoc *mdoc, int line, int *pos, c |
|
Line 683 append_delims(struct mdoc *mdoc, int line, int *pos, c |
|
* knowing which symbols break this behaviour, for |
* knowing which symbols break this behaviour, for |
* example, `. ;' shouldn't propagate the double-space. |
* example, `. ;' shouldn't propagate the double-space. |
*/ |
*/ |
if (mandoc_eos(p, strlen(p), 0)) |
if (mandoc_eos(p, strlen(p))) |
mdoc->last->flags |= MDOC_EOS; |
mdoc->last->flags |= MDOC_EOS; |
} |
} |
|
|
Line 708 blk_exp_close(MACRO_PROT_ARGS) |
|
Line 713 blk_exp_close(MACRO_PROT_ARGS) |
|
maxargs = 1; |
maxargs = 1; |
break; |
break; |
case (MDOC_Ek): |
case (MDOC_Ek): |
if ( ! (MDOC_SYNOPSIS & mdoc->flags)) |
mdoc->flags &= ~MDOC_KEEP; |
mdoc->flags &= ~MDOC_KEEP; |
|
default: |
default: |
maxargs = 0; |
maxargs = 0; |
break; |
break; |
Line 1343 blk_part_imp(MACRO_PROT_ARGS) |
|
Line 1347 blk_part_imp(MACRO_PROT_ARGS) |
|
if ( ! mdoc_body_alloc(mdoc, line, ppos, tok)) |
if ( ! mdoc_body_alloc(mdoc, line, ppos, tok)) |
return(0); |
return(0); |
body = mdoc->last; |
body = mdoc->last; |
} |
|
|
|
for (n = body->child; n && n->next; n = n->next) |
|
/* Do nothing. */ ; |
|
|
|
/* |
|
* End of sentence spacing: if the last node is a text node and |
|
* has a trailing period, then mark it as being end-of-sentence. |
|
*/ |
|
|
|
if (n && MDOC_TEXT == n->type && n->string) |
|
if (mandoc_eos(n->string, strlen(n->string), 1)) |
|
n->flags |= MDOC_EOS; |
|
|
|
/* Up-propagate the end-of-space flag. */ |
|
|
|
if (n && (MDOC_EOS & n->flags)) { |
|
body->flags |= MDOC_EOS; |
|
body->parent->flags |= MDOC_EOS; |
|
} |
} |
|
|
/* |
/* |