version 1.168, 2011/04/13 09:57:08 |
version 1.172, 2011/07/26 14:09:01 |
Line 545 check_argv(struct mdoc *m, struct mdoc_node *n, struct |
|
Line 545 check_argv(struct mdoc *m, struct mdoc_node *n, struct |
|
static void |
static void |
check_text(struct mdoc *m, int ln, int pos, char *p) |
check_text(struct mdoc *m, int ln, int pos, char *p) |
{ |
{ |
char *cpp, *pp; |
char *cp; |
size_t sz; |
|
|
|
while ('\0' != *p) { |
cp = p; |
sz = strcspn(p, "\t\\"); |
for (cp = p; NULL != (p = strchr(p, '\t')); p++) { |
|
if (MDOC_LITERAL & m->flags) |
p += (int)sz; |
|
pos += (int)sz; |
|
|
|
if ('\t' == *p) { |
|
if ( ! (MDOC_LITERAL & m->flags)) |
|
mdoc_pmsg(m, ln, pos, MANDOCERR_BADTAB); |
|
p++; |
|
pos++; |
|
continue; |
continue; |
} else if ('\0' == *p) |
mdoc_pmsg(m, ln, (int)(p - cp), MANDOCERR_BADTAB); |
break; |
|
|
|
pos++; |
|
pp = ++p; |
|
|
|
if (ESCAPE_ERROR == mandoc_escape |
|
((const char **)&pp, NULL, NULL)) { |
|
mdoc_pmsg(m, ln, pos, MANDOCERR_BADESCAPE); |
|
break; |
|
} |
|
|
|
cpp = p; |
|
while (NULL != (cpp = memchr(cpp, ASCII_HYPH, pp - cpp))) |
|
*cpp = '-'; |
|
|
|
pos += pp - p; |
|
p = pp; |
|
} |
} |
} |
} |
|
|
Line 899 pre_sh(PRE_ARGS) |
|
Line 873 pre_sh(PRE_ARGS) |
|
if (MDOC_BLOCK != n->type) |
if (MDOC_BLOCK != n->type) |
return(1); |
return(1); |
|
|
mdoc->regs->regs[(int)REG_nS].set = 0; |
roff_regunset(mdoc->roff, REG_nS); |
return(check_parent(mdoc, n, MDOC_MAX, MDOC_ROOT)); |
return(check_parent(mdoc, n, MDOC_MAX, MDOC_ROOT)); |
} |
} |
|
|
Line 1535 post_bl_head(POST_ARGS) |
|
Line 1509 post_bl_head(POST_ARGS) |
|
assert(0 == np->args->argv[j].sz); |
assert(0 == np->args->argv[j].sz); |
|
|
/* |
/* |
* Accomodate for new-style groff column syntax. Shuffle the |
* Accommodate for new-style groff column syntax. Shuffle the |
* child nodes, all of which must be TEXT, as arguments for the |
* child nodes, all of which must be TEXT, as arguments for the |
* column field. Then, delete the head children. |
* column field. Then, delete the head children. |
*/ |
*/ |
Line 2046 post_dt(POST_ARGS) |
|
Line 2020 post_dt(POST_ARGS) |
|
|
|
if (NULL != (nn = n->child)) |
if (NULL != (nn = n->child)) |
for (p = nn->string; *p; p++) { |
for (p = nn->string; *p; p++) { |
if (toupper((u_char)*p) == *p) |
if (toupper((unsigned char)*p) == *p) |
continue; |
continue; |
|
|
/* |
/* |