version 1.34, 2010/02/18 02:11:26 |
version 1.35, 2010/03/02 00:38:59 |
|
|
/* LINTED */ |
/* LINTED */ |
"Dx", "%Q", "br", "sp", |
"Dx", "%Q", "br", "sp", |
/* LINTED */ |
/* LINTED */ |
"%U" |
"%U", "eos" |
}; |
}; |
|
|
const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
|
|
if (j != i && ! pstring(m, line, j, &buf[j], (size_t)(i - j))) |
if (j != i && ! pstring(m, line, j, &buf[j], (size_t)(i - j))) |
return(0); |
return(0); |
|
|
|
/* |
|
* Mark the end of a sentence. Only works when you respect |
|
* Jason's rule: "new sentence, new line". |
|
*/ |
|
if ('.' == buf[i-1] || '!' == buf[i-1] || '?' == buf[i-1]) { |
|
m->next = MDOC_NEXT_SIBLING; |
|
if ( ! mdoc_elem_alloc(m, line, i, MDOC_eos, NULL)) |
|
return(0); |
|
} |
|
|
m->next = MDOC_NEXT_SIBLING; |
m->next = MDOC_NEXT_SIBLING; |
return(1); |
return(1); |
} |
} |
|
|
{ |
{ |
int i, j, c; |
int i, j, c; |
char mac[5]; |
char mac[5]; |
|
struct mdoc_node *n; |
|
char *t; |
|
|
/* Empty lines are ignored. */ |
/* Empty lines are ignored. */ |
|
|
|
|
*/ |
*/ |
if ( ! mdoc_macro(m, c, ln, 1, &i, buf)) |
if ( ! mdoc_macro(m, c, ln, 1, &i, buf)) |
goto err; |
goto err; |
|
|
|
/* |
|
* Mark the end of a sentence, but be careful not to insert |
|
* markers into reference blocks. |
|
*/ |
|
n = m->last; |
|
if (n->child) |
|
n = n->child; |
|
while (n->next) |
|
n = n->next; |
|
if (MDOC_TEXT == n->type && m->last->parent->tok != MDOC_Rs) { |
|
t = n->string; |
|
while (t && t[1]) |
|
t++; |
|
if ('.' == *t || '!' == *t || '?' == *t) { |
|
if ( ! mdoc_elem_alloc(m, ln, i, MDOC_eos, NULL)) |
|
return(0); |
|
m->next = MDOC_NEXT_SIBLING; |
|
} |
|
} |
|
|
return(1); |
return(1); |
|
|