summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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. */