From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Have mandoc-db grok `Dt'/`TH' manual title as well.
Date: Tue, 3 May 2011 06:08:39 -0400 (EDT) [thread overview]
Message-ID: <201105031008.p43A8drA022106@krisdoz.my.domain> (raw)
Log Message:
-----------
Have mandoc-db grok `Dt'/`TH' manual title as well.
Modified Files:
--------------
mdocml:
mandoc-db.c
Revision Data
-------------
Index: mandoc-db.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lmandoc-db.c -Lmandoc-db.c -u -p -r1.15 -r1.16
--- mandoc-db.c
+++ mandoc-db.c
@@ -223,6 +223,7 @@ main(int argc, char *argv[])
struct man *man; /* resulting man */
char *fn; /* current file being parsed */
const char *msec, /* manual section */
+ *mtitle, /* manual title */
*dir; /* result dir (default: cwd) */
char ibuf[MAXPATHLEN], /* index fname */
ibbuf[MAXPATHLEN], /* index backup fname */
@@ -356,8 +357,12 @@ main(int argc, char *argv[])
msec = NULL != mdoc ?
mdoc_meta(mdoc)->msec :
man_meta(man)->msec;
+ mtitle = NULL != mdoc ?
+ mdoc_meta(mdoc)->title :
+ man_meta(man)->title;
assert(msec);
+ assert(mtitle);
/*
* The index record value consists of a nil-terminated
@@ -370,6 +375,7 @@ main(int argc, char *argv[])
dbt_init(&rval, &rsz);
dbt_appendb(&rval, &rsz, fn, strlen(fn) + 1);
dbt_appendb(&rval, &rsz, msec, strlen(msec) + 1);
+ dbt_appendb(&rval, &rsz, mtitle, strlen(mtitle) + 1);
sv = rval.size;
/* Fix the record number in the btree value. */
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2011-05-03 10:08 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=201105031008.p43A8drA022106@krisdoz.my.domain \
--to=kristaps@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).