version 1.79, 2010/07/07 15:04:54 |
version 1.82, 2010/07/22 13:47:50 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
Line 92 static int pre_RS(DECL_ARGS); |
|
Line 92 static int pre_RS(DECL_ARGS); |
|
static int pre_SH(DECL_ARGS); |
static int pre_SH(DECL_ARGS); |
static int pre_SS(DECL_ARGS); |
static int pre_SS(DECL_ARGS); |
static int pre_TP(DECL_ARGS); |
static int pre_TP(DECL_ARGS); |
static int pre_br(DECL_ARGS); |
|
static int pre_fi(DECL_ARGS); |
static int pre_fi(DECL_ARGS); |
static int pre_ign(DECL_ARGS); |
static int pre_ign(DECL_ARGS); |
static int pre_nf(DECL_ARGS); |
static int pre_nf(DECL_ARGS); |
Line 106 static void post_SS(DECL_ARGS); |
|
Line 105 static void post_SS(DECL_ARGS); |
|
static void post_TP(DECL_ARGS); |
static void post_TP(DECL_ARGS); |
|
|
static const struct termact termacts[MAN_MAX] = { |
static const struct termact termacts[MAN_MAX] = { |
{ pre_br, NULL, MAN_NOTEXT }, /* br */ |
{ pre_sp, NULL, MAN_NOTEXT }, /* br */ |
{ NULL, NULL, 0 }, /* TH */ |
{ NULL, NULL, 0 }, /* TH */ |
{ pre_SH, post_SH, 0 }, /* SH */ |
{ pre_SH, post_SH, 0 }, /* SH */ |
{ pre_SS, post_SS, 0 }, /* SS */ |
{ pre_SS, post_SS, 0 }, /* SS */ |
|
|
pre_fi(DECL_ARGS) |
pre_fi(DECL_ARGS) |
{ |
{ |
|
|
|
term_newln(p); |
mt->fl &= ~MANT_LITERAL; |
mt->fl &= ~MANT_LITERAL; |
return(1); |
return(1); |
} |
} |
|
|
pre_nf(DECL_ARGS) |
pre_nf(DECL_ARGS) |
{ |
{ |
|
|
|
term_newln(p); |
mt->fl |= MANT_LITERAL; |
mt->fl |= MANT_LITERAL; |
return(MAN_Vb != n->tok); |
return(MAN_Vb != n->tok); |
} |
} |
Line 357 pre_sp(DECL_ARGS) |
|
Line 358 pre_sp(DECL_ARGS) |
|
{ |
{ |
size_t i, len; |
size_t i, len; |
|
|
len = n->child ? |
switch (n->tok) { |
a2height(p, n->child->string) : term_len(p, 1); |
case (MAN_br): |
|
len = 0; |
|
break; |
|
default: |
|
len = n->child ? a2height(p, n->child->string) : 1; |
|
break; |
|
} |
|
|
if (0 == len) |
if (0 == len) |
term_newln(p); |
term_newln(p); |
for (i = 0; i <= len; i++) |
for (i = 0; i < len; i++) |
term_vspace(p); |
term_vspace(p); |
|
|
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
pre_br(DECL_ARGS) |
|
{ |
|
|
|
term_newln(p); |
|
return(0); |
return(0); |
} |
} |
|
|