version 1.17, 2009/06/27 09:03:03 |
version 1.18, 2009/07/04 09:01:55 |
|
|
#include <string.h> |
#include <string.h> |
|
|
#include "libmdoc.h" |
#include "libmdoc.h" |
|
#include "libmandoc.h" |
|
|
/* FIXME: .Bl -diag can't have non-text children in HEAD. */ |
/* FIXME: .Bl -diag can't have non-text children in HEAD. */ |
/* TODO: ignoring Pp (it's superfluous in some invocations). */ |
/* TODO: ignoring Pp (it's superfluous in some invocations). */ |
Line 708 check_argv(struct mdoc *m, const struct mdoc_node *n, |
|
Line 709 check_argv(struct mdoc *m, const struct mdoc_node *n, |
|
static int |
static int |
check_text(struct mdoc *mdoc, int line, int pos, const char *p) |
check_text(struct mdoc *mdoc, int line, int pos, const char *p) |
{ |
{ |
size_t c; |
int c; |
|
|
for ( ; *p; p++) { |
for ( ; *p; p++, pos++) { |
if ('\t' == *p) { |
if ('\t' == *p) { |
if ( ! (MDOC_LITERAL & mdoc->flags)) |
if ( ! (MDOC_LITERAL & mdoc->flags)) |
if ( ! warn_print(mdoc, line, pos)) |
if ( ! warn_print(mdoc, line, pos)) |
Line 722 check_text(struct mdoc *mdoc, int line, int pos, const |
|
Line 723 check_text(struct mdoc *mdoc, int line, int pos, const |
|
if ('\\' != *p) |
if ('\\' != *p) |
continue; |
continue; |
|
|
c = mdoc_isescape(p); |
c = mandoc_special(p); |
if (c) { |
if (c) { |
p += (int)c - 1; |
p += c - 1; |
|
pos += c - 1; |
continue; |
continue; |
} |
} |
if ( ! (MDOC_IGN_ESCAPE & mdoc->pflags)) |
if ( ! (MDOC_IGN_ESCAPE & mdoc->pflags)) |