summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--index.sgml22
-rw-r--r--mandoc-db.c25
2 files changed, 42 insertions, 5 deletions
diff --git a/index.sgml b/index.sgml
index d98ad756..c8a4d9c7 100644
--- a/index.sgml
+++ b/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>
@@ -152,6 +158,18 @@
</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>
+ <TR>
<TD VALIGN="top"><A HREF="mandoc.3.html">mandoc(3)</A></TD>
<TD VALIGN="top">
mandoc macro compiler library
@@ -361,7 +379,7 @@
<P CLASS="foot">
Copyright &#169; 2008&#8211;2011
<A CLASS="external" HREF="http://kristaps.bsd.lv">Kristaps Dzonsons</A>,
- $Date: 2011/04/30 10:18:24 $
+ $Date: 2011/05/04 08:21:17 $
</P>
</BODY>
</HTML>
diff --git a/mandoc-db.c b/mandoc-db.c
index 0f8e56fd..85d5036e 100644
--- a/mandoc-db.c
+++ b/mandoc-db.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc-db.c,v 1.17 2011/05/03 14:39:27 kristaps Exp $ */
+/* $Id: mandoc-db.c,v 1.18 2011/05/04 08:21:17 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 *, size_t *,
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 */
@@ -593,6 +595,23 @@ pmdoc_Fd(MDOC_ARGS)
/* 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);
+}
+
+/* ARGSUSED */
+static void
pmdoc_In(MDOC_ARGS)
{
uint32_t fl;