=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.244 retrieving revision 1.246 diff -u -p -r1.244 -r1.246 --- mandoc/mdoc_html.c 2017/01/10 13:47:00 1.244 +++ mandoc/mdoc_html.c 2017/01/10 23:36:34 1.246 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.244 2017/01/10 13:47:00 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.246 2017/01/10 23:36:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -71,7 +71,6 @@ static void mdoc_bk_post(MDOC_ARGS); static int mdoc_bk_pre(MDOC_ARGS); static int mdoc_bl_pre(MDOC_ARGS); static int mdoc_bt_pre(MDOC_ARGS); -static int mdoc_bx_pre(MDOC_ARGS); static int mdoc_cd_pre(MDOC_ARGS); static int mdoc_d1_pre(MDOC_ARGS); static int mdoc_dv_pre(MDOC_ARGS); @@ -183,7 +182,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {mdoc_quote_pre, mdoc_quote_post}, /* Bo */ {mdoc_quote_pre, mdoc_quote_post}, /* Bq */ {mdoc_xx_pre, NULL}, /* Bsx */ - {mdoc_bx_pre, NULL}, /* Bx */ + {mdoc_xx_pre, NULL}, /* Bx */ {mdoc_skip_pre, NULL}, /* Db */ {NULL, NULL}, /* Dc */ {mdoc_quote_pre, mdoc_quote_post}, /* Do */ @@ -732,71 +731,11 @@ mdoc_ar_pre(MDOC_ARGS) static int mdoc_xx_pre(MDOC_ARGS) { - const char *pp; struct htmlpair tag; - int flags; - switch (n->tok) { - case MDOC_Bsx: - pp = "BSD/OS"; - break; - case MDOC_Dx: - pp = "DragonFly"; - break; - case MDOC_Fx: - pp = "FreeBSD"; - break; - case MDOC_Nx: - pp = "NetBSD"; - break; - case MDOC_Ox: - pp = "OpenBSD"; - break; - case MDOC_Ux: - pp = "UNIX"; - break; - default: - return 1; - } - PAIR_CLASS_INIT(&tag, "unix"); print_otag(h, TAG_SPAN, 1, &tag); - - print_text(h, pp); - if (n->child) { - flags = h->flags; - h->flags |= HTML_KEEP; - print_text(h, n->child->string); - h->flags = flags; - } - return 0; -} - -static int -mdoc_bx_pre(MDOC_ARGS) -{ - struct htmlpair tag; - - PAIR_CLASS_INIT(&tag, "unix"); - print_otag(h, TAG_SPAN, 1, &tag); - - if (NULL != (n = n->child)) { - print_text(h, n->string); - h->flags |= HTML_NOSPACE; - print_text(h, "BSD"); - } else { - print_text(h, "BSD"); - return 0; - } - - if (NULL != (n = n->next)) { - h->flags |= HTML_NOSPACE; - print_text(h, "-"); - h->flags |= HTML_NOSPACE; - print_text(h, n->string); - } - - return 0; + return 1; } static int