source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Grok manual architecture in mandoc-db.c.
@ 2011-05-04 20:43 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-05-04 20:43 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-04 20:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 20:43 mdocml: Grok manual architecture in mandoc-db.c kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).