version 1.151, 2011/07/25 15:37:00 |
version 1.152, 2011/07/26 14:09:01 |
Line 404 roff_alloc(struct mparse *parse) |
|
Line 404 roff_alloc(struct mparse *parse) |
|
static int |
static int |
roff_res(struct roff *r, char **bufp, size_t *szp, int ln, int pos) |
roff_res(struct roff *r, char **bufp, size_t *szp, int ln, int pos) |
{ |
{ |
|
enum mandoc_esc esc; |
const char *stesc; /* start of an escape sequence ('\\') */ |
const char *stesc; /* start of an escape sequence ('\\') */ |
const char *stnam; /* start of the name, after "[(*" */ |
const char *stnam; /* start of the name, after "[(*" */ |
const char *cp; /* end of the name, e.g. before ']' */ |
const char *cp; /* end of the name, e.g. before ']' */ |
Line 426 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
Line 427 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
|
|
if ('\0' == *cp) |
if ('\0' == *cp) |
return(1); |
return(1); |
if ('*' != *cp++) |
|
|
if ('*' != *cp) { |
|
res = cp; |
|
esc = mandoc_escape(&cp, NULL, NULL); |
|
if (ESCAPE_ERROR != esc) |
|
continue; |
|
mandoc_msg(MANDOCERR_BADESCAPE, |
|
r->parse, ln, pos, NULL); |
|
cp = res; |
continue; |
continue; |
|
} |
|
|
|
cp++; |
|
|
/* |
/* |
* The third character decides the length |
* The third character decides the length |