version 1.190, 2010/09/27 11:21:39 |
version 1.197, 2010/12/11 14:40:51 |
Line 81 static void termp_lb_post(DECL_ARGS); |
|
Line 81 static void termp_lb_post(DECL_ARGS); |
|
static void termp_nm_post(DECL_ARGS); |
static void termp_nm_post(DECL_ARGS); |
static void termp_pf_post(DECL_ARGS); |
static void termp_pf_post(DECL_ARGS); |
static void termp_quote_post(DECL_ARGS); |
static void termp_quote_post(DECL_ARGS); |
static void termp_quote_post(DECL_ARGS); |
|
static void termp_sh_post(DECL_ARGS); |
static void termp_sh_post(DECL_ARGS); |
static void termp_ss_post(DECL_ARGS); |
static void termp_ss_post(DECL_ARGS); |
|
|
Line 103 static int termp_fl_pre(DECL_ARGS); |
|
Line 102 static int termp_fl_pre(DECL_ARGS); |
|
static int termp_fn_pre(DECL_ARGS); |
static int termp_fn_pre(DECL_ARGS); |
static int termp_fo_pre(DECL_ARGS); |
static int termp_fo_pre(DECL_ARGS); |
static int termp_ft_pre(DECL_ARGS); |
static int termp_ft_pre(DECL_ARGS); |
|
static int termp_igndelim_pre(DECL_ARGS); |
static int termp_in_pre(DECL_ARGS); |
static int termp_in_pre(DECL_ARGS); |
static int termp_it_pre(DECL_ARGS); |
static int termp_it_pre(DECL_ARGS); |
static int termp_li_pre(DECL_ARGS); |
static int termp_li_pre(DECL_ARGS); |
Line 110 static int termp_lk_pre(DECL_ARGS); |
|
Line 110 static int termp_lk_pre(DECL_ARGS); |
|
static int termp_nd_pre(DECL_ARGS); |
static int termp_nd_pre(DECL_ARGS); |
static int termp_nm_pre(DECL_ARGS); |
static int termp_nm_pre(DECL_ARGS); |
static int termp_ns_pre(DECL_ARGS); |
static int termp_ns_pre(DECL_ARGS); |
static int termp_pf_pre(DECL_ARGS); |
|
static int termp_quote_pre(DECL_ARGS); |
static int termp_quote_pre(DECL_ARGS); |
static int termp_rs_pre(DECL_ARGS); |
static int termp_rs_pre(DECL_ARGS); |
static int termp_rv_pre(DECL_ARGS); |
static int termp_rv_pre(DECL_ARGS); |
Line 197 static const struct termact termacts[MDOC_MAX] = { |
|
Line 196 static const struct termact termacts[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Eo */ |
{ NULL, NULL }, /* Eo */ |
{ termp_xx_pre, NULL }, /* Fx */ |
{ termp_xx_pre, NULL }, /* Fx */ |
{ termp_bold_pre, NULL }, /* Ms */ |
{ termp_bold_pre, NULL }, /* Ms */ |
{ NULL, NULL }, /* No */ |
{ termp_igndelim_pre, NULL }, /* No */ |
{ termp_ns_pre, NULL }, /* Ns */ |
{ termp_ns_pre, NULL }, /* Ns */ |
{ termp_xx_pre, NULL }, /* Nx */ |
{ termp_xx_pre, NULL }, /* Nx */ |
{ termp_xx_pre, NULL }, /* Ox */ |
{ termp_xx_pre, NULL }, /* Ox */ |
{ NULL, NULL }, /* Pc */ |
{ NULL, NULL }, /* Pc */ |
{ termp_pf_pre, termp_pf_post }, /* Pf */ |
{ termp_igndelim_pre, termp_pf_post }, /* Pf */ |
{ termp_quote_pre, termp_quote_post }, /* Po */ |
{ termp_quote_pre, termp_quote_post }, /* Po */ |
{ termp_quote_pre, termp_quote_post }, /* Pq */ |
{ termp_quote_pre, termp_quote_post }, /* Pq */ |
{ NULL, NULL }, /* Qc */ |
{ NULL, NULL }, /* Qc */ |
Line 320 print_mdoc_node(DECL_ARGS) |
|
Line 319 print_mdoc_node(DECL_ARGS) |
|
/* |
/* |
* Keeps only work until the end of a line. If a keep was |
* Keeps only work until the end of a line. If a keep was |
* invoked in a prior line, revert it to PREKEEP. |
* invoked in a prior line, revert it to PREKEEP. |
|
* |
|
* Also let SYNPRETTY sections behave as if they were wrapped |
|
* in a `Bk' block. |
*/ |
*/ |
|
|
if (TERMP_KEEP & p->flags) { |
if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) { |
if (n->prev && n->prev->line != n->line) { |
if (n->prev && n->prev->line != n->line) { |
p->flags &= ~TERMP_KEEP; |
p->flags &= ~TERMP_KEEP; |
p->flags |= TERMP_PREKEEP; |
p->flags |= TERMP_PREKEEP; |
Line 334 print_mdoc_node(DECL_ARGS) |
|
Line 336 print_mdoc_node(DECL_ARGS) |
|
} |
} |
} |
} |
|
|
|
/* |
|
* Since SYNPRETTY sections aren't "turned off" with `Ek', |
|
* we have to intuit whether we should disable formatting. |
|
*/ |
|
|
|
if ( ! (MDOC_SYNPRETTY & n->flags) && |
|
((n->prev && MDOC_SYNPRETTY & n->prev->flags) || |
|
(n->parent && MDOC_SYNPRETTY & n->parent->flags))) |
|
p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP); |
|
|
if (chld && n->child) |
if (chld && n->child) |
print_mdoc_nodelist(p, &npair, m, n->child); |
print_mdoc_nodelist(p, &npair, m, n->child); |
|
|
Line 1585 termp_bd_pre(DECL_ARGS) |
|
Line 1597 termp_bd_pre(DECL_ARGS) |
|
* anyway, so don't sweat it. |
* anyway, so don't sweat it. |
*/ |
*/ |
switch (nn->tok) { |
switch (nn->tok) { |
|
case (MDOC_Sm): |
|
/* FALLTHROUGH */ |
case (MDOC_br): |
case (MDOC_br): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_sp): |
case (MDOC_sp): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_Bl): |
case (MDOC_Bl): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
|
case (MDOC_D1): |
|
/* FALLTHROUGH */ |
|
case (MDOC_Dl): |
|
/* FALLTHROUGH */ |
case (MDOC_Lp): |
case (MDOC_Lp): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_Pp): |
case (MDOC_Pp): |
Line 1656 termp_xx_pre(DECL_ARGS) |
|
Line 1674 termp_xx_pre(DECL_ARGS) |
|
pp = NULL; |
pp = NULL; |
switch (n->tok) { |
switch (n->tok) { |
case (MDOC_Bsx): |
case (MDOC_Bsx): |
pp = "BSDI BSD/OS"; |
pp = "BSD/OS"; |
break; |
break; |
case (MDOC_Dx): |
case (MDOC_Dx): |
pp = "DragonFly"; |
pp = "DragonFly"; |
Line 1685 termp_xx_pre(DECL_ARGS) |
|
Line 1703 termp_xx_pre(DECL_ARGS) |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
termp_pf_pre(DECL_ARGS) |
termp_igndelim_pre(DECL_ARGS) |
{ |
{ |
|
|
p->flags |= TERMP_IGNDELIM; |
p->flags |= TERMP_IGNDELIM; |
|
|
termp_pf_post(DECL_ARGS) |
termp_pf_post(DECL_ARGS) |
{ |
{ |
|
|
p->flags &= ~TERMP_IGNDELIM; |
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
} |
} |
|
|
Line 2076 termp_lk_pre(DECL_ARGS) |
|
Line 2093 termp_lk_pre(DECL_ARGS) |
|
|
|
nn = sv = n->child; |
nn = sv = n->child; |
|
|
if (NULL == nn->next) |
if (NULL == nn || NULL == nn->next) |
return(1); |
return(1); |
|
|
for (nn = nn->next; nn; nn = nn->next) |
for (nn = nn->next; nn; nn = nn->next) |