=================================================================== RCS file: /cvs/mandoc/mdoc_man.c,v retrieving revision 1.128 retrieving revision 1.131 diff -u -p -r1.128 -r1.131 --- mandoc/mdoc_man.c 2018/08/23 19:33:27 1.128 +++ mandoc/mdoc_man.c 2018/12/30 00:49:55 1.131 @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.128 2018/08/23 19:33:27 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.131 2018/12/30 00:49:55 schwarze Exp $ */ /* * Copyright (c) 2011-2018 Ingo Schwarze * @@ -75,6 +75,7 @@ static void post_pf(DECL_ARGS); static void post_sect(DECL_ARGS); static void post_vt(DECL_ARGS); static int pre__t(DECL_ARGS); +static int pre_abort(DECL_ARGS); static int pre_an(DECL_ARGS); static int pre_ap(DECL_ARGS); static int pre_aq(DECL_ARGS); @@ -172,7 +173,7 @@ static const struct mdoc_man_act mdoc_man_acts[MDOC_MA { cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */ { NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */ { 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_ex, NULL, NULL, NULL }, /* Rv */ { NULL, NULL, NULL, NULL, NULL }, /* St */ @@ -245,7 +246,7 @@ static const struct mdoc_man_act mdoc_man_acts[MDOC_MA { NULL, pre_em, post_font, NULL, NULL }, /* Fr */ { NULL, NULL, NULL, NULL, NULL }, /* Ud */ { 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_em, post_font, NULL, NULL }, /* Mt */ { cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */ @@ -324,6 +325,7 @@ man_strlen(const char *cp) case ESCAPE_UNICODE: case ESCAPE_NUMBERED: case ESCAPE_SPECIAL: + case ESCAPE_UNDEF: case ESCAPE_OVERSTRIKE: if (skip) skip = 0; @@ -600,7 +602,7 @@ print_count(int *count) } void -man_mdoc(void *arg, const struct roff_man *mdoc) +man_mdoc(void *arg, const struct roff_meta *mdoc) { struct roff_node *n; @@ -613,9 +615,8 @@ man_mdoc(void *arg, const struct roff_man *mdoc) } printf(".TH \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", - mdoc->meta.title, - (mdoc->meta.msec == NULL ? "" : mdoc->meta.msec), - mdoc->meta.date, mdoc->meta.os, mdoc->meta.vol); + mdoc->title, (mdoc->msec == NULL ? "" : mdoc->msec), + mdoc->date, mdoc->os, mdoc->vol); /* Disable hyphenation and if nroff, disable justification. */ printf(".nh\n.if n .ad l"); @@ -627,7 +628,7 @@ man_mdoc(void *arg, const struct roff_man *mdoc) *fontqueue.tail = 'R'; } for (; n != NULL; n = n->next) - print_node(&mdoc->meta, n); + print_node(mdoc, n); putchar('\n'); } @@ -722,6 +723,12 @@ cond_body(DECL_ARGS) { return n->type == ROFFT_BODY; +} + +static int +pre_abort(DECL_ARGS) +{ + abort(); } static int