* mdocml: Have mandoc-db grok `Dt'/`TH' manual title as well.
@ 2011-05-03 10:08 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-05-03 10:08 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-03 10:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-03 10:08 mdocml: Have mandoc-db grok `Dt'/`TH' manual title as well kristaps
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).