Files
ports/mail/mutt/files/extra-patch-ifdef
Derek Schrock efe2cf37e6 mail/mutt: Remove QUOTE_PATCH option and future patch removal
* Removing QUOTE_PATCH due to logic issues and RFC3676 quoting.
 * Keep vvv initials patch from QUOTE_PATCH adding INITIALS_PATCH
 * Add depercation of other patches to be removed in future updates via

UPDATING and pkg-message. See PR 271190 [1] comment 12 [2].
 * SASL_NONE will now add --with-sasl=no (making portlint happy)
 * Update context on patches

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271190
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271190#c12

Context and discussion:
https://lists.freebsd.org/archives/freebsd-ports/2023-May/003815.html

PR:			271190
Reported by:		kh@panix.com
Differential Revision:	https://reviews.freebsd.org/D39985
2023-05-09 11:38:23 +02:00

78 lines
2.4 KiB
Plaintext

--- PATCHES.orig 2023-05-05 18:53:08 UTC
+++ PATCHES
@@ -0,0 +1 @@
+patch-1.5.4.cd.ifdef.1
--- init.c.orig 2023-01-02 04:42:19 UTC
+++ init.c
@@ -715,6 +715,52 @@ static mbchar_table *parse_mbchar_table (const char *s
return t;
}
+static int parse_ifdef (BUFFER *tmp, BUFFER *s, union pointer_long_t 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++)
+ {
+ const struct menu_func_op_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, MUTT_TOKEN_SPACE);
+
+ if (res)
+ {
+ if (mutt_parse_rc_buffer (tmp, &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, union pointer_long_t udata, BUFFER *err)
{
do
--- init.h.orig 2023-03-25 19:50:20 UTC
+++ init.h
@@ -4926,6 +4926,7 @@ static int parse_lists (BUFFER *, BUFFER *, union poin
static int parse_unlists (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
static int parse_alias (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
static int parse_unalias (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
+static int parse_ifdef (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
static int parse_echo (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
static int parse_ignore (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
static int parse_unignore (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
@@ -4993,6 +4994,7 @@ const struct command_t Commands[] = {
{ "hdr_order", parse_list, {.p=&HeaderOrderList} },
#ifdef HAVE_ICONV
{ "iconv-hook", mutt_parse_hook, {.l=MUTT_ICONVHOOK} },
+ { "ifdef", parse_ifdef, {.l=0} },
#endif
{ "ignore", parse_ignore, {.l=0} },
{ "index-format-hook",mutt_parse_idxfmt_hook, {.l=MUTT_IDXFMTHOOK} },