summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-04 20:43:38 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-04 20:43:38 +0000
commit33e222d2893cd2543464bbb9c8ed5c7d6a0c57ce (patch)
tree2b3fb0a3509b64c696f1d599b03862ec048630f5
parentc74a9fa3c4aa1003c08cf8571d41c861ec60a6a7 (diff)
downloadmandoc-33e222d2893cd2543464bbb9c8ed5c7d6a0c57ce.tar.gz
Grok manual architecture in mandoc-db.c.
-rw-r--r--mandoc-db.15
-rw-r--r--mandoc-db.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/mandoc-db.1 b/mandoc-db.1
index d20d05ad..d68f65a1 100644
--- a/mandoc-db.1
+++ b/mandoc-db.1
@@ -69,6 +69,9 @@ a nil-terminated manual section,
.It
a nil-terminated manual title,
.It
+a nil-terminated architecture
+.Pq this is not often available
+.It
and a nil-terminated description.
.El
.Pp
@@ -102,6 +105,8 @@ A variable name as given in the SYNOPSIS section.
A standard as given in the STANDARDS section.
.It Li 0x07
An author as given in the AUTHORS section.
+.It Li 0x08
+A configuration as given in the SYNOPSIS section.
.El
.Pp
If a value is encountered outside of this range, the database is
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. */