-diff -ruN mutt-1.4./README.xface mutt-1.4/README.xface
+x-face patch for Mutt 1.5.6
+
+Copied from Debian's slrnface package:
+
+ http://dave.willfork.com/slrnface/
+ Upstream Author: Drazen Kacar <dave@arsdigita.com>
+ Copyright: /usr/share/common-licenses/GPL
+
+
--- mutt-1.4./README.xface Thu Jan 1 01:00:00 1970
+++ mutt-1.4/README.xface Sat Aug 24 02:29:23 2002
@@ -0,0 +1,80 @@
+Home page: http://dave.willfork.com/slrnface/
+
+dave@willfork.com
-diff -ruN mutt-1.4./globals.h mutt-1.4/globals.h
---- mutt-1.4./globals.h Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/globals.h Mon Jan 20 00:28:31 2003
-@@ -177,6 +177,8 @@
+diff -urp ../MUTT/mutt/PATCHES mutt/PATCHES
+--- ../MUTT/mutt/PATCHES 2002-12-09 18:44:54.000000000 +0100
++++ mutt/PATCHES 2004-07-21 16:02:16.000000000 +0200
+@@ -0,0 +1 @@
++patch-1.5.6.cb.xface.1
+diff -urp ../MUTT/mutt/globals.h mutt/globals.h
+--- ../MUTT/mutt/globals.h.orig 2007-03-26 14:49:03.226880430 +0200
++++ mutt/globals.h 2007-03-26 14:51:13.227945753 +0200
+@@ -218,6 +218,8 @@
WHERE ALIAS *Aliases INITVAL (0);
WHERE LIST *UserHeader INITVAL (0);
+WHERE int slrnface_fd INITVAL (-1);
+
- #ifdef DEBUG
- WHERE FILE *debugfile INITVAL (0);
- WHERE int debuglevel INITVAL (0);
-diff -ruN mutt-1.4./init.c mutt-1.4/init.c
---- mutt-1.4./init.c Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/init.c Mon Jan 20 00:28:31 2003
-@@ -47,6 +47,8 @@
+ /*-- formerly in pgp.h --*/
+ WHERE REGEXP PgpGoodSign;
+ WHERE char *PgpSignAs;
+diff -urp ../MUTT/mutt/init.c mutt/init.c
+--- ../MUTT/mutt/init.c 2004-07-18 01:25:28.000000000 +0200
++++ mutt/init.c 2004-07-21 13:33:47.000000000 +0200
+@@ -43,6 +43,8 @@
#include <string.h>
#include <sys/utsname.h>
#include <errno.h>
#include <sys/wait.h>
void toggle_quadoption (int opt)
-@@ -1971,3 +1973,131 @@
- return c->data;
- return 0;
+@@ -2356,3 +2358,130 @@ int mutt_get_hook_type (const char *name
+ return 1;
}
-+
+
+void mutt_start_slrnface(void)
+{
+ char *fifo;
+
+ /* FIFO has been unlinked in the startup function. */
+}
-diff -ruN mutt-1.4./init.h mutt-1.4/init.h
---- mutt-1.4./init.h Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/init.h Mon Jan 20 00:28:31 2003
-@@ -2437,6 +2437,12 @@
+diff -urp ../MUTT/mutt/init.h mutt/init.h
+--- ../MUTT/mutt/init.h 2004-07-21 13:33:02.000000000 +0200
++++ mutt/init.h 2004-07-21 13:33:47.000000000 +0200
+@@ -2736,6 +2736,12 @@ struct option_t MuttVars[] = {
** Controls whether mutt writes out the Bcc header when preparing
** messages to be sent. Exim users may wish to use this.
*/
/*--*/
{ NULL }
};
-diff -ruN mutt-1.4./main.c mutt-1.4/main.c
---- mutt-1.4./main.c Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/main.c Mon Jan 20 00:28:31 2003
-@@ -841,6 +841,8 @@
+diff -urp ../MUTT/mutt/main.c mutt/main.c
+--- ../MUTT/mutt/main.c 2004-06-18 17:24:22.000000000 +0200
++++ mutt/main.c 2004-07-21 13:33:47.000000000 +0200
+@@ -905,6 +905,8 @@ int main (int argc, char **argv)
mutt_folder_hook (folder);
+ mutt_start_slrnface();
+
- if((Context = mx_open_mailbox (folder, ((flags & M_RO) || option (OPTREADONLY)) ? M_READONLY : 0, NULL))
+ if((Context = mx_open_mailbox (folder, ((flags & MUTT_RO) || option (OPTREADONLY)) ? MUTT_READONLY : 0, NULL))
|| !explicit_folder)
{
-@@ -849,6 +851,8 @@
- safe_free ((void **)&Context);
+@@ -913,6 +915,8 @@ int main (int argc, char **argv)
}
- mutt_endwin (Errorbuf);
+
+ exit_endwin_msg = Errorbuf;
+
+ mutt_stop_slrnface();
}
- exit (0);
-diff -ruN mutt-1.4./mutt.h mutt-1.4/mutt.h
---- mutt-1.4./mutt.h Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/mutt.h Mon Jan 20 00:28:31 2003
-@@ -422,6 +422,7 @@
+ exit_code = 0;
+diff -urp ../MUTT/mutt/mutt.h mutt/mutt.h
+--- ../MUTT/mutt/mutt.h 2004-07-21 13:33:02.000000000 +0200
++++ mutt/mutt.h 2004-07-21 13:33:47.000000000 +0200
+@@ -435,6 +435,7 @@ enum
OPTWRAP,
OPTWRAPSEARCH,
OPTWRITEBCC, /* write out a bcc header? */
+ OPTXFACE,
OPTXMAILER,
- /* PGP options */
-@@ -540,6 +541,7 @@
- char *x_label;
+ OPTCRYPTUSEGPGME,
+@@ -577,6 +578,7 @@ typedef struct envelope
+ BUFFER *spam;
LIST *references; /* message references (in reverse order) */
LIST *in_reply_to; /* in-reply-to header content */
+ LIST *x_face; /* X-Face header content */
LIST *userhdrs; /* user defined headers */
} ENVELOPE;
-diff -ruN mutt-1.4./muttlib.c mutt-1.4/muttlib.c
---- mutt-1.4./muttlib.c Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/muttlib.c Mon Jan 20 00:28:31 2003
-@@ -650,6 +650,7 @@
- safe_free ((void **) &(*p)->date);
+diff -urp ../MUTT/mutt/muttlib.c mutt/muttlib.c
+--- ../MUTT/mutt/muttlib.c 2004-07-18 01:25:28.000000000 +0200
++++ mutt/muttlib.c 2004-07-21 13:33:47.000000000 +0200
+@@ -651,6 +651,7 @@ void mutt_free_envelope (ENVELOPE **p)
+ FREE (&(*p)->date);
mutt_free_list (&(*p)->references);
mutt_free_list (&(*p)->in_reply_to);
+ mutt_free_list (&(*p)->x_face);
mutt_free_list (&(*p)->userhdrs);
- safe_free ((void **) p);
+ FREE (p);
}
-diff -ruN mutt-1.4./pager.c mutt-1.4/pager.c
---- mutt-1.4./pager.c Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/pager.c Mon Jan 20 00:28:31 2003
-@@ -1431,6 +1431,66 @@
+diff -urp ../MUTT/mutt/pager.c mutt/pager.c
+--- ../MUTT/mutt/pager.c 2004-07-18 01:25:28.000000000 +0200
++++ mutt/pager.c 2004-07-21 13:36:34.000000000 +0200
+@@ -1527,6 +1527,66 @@ upNLines (int nlines, struct line_t *inf
return cur;
}
+ write(slrnface_fd, "show\n", sizeof "show");
+}
+
- static struct mapping_t PagerHelp[] = {
+ static const struct mapping_t PagerHelp[] = {
{ N_("Exit"), OP_EXIT },
{ N_("PrevPg"), OP_PREV_PAGE },
-@@ -1535,6 +1595,9 @@
+@@ -1545,6 +1605,9 @@ mutt_pager (const char *banner, const ch
snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer);
}
while (ch != -1)
{
mutt_curs_set (0);
-@@ -2035,7 +2098,9 @@
+@@ -2067,7 +2130,9 @@ search_next:
if (! InHelp)
{
InHelp = 1;
+ mutt_suppress_xface ();
mutt_help (MENU_PAGER);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
InHelp = 0;
}
-@@ -2329,59 +2394,71 @@
+@@ -2383,58 +2448,70 @@ CHECK_IMAP_ACL(IMAP_ACL_WRITE);
case OP_MAIL:
CHECK_MODE(IsHeader (extra) && !IsAttach (extra));
CHECK_ATTACH;
+ mutt_suppress_xface ();
- ci_send_message (0, NULL, NULL, NULL, NULL);
+ ci_send_message (0, NULL, NULL, extra->ctx, NULL);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
case OP_REPLY:
CHECK_ATTACH;
+ mutt_suppress_xface();
if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy,
- SENDREPLY);
+ mutt_attach_reply (extra->fp, extra->hdr, extra->actx,
+ extra->bdy, SENDREPLY);
else
ci_send_message (SENDREPLY, NULL, NULL, extra->ctx, extra->hdr);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
case OP_RECALL_MESSAGE:
- CHECK_MODE(IsHeader (extra));
+ CHECK_MODE(IsHeader (extra) && !IsAttach(extra));
CHECK_ATTACH;
+ mutt_suppress_xface();
ci_send_message (SENDPOSTPONED, NULL, NULL, extra->ctx, extra->hdr);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
case OP_GROUP_REPLY:
CHECK_ATTACH;
+ mutt_suppress_xface();
if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy, SENDREPLY|SENDGROUPREPLY);
+ mutt_attach_reply (extra->fp, extra->hdr, extra->actx,
+ extra->bdy, SENDREPLY|SENDGROUPREPLY);
else
ci_send_message (SENDREPLY | SENDGROUPREPLY, NULL, NULL, extra->ctx, extra->hdr);
+ mutt_suppress_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
case OP_LIST_REPLY:
CHECK_ATTACH;
+ mutt_suppress_xface();
if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy, SENDREPLY|SENDLISTREPLY);
+ mutt_attach_reply (extra->fp, extra->hdr, extra->actx,
+ extra->bdy, SENDREPLY|SENDLISTREPLY);
else
ci_send_message (SENDREPLY | SENDLISTREPLY, NULL, NULL, extra->ctx, extra->hdr);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
case OP_FORWARD_MESSAGE:
CHECK_ATTACH;
+ mutt_suppress_xface();
if (IsMsgAttach (extra))
- mutt_attach_forward (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy);
+ mutt_attach_forward (extra->fp, extra->hdr, extra->actx,
+ extra->bdy);
else
ci_send_message (SENDFORWARD, NULL, NULL, extra->ctx, extra->hdr);
+ mutt_show_xface ();
- redraw = REDRAW_FULL;
+ pager_menu->redraw = REDRAW_FULL;
break;
-@@ -2430,7 +2507,9 @@
+@@ -2485,7 +2562,9 @@ CHECK_IMAP_ACL(IMAP_ACL_WRITE);
break;
case OP_SHELL_ESCAPE:
+ mutt_suppress_xface ();
mutt_shell_escape ();
+ mutt_show_xface ();
- MAYBE_REDRAW (redraw);
break;
-@@ -2573,5 +2652,6 @@
- safe_free ((void **) &lineInfo);
- if (index)
- mutt_menuDestroy(&index);
+ case OP_TAG:
+@@ -2644,5 +2723,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
+ FREE (&rd.pager_status_window);
+ FREE (&rd.pager_window);
+
+ mutt_clear_xface ();
return (rc != -1 ? rc : 0);
}
-diff -ruN mutt-1.4./parse.c mutt-1.4/parse.c
---- mutt-1.4./parse.c Tue Jan 29 11:05:20 2002
-+++ mutt-1.4/parse.c Mon Jan 20 00:28:32 2003
-@@ -90,6 +90,27 @@
+diff -urp ../MUTT/mutt/parse.c mutt/parse.c
+--- ../MUTT/mutt/parse.c 2004-07-21 13:33:02.000000000 +0200
++++ mutt/parse.c 2004-07-21 13:33:47.000000000 +0200
+@@ -85,6 +85,27 @@ static char *read_rfc822_line (FILE *f,
/* not reached */
}
static LIST *mutt_parse_references (char *s, int in_reply_to)
{
LIST *t, *lst = NULL;
-@@ -1207,6 +1228,11 @@
+@@ -1231,6 +1252,11 @@ int mutt_parse_rfc822_line (ENVELOPE *e,
e->x_label = safe_strdup(p);
matched = 1;
}
default:
break;
-diff -ruN mutt-1.4./sendlib.c mutt-1.4/sendlib.c
---- mutt-1.4./sendlib.c Sat Apr 20 09:25:49 2002
-+++ mutt-1.4/sendlib.c Mon Jan 20 00:28:32 2003
-@@ -1663,6 +1663,15 @@
- fputc ('\n', fp);
+diff -urp ../MUTT/mutt/sendlib.c mutt/sendlib.c
+--- ../MUTT/mutt/sendlib.c 2004-07-21 13:33:02.000000000 +0200
++++ mutt/sendlib.c 2004-07-21 13:37:16.000000000 +0200
+@@ -1697,6 +1697,15 @@ int mutt_write_rfc822_header (FILE *fp,
+ }
}
-
+
+ /* Add X-Face headers */
+ if (env->x_face)
+ {
+ fprintf (fp, "X-Face: %s\n", face->data);
+ }
+
- if (mode == 0 && !privacy && option (OPTXMAILER))
+ if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent)
{
/* Add a vanity header */