source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: docbook2mdoc: ignore <quote> around <filename>
Date: Sun, 14 Apr 2019 18:07:35 -0500 (EST)	[thread overview]
Message-ID: <e3fdd6af20c8eea3@fantadrom.bsd.lv> (raw)

Log Message:
-----------
ignore <quote> around <filename>

Modified Files:
--------------
    docbook2mdoc:
        docbook2mdoc.c
        statistics.c

Revision Data
-------------
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.126 -r1.127
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -1198,7 +1198,12 @@ pnode_print(struct format *f, struct pno
 		pnode_unlinksub(n);
 		break;
 	case NODE_QUOTE:
-		if (was_impl)
+		if ((nc = TAILQ_FIRST(&n->childq)) != NULL &&
+		    nc->node == NODE_FILENAME &&
+		    TAILQ_NEXT(nc, child) == NULL) {
+			if (n->spc)
+				nc->spc = 1;
+		} else if (was_impl)
 			macro_open(f, "Do");
 		else {
 			macro_open(f, "Dq");
@@ -1347,7 +1352,11 @@ pnode_print(struct format *f, struct pno
 		fputs(" } ", stdout);
 		break;
 	case NODE_QUOTE:
-		if (was_impl) {
+		if ((nc = TAILQ_FIRST(&n->childq)) != NULL &&
+		    nc->node == NODE_FILENAME &&
+		    TAILQ_NEXT(nc, child) == NULL)
+			/* nothing */;
+		else if (was_impl) {
 			f->flags &= ~FMT_NOSPC;
 			macro_open(f, "Dc");
 		} else
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -Lstatistics.c -Lstatistics.c -u -p -r1.32 -r1.33
--- statistics.c
+++ statistics.c
@@ -360,10 +360,16 @@ main(int argc, char *argv[])
 
 	/* Exclude relations that are already fully implemented. */
 	if (show_all == 0) {
+		table_add("ROOT", "appendix");
 		table_add("ROOT", "article");
 		table_add("ROOT", "book");
 		table_add("ROOT", "chapter");
+		table_add("ROOT", "glossary");
+		table_add("ROOT", "part");
+		table_add("ROOT", "preface");
 		table_add("ROOT", "refentry");
+		table_add("ROOT", "sect1");
+		table_add("ROOT", "sect2");
 		table_add("acronym", "TEXT");
 		table_add("affiliation", "orgdiv");
 		table_add("affiliation", "orgname");
@@ -407,6 +413,7 @@ main(int argc, char *argv[])
 		table_add("cmdsynopsis", "arg");
 		table_add("cmdsynopsis", "command");
 		table_add("cmdsynopsis", "group");
+		table_add("cmdsynopsis", "sbr");
 		table_add("code", "TEXT");
 		table_add("command", "TEXT");
 		table_add("computeroutput", "TEXT");
@@ -425,6 +432,7 @@ main(int argc, char *argv[])
 		table_add("entry", NULL);
 		table_add("errorname", "TEXT");
 		table_add("figure", "mediaobject");
+		table_add("figure", "title");
 		table_add("filename", "TEXT");
 		table_add("firstname", "TEXT");
 		table_add("firstterm", "TEXT");
@@ -446,6 +454,7 @@ main(int argc, char *argv[])
 		table_add("glossentry", "glossterm");
 		table_add("glossentry", "indexterm");
 		table_add("glosslist", "glossentry");
+		table_add("glossterm", "emphasis");
 		table_add("glossterm", "TEXT");
 		table_add("group", "arg");
 		table_add("holder", "TEXT");
@@ -500,6 +509,7 @@ main(int argc, char *argv[])
 		table_add("property", "TEXT");
 		table_add("pubdate", "TEXT");
 		table_add("quote", "command");
+		table_add("quote", "filename");
 		table_add("quote", "literal");
 		table_add("quote", "TEXT");
 		table_add("refentry", "refentryinfo");
@@ -508,6 +518,7 @@ main(int argc, char *argv[])
 		table_add("refentry", "refsect1");
 		table_add("refentry", "refsynopsisdiv");
 		table_add("refentryinfo", "author");
+		table_add("refentryinfo", "authorgroup");
 		table_add("refentryinfo", "copyright");
 		table_add("refentryinfo", "date");
 		table_add("refentrytitle", "TEXT");
@@ -546,6 +557,9 @@ main(int argc, char *argv[])
 		table_add("superscript", "TEXT");
 		table_add("surname", "TEXT");
 		table_add("symbol", "TEXT");
+		table_add("synopsis", "function");
+		table_add("synopsis", "parameter");
+		table_add("synopsis", "type");
 		table_add("synopsis", "TEXT");
 		table_add("systemitem", "TEXT");
 		table_add("table", "tgroup");
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2019-04-14 23: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=e3fdd6af20c8eea3@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).