version 1.311, 2017/06/14 19:39:18 |
version 1.313, 2017/06/17 22:43:14 |
Line 223 static enum rofferr roff_userdef(ROFF_ARGS); |
|
Line 223 static enum rofferr roff_userdef(ROFF_ARGS); |
|
|
|
const char *__roff_name[MAN_MAX + 1] = { |
const char *__roff_name[MAN_MAX + 1] = { |
"br", "ce", "ft", "ll", |
"br", "ce", "ft", "ll", |
"mc", "rj", "sp", "ta", |
"mc", "po", "rj", "sp", |
"ti", NULL, |
"ta", "ti", NULL, |
"ab", "ad", "af", "aln", |
"ab", "ad", "af", "aln", |
"als", "am", "am1", "ami", |
"als", "am", "am1", "ami", |
"ami1", "as", "as1", "asciify", |
"ami1", "as", "as1", "asciify", |
Line 265 const char *__roff_name[MAN_MAX + 1] = { |
|
Line 265 const char *__roff_name[MAN_MAX + 1] = { |
|
"open", "opena", "os", "output", |
"open", "opena", "os", "output", |
"padj", "papersize", "pc", "pev", |
"padj", "papersize", "pc", "pev", |
"pi", "PI", "pl", "pm", |
"pi", "PI", "pl", "pm", |
"pn", "pnr", "po", "ps", |
"pn", "pnr", "ps", |
"psbb", "pshape", "pso", "ptr", |
"psbb", "pshape", "pso", "ptr", |
"pvs", "rchar", "rd", "recursionlimit", |
"pvs", "rchar", "rd", "recursionlimit", |
"return", "rfschar", "rhang", |
"return", "rfschar", "rhang", |
Line 335 static struct roffmac roffs[TOKEN_NONE] = { |
|
Line 335 static struct roffmac roffs[TOKEN_NONE] = { |
|
{ roff_onearg, NULL, NULL, 0 }, /* ft */ |
{ roff_onearg, NULL, NULL, 0 }, /* ft */ |
{ roff_onearg, NULL, NULL, 0 }, /* ll */ |
{ roff_onearg, NULL, NULL, 0 }, /* ll */ |
{ roff_onearg, NULL, NULL, 0 }, /* mc */ |
{ roff_onearg, NULL, NULL, 0 }, /* mc */ |
|
{ roff_onearg, NULL, NULL, 0 }, /* po */ |
{ roff_onearg, NULL, NULL, 0 }, /* rj */ |
{ roff_onearg, NULL, NULL, 0 }, /* rj */ |
{ roff_onearg, NULL, NULL, 0 }, /* sp */ |
{ roff_onearg, NULL, NULL, 0 }, /* sp */ |
{ roff_manyarg, NULL, NULL, 0 }, /* ta */ |
{ roff_manyarg, NULL, NULL, 0 }, /* ta */ |
Line 500 static struct roffmac roffs[TOKEN_NONE] = { |
|
Line 501 static struct roffmac roffs[TOKEN_NONE] = { |
|
{ roff_line_ignore, NULL, NULL, 0 }, /* pm */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* pm */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* pn */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* pn */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* pnr */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* pnr */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* po */ |
|
{ roff_line_ignore, NULL, NULL, 0 }, /* ps */ |
{ roff_line_ignore, NULL, NULL, 0 }, /* ps */ |
{ roff_unsupp, NULL, NULL, 0 }, /* psbb */ |
{ roff_unsupp, NULL, NULL, 0 }, /* psbb */ |
{ roff_unsupp, NULL, NULL, 0 }, /* pshape */ |
{ roff_unsupp, NULL, NULL, 0 }, /* pshape */ |
Line 1166 roff_res(struct roff *r, struct buf *buf, int ln, int |
|
Line 1166 roff_res(struct roff *r, struct buf *buf, int ln, int |
|
size_t maxl; /* expected length of the escape name */ |
size_t maxl; /* expected length of the escape name */ |
size_t naml; /* actual length of the escape name */ |
size_t naml; /* actual length of the escape name */ |
enum mandoc_esc esc; /* type of the escape sequence */ |
enum mandoc_esc esc; /* type of the escape sequence */ |
|
enum mdoc_os os_e; /* kind of RCS id seen */ |
int inaml; /* length returned from mandoc_escape() */ |
int inaml; /* length returned from mandoc_escape() */ |
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 */ |
Line 1183 roff_res(struct roff *r, struct buf *buf, int ln, int |
|
Line 1184 roff_res(struct roff *r, struct buf *buf, int ln, int |
|
stesc++; |
stesc++; |
if (*stesc != '"' && *stesc != '#') |
if (*stesc != '"' && *stesc != '#') |
continue; |
continue; |
|
|
|
/* Comment found, look for RCS id. */ |
|
|
|
if ((cp = strstr(stesc, "$" "OpenBSD")) != NULL) { |
|
os_e = MDOC_OS_OPENBSD; |
|
cp += 8; |
|
} else if ((cp = strstr(stesc, "$" "NetBSD")) != NULL) { |
|
os_e = MDOC_OS_NETBSD; |
|
cp += 7; |
|
} |
|
if (cp != NULL && |
|
isalnum((unsigned char)*cp) == 0 && |
|
strchr(cp, '$') != NULL) |
|
r->man->meta.rcsids |= 1 << os_e; |
|
|
|
/* Handle trailing whitespace. */ |
|
|
cp = strchr(stesc--, '\0') - 1; |
cp = strchr(stesc--, '\0') - 1; |
if (*cp == '\n') { |
if (*cp == '\n') { |
done = 1; |
done = 1; |