From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: merge rev.
Date: Fri, 27 Jan 2017 09:19:12 -0500 (EST) [thread overview]
Message-ID: <4339728856335601180.enqueue@fantadrom.bsd.lv> (raw)
Log Message:
-----------
merge rev. 1.240: default to preformatted, not to man(7)
Tags:
----
VERSION_1_13
Modified Files:
--------------
mdocml:
mandocdb.c
Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandocdb.c,v
retrieving revision 1.220.2.8
retrieving revision 1.220.2.9
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.220.2.8 -r1.220.2.9
--- mandocdb.c
+++ mandocdb.c
@@ -1192,6 +1192,7 @@ mpages_merge(struct mparse *mp)
if (mlink->dform != FORM_CAT || mlink->fform != FORM_CAT) {
mparse_readfd(mp, fd, mlink->file);
close(fd);
+ fd = -1;
mparse_result(mp, &man, &sodest);
}
@@ -1248,16 +1249,28 @@ mpages_merge(struct mparse *mp)
mpage->title = mandoc_strdup(man->meta.title);
} else if (man != NULL && man->macroset == MACROSET_MAN) {
man_validate(man);
- mpage->form = FORM_SRC;
- mpage->sec = mandoc_strdup(man->meta.msec);
- mpage->arch = mandoc_strdup(mlink->arch);
- mpage->title = mandoc_strdup(man->meta.title);
- } else {
+ if (*man->meta.msec != '\0' ||
+ *man->meta.msec != '\0') {
+ mpage->form = FORM_SRC;
+ mpage->sec = mandoc_strdup(man->meta.msec);
+ mpage->arch = mandoc_strdup(mlink->arch);
+ mpage->title = mandoc_strdup(man->meta.title);
+ } else
+ man = NULL;
+ }
+
+ assert(mpage->desc == NULL);
+ if (man == NULL) {
mpage->form = FORM_CAT;
mpage->sec = mandoc_strdup(mlink->dsec);
mpage->arch = mandoc_strdup(mlink->arch);
mpage->title = mandoc_strdup(mlink->name);
- }
+ parse_cat(mpage, fd);
+ } else if (man->macroset == MACROSET_MDOC)
+ parse_mdoc(mpage, &man->meta, man->first);
+ else
+ parse_man(mpage, &man->meta, man->first);
+
putkey(mpage, mpage->sec, TYPE_sec);
if (*mpage->arch != '\0')
putkey(mpage, mpage->arch, TYPE_arch);
@@ -1272,13 +1285,6 @@ mpages_merge(struct mparse *mp)
putkey(mpage, mlink->name, NAME_FILE);
}
- assert(mpage->desc == NULL);
- if (man != NULL && man->macroset == MACROSET_MDOC)
- parse_mdoc(mpage, &man->meta, man->first);
- else if (man != NULL)
- parse_man(mpage, &man->meta, man->first);
- else
- parse_cat(mpage, fd);
if (mpage->desc == NULL)
mpage->desc = mandoc_strdup(mpage->mlinks->name);
@@ -1288,7 +1294,6 @@ mpages_merge(struct mparse *mp)
mlink_check(mpage, mlink);
dbadd(mpage);
- mlink = mpage->mlinks;
nextpage:
ohash_delete(&strings);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
next reply other threads:[~2017-01-27 14:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 14:19 schwarze [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-05 22:25 schwarze
2017-01-28 23:35 schwarze
2017-01-27 14:23 schwarze
2017-01-27 13:59 schwarze
2017-01-12 15:48 schwarze
2017-01-11 17:47 schwarze
2017-01-10 23:40 schwarze
2017-01-10 22:04 schwarze
2017-01-09 17:57 schwarze
2017-01-09 2:28 schwarze
2017-01-09 2:26 schwarze
2017-01-09 2:22 schwarze
2016-11-10 12:52 schwarze
2016-10-20 17:52 schwarze
2016-10-20 17:40 schwarze
2016-10-20 17:36 schwarze
2013-09-18 2:24 mdocml: Merge rev schwarze
2013-09-18 1:55 schwarze
2013-09-17 20:42 schwarze
2013-09-17 20:39 schwarze
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=4339728856335601180.enqueue@fantadrom.bsd.lv \
--to=schwarze@mdocml.bsd.lv \
--cc=source@mdocml.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).