version 1.212, 2014/06/29 22:14:10 |
version 1.221, 2014/07/07 21:36:20 |
Line 200 static enum rofferr roff_line_ignore(ROFF_ARGS); |
|
Line 200 static enum rofferr roff_line_ignore(ROFF_ARGS); |
|
static enum rofferr roff_nr(ROFF_ARGS); |
static enum rofferr roff_nr(ROFF_ARGS); |
static void roff_openeqn(struct roff *, const char *, |
static void roff_openeqn(struct roff *, const char *, |
int, int, const char *); |
int, int, const char *); |
static enum rofft roff_parse(struct roff *, const char *, int *); |
static enum rofft roff_parse(struct roff *, char *, int *, |
|
int, int); |
static enum rofferr roff_parsetext(char **, size_t *, int, int *); |
static enum rofferr roff_parsetext(char **, size_t *, int, int *); |
static enum rofferr roff_res(struct roff *, |
static enum rofferr roff_res(struct roff *, |
char **, size_t *, int, int); |
char **, size_t *, int, int); |
Line 499 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
Line 500 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
size_t naml; /* actual length of the escape name */ |
size_t naml; /* actual length of the escape name */ |
int expand_count; /* to avoid infinite loops */ |
int expand_count; /* to avoid infinite loops */ |
int npos; /* position in numeric expression */ |
int npos; /* position in numeric expression */ |
int irc; /* return code from roff_evalnum() */ |
int arg_complete; /* argument not interrupted by eol */ |
char term; /* character terminating the escape */ |
char term; /* character terminating the escape */ |
|
|
expand_count = 0; |
expand_count = 0; |
Line 541 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
Line 542 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
break; |
break; |
default: |
default: |
if (ESCAPE_ERROR == mandoc_escape(&cp, NULL, NULL)) |
if (ESCAPE_ERROR == mandoc_escape(&cp, NULL, NULL)) |
mandoc_msg(MANDOCERR_BADESCAPE, r->parse, |
mandoc_vmsg(MANDOCERR_ESC_BAD, |
ln, (int)(stesc - *bufp), NULL); |
r->parse, ln, (int)(stesc - *bufp), |
|
"%.*s", (int)(cp - stesc), stesc); |
continue; |
continue; |
} |
} |
|
|
Line 584 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
Line 586 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
|
|
/* Advance to the end of the name. */ |
/* Advance to the end of the name. */ |
|
|
|
arg_complete = 1; |
for (naml = 0; 0 == maxl || naml < maxl; naml++, cp++) { |
for (naml = 0; 0 == maxl || naml < maxl; naml++, cp++) { |
if ('\0' == *cp) { |
if ('\0' == *cp) { |
mandoc_msg(MANDOCERR_BADESCAPE, r->parse, |
mandoc_msg(MANDOCERR_ESC_BAD, r->parse, |
ln, (int)(stesc - *bufp), NULL); |
ln, (int)(stesc - *bufp), stesc); |
|
arg_complete = 0; |
break; |
break; |
} |
} |
if (0 == maxl && *cp == term) { |
if (0 == maxl && *cp == term) { |
Line 603 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
Line 607 roff_res(struct roff *r, char **bufp, size_t *szp, int |
|
|
|
switch (stesc[1]) { |
switch (stesc[1]) { |
case '*': |
case '*': |
res = roff_getstrn(r, stnam, naml); |
if (arg_complete) |
|
res = roff_getstrn(r, stnam, naml); |
break; |
break; |
case 'B': |
case 'B': |
npos = 0; |
npos = 0; |
irc = roff_evalnum(stnam, &npos, NULL, 0); |
ubuf[0] = arg_complete && |
ubuf[0] = irc && stnam + npos + 1 == cp |
roff_evalnum(stnam, &npos, NULL, 0) && |
? '1' : '0'; |
stnam + npos + 1 == cp ? '1' : '0'; |
ubuf[1] = '\0'; |
ubuf[1] = '\0'; |
break; |
break; |
case 'n': |
case 'n': |
(void)snprintf(ubuf, sizeof(ubuf), "%d", |
if (arg_complete) |
roff_getregn(r, stnam, naml)); |
(void)snprintf(ubuf, sizeof(ubuf), "%d", |
|
roff_getregn(r, stnam, naml)); |
|
else |
|
ubuf[0] = '\0'; |
break; |
break; |
case 'w': |
case 'w': |
|
/* use even incomplete args */ |
(void)snprintf(ubuf, sizeof(ubuf), "%d", |
(void)snprintf(ubuf, sizeof(ubuf), "%d", |
24 * (int)naml); |
24 * (int)naml); |
break; |
break; |
} |
} |
|
|
if (NULL == res) { |
if (NULL == res) { |
mandoc_msg(MANDOCERR_BADESCAPE, r->parse, |
mandoc_vmsg(MANDOCERR_STR_UNDEF, |
ln, (int)(stesc - *bufp), NULL); |
r->parse, ln, (int)(stesc - *bufp), |
|
"%.*s", (int)naml, stnam); |
res = ""; |
res = ""; |
} |
} |
|
|
Line 764 roff_parseln(struct roff *r, int ln, char **bufp, |
|
Line 774 roff_parseln(struct roff *r, int ln, char **bufp, |
|
* the compilers handle it. |
* the compilers handle it. |
*/ |
*/ |
|
|
if (ROFF_MAX == (t = roff_parse(r, *bufp, &pos))) |
if (ROFF_MAX == (t = roff_parse(r, *bufp, &pos, ln, ppos))) |
return(ROFF_CONT); |
return(ROFF_CONT); |
|
|
assert(roffs[t].proc); |
assert(roffs[t].proc); |
Line 776 roff_endparse(struct roff *r) |
|
Line 786 roff_endparse(struct roff *r) |
|
{ |
{ |
|
|
if (r->last) |
if (r->last) |
mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, |
mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, |
r->last->line, r->last->col, NULL); |
r->last->line, r->last->col, |
|
roffs[r->last->tok].name); |
|
|
if (r->eqn) { |
if (r->eqn) { |
mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, |
mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, |
r->eqn->eqn.ln, r->eqn->eqn.pos, NULL); |
r->eqn->eqn.ln, r->eqn->eqn.pos, "EQ"); |
eqn_end(&r->eqn); |
eqn_end(&r->eqn); |
} |
} |
|
|
if (r->tbl) { |
if (r->tbl) { |
mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, |
mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, |
r->tbl->line, r->tbl->pos, NULL); |
r->tbl->line, r->tbl->pos, "TS"); |
tbl_end(&r->tbl); |
tbl_end(&r->tbl); |
} |
} |
} |
} |
Line 797 roff_endparse(struct roff *r) |
|
Line 808 roff_endparse(struct roff *r) |
|
* form of ".foo xxx" in the usual way. |
* form of ".foo xxx" in the usual way. |
*/ |
*/ |
static enum rofft |
static enum rofft |
roff_parse(struct roff *r, const char *buf, int *pos) |
roff_parse(struct roff *r, char *buf, int *pos, int ln, int ppos) |
{ |
{ |
|
char *cp; |
const char *mac; |
const char *mac; |
size_t maclen; |
size_t maclen; |
enum rofft t; |
enum rofft t; |
|
|
if ('\0' == buf[*pos] || '"' == buf[*pos] || |
cp = buf + *pos; |
'\t' == buf[*pos] || ' ' == buf[*pos]) |
|
|
if ('\0' == *cp || '"' == *cp || '\t' == *cp || ' ' == *cp) |
return(ROFF_MAX); |
return(ROFF_MAX); |
|
|
/* We stop the macro parse at an escape, tab, space, or nil. */ |
mac = cp; |
|
maclen = roff_getname(r, &cp, ln, ppos); |
|
|
mac = buf + *pos; |
|
maclen = strcspn(mac, " \\\t\0"); |
|
|
|
t = (r->current_string = roff_getstrn(r, mac, maclen)) |
t = (r->current_string = roff_getstrn(r, mac, maclen)) |
? ROFF_USERDEF : roffhash_find(mac, maclen); |
? ROFF_USERDEF : roffhash_find(mac, maclen); |
|
|
*pos += (int)maclen; |
if (ROFF_MAX != t) |
|
*pos = cp - buf; |
|
|
while (buf[*pos] && ' ' == buf[*pos]) |
|
(*pos)++; |
|
|
|
return(t); |
return(t); |
} |
} |
|
|
Line 833 roff_cblock(ROFF_ARGS) |
|
Line 842 roff_cblock(ROFF_ARGS) |
|
*/ |
*/ |
|
|
if (NULL == r->last) { |
if (NULL == r->last) { |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, ".."); |
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
|
|
switch (r->last->tok) { |
switch (r->last->tok) { |
case ROFF_am: |
case ROFF_am: |
|
/* ROFF_am1 is remapped to ROFF_am in roff_block(). */ |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case ROFF_ami: |
case ROFF_ami: |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case ROFF_am1: |
|
/* FALLTHROUGH */ |
|
case ROFF_de: |
case ROFF_de: |
/* ROFF_de1 is remapped to ROFF_de in roff_block(). */ |
/* ROFF_de1 is remapped to ROFF_de in roff_block(). */ |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
Line 852 roff_cblock(ROFF_ARGS) |
|
Line 861 roff_cblock(ROFF_ARGS) |
|
case ROFF_ig: |
case ROFF_ig: |
break; |
break; |
default: |
default: |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, ".."); |
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
|
|
if ((*bufp)[pos]) |
if ((*bufp)[pos]) |
mandoc_msg(MANDOCERR_ARGSLOST, r->parse, ln, pos, NULL); |
mandoc_vmsg(MANDOCERR_ARG_SKIP, r->parse, ln, pos, |
|
".. %s", *bufp + pos); |
|
|
roffnode_pop(r); |
roffnode_pop(r); |
roffnode_cleanscope(r); |
roffnode_cleanscope(r); |
Line 881 roff_ccond(struct roff *r, int ln, int ppos) |
|
Line 892 roff_ccond(struct roff *r, int ln, int ppos) |
|
{ |
{ |
|
|
if (NULL == r->last) { |
if (NULL == r->last) { |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, "\\}"); |
return; |
return; |
} |
} |
|
|
Line 893 roff_ccond(struct roff *r, int ln, int ppos) |
|
Line 905 roff_ccond(struct roff *r, int ln, int ppos) |
|
case ROFF_if: |
case ROFF_if: |
break; |
break; |
default: |
default: |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, "\\}"); |
return; |
return; |
} |
} |
|
|
if (r->last->endspan > -1) { |
if (r->last->endspan > -1) { |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, "\\}"); |
return; |
return; |
} |
} |
|
|
Line 910 roff_ccond(struct roff *r, int ln, int ppos) |
|
Line 924 roff_ccond(struct roff *r, int ln, int ppos) |
|
static enum rofferr |
static enum rofferr |
roff_block(ROFF_ARGS) |
roff_block(ROFF_ARGS) |
{ |
{ |
int sv; |
const char *name; |
size_t sz; |
char *iname, *cp; |
char *name; |
size_t namesz; |
|
|
name = NULL; |
/* Ignore groff compatibility mode for now. */ |
|
|
if (ROFF_ig != tok) { |
if (ROFF_de1 == tok) |
if ('\0' == (*bufp)[pos]) { |
tok = ROFF_de; |
mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL); |
else if (ROFF_am1 == tok) |
return(ROFF_IGN); |
tok = ROFF_am; |
} |
|
|
|
/* |
/* Parse the macro name argument. */ |
* Re-write `de1', since we don't really care about |
|
* groff's strange compatibility mode, into `de'. |
|
*/ |
|
|
|
if (ROFF_de1 == tok) |
cp = *bufp + pos; |
tok = ROFF_de; |
if (ROFF_ig == tok) { |
if (ROFF_de == tok) |
iname = NULL; |
name = *bufp + pos; |
namesz = 0; |
else |
} else { |
mandoc_msg(MANDOCERR_REQUEST, r->parse, ln, ppos, |
iname = cp; |
roffs[tok].name); |
namesz = roff_getname(r, &cp, ln, ppos); |
|
iname[namesz] = '\0'; |
|
} |
|
|
while ((*bufp)[pos] && ! isspace((unsigned char)(*bufp)[pos])) |
/* Resolve the macro name argument if it is indirect. */ |
pos++; |
|
|
|
while (isspace((unsigned char)(*bufp)[pos])) |
if (namesz && (ROFF_dei == tok || ROFF_ami == tok)) { |
(*bufp)[pos++] = '\0'; |
if (NULL == (name = roff_getstrn(r, iname, namesz))) { |
|
mandoc_vmsg(MANDOCERR_STR_UNDEF, |
|
r->parse, ln, (int)(iname - *bufp), |
|
"%.*s", (int)namesz, iname); |
|
namesz = 0; |
|
} else |
|
namesz = strlen(name); |
|
} else |
|
name = iname; |
|
|
|
if (0 == namesz && ROFF_ig != tok) { |
|
mandoc_msg(MANDOCERR_REQ_EMPTY, r->parse, |
|
ln, ppos, roffs[tok].name); |
|
return(ROFF_IGN); |
} |
} |
|
|
roffnode_push(r, tok, name, ln, ppos); |
roffnode_push(r, tok, name, ln, ppos); |
Line 950 roff_block(ROFF_ARGS) |
|
Line 974 roff_block(ROFF_ARGS) |
|
* appended from roff_block_text() in multiline mode. |
* appended from roff_block_text() in multiline mode. |
*/ |
*/ |
|
|
if (ROFF_de == tok) |
if (ROFF_de == tok || ROFF_dei == tok) |
roff_setstr(r, name, "", 0); |
roff_setstrn(&r->strtab, name, namesz, "", 0, 0); |
|
|
if ('\0' == (*bufp)[pos]) |
if ('\0' == *cp) |
return(ROFF_IGN); |
return(ROFF_IGN); |
|
|
/* If present, process the custom end-of-line marker. */ |
/* Get the custom end marker. */ |
|
|
sv = pos; |
iname = cp; |
while ((*bufp)[pos] && ! isspace((unsigned char)(*bufp)[pos])) |
namesz = roff_getname(r, &cp, ln, ppos); |
pos++; |
|
|
|
/* |
/* Resolve the end marker if it is indirect. */ |
* Note: groff does NOT like escape characters in the input. |
|
* Instead of detecting this, we're just going to let it fly and |
|
* to hell with it. |
|
*/ |
|
|
|
assert(pos > sv); |
if (namesz && (ROFF_dei == tok || ROFF_ami == tok)) { |
sz = (size_t)(pos - sv); |
if (NULL == (name = roff_getstrn(r, iname, namesz))) { |
|
mandoc_vmsg(MANDOCERR_STR_UNDEF, |
|
r->parse, ln, (int)(iname - *bufp), |
|
"%.*s", (int)namesz, iname); |
|
namesz = 0; |
|
} else |
|
namesz = strlen(name); |
|
} else |
|
name = iname; |
|
|
if (1 == sz && '.' == (*bufp)[sv]) |
if (namesz) |
return(ROFF_IGN); |
r->last->end = mandoc_strndup(name, namesz); |
|
|
r->last->end = mandoc_malloc(sz + 1); |
if ('\0' != *cp) |
|
mandoc_vmsg(MANDOCERR_ARG_EXCESS, r->parse, |
|
ln, pos, ".%s ... %s", roffs[tok].name, cp); |
|
|
memcpy(r->last->end, *bufp + sv, sz); |
|
r->last->end[(int)sz] = '\0'; |
|
|
|
if ((*bufp)[pos]) |
|
mandoc_msg(MANDOCERR_ARGSLOST, r->parse, ln, pos, NULL); |
|
|
|
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
|
|
Line 1016 roff_block_sub(ROFF_ARGS) |
|
Line 1039 roff_block_sub(ROFF_ARGS) |
|
i++; |
i++; |
|
|
pos = i; |
pos = i; |
if (ROFF_MAX != roff_parse(r, *bufp, &pos)) |
if (ROFF_MAX != roff_parse(r, *bufp, &pos, ln, ppos)) |
return(ROFF_RERUN); |
return(ROFF_RERUN); |
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
Line 1027 roff_block_sub(ROFF_ARGS) |
|
Line 1050 roff_block_sub(ROFF_ARGS) |
|
* pulling it out of the hashtable. |
* pulling it out of the hashtable. |
*/ |
*/ |
|
|
t = roff_parse(r, *bufp, &pos); |
t = roff_parse(r, *bufp, &pos, ln, ppos); |
|
|
/* |
|
* Macros other than block-end are only significant |
|
* in `de' blocks; elsewhere, simply throw them away. |
|
*/ |
|
if (ROFF_cblock != t) { |
if (ROFF_cblock != t) { |
if (ROFF_de == tok) |
if (ROFF_ig != tok) |
roff_setstr(r, r->last->name, *bufp + ppos, 2); |
roff_setstr(r, r->last->name, *bufp + ppos, 2); |
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
Line 1047 static enum rofferr |
|
Line 1066 static enum rofferr |
|
roff_block_text(ROFF_ARGS) |
roff_block_text(ROFF_ARGS) |
{ |
{ |
|
|
if (ROFF_de == tok) |
if (ROFF_ig != tok) |
roff_setstr(r, r->last->name, *bufp + pos, 2); |
roff_setstr(r, r->last->name, *bufp + pos, 2); |
|
|
return(ROFF_IGN); |
return(ROFF_IGN); |
Line 1062 roff_cond_sub(ROFF_ARGS) |
|
Line 1081 roff_cond_sub(ROFF_ARGS) |
|
|
|
rr = r->last->rule; |
rr = r->last->rule; |
roffnode_cleanscope(r); |
roffnode_cleanscope(r); |
t = roff_parse(r, *bufp, &pos); |
t = roff_parse(r, *bufp, &pos, ln, ppos); |
|
|
/* |
/* |
* Fully handle known macros when they are structurally |
* Fully handle known macros when they are structurally |
Line 1306 roff_cond(ROFF_ARGS) |
|
Line 1325 roff_cond(ROFF_ARGS) |
|
*/ |
*/ |
|
|
if ('\0' == (*bufp)[pos]) |
if ('\0' == (*bufp)[pos]) |
mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_COND_EMPTY, r->parse, |
|
ln, ppos, roffs[tok].name); |
|
|
r->last->endspan = 1; |
r->last->endspan = 1; |
|
|
Line 1779 roff_TE(ROFF_ARGS) |
|
Line 1799 roff_TE(ROFF_ARGS) |
|
{ |
{ |
|
|
if (NULL == r->tbl) |
if (NULL == r->tbl) |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, "TE"); |
else |
else |
tbl_end(&r->tbl); |
tbl_end(&r->tbl); |
|
|
Line 1791 roff_T_(ROFF_ARGS) |
|
Line 1812 roff_T_(ROFF_ARGS) |
|
{ |
{ |
|
|
if (NULL == r->tbl) |
if (NULL == r->tbl) |
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, |
|
ln, ppos, "T&"); |
else |
else |
tbl_restart(ppos, ln, r->tbl); |
tbl_restart(ppos, ln, r->tbl); |
|
|
Line 1842 static enum rofferr |
|
Line 1864 static enum rofferr |
|
roff_EN(ROFF_ARGS) |
roff_EN(ROFF_ARGS) |
{ |
{ |
|
|
mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, ln, ppos, "EN"); |
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
|
|
Line 1852 roff_TS(ROFF_ARGS) |
|
Line 1874 roff_TS(ROFF_ARGS) |
|
struct tbl_node *tbl; |
struct tbl_node *tbl; |
|
|
if (r->tbl) { |
if (r->tbl) { |
mandoc_msg(MANDOCERR_SCOPEBROKEN, r->parse, ln, ppos, NULL); |
mandoc_msg(MANDOCERR_BLK_BROKEN, r->parse, |
|
ln, ppos, "TS breaks TS"); |
tbl_end(&r->tbl); |
tbl_end(&r->tbl); |
} |
} |
|
|
Line 1904 roff_tr(ROFF_ARGS) |
|
Line 1927 roff_tr(ROFF_ARGS) |
|
if ('\\' == *first) { |
if ('\\' == *first) { |
esc = mandoc_escape(&p, NULL, NULL); |
esc = mandoc_escape(&p, NULL, NULL); |
if (ESCAPE_ERROR == esc) { |
if (ESCAPE_ERROR == esc) { |
mandoc_msg(MANDOCERR_BADESCAPE, |
mandoc_msg(MANDOCERR_ESC_BAD, r->parse, |
r->parse, ln, |
ln, (int)(p - *bufp), first); |
(int)(p - *bufp), NULL); |
|
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
fsz = (size_t)(p - first); |
fsz = (size_t)(p - first); |
Line 1916 roff_tr(ROFF_ARGS) |
|
Line 1938 roff_tr(ROFF_ARGS) |
|
if ('\\' == *second) { |
if ('\\' == *second) { |
esc = mandoc_escape(&p, NULL, NULL); |
esc = mandoc_escape(&p, NULL, NULL); |
if (ESCAPE_ERROR == esc) { |
if (ESCAPE_ERROR == esc) { |
mandoc_msg(MANDOCERR_BADESCAPE, |
mandoc_msg(MANDOCERR_ESC_BAD, r->parse, |
r->parse, ln, |
ln, (int)(p - *bufp), second); |
(int)(p - *bufp), NULL); |
|
return(ROFF_IGN); |
return(ROFF_IGN); |
} |
} |
ssz = (size_t)(p - second); |
ssz = (size_t)(p - second); |
Line 2039 roff_getname(struct roff *r, char **cpp, int ln, int p |
|
Line 2060 roff_getname(struct roff *r, char **cpp, int ln, int p |
|
} |
} |
if ('\\' != *cp) |
if ('\\' != *cp) |
continue; |
continue; |
|
namesz = cp - name; |
|
if ('{' == cp[1] || '}' == cp[1]) |
|
break; |
cp++; |
cp++; |
if ('\\' == *cp) |
if ('\\' == *cp) |
continue; |
continue; |
namesz = cp - name - 1; |
|
mandoc_msg(MANDOCERR_NAMESC, r->parse, ln, pos, NULL); |
mandoc_msg(MANDOCERR_NAMESC, r->parse, ln, pos, NULL); |
mandoc_escape((const char **)&cp, NULL, NULL); |
mandoc_escape((const char **)&cp, NULL, NULL); |
break; |
break; |