source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: docbook2mdoc: some nodes never continue an existing macro line
Date: Sun, 7 Apr 2019 10:07:27 -0500 (EST)	[thread overview]
Message-ID: <e3fd707206eff10d@fantadrom.bsd.lv> (raw)

Log Message:
-----------
some nodes never continue an existing macro line

Modified Files:
--------------
    docbook2mdoc:
        docbook2mdoc.c
        macro.c

Revision Data
-------------
Index: macro.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/macro.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lmacro.c -Lmacro.c -u -p -r1.6 -r1.7
--- macro.c
+++ macro.c
@@ -59,6 +59,7 @@ macro_close(struct format *f)
 void
 macro_line(struct format *f, const char *name)
 {
+	macro_close(f);
 	macro_open(f, name);
 	macro_close(f);
 }
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.94 -r1.95
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -196,9 +196,11 @@ pnode_printrefsect(struct format *p, str
 
 	switch (level) {
 	case 1:
+		macro_close(p);
 		macro_open(p, "Sh");
 		break;
 	case 2:
+		macro_close(p);
 		macro_open(p, "Ss");
 		break;
 	default:
@@ -254,6 +256,7 @@ pnode_printrefmeta(struct format *p, str
 		else if (pp->node == NODE_REFENTRYTITLE)
 			title = pp;
 	}
+	macro_close(p);
 	macro_open(p, "Dt");
 	if (title == NULL)
 		macro_addarg(p, "UNKNOWN", ARG_SPACE);
@@ -554,6 +557,7 @@ pnode_printvarlistentry(struct format *p
 	struct pnode	*pp;
 	int		 first = 1;
 
+	macro_close(p);
 	macro_open(p, "It");
 	TAILQ_FOREACH(pp, &pn->childq, child) {
 		if (pp->node != NODE_TERM)
@@ -622,6 +626,7 @@ pnode_printtgroup2(struct format *f, str
 	while ((nr = pnode_findfirst(n, NODE_ROW)) != NULL) {
 		if ((ne = pnode_findfirst(n, NODE_ENTRY)) == NULL)
 			break;
+		macro_close(f);
 		macro_open(f, "It");
 		pnode_print(f, ne);
 		macro_close(f);
@@ -798,6 +803,7 @@ pnode_print(struct format *p, struct pno
 		macro_open(p, "Ql");
 		break;
 	case NODE_LITERALLAYOUT:
+		macro_close(p);
 		macro_argline(p, "Bd", pnode_getattr(pn, ATTRKEY_CLASS) ==
 		    ATTRVAL_MONOSPACED ? "-literal" : "-unfilled");
 		break;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2019-04-07 15:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3fd707206eff10d@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).