[mutt] 03/11: Replace ifdef.patch with neomutt's

Faidon Liambotis paravoid at moszumanska.debian.org
Fri May 13 15:33:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

paravoid pushed a commit to branch wip-neomutt
in repository mutt.

commit aedbfbb2548d2f4761972654084dae27e616b432
Author: Faidon Liambotis <paravoid at debian.org>
Date:   Thu May 5 20:33:27 2016 +0300

    Replace ifdef.patch with neomutt's
---
 debian/patches/features/compressed-folders.patch |  32 ++---
 debian/patches/features/ifdef.patch              | 158 -----------------------
 debian/patches/series                            |   2 +-
 3 files changed, 15 insertions(+), 177 deletions(-)

diff --git a/debian/patches/features/compressed-folders.patch b/debian/patches/features/compressed-folders.patch
index 205956f..1d1a9c6 100644
--- a/debian/patches/features/compressed-folders.patch
+++ b/debian/patches/features/compressed-folders.patch
@@ -32,7 +32,6 @@ Signed-off-by: Matteo F. Vescovi <mfv at debian.org>
  doc/muttrc.man.head |  18 ++
  hook.c              |  14 ++
  init.h              |   5 +
- main.c              |   6 +
  mbox.c              |  10 ++
  mutt.h              |  10 ++
  mx.c                |  40 +++++
@@ -923,23 +922,6 @@ index 49a35fb..18fd040 100644
    { "group",		parse_group,		M_GROUP },
    { "ungroup",		parse_group,		M_UNGROUP },
    { "hdr_order",	parse_list,		UL &HeaderOrderList },
-diff --git a/main.c b/main.c
-index 9632e00..0b60d85 100644
---- a/main.c
-+++ b/main.c
-@@ -433,6 +433,12 @@ static void show_version (void)
- #else
- 	"-LOCALES_HACK  "
- #endif
-+
-+#ifdef USE_COMPRESSED
-+	"+COMPRESSED  "
-+#else
-+	"-COMPRESSED  "
-+#endif
- 	      
- #ifdef HAVE_WC_FUNCS
- 	"+HAVE_WC_FUNCS  "
 diff --git a/mbox.c b/mbox.c
 index 95cba65..9ff8512 100644
 --- a/mbox.c
@@ -1181,3 +1163,17 @@ index 6051e3a..e8693c8 100644
        if (Context && Context->path)
        {
  	strfcpy (tmp, Context->path, sizeof (tmp));
+--- a/version.c
++++ b/version.c
+@@ -231,6 +231,11 @@ static struct compile_options comp_opts[
+ #else
+ 	{ "ICONV_NONTRANS", 0 },
+ #endif
++#ifdef USE_COMPRESSED
++	{ "COMPRESSED", 1 },
++#else
++	{ "COMPRESSED", 0 },
++#endif
+ #ifdef USE_DOTLOCK
+ 	{ "USE_DOTLOCK", 1 },
+ #else
diff --git a/debian/patches/features/ifdef.patch b/debian/patches/features/ifdef.patch
deleted file mode 100644
index e2450b1..0000000
--- a/debian/patches/features/ifdef.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From: Cedric Duval <cedricduval at free.fr>
-Date: Thu, 27 Feb 2014 12:06:21 +0100
-Subject: ifdef
-
-This command allows to test if a feature has been compiled in before
-actually attempting to configure / use it.
-
-Syntax:
-
-ifdef <item> <command>
-
-where <item> can be the name of a variable, function, or command.
-
-Examples:
-
-ifdef  imap-fetch-mail  'source ~/.mutt/imap_setup'
-ifdef  trash  set trash=~/Mail/trash
-
-* Patch last synced with upstream:
-  - Date: 2007-02-15
-  - File:
-    http://cedricduval.free.fr/mutt/patches/download/patch-1.5.4.cd.ifdef.1
-
-* Changes made:
-  - Updated to 1.5.13
-  - Also look for commands
-  - Use mutt_strcmp in favor of ascii_strncasecmp to compare strings.
-
-Signed-off-by: Matteo F. Vescovi <mfv at debian.org>
----
- doc/manual.xml.head | 22 ++++++++++++++++++++
- init.c              | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- init.h              |  2 ++
- 3 files changed, 83 insertions(+)
-
-diff --git a/doc/manual.xml.head b/doc/manual.xml.head
-index b90908f..8840980 100644
---- a/doc/manual.xml.head
-+++ b/doc/manual.xml.head
-@@ -4456,6 +4456,28 @@ from which to read input (e.g.  <literal><command>source</command>
- 
- </sect1>
- 
-+<sect1 id="ifdef">
-+
-+<title>Configuring features conditionally</title>
-+
-+<para>
-+Usage: <literal>ifdef</literal> <emphasis>item</emphasis> <emphasis>command</emphasis>
-+</para>
-+
-+<para>
-+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, variable, or command. Example:
-+</para>
-+
-+<para>
-+<screen>
-+ifdef imap_keepalive 'source ~/.mutt/imap_setup'
-+</screen>
-+</para>
-+
-+</sect1>
-+
- <sect1 id="unhook">
- <title>Removing Hooks</title>
- 
-diff --git a/init.c b/init.c
-index 69e2f76..16b19a9 100644
---- a/init.c
-+++ b/init.c
-@@ -601,6 +601,65 @@ static void remove_from_list (LIST **l, const char *str)
-   }
- }
- 
-+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? */
-+  res = (mutt_option_index (tmp->data) != -1);
-+
-+  /* a function? */
-+  if (!res)
-+    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 (!mutt_strcmp (tmp->data, b[j].name))
-+	{
-+	  res = 1;
-+	  break;
-+	}
-+    }
-+
-+  /* a command? */
-+  if (!res)
-+    for (i = 0; Commands[i].name; i++)
-+    {
-+      if (!mutt_strcmp (tmp->data, Commands[i].name))
-+      {
-+	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
-diff --git a/init.h b/init.h
-index 5a12ec0..7fc40bb 100644
---- a/init.h
-+++ b/init.h
-@@ -3665,6 +3665,7 @@ static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
- 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 *);
-@@ -3715,6 +3716,7 @@ const struct command_t Commands[] = {
-   { "group",		parse_group,		M_GROUP },
-   { "ungroup",		parse_group,		M_UNGROUP },
-   { "hdr_order",	parse_list,		UL &HeaderOrderList },
-+  { "ifdef",		parse_ifdef,		0 },
- #ifdef HAVE_ICONV
-   { "iconv-hook",	mutt_parse_hook,	M_ICONVHOOK },
- #endif
diff --git a/debian/patches/series b/debian/patches/series
index 5b60ed2..806dc2c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,5 @@
 misc/am-maintainer-mode.patch
-features/ifdef.patch
+neomutt/11-ifdef.patch
 features/trash-folder.patch
 features/purge-message.patch
 features/imap_fast_trash.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list