From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 5b1230b4; for ; Fri, 25 Sep 2015 19:33:05 -0500 (EST) Date: Fri, 25 Sep 2015 19:33:05 -0500 (EST) Message-Id: <6832763050389185879.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: resolve code duplication and do style cleanup in mdoc_nm_pre(), X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- resolve code duplication and do style cleanup in mdoc_nm_pre(), no functional change Modified Files: -------------- mdocml: mdoc_html.c Revision Data ------------- Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v retrieving revision 1.234 retrieving revision 1.235 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.234 -r1.235 --- mdoc_html.c +++ mdoc_html.c @@ -641,17 +641,13 @@ mdoc_nm_pre(MDOC_ARGS) int len; switch (n->type) { - case ROFFT_ELEM: - PAIR_CLASS_INIT(&tag, "name"); - print_otag(h, TAG_B, 1, &tag); - if (NULL == n->child && meta->name) - print_text(h, meta->name); - return(1); case ROFFT_HEAD: print_otag(h, TAG_TD, 0, NULL); + /* FALLTHROUGH */ + case ROFFT_ELEM: PAIR_CLASS_INIT(&tag, "name"); print_otag(h, TAG_B, 1, &tag); - if (NULL == n->child && meta->name) + if (n->child == NULL && meta->name != NULL) print_text(h, meta->name); return(1); case ROFFT_BODY: @@ -669,7 +665,7 @@ mdoc_nm_pre(MDOC_ARGS) if (n->type == ROFFT_TEXT) len += html_strlen(n->string); - if (0 == len && meta->name) + if (len == 0 && meta->name != NULL) len = html_strlen(meta->name); SCALE_HS_INIT(&su, len); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv