From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o54L5fTe032474 for ; Fri, 4 Jun 2010 17:05:41 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o54L5fTe028771; Fri, 4 Jun 2010 17:05:41 -0400 (EDT) Date: Fri, 4 Jun 2010 17:05:41 -0400 (EDT) Message-Id: <201006042105.o54L5fTe028771@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Fixed `Fd' to format in the right way. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fixed `Fd' to format in the right way. Found when confused by what the hell `Fd' is supposed to do anyway (answer: it's a historical macro and we shouldn't be doing anything with it anyway). Modified Files: -------------- mdocml: mdoc_html.c mdoc_term.c Added Files: ----------- mdocml/regress/mdoc/Fd: fd.in Revision Data ------------- Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.72 retrieving revision 1.73 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.72 -r1.73 --- mdoc_html.c +++ mdoc_html.c @@ -84,6 +84,7 @@ static void mdoc_dq_post(MDOC_ARGS); static int mdoc_dq_pre(MDOC_ARGS); static int mdoc_dv_pre(MDOC_ARGS); static int mdoc_fa_pre(MDOC_ARGS); +static void mdoc_fd_post(MDOC_ARGS); static int mdoc_fd_pre(MDOC_ARGS); static int mdoc_fl_pre(MDOC_ARGS); static int mdoc_fn_pre(MDOC_ARGS); @@ -158,7 +159,7 @@ static const struct htmlmdoc mdocs[MDOC_ {mdoc_ev_pre, NULL}, /* Ev */ {mdoc_ex_pre, NULL}, /* Ex */ {mdoc_fa_pre, NULL}, /* Fa */ - {mdoc_fd_pre, NULL}, /* Fd */ + {mdoc_fd_pre, mdoc_fd_post}, /* Fd */ {mdoc_fl_pre, NULL}, /* Fl */ {mdoc_fn_pre, NULL}, /* Fn */ {mdoc_ft_pre, NULL}, /* Ft */ @@ -1510,21 +1511,19 @@ mdoc_fa_pre(MDOC_ARGS) /* ARGSUSED */ +static void +mdoc_fd_post(MDOC_ARGS) +{ + + print_otag(h, TAG_BR, 0, NULL); +} + + +/* ARGSUSED */ static int mdoc_fd_pre(MDOC_ARGS) { struct htmlpair tag; - struct roffsu su; - - if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { - if (n->next && MDOC_Fd != n->next->tok) { - SCALE_VS_INIT(&su, 1); - bufcat_su(h, "margin-bottom", &su); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_DIV, 1, &tag); - } else - print_otag(h, TAG_DIV, 0, NULL); - } PAIR_CLASS_INIT(&tag, "macro"); print_otag(h, TAG_SPAN, 1, &tag); Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.136 retrieving revision 1.137 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.136 -r1.137 --- mdoc_term.c +++ mdoc_term.c @@ -1358,12 +1358,7 @@ static void termp_fd_post(DECL_ARGS) { - if (n->sec != SEC_SYNOPSIS || ! (MDOC_LINE & n->flags)) - return; - term_newln(p); - if (n->next && MDOC_Fd != n->next->tok) - term_vspace(p); } --- /dev/null +++ regress/mdoc/Fd/fd.in @@ -0,0 +1,22 @@ +.Dd $Mdocdate: June 4 2010 $ +.Dt FOO +.Os +.Sh NAME +.Nm foo +.Nd bar +.Sh SYNOPSIS +1 +.Fl +.Fd 2 3 4 +.Fd 3 +4 +.Sh DESCRIPTION +1 +.Fd 2 +.Fd 3 +4 +.Sh BLAH +1 +.Fd 2 +.Fd 3 +4 -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv