version 1.198, 2017/05/07 17:31:45 |
version 1.202, 2017/06/04 22:44:15 |
Line 68 static void print_bvspace(struct termp *, |
|
Line 68 static void print_bvspace(struct termp *, |
|
const struct roff_node *, int); |
const struct roff_node *, int); |
|
|
static int pre_B(DECL_ARGS); |
static int pre_B(DECL_ARGS); |
|
static int pre_DT(DECL_ARGS); |
static int pre_HP(DECL_ARGS); |
static int pre_HP(DECL_ARGS); |
static int pre_I(DECL_ARGS); |
static int pre_I(DECL_ARGS); |
static int pre_IP(DECL_ARGS); |
static int pre_IP(DECL_ARGS); |
Line 117 static const struct termact __termacts[MAN_MAX - MAN_T |
|
Line 118 static const struct termact __termacts[MAN_MAX - MAN_T |
|
{ pre_literal, NULL, 0 }, /* fi */ |
{ pre_literal, NULL, 0 }, /* fi */ |
{ NULL, NULL, 0 }, /* RE */ |
{ NULL, NULL, 0 }, /* RE */ |
{ pre_RS, post_RS, 0 }, /* RS */ |
{ pre_RS, post_RS, 0 }, /* RS */ |
{ pre_ign, NULL, 0 }, /* DT */ |
{ pre_DT, NULL, 0 }, /* DT */ |
{ pre_ign, NULL, MAN_NOTEXT }, /* UC */ |
{ pre_ign, NULL, MAN_NOTEXT }, /* UC */ |
{ pre_PD, NULL, MAN_NOTEXT }, /* PD */ |
{ pre_PD, NULL, MAN_NOTEXT }, /* PD */ |
{ pre_ign, NULL, 0 }, /* AT */ |
{ pre_ign, NULL, 0 }, /* AT */ |
Line 140 terminal_man(void *arg, const struct roff_man *man) |
|
Line 141 terminal_man(void *arg, const struct roff_man *man) |
|
size_t save_defindent; |
size_t save_defindent; |
|
|
p = (struct termp *)arg; |
p = (struct termp *)arg; |
p->overstep = 0; |
|
p->rmargin = p->maxrmargin = p->defrmargin; |
p->rmargin = p->maxrmargin = p->defrmargin; |
term_tab_set(p, NULL); |
term_tab_set(p, NULL); |
term_tab_set(p, "T"); |
term_tab_set(p, "T"); |
Line 392 pre_in(DECL_ARGS) |
|
Line 392 pre_in(DECL_ARGS) |
|
} |
} |
|
|
static int |
static int |
|
pre_DT(DECL_ARGS) |
|
{ |
|
term_tab_set(p, NULL); |
|
term_tab_set(p, "T"); |
|
term_tab_set(p, ".5i"); |
|
return 0; |
|
} |
|
|
|
static int |
pre_HP(DECL_ARGS) |
pre_HP(DECL_ARGS) |
{ |
{ |
struct roffsu su; |
struct roffsu su; |
Line 853 post_UR(DECL_ARGS) |
|
Line 862 post_UR(DECL_ARGS) |
|
static void |
static void |
print_man_node(DECL_ARGS) |
print_man_node(DECL_ARGS) |
{ |
{ |
size_t rm, rmax; |
|
int c; |
int c; |
|
|
switch (n->type) { |
switch (n->type) { |
Line 863 print_man_node(DECL_ARGS) |
|
Line 871 print_man_node(DECL_ARGS) |
|
* If we have a space as the first character, break |
* If we have a space as the first character, break |
* before printing the line's data. |
* before printing the line's data. |
*/ |
*/ |
if ('\0' == *n->string) { |
if (*n->string == '\0') { |
term_vspace(p); |
term_vspace(p); |
return; |
return; |
} else if (' ' == *n->string && NODE_LINE & n->flags) |
} else if (*n->string == ' ' && n->flags & NODE_LINE && |
|
(p->flags & TERMP_NONEWLINE) == 0) |
term_newln(p); |
term_newln(p); |
|
|
term_word(p, n->string); |
term_word(p, n->string); |
|
|
if (mt->fl & MANT_LITERAL && |
if (mt->fl & MANT_LITERAL && |
! (p->flags & (TERMP_NOBREAK | TERMP_NONEWLINE)) && |
! (p->flags & (TERMP_NOBREAK | TERMP_NONEWLINE)) && |
(n->next == NULL || n->next->flags & NODE_LINE)) { |
(n->next == NULL || n->next->flags & NODE_LINE)) { |
rm = p->rmargin; |
p->flags |= TERMP_BRNEVER | TERMP_NOSPACE; |
rmax = p->maxrmargin; |
|
p->rmargin = p->maxrmargin = TERM_MAXMARGIN; |
|
p->flags |= TERMP_NOSPACE; |
|
if (n->string != NULL && *n->string != '\0') |
if (n->string != NULL && *n->string != '\0') |
term_flushln(p); |
term_flushln(p); |
else |
else |
term_newln(p); |
term_newln(p); |
if (rm < rmax && n->parent->tok == MAN_HP) { |
p->flags &= ~TERMP_BRNEVER; |
p->offset = rm; |
if (p->rmargin < p->maxrmargin && n->parent->tok == MAN_HP) { |
p->rmargin = rmax; |
p->offset = p->rmargin; |
} else |
p->rmargin = p->maxrmargin; |
p->rmargin = rm; |
} |
p->maxrmargin = rmax; |
|
} |
} |
if (NODE_EOS & n->flags) |
if (NODE_EOS & n->flags) |
p->flags |= TERMP_SENTENCE; |
p->flags |= TERMP_SENTENCE; |