Changes specific to mutt-ng:
+2005-03-10:
+ * included CD's ifdef patch
+
2005-03-05:
* added color sidebar
rr.compressed
patch-1.5.4.fw.maildir_inode_sort
patch-1.4.admcd.gnutls.59d
-patch-1.5.5.1.cd.edit_threads.9.5
patch-1.5.6i.sidebar.20041122
patch-1.5.4.aw.listreply.1
-patch-1.5.4.cd.source_multiple.2
vvv.initials
patch-1.5.5.1.cd.purge_message.3.4
patch-1.5.5.1.cd.trash_folder.3.4
+patch-1.5.5.1.cd.edit_threads.9.5
+patch-1.5.4.cd.ifdef.1
+patch-1.5.4.cd.source_multiple.2
vvv.quote
vvv.nntp
this still likely is incomplete. Please report missing items to
<mutt-ng-devel@lists.berlios.de>
+2005-03-10
+
+ New Configuration Command (from CD's ifdef Patch):
+ - ifdef
+
2005-03-07
New Variables:
considered to be an executable program from which to read input (eg.
<tt>source ~/bin/myscript|</tt>).
+<sect1>Configuring features conditionnaly<label id="ifdef">
+<p>
+Usage: <tt/ifdef/ <em/item/ <em/command/
+
+This command allows to test if a feature has been compiled in, before
+actually executing the command. Item can be either the name of a
+function or a variable.
+
+Example:
+<tscreen><verb>
+ifdef imap_keepalive 'source ~/.mutt/imap_setup'
+</verb></tscreen>
+
<sect1>Removing hooks<label id="unhook">
<p>
Usage: <tt/unhook/ [ * | <em/hook-type/ ]
return (rv);
}
+static int parse_ifdef (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
+{
+ int i, j, res = 0;
+ BUFFER token;
+
+ memset (&token, 0, sizeof (token));
+ mutt_extract_token (tmp, s, 0);
+
+ /* is the item defined as a variable or a function? */
+ if (!(res = (mutt_option_index (tmp->data) != -1)))
+ for (i = 0; !res && i < MENU_MAX; i++)
+ {
+ struct binding_t *b = km_get_table (Menus[i].value);
+
+ if (!b)
+ continue;
+
+ for (j = 0; b[j].name; j++)
+ if (!ascii_strncasecmp (tmp->data, b[j].name, mutt_strlen (tmp->data))
+ && (mutt_strlen (b[j].name) == mutt_strlen (tmp->data)))
+ {
+ res = 1;
+ break;
+ }
+ }
+
+ if (!MoreArgs (s))
+ {
+ snprintf (err->data, err->dsize, _("ifdef: too few arguments"));
+ return (-1);
+ }
+ mutt_extract_token (tmp, s, M_TOKEN_SPACE);
+
+ if (res)
+ {
+ if (mutt_parse_rc_line (tmp->data, &token, err) == -1)
+ {
+ mutt_error ("Erreur: %s", err->data);
+ FREE (&token.data);
+ return (-1);
+ }
+ FREE (&token.data);
+ }
+ return 0;
+}
+
static int parse_unignore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
do
static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unalias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_ifdef (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_ignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_source (BUFFER *, BUFFER *, unsigned long, BUFFER *);
#endif
{ "hdr_order", parse_list, UL &HeaderOrderList },
#ifdef HAVE_ICONV
+ { "ifdef", parse_ifdef, 0 },
{ "iconv-hook", mutt_parse_hook, M_ICONVHOOK },
#endif
{ "ignore", parse_ignore, 0 },