#include "buffy.h"
#include "mutt.h"
-#include "version.h"
#ifndef _MAKEDOC
#define DT_MASK 0x0f
#define DT_MAGIC 8 /* mailbox type */
#define DT_SYN 9 /* synonym for another variable */
#define DT_ADDR 10 /* e-mail address */
-#define DT_SYS 11 /* pre-defined via $madmutt_ */
#define DTYPE(x) ((x) & DT_MASK)
#define R_NONE 0
#define R_INDEX (1<<0)
#define R_PAGER (1<<1)
+#define R_BOTH (R_INDEX|R_PAGER)
+
+/* TODO:MC: will go in the the thread module */
#define R_RESORT (1<<2) /* resort the mailbox */
#define R_RESORT_SUB (1<<3) /* resort subthreads */
#define R_RESORT_INIT (1<<4) /* resort from scratch */
#define R_TREE (1<<5) /* redraw the thread tree */
-#define R_BOTH (R_INDEX|R_PAGER)
#define R_RESORT_BOTH (R_RESORT|R_RESORT_SUB)
struct option_t {
** check only happens after the \fIfirst\fP edit of the file). When set
** to \fIno\fP, composition will never be aborted.
*/
- {"alias_file", DT_PATH, R_NONE, UL &AliasFile, "~/.madmuttrc"},
- /*
- ** .pp
- ** The default file in which to save aliases created by the
- ** ``$create-alias'' function.
- ** .pp
- ** \fBNote:\fP Madmutt will not automatically source this file; you must
- ** explicitly use the ``$source'' command for it to be executed.
- */
- {"alias_format", DT_STR, R_NONE, UL &AliasFmt, "%4n %2f %t %-10a %r"},
- /*
- ** .pp
- ** Specifies the format of the data displayed for the ``alias'' menu. The
- ** following \fTprintf(3)\fP-style sequences are available:
- ** .pp
- ** .dl
- ** .dt %a .dd alias name
- ** .dt %f .dd flags - currently, a "d" for an alias marked for deletion
- ** .dt %n .dd index number
- ** .dt %r .dd address which alias expands to
- ** .dt %t .dd character which indicates if the alias is tagged for inclusion
- ** .de
- */
{"allow_8bit", DT_BOOL, R_NONE, OPTALLOW8BIT, "yes" },
/*
** .pp
** unset, you must first use the ``tag-prefix'' function (default: "\fT;\fP") to
** make the next function apply to all tagged messages.
*/
- {"beep", DT_BOOL, R_NONE, OPTBEEP, "yes" },
- /*
- ** .pp
- ** When this variable is \fIset\fP, Madmutt will beep when an error occurs.
- */
- {"beep_new", DT_BOOL, R_NONE, OPTBEEPNEW, "no" },
- /*
- ** .pp
- ** When this variable is \fIset\fP, Madmutt will beep whenever it prints a message
- ** notifying you of new mail. This is independent of the setting of the
- ** ``$$beep'' variable.
- */
{"bounce", DT_QUAD, R_NONE, OPT_BOUNCE, "ask-yes" },
/*
** .pp
** is viewed it is passed as standard input to $$display_filter, and the
** filtered message is read from the standard output.
*/
- {"dotlock_program", DT_PATH, R_NONE, UL &MuttDotlock, "$madmutt_bindir/muttng_dotlock"},
- /*
- ** .pp
- ** Contains the path of the \fTmadmutt_dotlock(1)\fP binary to be used by
- ** Madmutt.
- */
- {"dsn_notify", DT_STR, R_NONE, UL &DsnNotify, ""},
- /*
- ** .pp
- ** \fBNote:\fP you should not enable this unless you are using Sendmail
- ** 8.8.x or greater or in connection with the SMTP support via libESMTP.
- ** .pp
- ** This variable sets the request for when notification is returned. The
- ** string consists of a comma separated list (no spaces!) of one or more
- ** of the following: \fInever\fP, to never request notification,
- ** \fIfailure\fP, to request notification on transmission failure,
- ** \fIdelay\fP, to be notified of message delays, \fIsuccess\fP, to be
- ** notified of successful transmission.
- ** .pp
- ** Example: \fTset dsn_notify="failure,delay"\fP
- */
- {"dsn_return", DT_STR, R_NONE, UL &DsnReturn, ""},
- /*
- ** .pp
- ** \fBNote:\fP you should not enable this unless you are using Sendmail
- ** 8.8.x or greater or in connection with the SMTP support via libESMTP.
- ** .pp
- ** This variable controls how much of your message is returned in DSN
- ** messages. It may be set to either \fIhdrs\fP to return just the
- ** message header, or \fIfull\fP to return the full message.
- ** .pp
- ** Example: \fTset dsn_return=hdrs\fP
- */
{"duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTDUPTHREADS, "yes" },
/*
** .pp
** Note: if $$edit_headers had to be turned on by force because
** $$strict_mailto is \fIunset\fP, this option has no effect.
*/
- {"editor", DT_PATH, R_NONE, UL &Editor, "" },
- /*
- ** .pp
- ** This variable specifies which editor is used by Madmutt.
- ** It defaults to the value of the \fT$$$VISUAL\fP, or \fT$$$EDITOR\fP, environment
- ** variable, or to the string "\fTvi\fP" if neither of those are set.
- */
{"encode_from", DT_BOOL, R_NONE, OPTENCODEFROM, "no" },
/*
** .pp
** .pp
** Defaults to the contents of the environment variable \fT$$$EMAIL\fP.
*/
- {"gecos_mask", DT_RX, R_NONE, UL &GecosMask, "^[^,]*"},
- /*
- ** .pp
- ** A regular expression used by Madmutt to parse the GECOS field of a password
- ** entry when expanding the alias. By default the regular expression is set
- ** to ``\fT^[^,]*\fP'' which will return the string up to the first ``\fT,\fP'' encountered.
- ** If the GECOS field contains a string like "lastname, firstname" then you
- ** should do: \fTset gecos_mask=".*"\fP.
- ** .pp
- ** This can be useful if you see the following behavior: you address a e-mail
- ** to user ID stevef whose full name is Steve Franklin. If Madmutt expands
- ** stevef to ``Franklin'' stevef@foo.bar then you should set the gecos_mask to
- ** a regular expression that will match the whole name so Madmutt will expand
- ** ``Franklin'' to ``Franklin, Steve''.
- */
#ifdef USE_NNTP
{"nntp_group_index_format", DT_STR, R_BOTH, UL &GroupFormat, "%4C %M%N %5s %-45.45f %d"},
/*
** This specifies the folder into which read mail in your ``$$spoolfile''
** folder will be appended.
*/
- {"madmutt_version", DT_SYS, R_NONE, 0, VERSION },
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies madmutt's
- ** version string.\fP
- */
- {"madmutt_revision", DT_SYS, R_NONE, 0, MUTT_REVISION },
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies madmutt's
- ** subversion revision string.\fP
- */
- {"madmutt_sysconfdir", DT_SYS, R_NONE, 0, SYSCONFDIR },
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies the
- ** directory containing the madmutt system-wide configuration.\fP
- */
- {"madmutt_bindir", DT_SYS, R_NONE, 0, BINDIR },
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies the
- ** directory containing the madmutt binary.\fP
- */
- {"madmutt_docdir", DT_SYS, R_NONE, 0, PKGDOCDIR },
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies the
- ** directory containing the madmutt documentation.\fP
- */
-#ifdef USE_HCACHE
-#if defined(HAVE_QDBM)
- {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "qdbm" },
-#elif defined(HAVE_GDBM)
- {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "gdbm" },
-#elif defined(HAVE_DB4)
- {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "db4" },
-#else
- {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "unknown" },
-#endif
- /*
- ** .pp
- ** \fIThis is a read-only system property and specifies the
- ** header chaching's database backend.\fP
- */
-#endif
- {"madmutt_folder_path", DT_SYS, R_NONE, 0, "" },
- /*
- ** .pp
- ** \fIThis is a read-only system property and, at runtime,
- ** specifies the full path or URI of the folder currently
- ** open (if any).\fP
- */
- {"madmutt_folder_name", DT_SYS, R_NONE, 0, "" },
- /*
- ** .pp
- ** \fIThis is a read-only system property and, at runtime,
- ** specifies the actual name of the folder as far as it could
- ** be detected.\fP
- ** .pp
- ** For detection, $$$folder is first taken into account
- ** and simply stripped to form the result when a match is found. For
- ** example, with $$$folder being \fTimap://host\fP and the folder is
- ** \fTimap://host/INBOX/foo\fP, $$$madmutt_folder_name will be just
- ** \fTINBOX/foo\fP.)
- ** .pp
- ** Second, if the initial portion of a name is not $$$folder,
- ** the result will be everything after the last ``/''.
- ** .pp
- ** Third and last, the result will be just the name if neither
- ** $$$folder nor a ``/'' were found in the name.
- */
- {"madmutt_pwd", DT_SYS, R_NONE, 0, "" },
- /*
- ** .pp
- ** \fIThis is a read-only system property and, at runtime,
- ** specifies the current working directory of the madmutt
- ** binary.\fP
- */
{"operating_system", DT_STR, R_NONE, UL &OperatingSystem, "" },
/*
** .pp
** with the query string the user types. See ``$query'' for more
** information.
*/
- {"quit", DT_QUAD, R_NONE, OPT_QUIT, "yes" },
- /*
- ** .pp
- ** This variable controls whether ``quit'' and ``exit'' actually quit
- ** from Madmutt. If it set to \fIyes\fP, they do quit, if it is set to \fIno\fP, they
- ** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
- ** prompted for confirmation when you try to quit.
- */
{"quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, "yes" },
/*
** .pp
** \fTiso-8859-2\fP, \fTkoi8-r\fP or \fTiso-2022-jp\fP) either
** instead of or after \fTiso-8859-1\fP.
*/
- {"sendmail", DT_PATH, R_NONE, UL &Sendmail, SENDMAIL " -oem -oi"},
- /*
- ** .pp
- ** Specifies the program and arguments used to deliver mail sent by Madmutt.
- ** Madmutt expects that the specified program interprets additional
- ** arguments as recipient addresses.
- */
{"sendmail_wait", DT_NUM, R_NONE, UL &SendmailWait, "0" },
/*
** .pp
** process will be put in a temporary file. If there is some error, you
** will be informed as to where to find the output.
*/
- {"shell", DT_PATH, R_NONE, UL &Shell, "" },
- /*
- ** .pp
- ** Command to use when spawning a subshell. By default, the user's login
- ** shell from \fT/etc/passwd\fP is used.
- */
#ifdef USE_NNTP
{"nntp_save_unsubscribed", DT_BOOL, R_NONE, OPTSAVEUNSUB, "no" },
/*
** checking for new mail. A value of zero or less will cause Madmutt
** to never time out.
*/
- {"tmpdir", DT_PATH, R_NONE, UL &Tempdir, "" },
- /*
- ** .pp
- ** This variable allows you to specify where Madmutt will place its
- ** temporary files needed for displaying and composing messages. If
- ** this variable is not set, the environment variable \fT$$$TMPDIR\fP is
- ** used. If \fT$$$TMPDIR\fP is not set then "\fT/tmp\fP" is used.
- */
{"to_chars", DT_STR, R_BOTH, UL &Tochars, " +TCFL"},
/*
** .pp
*/
#endif
/*--*/
- {"strict_mime", DT_BOOL, R_NONE, OPTSTRICTMIME, "no" },
- {"rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, "yes"},
{ NULL, -1, R_NONE, -1, NULL }
};