From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p44KhdUp015897 for ; Wed, 4 May 2011 16:43:39 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p44Khcxg027110; Wed, 4 May 2011 16:43:38 -0400 (EDT) Date: Wed, 4 May 2011 16:43:38 -0400 (EDT) Message-Id: <201105042043.p44Khcxg027110@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Grok manual architecture in mandoc-db.c. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Grok manual architecture in mandoc-db.c. Modified Files: -------------- mdocml: mandoc-db.c mandoc-db.1 Revision Data ------------- Index: mandoc-db.1 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.1,v retrieving revision 1.4 retrieving revision 1.5 diff -Lmandoc-db.1 -Lmandoc-db.1 -u -p -r1.4 -r1.5 --- mandoc-db.1 +++ 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 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 Index: mandoc-db.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.c,v retrieving revision 1.18 retrieving revision 1.19 diff -Lmandoc-db.c -Lmandoc-db.c -u -p -r1.18 -r1.19 --- mandoc-db.c +++ 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. */ -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv