From 33e222d2893cd2543464bbb9c8ed5c7d6a0c57ce Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 4 May 2011 20:43:38 +0000 Subject: Grok manual architecture in mandoc-db.c. --- mandoc-db.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mandoc-db.c') diff --git a/mandoc-db.c b/mandoc-db.c index ea055c5e..d8f2ce29 100644 --- a/mandoc-db.c +++ b/mandoc-db.c @@ -228,6 +228,7 @@ main(int argc, char *argv[]) char *fn; /* current file being parsed */ const char *msec, /* manual section */ *mtitle, /* manual title */ + *arch, /* manual architecture */ *dir; /* result dir (default: cwd) */ char ibuf[MAXPATHLEN], /* index fname */ ibbuf[MAXPATHLEN], /* index backup fname */ @@ -364,6 +365,7 @@ main(int argc, char *argv[]) mtitle = NULL != mdoc ? mdoc_meta(mdoc)->title : man_meta(man)->title; + arch = NULL != mdoc ? mdoc_meta(mdoc)->arch : NULL; assert(msec); assert(mtitle); @@ -380,6 +382,9 @@ main(int argc, char *argv[]) dbt_appendb(&rval, &rsz, fn, strlen(fn) + 1); dbt_appendb(&rval, &rsz, msec, strlen(msec) + 1); dbt_appendb(&rval, &rsz, mtitle, strlen(mtitle) + 1); + dbt_appendb(&rval, &rsz, arch ? arch : "", + arch ? strlen(arch) + 1 : 1); + sv = rval.size; /* Fix the record number in the btree value. */ -- cgit