version 1.45, 2009/03/20 16:43:28 |
version 1.48, 2009/03/21 09:48:29 |
Line 57 static int post_ar(POST_ARGS); |
|
Line 57 static int post_ar(POST_ARGS); |
|
static int post_bl(POST_ARGS); |
static int post_bl(POST_ARGS); |
static int post_bl_width(POST_ARGS); |
static int post_bl_width(POST_ARGS); |
static int post_bl_tagwidth(POST_ARGS); |
static int post_bl_tagwidth(POST_ARGS); |
static int post_bd(POST_ARGS); |
|
static int post_dd(POST_ARGS); |
static int post_dd(POST_ARGS); |
|
static int post_display(POST_ARGS); |
static int post_dt(POST_ARGS); |
static int post_dt(POST_ARGS); |
static int post_nm(POST_ARGS); |
static int post_nm(POST_ARGS); |
static int post_os(POST_ARGS); |
static int post_os(POST_ARGS); |
Line 67 static int post_sh(POST_ARGS); |
|
Line 67 static int post_sh(POST_ARGS); |
|
static int post_std(POST_ARGS); |
static int post_std(POST_ARGS); |
|
|
static int pre_bd(PRE_ARGS); |
static int pre_bd(PRE_ARGS); |
|
static int pre_dl(PRE_ARGS); |
|
|
#define merr(m, t) perr((m), (m)->last->line, (m)->last->pos, (t)) |
#define merr(m, t) perr((m), (m)->last->line, (m)->last->pos, (t)) |
#define mwarn(m, t) pwarn((m), (m)->last->line, (m)->last->pos, (t)) |
#define mwarn(m, t) pwarn((m), (m)->last->line, (m)->last->pos, (t)) |
Line 80 const struct actions mdoc_actions[MDOC_MAX] = { |
|
Line 81 const struct actions mdoc_actions[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Ss */ |
{ NULL, NULL }, /* Ss */ |
{ NULL, NULL }, /* Pp */ |
{ NULL, NULL }, /* Pp */ |
{ NULL, NULL }, /* D1 */ |
{ NULL, NULL }, /* D1 */ |
{ NULL, NULL }, /* Dl */ |
{ pre_dl, post_display }, /* Dl */ |
{ pre_bd, post_bd }, /* Bd */ |
{ pre_bd, post_display }, /* Bd */ |
{ NULL, NULL }, /* Ed */ |
{ NULL, NULL }, /* Ed */ |
{ NULL, post_bl }, /* Bl */ |
{ NULL, post_bl }, /* Bl */ |
{ NULL, NULL }, /* El */ |
{ NULL, NULL }, /* El */ |
Line 190 const struct actions mdoc_actions[MDOC_MAX] = { |
|
Line 191 const struct actions mdoc_actions[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Es */ |
{ NULL, NULL }, /* Es */ |
{ NULL, NULL }, /* En */ |
{ NULL, NULL }, /* En */ |
{ NULL, NULL }, /* Dx */ |
{ NULL, NULL }, /* Dx */ |
|
{ NULL, NULL }, /* %Q */ |
}; |
}; |
|
|
|
|
Line 403 post_dt(POST_ARGS) |
|
Line 405 post_dt(POST_ARGS) |
|
* arch = NULL |
* arch = NULL |
*/ |
*/ |
|
|
if ((cp = mdoc_a2msec(n->string))) { |
cp = mdoc_a2msec(n->string); |
|
if (cp) { |
m->meta.vol = xstrdup(cp); |
m->meta.vol = xstrdup(cp); |
errno = 0; |
errno = 0; |
lval = strtol(n->string, &ep, 10); |
lval = strtol(n->string, &ep, 10); |
Line 422 post_dt(POST_ARGS) |
|
Line 425 post_dt(POST_ARGS) |
|
* VOL |
* VOL |
*/ |
*/ |
|
|
if ((cp = mdoc_a2vol(n->string))) { |
cp = mdoc_a2vol(n->string); |
|
if (cp) { |
free(m->meta.vol); |
free(m->meta.vol); |
m->meta.vol = xstrdup(cp); |
m->meta.vol = xstrdup(cp); |
n = n->next; |
n = n->next; |
Line 487 post_bl_tagwidth(struct mdoc *m) |
|
Line 491 post_bl_tagwidth(struct mdoc *m) |
|
* width if a macro. |
* width if a macro. |
*/ |
*/ |
|
|
if ((n = n->head->child)) { |
n = n->head->child; |
|
if (n) { |
if (MDOC_TEXT != n->type) { |
if (MDOC_TEXT != n->type) { |
if (0 == (sz = (int)mdoc_macro2len(n->tok))) |
if (0 == (sz = (int)mdoc_macro2len(n->tok))) |
sz = -1; |
sz = -1; |
Line 686 post_prol(POST_ARGS) |
|
Line 691 post_prol(POST_ARGS) |
|
|
|
|
|
static int |
static int |
|
pre_dl(PRE_ARGS) |
|
{ |
|
|
|
if (MDOC_BODY != n->type) |
|
return(1); |
|
m->flags |= MDOC_LITERAL; |
|
return(1); |
|
} |
|
|
|
|
|
static int |
pre_bd(PRE_ARGS) |
pre_bd(PRE_ARGS) |
{ |
{ |
int i; |
int i; |
Line 714 pre_bd(PRE_ARGS) |
|
Line 730 pre_bd(PRE_ARGS) |
|
|
|
|
|
static int |
static int |
post_bd(POST_ARGS) |
post_display(POST_ARGS) |
{ |
{ |
|
|
if (MDOC_BODY == m->last->type) |
if (MDOC_BODY == m->last->type) |