version 1.15, 2009/02/24 15:01:15 |
version 1.16, 2009/02/24 16:16:45 |
Line 113 DECL_PREPOST(termp_fa); |
|
Line 113 DECL_PREPOST(termp_fa); |
|
DECL_PREPOST(termp_fd); |
DECL_PREPOST(termp_fd); |
DECL_PREPOST(termp_fl); |
DECL_PREPOST(termp_fl); |
DECL_PREPOST(termp_fn); |
DECL_PREPOST(termp_fn); |
|
DECL_PREPOST(termp_fo); |
DECL_PREPOST(termp_ft); |
DECL_PREPOST(termp_ft); |
DECL_PREPOST(termp_ic); |
DECL_PREPOST(termp_ic); |
DECL_PREPOST(termp_in); |
DECL_PREPOST(termp_in); |
Line 134 DECL_PRE(termp_at); |
|
Line 135 DECL_PRE(termp_at); |
|
DECL_PRE(termp_bsx); |
DECL_PRE(termp_bsx); |
DECL_PRE(termp_bx); |
DECL_PRE(termp_bx); |
DECL_PRE(termp_ex); |
DECL_PRE(termp_ex); |
|
DECL_PRE(termp_fx); |
DECL_PRE(termp_nd); |
DECL_PRE(termp_nd); |
DECL_PRE(termp_ns); |
DECL_PRE(termp_ns); |
DECL_PRE(termp_nx); |
DECL_PRE(termp_nx); |
Line 142 DECL_PRE(termp_pp); |
|
Line 144 DECL_PRE(termp_pp); |
|
DECL_PRE(termp_rv); |
DECL_PRE(termp_rv); |
DECL_PRE(termp_st); |
DECL_PRE(termp_st); |
DECL_PRE(termp_ud); |
DECL_PRE(termp_ud); |
|
DECL_PRE(termp_ux); |
DECL_PRE(termp_xr); |
DECL_PRE(termp_xr); |
|
|
DECL_POST(termp_bl); |
DECL_POST(termp_bl); |
Line 217 const struct termact __termacts[MDOC_MAX] = { |
|
Line 220 const struct termact __termacts[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Ef */ |
{ NULL, NULL }, /* Ef */ |
{ termp_em_pre, termp_em_post }, /* Em */ |
{ termp_em_pre, termp_em_post }, /* Em */ |
{ NULL, NULL }, /* Eo */ |
{ NULL, NULL }, /* Eo */ |
{ NULL, NULL }, /* Fx */ |
{ termp_fx_pre, NULL }, /* Fx */ |
{ NULL, NULL }, /* Ms */ |
{ NULL, NULL }, /* Ms */ |
{ NULL, NULL }, /* No */ |
{ NULL, NULL }, /* No */ |
{ termp_ns_pre, NULL }, /* Ns */ |
{ termp_ns_pre, NULL }, /* Ns */ |
Line 228 const struct termact __termacts[MDOC_MAX] = { |
|
Line 231 const struct termact __termacts[MDOC_MAX] = { |
|
{ termp_pq_pre, termp_pq_post }, /* Po */ |
{ termp_pq_pre, termp_pq_post }, /* Po */ |
{ termp_pq_pre, termp_pq_post }, /* Pq */ |
{ termp_pq_pre, termp_pq_post }, /* Pq */ |
{ NULL, NULL }, /* Qc */ |
{ NULL, NULL }, /* Qc */ |
{ NULL, NULL }, /* Ql */ |
{ termp_sq_pre, termp_sq_post }, /* Ql */ |
{ termp_qq_pre, termp_qq_post }, /* Qo */ |
{ termp_qq_pre, termp_qq_post }, /* Qo */ |
{ termp_qq_pre, termp_qq_post }, /* Qq */ |
{ termp_qq_pre, termp_qq_post }, /* Qq */ |
{ NULL, NULL }, /* Re */ |
{ NULL, NULL }, /* Re */ |
Line 240 const struct termact __termacts[MDOC_MAX] = { |
|
Line 243 const struct termact __termacts[MDOC_MAX] = { |
|
{ termp_sx_pre, termp_sx_post }, /* Sx */ |
{ termp_sx_pre, termp_sx_post }, /* Sx */ |
{ NULL, NULL }, /* Sy */ |
{ NULL, NULL }, /* Sy */ |
{ NULL, NULL }, /* Tn */ |
{ NULL, NULL }, /* Tn */ |
{ NULL, NULL }, /* Ux */ |
{ termp_ux_pre, NULL }, /* Ux */ |
{ NULL, NULL }, /* Xc */ |
{ NULL, NULL }, /* Xc */ |
{ NULL, NULL }, /* Xo */ |
{ NULL, NULL }, /* Xo */ |
{ NULL, NULL }, /* Fo */ |
{ termp_fo_pre, termp_fo_post }, /* Fo */ |
{ NULL, NULL }, /* Fc */ |
{ NULL, NULL }, /* Fc */ |
{ NULL, NULL }, /* Oo */ |
{ termp_op_pre, termp_op_post }, /* Oo */ |
{ NULL, NULL }, /* Oc */ |
{ NULL, NULL }, /* Oc */ |
{ NULL, NULL }, /* Bk */ |
{ NULL, NULL }, /* Bk */ |
{ NULL, NULL }, /* Ek */ |
{ NULL, NULL }, /* Ek */ |
Line 897 termp_fn_pre(DECL_ARGS) |
|
Line 900 termp_fn_pre(DECL_ARGS) |
|
word(p, node->child->data.text.string); |
word(p, node->child->data.text.string); |
p->flags &= ~ttypes[TTYPE_FUNC_NAME]; |
p->flags &= ~ttypes[TTYPE_FUNC_NAME]; |
|
|
p->flags |= TERMP_NOSPACE; |
|
word(p, "("); |
word(p, "("); |
|
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
Line 906 termp_fn_pre(DECL_ARGS) |
|
Line 908 termp_fn_pre(DECL_ARGS) |
|
p->flags |= ttypes[TTYPE_FUNC_ARG]; |
p->flags |= ttypes[TTYPE_FUNC_ARG]; |
word(p, n->data.text.string); |
word(p, n->data.text.string); |
p->flags &= ~ttypes[TTYPE_FUNC_ARG]; |
p->flags &= ~ttypes[TTYPE_FUNC_ARG]; |
if ((n->next)) |
if (n->next) |
word(p, ","); |
word(p, ","); |
} |
} |
|
|
p->flags |= TERMP_NOSPACE; |
|
word(p, ")"); |
word(p, ")"); |
|
|
if (SEC_SYNOPSIS == node->sec) |
if (SEC_SYNOPSIS == node->sec) |
Line 954 termp_sx_post(DECL_ARGS) |
|
Line 955 termp_sx_post(DECL_ARGS) |
|
static int |
static int |
termp_fa_pre(DECL_ARGS) |
termp_fa_pre(DECL_ARGS) |
{ |
{ |
|
struct mdoc_node *n; |
|
|
p->flags |= ttypes[TTYPE_FUNC_ARG]; |
if (node->parent->tok != MDOC_Fo) { |
return(1); |
p->flags |= ttypes[TTYPE_FUNC_ARG]; |
|
return(1); |
|
} |
|
|
|
for (n = node->child; n; n = n->next) { |
|
assert(MDOC_TEXT == n->type); |
|
|
|
p->flags |= ttypes[TTYPE_FUNC_ARG]; |
|
word(p, n->data.text.string); |
|
p->flags &= ~ttypes[TTYPE_FUNC_ARG]; |
|
|
|
if (n->next) |
|
word(p, ","); |
|
} |
|
|
|
if (node->next && node->next->tok == MDOC_Fa) |
|
word(p, ","); |
|
|
|
return(0); |
} |
} |
|
|
|
|
Line 1110 termp_ox_pre(DECL_ARGS) |
|
Line 1130 termp_ox_pre(DECL_ARGS) |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
|
termp_ux_pre(DECL_ARGS) |
|
{ |
|
|
|
word(p, "UNIX"); |
|
return(1); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
termp_fx_pre(DECL_ARGS) |
|
{ |
|
|
|
word(p, "FreeBSD"); |
|
return(1); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
termp_nx_pre(DECL_ARGS) |
termp_nx_pre(DECL_ARGS) |
{ |
{ |
|
|
Line 1350 termp_bq_post(DECL_ARGS) |
|
Line 1390 termp_bq_post(DECL_ARGS) |
|
|
|
if (MDOC_BODY != node->type) |
if (MDOC_BODY != node->type) |
return; |
return; |
p->flags |= TERMP_NOSPACE; |
|
word(p, "]"); |
word(p, "]"); |
} |
} |
|
|
Line 1375 termp_pq_post(DECL_ARGS) |
|
Line 1414 termp_pq_post(DECL_ARGS) |
|
|
|
if (MDOC_BODY != node->type) |
if (MDOC_BODY != node->type) |
return; |
return; |
p->flags |= TERMP_NOSPACE; |
|
word(p, ")"); |
word(p, ")"); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
termp_fo_pre(DECL_ARGS) |
|
{ |
|
const struct mdoc_node *n; |
|
|
|
if (MDOC_BODY == node->type) { |
|
word(p, "("); |
|
p->flags |= TERMP_NOSPACE; |
|
return(1); |
|
} else if (MDOC_HEAD != node->type) |
|
return(1); |
|
|
|
p->flags |= ttypes[TTYPE_FUNC_NAME]; |
|
for (n = node->child; n; n = n->next) { |
|
assert(MDOC_TEXT == n->type); |
|
word(p, n->data.text.string); |
|
} |
|
p->flags &= ~ttypes[TTYPE_FUNC_NAME]; |
|
|
|
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static void |
|
termp_fo_post(DECL_ARGS) |
|
{ |
|
|
|
if (MDOC_BODY != node->type) |
|
return; |
|
word(p, ")"); |
|
word(p, ";"); |
|
newln(p); |
} |
} |
|
|
|
|