source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Add configurations (`Cd') to mandoc-db mining.
Date: Wed, 4 May 2011 04:21:17 -0400 (EDT)	[thread overview]
Message-ID: <201105040821.p448LHLE004470@krisdoz.my.domain> (raw)

Log Message:
-----------
Add configurations (`Cd') to mandoc-db mining.
Also put some notes into index.sgml to the effect that mandoc-db exists,
but is not linked to the build.

Modified Files:
--------------
    mdocml:
        index.sgml
        mandoc-db.c

Revision Data
-------------
Index: mandoc-db.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lmandoc-db.c -Lmandoc-db.c -u -p -r1.17 -r1.18
--- mandoc-db.c
+++ mandoc-db.c
@@ -50,7 +50,8 @@ enum	type {
 	MANDOC_INCLUDES,
 	MANDOC_VARIABLE,
 	MANDOC_STANDARD,
-	MANDOC_AUTHOR
+	MANDOC_AUTHOR,
+	MANDOC_CONFIG
 };
 
 #define	MAN_ARGS	  DB *db, \
@@ -79,6 +80,7 @@ static	void		  pmdoc(DB *, const char *,
 				DBT *, DBT *, size_t *, struct mdoc *);
 static	void		  pmdoc_node(MDOC_ARGS);
 static	void		  pmdoc_An(MDOC_ARGS);
+static	void		  pmdoc_Cd(MDOC_ARGS);
 static	void		  pmdoc_Fd(MDOC_ARGS);
 static	void		  pmdoc_In(MDOC_ARGS);
 static	void		  pmdoc_Fn(MDOC_ARGS);
@@ -110,7 +112,7 @@ static	const pmdoc_nf	  mdocs[MDOC_MAX] 
 	NULL, /* Ad */ 
 	pmdoc_An, /* An */ 
 	NULL, /* Ar */
-	NULL, /* Cd */ 
+	pmdoc_Cd, /* Cd */ 
 	NULL, /* Cm */
 	NULL, /* Dv */ 
 	NULL, /* Er */ 
@@ -588,6 +590,23 @@ pmdoc_Fd(MDOC_ARGS)
 	dbt_appendb(key, ksz, "", 1);
 
 	fl = MANDOC_INCLUDES;
+	memcpy(val->data, &fl, 4);
+}
+
+/* ARGSUSED */
+static void
+pmdoc_Cd(MDOC_ARGS)
+{
+	uint32_t	 fl;
+	
+	if (SEC_SYNOPSIS != n->sec)
+		return;
+
+	for (n = n->child; n; n = n->next)
+		if (MDOC_TEXT == n->type)
+			dbt_append(key, ksz, n->string);
+
+	fl = MANDOC_CONFIG;
 	memcpy(val->data, &fl, 4);
 }
 
Index: index.sgml
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/index.sgml,v
retrieving revision 1.113
retrieving revision 1.114
diff -Lindex.sgml -Lindex.sgml -u -p -r1.113 -r1.114
--- index.sgml
+++ index.sgml
@@ -44,7 +44,13 @@
 
 		<P>
 			<SPAN CLASS="nm">mdocml</SPAN> is in plain-old ANSI C and should build and run on any UNIX system.  The most current
-			version is <SPAN CLASS="attn">@VERSION@</SPAN>, dated <SPAN class="attn">@VDATE@</SPAN>.
+			version is <SPAN CLASS="attn">@VERSION@</SPAN>, dated <SPAN class="attn">@VDATE@</SPAN>.  If your system doesn't come
+			with <SPAN CLASS="nm">mdocml</SPAN> (see <Q>Downstream</Q>), run <CODE>make</CODE> to compile and <CODE>make
+			install</CODE> to install into <I>/usr/local</I>.
+		</P>
+		<P>
+			Note that <A HREF="mandoc-db.1.html">mandoc-db</A> is not yet linked to the build.  You must run <CODE>make
+			mandoc-db</CODE> to build it.
 		</P>
 
 		<H2>
@@ -148,6 +154,18 @@
 							<A HREF="mandoc.1.xhtml">xhtml</A> |
 							<A HREF="mandoc.1.pdf">pdf</A> |
 							<A HREF="mandoc.1.ps">postscript</A>)
+						</SMALL>
+					</TD>
+				</TR>
+				<TR>
+					<TD VALIGN="top"><A HREF="mandoc.1.html">mandoc-db(1)</A></TD>
+					<TD VALIGN="top">
+						index UNIX manuals
+						<SMALL>
+							(<A HREF="mandoc-db.1.txt">text</A> | 
+							<A HREF="mandoc-db.1.xhtml">xhtml</A> |
+							<A HREF="mandoc-db.1.pdf">pdf</A> |
+							<A HREF="mandoc-db.1.ps">postscript</A>)
 						</SMALL>
 					</TD>
 				</TR>
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2011-05-04  8:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105040821.p448LHLE004470@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).