version 1.80, 2009/06/15 10:36:01 |
version 1.83, 2009/06/16 20:22:23 |
|
|
}; |
}; |
|
|
const char *const __mdoc_macronames[MDOC_MAX] = { |
const char *const __mdoc_macronames[MDOC_MAX] = { |
"\\\"", "Dd", "Dt", "Os", |
"Ap", "Dd", "Dt", "Os", |
"Sh", "Ss", "Pp", "D1", |
"Sh", "Ss", "Pp", "D1", |
"Dl", "Bd", "Ed", "Bl", |
"Dl", "Bd", "Ed", "Bl", |
"El", "It", "Ad", "An", |
"El", "It", "Ad", "An", |
Line 63 const char *const __mdoc_macronames[MDOC_MAX] = { |
|
Line 63 const char *const __mdoc_macronames[MDOC_MAX] = { |
|
"Tn", "Ux", "Xc", "Xo", |
"Tn", "Ux", "Xc", "Xo", |
"Fo", "Fc", "Oo", "Oc", |
"Fo", "Fc", "Oo", "Oc", |
"Bk", "Ek", "Bt", "Hf", |
"Bk", "Ek", "Bt", "Hf", |
"Fr", "Ud", "Lb", "Ap", |
"Fr", "Ud", "Lb", "Lp", |
"Lp", "Lk", "Mt", "Brq", |
"Lk", "Mt", "Brq", "Bro", |
/* LINTED */ |
/* LINTED */ |
"Bro", "Brc", "\%C", "Es", |
"Brc", "\%C", "Es", "En", |
/* LINTED */ |
/* LINTED */ |
"En", "Dx", "\%Q" |
"Dx", "\%Q" |
}; |
}; |
|
|
const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
Line 99 static int perr(struct mdoc *, int, int, enum merr) |
|
Line 99 static int perr(struct mdoc *, int, int, enum merr) |
|
|
|
#define verr(m, t) perr((m), (m)->last->line, (m)->last->pos, (t)) |
#define verr(m, t) perr((m), (m)->last->line, (m)->last->pos, (t)) |
|
|
/* |
|
* Get the first (root) node of the parse tree. |
|
*/ |
|
const struct mdoc_node * |
const struct mdoc_node * |
mdoc_node(const struct mdoc *m) |
mdoc_node(const struct mdoc *m) |
{ |
{ |
Line 646 macrowarn(struct mdoc *m, int ln, const char *buf) |
|
Line 643 macrowarn(struct mdoc *m, int ln, const char *buf) |
|
} |
} |
|
|
|
|
|
|
/* |
/* |
* Parse a macro line, that is, a line beginning with the control |
* Parse a macro line, that is, a line beginning with the control |
* character. |
* character. |
Line 657 parsemacro(struct mdoc *m, int ln, char *buf) |
|
Line 653 parsemacro(struct mdoc *m, int ln, char *buf) |
|
int i, c; |
int i, c; |
char mac[5]; |
char mac[5]; |
|
|
/* Comments and empties are quickly ignored. */ |
/* Empty lines are ignored. */ |
|
|
if (0 == buf[1]) |
if (0 == buf[1]) |
return(1); |
return(1); |
Line 670 parsemacro(struct mdoc *m, int ln, char *buf) |
|
Line 666 parsemacro(struct mdoc *m, int ln, char *buf) |
|
return(1); |
return(1); |
return(perr(m, ln, 1, ESPACE)); |
return(perr(m, ln, 1, ESPACE)); |
} |
} |
|
|
if (buf[1] && '\\' == buf[1]) |
|
if (buf[2] && '\"' == buf[2]) |
|
return(1); |
|
|
|
/* Copy the first word into a nil-terminated buffer. */ |
/* Copy the first word into a nil-terminated buffer. */ |
|
|