* mdocml: resolve code duplication and do style cleanup in mdoc_nm_pre(),
@ 2015-09-26 0:33 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-09-26 0:33 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-26 0:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-26 0:33 mdocml: resolve code duplication and do style cleanup in mdoc_nm_pre(), schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).