makedoc-defs.h from init.h for use in functions.h.
rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttrc.head Muttrc \
- makedoc.c stamp-doc-rc README.SSL smime.h\
+ makedoc.c makedoc-defs.h stamp-doc-rc README.SSL smime.h \
muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
ChangeLog ChangeLog.old mkchangelog.sh cvslog2changelog.pl mutt_idna.h \
snprintf.c regex.c crypt-gpgme.h
Muttrc: stamp-doc-rc
-stamp-doc-rc: $(srcdir)/init.h makedoc Muttrc.head
+stamp-doc-rc: $(srcdir)/init.h $(srcdir)/makedoc-defs.h makedoc Muttrc.head
-rm -f Muttrc stamp-doc-rc
sed -e 's,[@]docdir[@],$(docdir),' $(srcdir)/Muttrc.head > Muttrc
$(CPP) $(AM_CPPFLAGS) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
mutt.1: $(srcdir)/mutt.man
$(EDIT) $(srcdir)/mutt.man > $@
-stamp-doc-xml: $(top_srcdir)/makedoc.c $(top_srcdir)/init.h manual.xml.head \
- $(top_srcdir)/functions.h $(top_srcdir)/OPS* manual.xml.tail \
- $(top_srcdir)/VERSION $(top_srcdir)/ChangeLog
+stamp-doc-xml: $(top_srcdir)/makedoc.c $(top_srcdir)/makedoc-defs.h $(top_srcdir)/init.h \
+ manual.xml.head $(top_srcdir)/functions.h $(top_srcdir)/OPS* manual.xml.tail \
+ $(srcdir)/gen-map-doc $(top_srcdir)/VERSION $(top_srcdir)/ChangeLog
$(MAKE) ../makedoc$(EXEEXT) # we do not want to rebuild the documentation in tarball builds
- ( date=`head -n 1 $(top_srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1`; \
- sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` ($$date)/" $(srcdir)/manual.xml.head ;\
- $(MAKEDOC_CPP) $(top_srcdir)/init.h | ../makedoc -s ;\
- perl $(srcdir)/gen-map-doc $(top_srcdir)/functions.h $(top_srcdir)/OPS* < $(srcdir)/manual.xml.tail \
+ ( date=`head -n 1 $(top_srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1` && \
+ sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` ($$date)/" $(srcdir)/manual.xml.head && \
+ $(MAKEDOC_CPP) $(top_srcdir)/init.h | ../makedoc -s && \
+ $(MAKEDOC_CPP) $(top_srcdir)/functions.h | \
+ perl $(srcdir)/gen-map-doc $(srcdir)/manual.xml.tail $(top_srcdir)/OPS* \
) > manual.xml
touch stamp-doc-xml
use strict;
-my (%OPS, %MAP, $map);
+my (%OPS, %MAP, %DOC, $map);
-my $functions_h = shift @ARGV;
+my $xml = shift @ARGV;
open F, "cat @ARGV |" or die "OPS*: $!";
while (<F>) {
}
close F;
-open F, $functions_h or die "$functions_h: $!";
-while (<F>) {
+while (<STDIN>) {
if (/^struct binding_t Op.*{ \/\* map: (.*) \*\//) {
$map = $1;
+ $DOC{$map} = "";
+ }
+ if ($map and /^\s*\*\*\s*(.*)/) {
+ $DOC{$map} .= "$1\n";
}
if ($map and /{\s*"(.+)"\s*,\s*(\w+)\s*,\s*(?:"([^"]+)"|(\w+))\s*}/) {
my ($function, $op, $binding) = ($1, $2, $3 || $4);
undef $map;
}
}
-close F;
-while (<STDIN>) {
+open XML, $xml or die "$xml: $!";
+while (<XML>) {
if (/__print_map\((.*)\)/) {
- die "map $1 undefined" unless $MAP{$1};
- print $MAP{$1};
+ my $map = $1;
+ unless ($MAP{$map}) {
+ warn "map $map undefined";
+ next;
+ }
+ print <<EOT;
+<sect2 id="${map}_map">
+<title>$map</title>
+$DOC{$map}
+<para>
+
+<table id="${map}_table">
+<title>Default $map function bindings</title>
+<tgroup cols="3">
+<thead>
+<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
+</thead>
+<tbody>
+$MAP{$map}
+</tbody>
+</tgroup>
+</table>
+
+</para>
+
+</sect2>
+
+EOT
delete $MAP{$1};
} else {
print;
}
}
+close XML;
-die "unprinted maps: ". join(" ", keys %MAP) if %MAP;
+warn "unprinted maps: ". join(" ", keys %MAP) if %MAP;
command.
</para>
-<sect2 id="generic_map">
-<title>generic</title>
-
-<para>
-The <emphasis>generic</emphasis> menu is not a real menu, but specifies common functions
-(such as movement) available in all menus except for <emphasis>pager</emphasis> and
-<emphasis>editor</emphasis>. Changing settings for this menu will affect the default
-bindings for all menus (except as noted).
-</para>
-
-<para>
-
-<table id="generic_table">
-<title>Default generic function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(generic)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="index_map">
-<title>index</title>
-
-<para>
-
-<table id="index_table">
-<title>Default index menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(index)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="pager_map">
-<title>pager</title>
-
-<para>
-
-<table id="pager_table">
-<title>Default pager menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(pager)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="alias_map">
-<title>alias</title>
-
-<para>
-
-<table id="alias_table">
-<title>Default alias menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(alias)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="query_map">
-<title>query</title>
-
-<para>
-
-<table id="query_table">
-<title>Default query menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(query)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="attach_map">
-<title>attach</title>
-
-<para>
-
-<table id="attach_table">
-<title>Default attach menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(attach)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="compose_map">
-<title>compose</title>
-
-<para>
-
-<table id="compose_table">
-<title>Default compose menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(compose)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="postpone_map">
-<title>postpone</title>
-
-<para>
-
-<table id="postpone_table">
-<title>Default postpone menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(postpone)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="browser_map">
-<title>browser</title>
-
-<para>
-
-<table id="browser_table">
-<title>Default browser menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(browser)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="pgp_map">
-<title>pgp</title>
-
-<para>
-
-<table id="pgp_table">
-<title>Default pgp menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(pgp)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="smime_map">
-<title>smime</title>
-
-<para>
-
-<table id="smime_table">
-<title>Default smime menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(smime)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="mix_map">
-<title>mix</title>
-
-<para>
-
-<table id="mix_table">
-<title>Default mix menu function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(mix)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
-
-<sect2 id="editor_map">
-<title>editor</title>
-
-<para>
-
-<table id="editor_table">
-<title>Default editor function bindings</title>
-<tgroup cols="3">
-<thead>
-<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
-</thead>
-<tbody>
__print_map(editor)
-</tbody>
-</tgroup>
-</table>
-
-</para>
-
-</sect2>
</sect1>
* - If you need to bind a control char, use the octal value because the \cX
* construct does not work at this level.
*
+ * - The magic "map:" comments define how the map will be called in the
+ * manual. Lines starting with "**" will be included in the manual.
+ *
*/
+#ifdef _MAKEDOC
+# include "config.h"
+# include "makedoc-defs.h"
+#endif
+
struct binding_t OpGeneric[] = { /* map: generic */
+ /*
+ ** <para>
+ ** The <emphasis>generic</emphasis> menu is not a real menu, but specifies common functions
+ ** (such as movement) available in all menus except for <emphasis>pager</emphasis> and
+ ** <emphasis>editor</emphasis>. Changing settings for this menu will affect the default
+ ** bindings for all menus (except as noted).
+ ** </para>
+ */
{ "top-page", OP_TOP_PAGE, "H" },
{ "next-entry", OP_NEXT_ENTRY, "j" },
{ "previous-entry", OP_PREV_ENTRY, "k" },
#ifdef _MAKEDOC
# include "config.h"
+# include "makedoc-defs.h"
#else
# include "sort.h"
#endif
#define ISPELL "ispell"
#endif
-/* build complete documentation */
-
-#ifdef _MAKEDOC
-# ifndef USE_IMAP
-# define USE_IMAP
-# endif
-# ifndef MIXMASTER
-# define MIXMASTER "mixmaster"
-# endif
-# ifndef USE_POP
-# define USE_POP
-# endif
-# ifndef USE_SMTP
-# define USE_SMTP
-# endif
-# ifndef USE_SSL_OPENSSL
-# define USE_SSL_OPENSSL
-# endif
-# ifndef USE_SSL_GNUTLS
-# define USE_SSL_GNUTLS
-# endif
-# ifndef USE_SSL
-# define USE_SSL
-# endif
-# ifndef USE_SOCKET
-# define USE_SOCKET
-# endif
-# ifndef USE_DOTLOCK
-# define USE_DOTLOCK
-# endif
-# ifndef DL_STANDALONE
-# define DL_STANDALONE
-# endif
-# ifndef USE_HCACHE
-# define USE_HCACHE
-# endif
-# ifndef HAVE_DB4
-# define HAVE_DB4
-# endif
-# ifndef HAVE_GDBM
-# define HAVE_GDBM
-# endif
-# ifndef HAVE_QDBM
-# define HAVE_QDBM
-# endif
-# ifndef HAVE_LIBIDN
-# define HAVE_LIBIDN
-# endif
-# ifndef HAVE_GETADDRINFO
-# define HAVE_GETADDRINFO
-# endif
-#endif
-
struct option_t MuttVars[] = {
/*++*/
{ "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES },
** .pp
** Example: set certificate_file=~/.mutt/certificates
*/
-# if defined _MAKEDOC || !defined(USE_SSL_GNUTLS)
+# ifdef USE_SSL_OPENSSL
{ "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
/*
** .pp
** This variables specifies whether to attempt to use SSLv2 in the
** SSL authentication process.
*/
-# endif /* defined _MAKEDOC || !defined(USE_SSL_GNUTLS) */
+# endif /* defined USE_SSL_OPENSSL */
{ "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 1 },
/*
** .pp
--- /dev/null
+/* build complete documentation */
+
+# ifndef CRYPT_BACKEND_GPGME
+# define CRYPT_BACKEND_GPGME
+# endif
+# ifndef USE_IMAP
+# define USE_IMAP
+# endif
+# ifndef MIXMASTER
+# define MIXMASTER "mixmaster"
+# endif
+# ifndef USE_POP
+# define USE_POP
+# endif
+# ifndef USE_SMTP
+# define USE_SMTP
+# endif
+# ifndef USE_SSL_OPENSSL
+# define USE_SSL_OPENSSL
+# endif
+# ifndef USE_SSL_GNUTLS
+# define USE_SSL_GNUTLS
+# endif
+# ifndef USE_SSL
+# define USE_SSL
+# endif
+# ifndef USE_SOCKET
+# define USE_SOCKET
+# endif
+# ifndef USE_DOTLOCK
+# define USE_DOTLOCK
+# endif
+# ifndef DL_STANDALONE
+# define DL_STANDALONE
+# endif
+# ifndef USE_HCACHE
+# define USE_HCACHE
+# endif
+# ifndef HAVE_DB4
+# define HAVE_DB4
+# endif
+# ifndef HAVE_GDBM
+# define HAVE_GDBM
+# endif
+# ifndef HAVE_QDBM
+# define HAVE_QDBM
+# endif
+# ifndef HAVE_LIBIDN
+# define HAVE_LIBIDN
+# endif
+# ifndef HAVE_GETADDRINFO
+# define HAVE_GETADDRINFO
+# endif
+