version 1.142, 2017/05/09 14:10:01 |
version 1.146, 2018/04/11 17:11:13 |
|
|
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc_aux.h" |
#include "mandoc_aux.h" |
|
#include "mandoc.h" |
#include "roff.h" |
#include "roff.h" |
#include "man.h" |
#include "man.h" |
#include "out.h" |
#include "out.h" |
Line 105 static const struct htmlman __mans[MAN_MAX - MAN_TH] = |
|
Line 106 static const struct htmlman __mans[MAN_MAX - MAN_TH] = |
|
{ NULL, NULL }, /* EE */ |
{ NULL, NULL }, /* EE */ |
{ man_UR_pre, NULL }, /* UR */ |
{ man_UR_pre, NULL }, /* UR */ |
{ NULL, NULL }, /* UE */ |
{ NULL, NULL }, /* UE */ |
|
{ man_UR_pre, NULL }, /* MT */ |
|
{ NULL, NULL }, /* ME */ |
}; |
}; |
static const struct htmlman *const mans = __mans - MAN_TH; |
static const struct htmlman *const mans = __mans - MAN_TH; |
|
|
Line 229 print_man_node(MAN_ARGS) |
|
Line 232 print_man_node(MAN_ARGS) |
|
case MAN_P: /* reopen .nf in the body. */ |
case MAN_P: /* reopen .nf in the body. */ |
case MAN_RS: |
case MAN_RS: |
case MAN_UR: |
case MAN_UR: |
|
case MAN_MT: |
fillmode(h, MAN_fi); |
fillmode(h, MAN_fi); |
break; |
break; |
default: |
default: |
Line 258 print_man_node(MAN_ARGS) |
|
Line 262 print_man_node(MAN_ARGS) |
|
break; |
break; |
print_paragraph(h); |
print_paragraph(h); |
return; |
return; |
|
case ROFFT_COMMENT: |
|
return; |
default: |
default: |
break; |
break; |
} |
} |
Line 358 fillmode(struct html *h, int want) |
|
Line 364 fillmode(struct html *h, int want) |
|
static int |
static int |
a2width(const struct roff_node *n, struct roffsu *su) |
a2width(const struct roff_node *n, struct roffsu *su) |
{ |
{ |
|
|
if (n->type != ROFFT_TEXT) |
if (n->type != ROFFT_TEXT) |
return 0; |
return 0; |
if (a2roffsu(n->string, su, SCALE_EN)) |
return a2roffsu(n->string, su, SCALE_EN) != NULL; |
return 1; |
|
|
|
return 0; |
|
} |
} |
|
|
static void |
static void |
Line 647 man_RS_pre(MAN_ARGS) |
|
Line 649 man_RS_pre(MAN_ARGS) |
|
static int |
static int |
man_UR_pre(MAN_ARGS) |
man_UR_pre(MAN_ARGS) |
{ |
{ |
|
char *cp; |
n = n->child; |
n = n->child; |
assert(n->type == ROFFT_HEAD); |
assert(n->type == ROFFT_HEAD); |
if (n->child != NULL) { |
if (n->child != NULL) { |
assert(n->child->type == ROFFT_TEXT); |
assert(n->child->type == ROFFT_TEXT); |
print_otag(h, TAG_A, "cTh", "Lk", n->child->string); |
if (n->tok == MAN_MT) { |
|
mandoc_asprintf(&cp, "mailto:%s", n->child->string); |
|
print_otag(h, TAG_A, "cTh", "Mt", cp); |
|
free(cp); |
|
} else |
|
print_otag(h, TAG_A, "cTh", "Lk", n->child->string); |
} |
} |
|
|
assert(n->next->type == ROFFT_BODY); |
assert(n->next->type == ROFFT_BODY); |