version 1.127, 2018/08/17 20:33:37 |
version 1.131, 2018/12/30 00:49:55 |
Line 75 static void post_pf(DECL_ARGS); |
|
Line 75 static void post_pf(DECL_ARGS); |
|
static void post_sect(DECL_ARGS); |
static void post_sect(DECL_ARGS); |
static void post_vt(DECL_ARGS); |
static void post_vt(DECL_ARGS); |
static int pre__t(DECL_ARGS); |
static int pre__t(DECL_ARGS); |
|
static int pre_abort(DECL_ARGS); |
static int pre_an(DECL_ARGS); |
static int pre_an(DECL_ARGS); |
static int pre_ap(DECL_ARGS); |
static int pre_ap(DECL_ARGS); |
static int pre_aq(DECL_ARGS); |
static int pre_aq(DECL_ARGS); |
Line 172 static const struct mdoc_man_act mdoc_man_acts[MDOC_MA |
|
Line 173 static const struct mdoc_man_act mdoc_man_acts[MDOC_MA |
|
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */ |
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */ |
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */ |
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */ |
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */ |
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */ |
{ NULL, pre_Ft, post_font, NULL, NULL }, /* Ot */ |
{ NULL, pre_abort, NULL, NULL, NULL }, /* Ot */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Pa */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Pa */ |
{ NULL, pre_ex, NULL, NULL, NULL }, /* Rv */ |
{ NULL, pre_ex, NULL, NULL, NULL }, /* Rv */ |
{ NULL, NULL, NULL, NULL, NULL }, /* St */ |
{ NULL, NULL, NULL, NULL, NULL }, /* St */ |
Line 245 static const struct mdoc_man_act mdoc_man_acts[MDOC_MA |
|
Line 246 static const struct mdoc_man_act mdoc_man_acts[MDOC_MA |
|
{ NULL, pre_em, post_font, NULL, NULL }, /* Fr */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Fr */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Ud */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Ud */ |
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */ |
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */ |
{ NULL, pre_pp, NULL, NULL, NULL }, /* Lp */ |
{ NULL, pre_abort, NULL, NULL, NULL }, /* Lp */ |
{ NULL, pre_lk, NULL, NULL, NULL }, /* Lk */ |
{ NULL, pre_lk, NULL, NULL, NULL }, /* Lk */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Mt */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Mt */ |
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */ |
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */ |
Line 324 man_strlen(const char *cp) |
|
Line 325 man_strlen(const char *cp) |
|
case ESCAPE_UNICODE: |
case ESCAPE_UNICODE: |
case ESCAPE_NUMBERED: |
case ESCAPE_NUMBERED: |
case ESCAPE_SPECIAL: |
case ESCAPE_SPECIAL: |
|
case ESCAPE_UNDEF: |
case ESCAPE_OVERSTRIKE: |
case ESCAPE_OVERSTRIKE: |
if (skip) |
if (skip) |
skip = 0; |
skip = 0; |
Line 600 print_count(int *count) |
|
Line 602 print_count(int *count) |
|
} |
} |
|
|
void |
void |
man_man(void *arg, const struct roff_man *man) |
man_mdoc(void *arg, const struct roff_meta *mdoc) |
{ |
{ |
|
|
/* |
|
* Dump the keep buffer. |
|
* We're guaranteed by now that this exists (is non-NULL). |
|
* Flush stdout afterward, just in case. |
|
*/ |
|
fputs(mparse_getkeep(man_mparse(man)), stdout); |
|
fflush(stdout); |
|
} |
|
|
|
void |
|
man_mdoc(void *arg, const struct roff_man *mdoc) |
|
{ |
|
struct roff_node *n; |
struct roff_node *n; |
|
|
printf(".\\\" Automatically generated from an mdoc input file." |
printf(".\\\" Automatically generated from an mdoc input file." |
Line 626 man_mdoc(void *arg, const struct roff_man *mdoc) |
|
Line 615 man_mdoc(void *arg, const struct roff_man *mdoc) |
|
} |
} |
|
|
printf(".TH \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", |
printf(".TH \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", |
mdoc->meta.title, |
mdoc->title, (mdoc->msec == NULL ? "" : mdoc->msec), |
(mdoc->meta.msec == NULL ? "" : mdoc->meta.msec), |
mdoc->date, mdoc->os, mdoc->vol); |
mdoc->meta.date, mdoc->meta.os, mdoc->meta.vol); |
|
|
|
/* Disable hyphenation and if nroff, disable justification. */ |
/* Disable hyphenation and if nroff, disable justification. */ |
printf(".nh\n.if n .ad l"); |
printf(".nh\n.if n .ad l"); |
Line 640 man_mdoc(void *arg, const struct roff_man *mdoc) |
|
Line 628 man_mdoc(void *arg, const struct roff_man *mdoc) |
|
*fontqueue.tail = 'R'; |
*fontqueue.tail = 'R'; |
} |
} |
for (; n != NULL; n = n->next) |
for (; n != NULL; n = n->next) |
print_node(&mdoc->meta, n); |
print_node(mdoc, n); |
putchar('\n'); |
putchar('\n'); |
} |
} |
|
|
Line 735 cond_body(DECL_ARGS) |
|
Line 723 cond_body(DECL_ARGS) |
|
{ |
{ |
|
|
return n->type == ROFFT_BODY; |
return n->type == ROFFT_BODY; |
|
} |
|
|
|
static int |
|
pre_abort(DECL_ARGS) |
|
{ |
|
abort(); |
} |
} |
|
|
static int |
static int |