diff options
-rw-r--r-- | mandoc-db.1 | 9 | ||||
-rw-r--r-- | mandoc-db.c | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/mandoc-db.1 b/mandoc-db.1 index 3ab17bc5..33fe6e21 100644 --- a/mandoc-db.1 +++ b/mandoc-db.1 @@ -1,4 +1,4 @@ -.\" $Id: mandoc-db.1,v 1.4 2011/05/03 14:39:27 kristaps Exp $ +.\" $Id: mandoc-db.1,v 1.5 2011/05/04 20:43:38 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 3 2011 $ +.Dd $Mdocdate: May 4 2011 $ .Dt MANDOC-DB 1 .Os .Sh NAME @@ -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 85d5036e..74796459 100644 --- a/mandoc-db.c +++ b/mandoc-db.c @@ -1,4 +1,4 @@ -/* $Id: mandoc-db.c,v 1.18 2011/05/04 08:21:17 kristaps Exp $ */ +/* $Id: mandoc-db.c,v 1.19 2011/05/04 20:43:38 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -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. */ |