From: Leandro Lucarella Date: Wed, 19 Jan 2011 04:24:21 +0000 (-0300) Subject: Update and enable NNTP patch X-Git-Tag: nntp/1.5.21-5nntp1 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/20f65ac3b82b354496b5bb469ff184ba8b0bcd96?ds=inline Update and enable NNTP patch --- diff --git a/.gitignore b/.gitignore index b32c836..208d7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,6 @@ debian/*.debhelper* obj-i486-linux-gnu-patched/ obj-i486-linux-gnu/ +obj-x86_64-linux-gnu/ +obj-x86_64-linux-gnu-patched/ tags diff --git a/PATCHES b/PATCHES deleted file mode 100644 index e69de29..0000000 diff --git a/debian/changelog b/debian/changelog index 35d7cdd..d019ef0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mutt (1.5.21-5nntp1) unstable; urgency=low + + * Add NNTP patch: + http://mutt.org.ua/download/mutt-1.5.21/patch-1.5.21.vvv.nntp.gz + + -- Leandro Lucarella Tue, 12 Apr 2011 14:00:09 -0300 + mutt (1.5.21-5) unstable; urgency=low * debian/control: Standards-Version moved from 3.9.2.0 to 3.9.2 for diff --git a/debian/patches/mutt-patched/nntp b/debian/patches/mutt-patched/nntp index 0f8c62e..3a67fdf 100644 --- a/debian/patches/mutt-patched/nntp +++ b/debian/patches/mutt-patched/nntp @@ -9,10 +9,17 @@ autoconf Vsevolod Volkov -diff -udprP mutt-1.5.20.orig/ChangeLog.nntp mutt-1.5.20/ChangeLog.nntp ---- mutt-1.5.20.orig/ChangeLog.nntp 1970-01-01 03:00:00.000000000 +0300 -+++ mutt-1.5.20/ChangeLog.nntp 2009-06-15 21:56:06.000000000 +0300 -@@ -0,0 +1,369 @@ +Index: mutt/ChangeLog.nntp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/ChangeLog.nntp 2011-01-19 02:29:05.161033056 -0300 +@@ -0,0 +1,375 @@ ++* Wed Sep 16 2010 Vsevolod Volkov ++- update to 1.5.21 ++ ++* Thu Aug 13 2009 Vsevolod Volkov ++- fixed writting references in nntp_save_cache_group() ++ +* Tue Jun 15 2009 Vsevolod Volkov +- update to 1.5.20 + @@ -382,10 +389,11 @@ diff -udprP mutt-1.5.20.orig/ChangeLog.nntp mutt-1.5.20/ChangeLog.nntp + +* Fri Jan 28 2000 Vsevolod Volkov +- update to 1.1.2 -diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS ---- mutt-1.5.20.orig/OPS 2009-05-13 08:01:13.000000000 +0300 -+++ mutt-1.5.20/OPS 2009-06-15 21:05:24.000000000 +0300 -@@ -8,14 +8,16 @@ OP_BOUNCE_MESSAGE "remail a message to a +Index: mutt/OPS +=================================================================== +--- mutt.orig/OPS 2011-01-19 02:29:05.114041704 -0300 ++++ mutt/OPS 2011-01-19 02:29:05.161033056 -0300 +@@ -8,14 +8,16 @@ OP_BROWSER_NEW_FILE "select a new file in this directory" OP_BROWSER_VIEW_FILE "view file" OP_BROWSER_TELL "display the currently selected file's name" @@ -404,7 +412,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_COMPOSE_EDIT_BCC "edit the BCC list" OP_COMPOSE_EDIT_CC "edit the CC list" OP_COMPOSE_EDIT_DESCRIPTION "edit attachment description" -@@ -26,7 +28,10 @@ OP_COMPOSE_EDIT_FROM "edit the from fiel +@@ -26,7 +28,10 @@ OP_COMPOSE_EDIT_HEADERS "edit the message with headers" OP_COMPOSE_EDIT_MESSAGE "edit the message" OP_COMPOSE_EDIT_MIME "edit attachment using mailcap entry" @@ -415,7 +423,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_COMPOSE_EDIT_SUBJECT "edit the subject of this message" OP_COMPOSE_EDIT_TO "edit the TO list" OP_CREATE_MAILBOX "create a new mailbox (IMAP only)" -@@ -85,8 +90,13 @@ OP_EXIT "exit this menu" +@@ -85,8 +90,13 @@ OP_FILTER "filter attachment through a shell command" OP_FIRST_ENTRY "move to the first entry" OP_FLAG_MESSAGE "toggle a message's 'important' flag" @@ -429,7 +437,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_GROUP_REPLY "reply to all recipients" OP_HALF_DOWN "scroll down 1/2 page" OP_HALF_UP "scroll up 1/2 page" -@@ -94,11 +104,14 @@ OP_HELP "this screen" +@@ -94,11 +104,14 @@ OP_JUMP "jump to an index number" OP_LAST_ENTRY "move to the last entry" OP_LIST_REPLY "reply to specified mailing list" @@ -444,7 +452,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_MAIN_CLEAR_FLAG "clear a status flag from a message" OP_MAIN_DELETE_PATTERN "delete messages matching a pattern" OP_MAIN_IMAP_FETCH "force retrieval of mail from IMAP server" -@@ -137,6 +150,7 @@ OP_PAGER_HIDE_QUOTED "toggle display of +@@ -138,6 +151,7 @@ OP_PAGER_SKIP_QUOTED "skip beyond quoted text" OP_PAGER_TOP "jump to the top of the message" OP_PIPE "pipe message/attachment to a shell command" @@ -452,7 +460,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_PREV_ENTRY "move to the previous entry" OP_PREV_LINE "scroll up one line" OP_PREV_PAGE "move to the previous page" -@@ -145,6 +159,7 @@ OP_QUERY "query external program for add +@@ -147,6 +161,7 @@ OP_QUERY_APPEND "append new query results to current results" OP_QUIT "save changes to mailbox and quit" OP_RECALL_MESSAGE "recall a postponed message" @@ -460,7 +468,7 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_REDRAW "clear and redraw the screen" OP_REFORMAT_WINCH "{internal}" OP_RENAME_MAILBOX "rename the current mailbox (IMAP only)" -@@ -159,18 +174,22 @@ OP_SEARCH_TOGGLE "toggle search pattern +@@ -161,18 +176,22 @@ OP_SHELL_ESCAPE "invoke a command in a subshell" OP_SORT "sort messages" OP_SORT_REVERSE "sort messages in reverse order" @@ -483,10 +491,11 @@ diff -udprP mutt-1.5.20.orig/OPS mutt-1.5.20/OPS OP_VERSION "show the Mutt version number and date" OP_VIEW_ATTACH "view attachment using mailcap entry if necessary" OP_VIEW_ATTACHMENTS "show MIME attachments" -diff -udprP mutt-1.5.20.orig/account.c mutt-1.5.20/account.c ---- mutt-1.5.20.orig/account.c 2008-11-11 21:55:46.000000000 +0200 -+++ mutt-1.5.20/account.c 2009-06-15 21:05:24.000000000 +0300 -@@ -51,6 +51,11 @@ int mutt_account_match (const ACCOUNT* a +Index: mutt/account.c +=================================================================== +--- mutt.orig/account.c 2011-01-19 02:29:04.836092850 -0300 ++++ mutt/account.c 2011-01-19 02:29:05.162032872 -0300 +@@ -51,6 +51,11 @@ user = PopUser; #endif @@ -498,7 +507,7 @@ diff -udprP mutt-1.5.20.orig/account.c mutt-1.5.20/account.c if (a1->flags & a2->flags & M_ACCT_USER) return (!strcmp (a1->user, a2->user)); if (a1->flags & M_ACCT_USER) -@@ -130,6 +135,16 @@ void mutt_account_tourl (ACCOUNT* accoun +@@ -130,6 +135,16 @@ } #endif @@ -515,7 +524,7 @@ diff -udprP mutt-1.5.20.orig/account.c mutt-1.5.20/account.c url->host = account->host; if (account->flags & M_ACCT_PORT) url->port = account->port; -@@ -155,6 +170,10 @@ int mutt_account_getuser (ACCOUNT* accou +@@ -155,6 +170,10 @@ else if ((account->type == M_ACCT_TYPE_POP) && PopUser) strfcpy (account->user, PopUser, sizeof (account->user)); #endif @@ -523,10 +532,10 @@ diff -udprP mutt-1.5.20.orig/account.c mutt-1.5.20/account.c + else if ((account->type == M_ACCT_TYPE_NNTP) && NntpUser) + strfcpy (account->user, NntpUser, sizeof (account->user)); +#endif + else if (option (OPTNOCURSES)) + return -1; /* prompt (defaults to unix username), copy into account->user */ - else - { -@@ -215,6 +234,10 @@ int mutt_account_getpass (ACCOUNT* accou +@@ -217,6 +236,10 @@ else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass) strfcpy (account->pass, SmtpPass, sizeof (account->pass)); #endif @@ -534,13 +543,14 @@ diff -udprP mutt-1.5.20.orig/account.c mutt-1.5.20/account.c + else if ((account->type == M_ACCT_TYPE_NNTP) && NntpPass) + strfcpy (account->pass, NntpPass, sizeof (account->pass)); +#endif + else if (option (OPTNOCURSES)) + return -1; else - { - snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "), -diff -udprP mutt-1.5.20.orig/account.h mutt-1.5.20/account.h ---- mutt-1.5.20.orig/account.h 2008-11-11 21:55:46.000000000 +0200 -+++ mutt-1.5.20/account.h 2009-06-15 21:05:24.000000000 +0300 -@@ -29,7 +29,8 @@ enum +Index: mutt/account.h +=================================================================== +--- mutt.orig/account.h 2011-01-19 02:28:26.196202678 -0300 ++++ mutt/account.h 2011-01-19 02:29:05.162032872 -0300 +@@ -29,7 +29,8 @@ M_ACCT_TYPE_NONE = 0, M_ACCT_TYPE_IMAP, M_ACCT_TYPE_POP, @@ -550,10 +560,11 @@ diff -udprP mutt-1.5.20.orig/account.h mutt-1.5.20/account.h }; /* account flags */ -diff -udprP mutt-1.5.20.orig/attach.h mutt-1.5.20/attach.h ---- mutt-1.5.20.orig/attach.h 2008-11-11 21:55:46.000000000 +0200 -+++ mutt-1.5.20/attach.h 2009-06-15 21:05:24.000000000 +0300 -@@ -50,7 +50,7 @@ void mutt_print_attachment_list (FILE *f +Index: mutt/attach.h +=================================================================== +--- mutt.orig/attach.h 2011-01-19 02:28:26.166208196 -0300 ++++ mutt/attach.h 2011-01-19 02:29:05.163032688 -0300 +@@ -50,7 +50,7 @@ void mutt_attach_bounce (FILE *, HEADER *, ATTACHPTR **, short, BODY *); void mutt_attach_resend (FILE *, HEADER *, ATTACHPTR **, short, BODY *); @@ -562,9 +573,10 @@ diff -udprP mutt-1.5.20.orig/attach.h mutt-1.5.20/attach.h void mutt_attach_reply (FILE *, HEADER *, ATTACHPTR **, short, BODY *, int); #endif /* _ATTACH_H_ */ -diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c ---- mutt-1.5.20.orig/browser.c 2009-06-11 20:52:54.000000000 +0300 -+++ mutt-1.5.20/browser.c 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/browser.c +=================================================================== +--- mutt.orig/browser.c 2011-01-19 02:29:04.633130198 -0300 ++++ mutt/browser.c 2011-01-19 02:29:05.164032504 -0300 @@ -32,6 +32,9 @@ #ifdef USE_IMAP #include "imap.h" @@ -575,7 +587,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c #include #include -@@ -49,6 +52,19 @@ static struct mapping_t FolderHelp[] = { +@@ -50,6 +53,19 @@ { NULL, 0 } }; @@ -595,7 +607,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c typedef struct folder_t { struct folder_file *ff; -@@ -114,9 +130,17 @@ static void browser_sort (struct browser +@@ -116,9 +132,17 @@ case SORT_ORDER: return; case SORT_DATE: @@ -613,7 +625,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c f = browser_compare_size; break; case SORT_SUBJECT: -@@ -307,8 +331,106 @@ folder_format_str (char *dest, size_t de +@@ -325,8 +349,106 @@ return (src); } @@ -632,7 +644,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, folder->num + 1); + break; -+ ++ + case 'f': + strncpy (fn, folder->ff->name, sizeof(fn) - 1); + snprintf (tmp, sizeof (tmp), "%%%ss", fmt); @@ -721,7 +733,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c { if (state->entrylen == state->entrymax) { -@@ -337,6 +459,10 @@ static void add_folder (MUTTMENU *m, str +@@ -355,6 +477,10 @@ #ifdef USE_IMAP (state->entry)[state->entrylen].imap = 0; #endif @@ -732,7 +744,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c (state->entrylen)++; } -@@ -352,9 +478,35 @@ static void init_state (struct browser_s +@@ -370,9 +496,35 @@ menu->data = state->entry; } @@ -768,7 +780,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c struct stat s; DIR *dp; struct dirent *de; -@@ -415,17 +567,40 @@ static int examine_directory (MUTTMENU * +@@ -433,17 +585,40 @@ tmp = Incoming; while (tmp && mutt_strcmp (buffer, tmp->path)) tmp = tmp->next; @@ -811,7 +823,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c BUFFY *tmp = Incoming; #ifdef USE_IMAP struct mailbox_state mbox; -@@ -443,14 +618,21 @@ static int examine_mailboxes (MUTTMENU * +@@ -461,14 +636,21 @@ if (mx_is_imap (tmp->path)) { imap_mailbox_state (tmp->path, &mbox); @@ -835,7 +847,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c continue; } #endif -@@ -479,15 +661,20 @@ static int examine_mailboxes (MUTTMENU * +@@ -497,15 +679,20 @@ strfcpy (buffer, NONULL(tmp->path), sizeof (buffer)); mutt_pretty_mailbox (buffer, sizeof (buffer)); @@ -857,20 +869,20 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c return (regexec (re, ((struct folder_file *) menu->data)[n].name, 0, NULL, 0)); } -@@ -498,6 +685,12 @@ static void folder_entry (char *s, size_ +@@ -516,6 +703,12 @@ folder.ff = &((struct folder_file *) menu->data)[num]; folder.num = num; +#ifdef USE_NNTP + if (option (OPTNEWS)) -+ mutt_FormatString (s, slen, 0, NONULL(GroupFormat), newsgroup_format_str, ++ mutt_FormatString (s, slen, 0, NONULL(GroupFormat), newsgroup_format_str, + (unsigned long) &folder, M_FORMAT_ARROWCURSOR); + else +#endif mutt_FormatString (s, slen, 0, NONULL(FolderFormat), folder_format_str, (unsigned long) &folder, M_FORMAT_ARROWCURSOR); } -@@ -518,6 +711,17 @@ static void init_menu (struct browser_st +@@ -536,6 +729,17 @@ menu->tagged = 0; @@ -886,9 +898,9 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c + else +#endif if (buffy) - snprintf (title, titlelen, _("Mailboxes [%d]"), mutt_buffy_check (0)); - else -@@ -573,6 +777,31 @@ void _mutt_select_file (char *f, size_t + { + menu->is_mailbox_list = 1; +@@ -609,6 +813,31 @@ if (!folder) strfcpy (LastDirBackup, LastDir, sizeof (LastDirBackup)); @@ -920,7 +932,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c if (*f) { mutt_expand_path (f, flen); -@@ -669,6 +898,9 @@ void _mutt_select_file (char *f, size_t +@@ -705,6 +934,9 @@ menu->tag = file_tag; menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER, @@ -930,7 +942,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c FolderHelp); init_menu (&state, menu, title, sizeof (title), buffy); -@@ -807,7 +1039,11 @@ void _mutt_select_file (char *f, size_t +@@ -842,7 +1074,11 @@ } } @@ -942,7 +954,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c { strfcpy (f, state.entry[menu->current].name, flen); mutt_expand_path (f, flen); -@@ -865,14 +1101,6 @@ void _mutt_select_file (char *f, size_t +@@ -900,14 +1136,6 @@ break; #ifdef USE_IMAP @@ -957,7 +969,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c case OP_BROWSER_TOGGLE_LSUB: if (option (OPTIMAPLSUB)) unset_option (OPTIMAPLSUB); -@@ -973,6 +1201,11 @@ void _mutt_select_file (char *f, size_t +@@ -1008,6 +1236,11 @@ case OP_CHANGE_DIRECTORY: @@ -969,7 +981,7 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c strfcpy (buf, LastDir, sizeof (buf)); #ifdef USE_IMAP if (!state.imap_browse) -@@ -1239,6 +1472,190 @@ void _mutt_select_file (char *f, size_t +@@ -1273,6 +1506,190 @@ else mutt_error _("Error trying to view file"); } @@ -1160,9 +1172,10 @@ diff -udprP mutt-1.5.20.orig/browser.c mutt-1.5.20/browser.c } } -diff -udprP mutt-1.5.20.orig/browser.h mutt-1.5.20/browser.h ---- mutt-1.5.20.orig/browser.h 2009-01-05 00:34:12.000000000 +0200 -+++ mutt-1.5.20/browser.h 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/browser.h +=================================================================== +--- mutt.orig/browser.h 2011-01-19 02:28:26.016235790 -0300 ++++ mutt/browser.h 2011-01-19 02:29:05.164032504 -0300 @@ -19,6 +19,10 @@ #ifndef _BROWSER_H #define _BROWSER_H 1 @@ -1174,7 +1187,7 @@ diff -udprP mutt-1.5.20.orig/browser.h mutt-1.5.20/browser.h struct folder_file { mode_t mode; -@@ -37,6 +41,9 @@ struct folder_file +@@ -37,6 +41,9 @@ unsigned selectable : 1; unsigned inferiors : 1; #endif @@ -1184,70 +1197,50 @@ diff -udprP mutt-1.5.20.orig/browser.h mutt-1.5.20/browser.h unsigned tagged : 1; }; -diff -udprP mutt-1.5.20.orig/buffy.c mutt-1.5.20/buffy.c ---- mutt-1.5.20.orig/buffy.c 2009-06-02 20:16:26.000000000 +0300 -+++ mutt-1.5.20/buffy.c 2009-06-15 21:05:24.000000000 +0300 -@@ -320,6 +320,9 @@ int mutt_buffy_check (int force) - #ifdef USE_POP - if (!Context || Context->magic != M_POP) - #endif +Index: mutt/buffy.c +=================================================================== +--- mutt.orig/buffy.c 2011-01-19 02:29:05.101044096 -0300 ++++ mutt/buffy.c 2011-01-19 02:29:05.165032320 -0300 +@@ -481,6 +481,9 @@ + + /* check device ID and serial number instead of comparing paths */ + if (!Context || Context->magic == M_IMAP || Context->magic == M_POP +#ifdef USE_NNTP -+ if (!Context || Context->magic != M_NNTP) ++ || Context->magic == M_NNTP +#endif - /* check device ID and serial number instead of comparing paths */ - if (!Context || !Context->path || stat (Context->path, &contex_sb) != 0) + || stat (Context->path, &contex_sb) != 0) { -@@ -343,6 +346,11 @@ int mutt_buffy_check (int force) - tmp->magic = M_POP; - else + contex_sb.st_dev=0; +@@ -497,6 +500,11 @@ + tmp->magic = M_POP; + else #endif +#ifdef USE_NNTP -+ if ((tmp->magic == M_NNTP) || mx_is_nntp (tmp->path)) -+ tmp->magic = M_NNTP; -+ else ++ if ((tmp->magic == M_NNTP) || mx_is_nntp (tmp->path)) ++ tmp->magic = M_NNTP; ++ else +#endif - if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) || - (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0)) - { -@@ -360,25 +368,21 @@ int mutt_buffy_check (int force) + if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) || + (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0)) + { +@@ -512,8 +520,11 @@ /* check to see if the folder is the currently selected folder * before polling */ if (!Context || !Context->path || --#if defined USE_IMAP || defined USE_POP -- (( -+ ( -+ (0 - #ifdef USE_IMAP -- tmp->magic == M_IMAP -+ || tmp->magic == M_IMAP - #endif - #ifdef USE_POP --#ifdef USE_IMAP -- || --#endif -- tmp->magic == M_POP --#endif -- ) ? mutt_strcmp (tmp->path, Context->path) : -+ || tmp->magic == M_POP - #endif -- (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino) --#if defined USE_IMAP || defined USE_POP -- ) +- (( tmp->magic == M_IMAP || tmp->magic == M_POP ) +- ? mutt_strcmp (tmp->path, Context->path) : ++ (( tmp->magic == M_IMAP || tmp->magic == M_POP +#ifdef USE_NNTP + || tmp->magic == M_NNTP - #endif -- ) -- -+ ) ? mutt_strcmp (tmp->path, Context->path) : -+ (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino) -+ ) -+ ) ++#endif ++ ) ? mutt_strcmp (tmp->path, Context->path) : + (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino))) { switch (tmp->magic) - { -diff -udprP mutt-1.5.20.orig/complete.c mutt-1.5.20/complete.c ---- mutt-1.5.20.orig/complete.c 2009-01-05 00:38:16.000000000 +0200 -+++ mutt-1.5.20/complete.c 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/complete.c +=================================================================== +--- mutt.orig/complete.c 2011-01-19 02:28:25.975243332 -0300 ++++ mutt/complete.c 2011-01-19 02:29:05.165032320 -0300 @@ -25,6 +25,9 @@ #include "mailbox.h" #include "imap.h" @@ -1258,7 +1251,7 @@ diff -udprP mutt-1.5.20.orig/complete.c mutt-1.5.20/complete.c #include #include -@@ -48,9 +51,71 @@ int mutt_complete (char *s, size_t slen) +@@ -48,9 +51,71 @@ char filepart[_POSIX_PATH_MAX]; #ifdef USE_IMAP char imap_path[LONG_STRING]; @@ -1330,10 +1323,11 @@ diff -udprP mutt-1.5.20.orig/complete.c mutt-1.5.20/complete.c /* we can use '/' as a delimiter, imap_complete rewrites it */ if (*s == '=' || *s == '+' || *s == '!') { -diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c ---- mutt-1.5.20.orig/compose.c 2009-03-31 09:52:43.000000000 +0300 -+++ mutt-1.5.20/compose.c 2009-06-15 21:05:24.000000000 +0300 -@@ -32,10 +32,15 @@ +Index: mutt/compose.c +=================================================================== +--- mutt.orig/compose.c 2011-01-19 02:29:05.103043728 -0300 ++++ mutt/compose.c 2011-01-19 02:29:05.166032136 -0300 +@@ -32,11 +32,16 @@ #include "mailbox.h" #include "sort.h" #include "charset.h" @@ -1342,21 +1336,15 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c #ifdef MIXMASTER #include "remailer.h" #endif -+ + +#ifdef USE_NNTP +#include "nntp.h" +#endif - ++ #include #include -@@ -60,18 +65,21 @@ enum - HDR_REPLYTO, - HDR_FCC, - --#ifdef MIXMASTER -- HDR_MIX, --#endif - + #include +@@ -67,11 +72,17 @@ HDR_CRYPT, HDR_CRYPTINFO, @@ -1373,10 +1361,10 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c -#define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */ +#define HDR_XOFFSET 14 +#define TITLE_FMT "%14s" /* Used for Prompts, which are ASCII */ - #define W (COLS - HDR_XOFFSET) + #define W (COLS - HDR_XOFFSET - SidebarWidth) static char *Prompts[] = -@@ -83,6 +91,16 @@ static char *Prompts[] = +@@ -83,6 +94,16 @@ "Subject: ", "Reply-To: ", "Fcc: " @@ -1393,7 +1381,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c }; static struct mapping_t ComposeHelp[] = { -@@ -97,6 +115,19 @@ static struct mapping_t ComposeHelp[] = +@@ -97,6 +118,19 @@ { NULL, 0 } }; @@ -1413,29 +1401,44 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c static void snd_entry (char *b, size_t blen, MUTTMENU *menu, int num) { mutt_FormatString (b, blen, 0, NONULL (AttachFormat), mutt_attach_fmt, -@@ -115,16 +146,16 @@ static void redraw_crypt_lines (HEADER * - if ((WithCrypto & APPLICATION_PGP) && (WithCrypto & APPLICATION_SMIME)) - { - if (!msg->security) -- mvaddstr (HDR_CRYPT, 0, "Security: "); -+ mvaddstr (HDR_CRYPT, 0, " Security: "); - else if (msg->security & APPLICATION_SMIME) -- mvaddstr (HDR_CRYPT, 0, " S/MIME: "); -+ mvaddstr (HDR_CRYPT, 0, " S/MIME: "); - else if (msg->security & APPLICATION_PGP) -- mvaddstr (HDR_CRYPT, 0, " PGP: "); -+ mvaddstr (HDR_CRYPT, 0, " PGP: "); +@@ -112,7 +146,7 @@ + { + int off = 0; + +- mvaddstr (HDR_CRYPT, SidebarWidth, "Security: "); ++ mvprintw (HDR_CRYPT, SidebarWidth, TITLE_FMT, "Security: "); + + if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0) + { +@@ -148,12 +182,15 @@ + clrtoeol (); + + if ((WithCrypto & APPLICATION_PGP) +- && msg->security & APPLICATION_PGP && msg->security & SIGN) +- printw ("%s%s", _(" sign as: "), PgpSignAs ? PgpSignAs : _("")); ++ && msg->security & APPLICATION_PGP && msg->security & SIGN) { ++ printw (TITLE_FMT, _(" sign as: ")); ++ printw ("%s", PgpSignAs ? PgpSignAs : _("")); ++ } + + if ((WithCrypto & APPLICATION_SMIME) + && msg->security & APPLICATION_SMIME && msg->security & SIGN) { +- printw ("%s%s", _(" sign as: "), SmimeDefaultKey ? SmimeDefaultKey : _("")); ++ printw (TITLE_FMT, _(" sign as: ")); ++ printw ("%s", SmimeDefaultKey ? SmimeDefaultKey : _("")); } - else if ((WithCrypto & APPLICATION_SMIME)) -- mvaddstr (HDR_CRYPT, 0, " S/MIME: "); -+ mvaddstr (HDR_CRYPT, 0, " S/MIME: "); - else if ((WithCrypto & APPLICATION_PGP)) -- mvaddstr (HDR_CRYPT, 0, " PGP: "); -+ mvaddstr (HDR_CRYPT, 0, " PGP: "); - else - return; -@@ -252,9 +283,28 @@ static void draw_envelope_addr (int line + if ((WithCrypto & APPLICATION_SMIME) +@@ -175,7 +212,7 @@ + int c; + char *t; + +- mvaddstr (HDR_MIX, SidebarWidth, " Mix: "); ++ mvprintw (HDR_MIX, SidebarWidth, TITLE_FMT, "Mix: "); + + if (!chain) + { +@@ -249,9 +286,28 @@ static void draw_envelope (HEADER *msg, char *fcc) { draw_envelope_addr (HDR_FROM, msg->env->from); @@ -1450,21 +1453,21 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c + } + else + { -+ mvprintw (HDR_TO, 0, TITLE_FMT , Prompts[HDR_NEWSGROUPS - 1]); ++ mvprintw (HDR_TO, SidebarWidth, TITLE_FMT , Prompts[HDR_NEWSGROUPS - 1]); + mutt_paddstr (W, NONULL (msg->env->newsgroups)); -+ mvprintw (HDR_CC, 0, TITLE_FMT , Prompts[HDR_FOLLOWUPTO - 1]); ++ mvprintw (HDR_CC, SidebarWidth, TITLE_FMT , Prompts[HDR_FOLLOWUPTO - 1]); + mutt_paddstr (W, NONULL (msg->env->followup_to)); + if (option (OPTXCOMMENTTO)) + { -+ mvprintw (HDR_BCC, 0, TITLE_FMT , Prompts[HDR_XCOMMENTTO - 1]); ++ mvprintw (HDR_BCC, SidebarWidth, TITLE_FMT , Prompts[HDR_XCOMMENTTO - 1]); + mutt_paddstr (W, NONULL (msg->env->x_comment_to)); + } + } +#endif - mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); + mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); mutt_paddstr (W, NONULL (msg->env->subject)); draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); -@@ -507,6 +557,12 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -504,6 +560,12 @@ /* Sort, SortAux could be changed in mutt_index_menu() */ int oldSort, oldSortAux; struct stat st; @@ -1477,7 +1480,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c mutt_attach_init (msg->content); idx = mutt_gen_attach_list (msg->content, -1, idx, &idxlen, &idxmax, 0, 1); -@@ -517,10 +573,18 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -514,10 +576,18 @@ menu->make_entry = snd_entry; menu->tag = mutt_tag_attach; menu->data = idx; @@ -1496,7 +1499,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c switch (op = mutt_menuLoop (menu)) { case OP_REDRAW: -@@ -533,17 +597,87 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -530,17 +600,87 @@ mutt_message_hook (NULL, msg, M_SEND2HOOK); break; case OP_COMPOSE_EDIT_TO: @@ -1584,7 +1587,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c case OP_COMPOSE_EDIT_SUBJECT: if (msg->env->subject) strfcpy (buf, msg->env->subject, sizeof (buf)); -@@ -706,6 +840,9 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -703,6 +843,9 @@ break; case OP_COMPOSE_ATTACH_MESSAGE: @@ -1594,7 +1597,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c { char *prompt; HEADER *h; -@@ -713,7 +850,22 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -710,7 +853,22 @@ fname[0] = 0; prompt = _("Open mailbox to attach message from"); @@ -1617,7 +1620,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c { strfcpy (fname, NONULL (Context->path), sizeof (fname)); mutt_pretty_mailbox (fname, sizeof (fname)); -@@ -722,6 +874,11 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -719,6 +877,11 @@ if (mutt_enter_fname (prompt, fname, sizeof (fname), &menu->redraw, 1) == -1 || !fname[0]) break; @@ -1629,7 +1632,7 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c mutt_expand_path (fname, sizeof (fname)); #ifdef USE_IMAP if (!mx_is_imap (fname)) -@@ -729,6 +886,9 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -726,6 +889,9 @@ #ifdef USE_POP if (!mx_is_pop (fname)) #endif @@ -1639,23 +1642,11 @@ diff -udprP mutt-1.5.20.orig/compose.c mutt-1.5.20/compose.c /* check to make sure the file exists and is readable */ if (access (fname, R_OK) == -1) { -diff -udprP mutt-1.5.20.orig/config.h.in mutt-1.5.20/config.h.in ---- mutt-1.5.20.orig/config.h.in 2009-06-09 09:51:15.000000000 +0300 -+++ mutt-1.5.20/config.h.in 2009-06-15 21:05:24.000000000 +0300 -@@ -37,6 +37,9 @@ - significant more memory when defined. */ - #undef EXACT_ADDRESS - -+/* Compiling with newsreading support with NNTP */ -+#undef USE_NNTP -+ - /* program to use for shell commands */ - #undef EXECSHELL - -diff -udprP mutt-1.5.20.orig/configure.ac mutt-1.5.20/configure.ac ---- mutt-1.5.20.orig/configure.ac 2009-06-09 09:50:33.000000000 +0300 -+++ mutt-1.5.20/configure.ac 2009-06-15 21:05:24.000000000 +0300 -@@ -599,6 +599,14 @@ if test x"$need_imap" = xyes -o x"$need_ +Index: mutt/configure.ac +=================================================================== +--- mutt.orig/configure.ac 2011-01-19 02:29:04.660125230 -0300 ++++ mutt/configure.ac 2011-01-19 02:29:05.167031952 -0300 +@@ -603,6 +603,14 @@ MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS bcache.o" fi @@ -1670,9 +1661,10 @@ diff -udprP mutt-1.5.20.orig/configure.ac mutt-1.5.20/configure.ac dnl -- end socket dependencies -- if test "$need_socket" = "yes" -diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c ---- mutt-1.5.20.orig/curs_main.c 2009-06-14 05:48:36.000000000 +0300 -+++ mutt-1.5.20/curs_main.c 2009-06-15 21:47:09.000000000 +0300 +Index: mutt/curs_main.c +=================================================================== +--- mutt.orig/curs_main.c 2011-01-19 02:29:05.104043544 -0300 ++++ mutt/curs_main.c 2011-01-19 02:29:05.168031768 -0300 @@ -22,6 +22,7 @@ #include "mutt.h" @@ -1681,7 +1673,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c #include "mutt_menu.h" #include "mailbox.h" #include "mapping.h" -@@ -38,6 +39,10 @@ +@@ -40,6 +41,10 @@ #include "mutt_crypt.h" @@ -1692,7 +1684,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c #include #include -@@ -413,12 +418,27 @@ static struct mapping_t IndexHelp[] = { +@@ -428,12 +433,27 @@ { NULL, 0 } }; @@ -1720,7 +1712,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c int op = OP_NULL; int done = 0; /* controls when to exit the "event" loop */ int i = 0, j; -@@ -439,7 +459,11 @@ int mutt_index_menu (void) +@@ -454,7 +474,11 @@ menu->make_entry = index_make_entry; menu->color = index_color; menu->current = ci_first_message (); @@ -1733,9 +1725,9 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c if (!attach_msg) mutt_buffy_check(1); /* force the buffy check after we enter the folder */ -@@ -690,6 +714,9 @@ int mutt_index_menu (void) - imap_disallow_reopen (Context); - #endif +@@ -712,6 +736,9 @@ + mutt_curs_set (1); /* fallback from the pager */ + } +#ifdef USE_NNTP + unset_option (OPTNEWS); /* for any case */ @@ -1743,7 +1735,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c switch (op) { -@@ -740,6 +767,120 @@ int mutt_index_menu (void) +@@ -762,6 +789,120 @@ menu_current_bottom (menu); break; @@ -1801,7 +1793,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c + menu->redraw = REDRAW_FULL; + } + else -+ mutt_error (_("Article %s not found on server"), buf); ++ mutt_error (_("Article %s not found on server"), buf); + } + } + break; @@ -1864,7 +1856,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c case OP_JUMP: CHECK_MSGCOUNT; -@@ -836,11 +977,33 @@ int mutt_index_menu (void) +@@ -858,11 +999,33 @@ break; case OP_MAIN_LIMIT: @@ -1899,8 +1891,8 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c { if (menu->oldcurrent >= 0) { -@@ -1057,15 +1220,22 @@ int mutt_index_menu (void) - +@@ -1102,15 +1265,22 @@ + case OP_SIDEBAR_OPEN: case OP_MAIN_CHANGE_FOLDER: case OP_MAIN_NEXT_UNREAD_MAILBOX: - @@ -1929,7 +1921,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c cp = _("Open mailbox in read-only mode"); else cp = _("Open mailbox"); -@@ -1084,6 +1254,21 @@ int mutt_index_menu (void) +@@ -1129,6 +1299,21 @@ } else { @@ -1950,8 +1942,8 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c +#endif mutt_buffy (buf, sizeof (buf)); - if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) -@@ -1103,6 +1288,14 @@ int mutt_index_menu (void) + if ( op == OP_SIDEBAR_OPEN ) { +@@ -1152,6 +1337,14 @@ } } @@ -1964,9 +1956,9 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c + else +#endif mutt_expand_path (buf, sizeof (buf)); + set_curbuffy(buf); if (mx_get_magic (buf) <= 0) - { -@@ -1140,15 +1333,18 @@ int mutt_index_menu (void) +@@ -1199,15 +1392,18 @@ CurrentMenu = MENU_MAIN; mutt_folder_hook (buf); @@ -1988,7 +1980,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c mutt_clear_error (); mutt_buffy_check(1); /* force the buffy check after we have changed the folder */ -@@ -1519,6 +1715,15 @@ int mutt_index_menu (void) +@@ -1580,6 +1776,15 @@ CHECK_READONLY; CHECK_ACL(M_ACL_WRITE, _("flag message")); @@ -2004,7 +1996,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c if (tag) { for (j = 0; j < Context->vcount; j++) -@@ -1866,6 +2071,17 @@ int mutt_index_menu (void) +@@ -1931,6 +2136,17 @@ } break; @@ -2022,11 +2014,10 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c case OP_DISPLAY_ADDRESS: CHECK_MSGCOUNT; -@@ -1993,6 +2209,15 @@ int mutt_index_menu (void) - menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; +@@ -2059,6 +2275,15 @@ } #endif -+ + +#ifdef USE_NNTP + if (Context->magic == M_NNTP) + { @@ -2035,10 +2026,11 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c + break; + } +#endif - ++ MAYBE_REDRAW (menu->redraw); break; -@@ -2065,6 +2290,41 @@ int mutt_index_menu (void) + +@@ -2135,6 +2360,41 @@ menu->redraw = REDRAW_FULL; break; @@ -2080,7 +2072,7 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c case OP_REPLY: CHECK_ATTACH; -@@ -2140,6 +2400,12 @@ int mutt_index_menu (void) +@@ -2212,6 +2472,12 @@ CHECK_READONLY; CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); @@ -2091,12 +2083,13 @@ diff -udprP mutt-1.5.20.orig/curs_main.c mutt-1.5.20/curs_main.c +#endif + rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0, - op == OP_UNDELETE_THREAD ? 0 : 1); - -diff -udprP mutt-1.5.20.orig/doc/manual.xml.head mutt-1.5.20/doc/manual.xml.head ---- mutt-1.5.20.orig/doc/manual.xml.head 2009-05-30 20:20:08.000000000 +0300 -+++ mutt-1.5.20/doc/manual.xml.head 2009-06-15 21:05:24.000000000 +0300 -@@ -1568,6 +1568,22 @@ fo-table for details. + op == OP_UNDELETE_THREAD ? 0 : 1) + + mutt_thread_set_flag (CURHDR, M_PURGED, 0, +Index: mutt/doc/manual.xml.head +=================================================================== +--- mutt.orig/doc/manual.xml.head 2011-01-19 02:29:04.663124678 -0300 ++++ mutt/doc/manual.xml.head 2011-01-19 02:29:05.171031216 -0300 +@@ -1611,6 +1611,22 @@ @@ -2119,21 +2112,22 @@ diff -udprP mutt-1.5.20.orig/doc/manual.xml.head mutt-1.5.20/doc/manual.xml.head -diff -udprP mutt-1.5.20.orig/doc/mutt.man mutt-1.5.20/doc/mutt.man ---- mutt-1.5.20.orig/doc/mutt.man 2009-06-07 03:32:44.000000000 +0300 -+++ mutt-1.5.20/doc/mutt.man 2009-06-15 21:07:47.000000000 +0300 -@@ -23,8 +23,8 @@ mutt \- The Mutt Mail User Agent +Index: mutt/doc/mutt.man +=================================================================== +--- mutt.orig/doc/mutt.man 2011-01-19 02:29:04.732111984 -0300 ++++ mutt/doc/mutt.man 2011-01-19 02:29:05.173030848 -0300 +@@ -23,8 +23,8 @@ .SH SYNOPSIS .PP .B mutt --[-nRyzZ] +-[\-nRyzZ] -[\-e \fIcmd\fP] [\-F \fIfile\fP] [\-m \fItype\fP] [\-f \fIfile\fP] -+[-GnRyzZ] ++[\-GnRyzZ] +[\-e \fIcmd\fP] [\-F \fIfile\fP] [\-g \fIserver\fP] [\-m \fItype\fP] [\-f \fIfile\fP] .PP .B mutt [\-nx] -@@ -101,6 +101,10 @@ files. +@@ -101,6 +101,10 @@ Specify which mailbox to load. .IP "-F \fImuttrc\fP" Specify an initialization file to read instead of ~/.muttrc @@ -2144,10 +2138,11 @@ diff -udprP mutt-1.5.20.orig/doc/mutt.man mutt-1.5.20/doc/mutt.man .IP "-h" Display help. .IP "-H \fIdraft\fP" -diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h ---- mutt-1.5.20.orig/functions.h 2009-04-30 08:36:17.000000000 +0300 -+++ mutt-1.5.20/functions.h 2009-06-15 21:05:24.000000000 +0300 -@@ -88,6 +88,10 @@ struct binding_t OpMain[] = { /* map: in +Index: mutt/functions.h +=================================================================== +--- mutt.orig/functions.h 2011-01-19 02:29:05.105043360 -0300 ++++ mutt/functions.h 2011-01-19 02:29:05.174030664 -0300 +@@ -88,6 +88,10 @@ { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" }, { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, @@ -2158,7 +2153,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL }, { "collapse-thread", OP_MAIN_COLLAPSE_THREAD, "\033v" }, { "collapse-all", OP_MAIN_COLLAPSE_ALL, "\033V" }, -@@ -101,7 +105,15 @@ struct binding_t OpMain[] = { /* map: in +@@ -101,7 +105,15 @@ { "edit", OP_EDIT_MESSAGE, "e" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, @@ -2175,7 +2170,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "group-reply", OP_GROUP_REPLY, "g" }, #ifdef USE_POP { "fetch-mail", OP_MAIN_FETCH_MAIL, "G" }, -@@ -127,6 +139,9 @@ struct binding_t OpMain[] = { /* map: in +@@ -129,6 +141,9 @@ { "sort-mailbox", OP_SORT, "o" }, { "sort-reverse", OP_SORT_REVERSE, "O" }, { "print-message", OP_PRINT, "p" }, @@ -2185,7 +2180,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, { "previous-subthread", OP_MAIN_PREV_SUBTHREAD, "\033p" }, { "recall-message", OP_RECALL_MESSAGE, "R" }, -@@ -146,6 +161,10 @@ struct binding_t OpMain[] = { /* map: in +@@ -148,6 +163,10 @@ { "show-version", OP_VERSION, "V" }, { "set-flag", OP_MAIN_SET_FLAG, "w" }, { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, @@ -2196,7 +2191,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "display-message", OP_DISPLAY_MESSAGE, M_ENTER_S }, { "buffy-list", OP_BUFFY_LIST, "." }, { "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" }, -@@ -157,7 +176,7 @@ struct binding_t OpMain[] = { /* map: in +@@ -159,7 +178,7 @@ { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD, "\033\t" }, { "next-unread", OP_MAIN_NEXT_UNREAD, NULL }, { "previous-unread", OP_MAIN_PREV_UNREAD, NULL }, @@ -2205,7 +2200,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "extract-keys", OP_EXTRACT_KEYS, "\013" }, -@@ -177,6 +196,10 @@ struct binding_t OpPager[] = { /* map: p +@@ -184,6 +203,10 @@ { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" }, { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, @@ -2216,7 +2211,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL }, { "copy-message", OP_COPY_MESSAGE, "C" }, { "decode-copy", OP_DECODE_COPY, "\033C" }, -@@ -187,8 +210,12 @@ struct binding_t OpPager[] = { /* map: p +@@ -194,8 +217,12 @@ { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, { "edit", OP_EDIT_MESSAGE, "e" }, { "edit-type", OP_EDIT_TYPE, "\005" }, @@ -2230,17 +2225,17 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "group-reply", OP_GROUP_REPLY, "g" }, #ifdef USE_IMAP { "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL }, -@@ -207,6 +234,9 @@ struct binding_t OpPager[] = { /* map: p - { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, - { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, +@@ -217,6 +244,9 @@ + { "sort-mailbox", OP_SORT, "o" }, + { "sort-reverse", OP_SORT_REVERSE, "O" }, { "print-message", OP_PRINT, "p" }, +#ifdef USE_NNTP + { "post-message", OP_POST, "P" }, +#endif { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, { "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" }, - { "quit", OP_QUIT, "Q" }, -@@ -254,7 +284,7 @@ struct binding_t OpPager[] = { /* map: p + { "purge-message", OP_PURGE_MESSAGE, NULL }, +@@ -265,7 +295,7 @@ { "half-down", OP_HALF_DOWN, NULL }, { "previous-line", OP_PREV_LINE, NULL }, { "bottom", OP_PAGER_BOTTOM, NULL }, @@ -2249,7 +2244,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h -@@ -275,6 +305,10 @@ struct binding_t OpAttach[] = { /* map: +@@ -291,6 +321,10 @@ { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" }, { "edit-type", OP_EDIT_TYPE, "\005" }, @@ -2260,7 +2255,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "print-entry", OP_PRINT, "p" }, { "save-entry", OP_SAVE, "s" }, { "pipe-entry", OP_PIPE, "|" }, -@@ -300,6 +334,7 @@ struct binding_t OpAttach[] = { /* map: +@@ -316,6 +350,7 @@ struct binding_t OpCompose[] = { /* map: compose */ { "attach-file", OP_COMPOSE_ATTACH_FILE, "a" }, { "attach-message", OP_COMPOSE_ATTACH_MESSAGE, "A" }, @@ -2268,7 +2263,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "edit-bcc", OP_COMPOSE_EDIT_BCC, "b" }, { "edit-cc", OP_COMPOSE_EDIT_CC, "c" }, { "copy-file", OP_SAVE, "C" }, -@@ -319,6 +354,11 @@ struct binding_t OpCompose[] = { /* map: +@@ -335,6 +370,11 @@ { "print-entry", OP_PRINT, "l" }, { "edit-mime", OP_COMPOSE_EDIT_MIME, "m" }, { "new-mime", OP_COMPOSE_NEW_MIME, "n" }, @@ -2280,7 +2275,7 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "postpone-message", OP_COMPOSE_POSTPONE_MESSAGE, "P" }, { "edit-reply-to", OP_COMPOSE_EDIT_REPLY_TO, "r" }, { "rename-file", OP_COMPOSE_RENAME_FILE, "R" }, -@@ -370,14 +410,25 @@ struct binding_t OpBrowser[] = { /* map: +@@ -386,14 +426,25 @@ { "select-new", OP_BROWSER_NEW_FILE, "N" }, { "check-new", OP_CHECK_NEW, NULL }, { "toggle-mailboxes", OP_TOGGLE_MAILBOXES, "\t" }, @@ -2306,10 +2301,11 @@ diff -udprP mutt-1.5.20.orig/functions.h mutt-1.5.20/functions.h { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB, "T" }, #endif { NULL, 0, NULL } -diff -udprP mutt-1.5.20.orig/globals.h mutt-1.5.20/globals.h ---- mutt-1.5.20.orig/globals.h 2009-06-03 23:48:31.000000000 +0300 -+++ mutt-1.5.20/globals.h 2009-06-15 21:05:24.000000000 +0300 -@@ -95,6 +95,15 @@ WHERE char *MixEntryFormat; +Index: mutt/globals.h +=================================================================== +--- mutt.orig/globals.h 2011-01-19 02:29:05.105043360 -0300 ++++ mutt/globals.h 2011-01-19 02:29:05.174030664 -0300 +@@ -95,6 +95,15 @@ #endif WHERE char *Muttrc INITVAL (NULL); @@ -2325,7 +2321,7 @@ diff -udprP mutt-1.5.20.orig/globals.h mutt-1.5.20/globals.h WHERE char *Outbox; WHERE char *Pager; WHERE char *PagerFmt; -@@ -188,6 +197,11 @@ extern unsigned char QuadOptions[]; +@@ -192,6 +201,11 @@ WHERE unsigned short Counter INITVAL (0); @@ -2337,10 +2333,11 @@ diff -udprP mutt-1.5.20.orig/globals.h mutt-1.5.20/globals.h WHERE short ConnectTimeout; WHERE short HistSize; WHERE short MenuContext; -diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c ---- mutt-1.5.20.orig/hash.c 2009-03-31 09:52:43.000000000 +0300 -+++ mutt-1.5.20/hash.c 2009-06-15 21:19:59.000000000 +0300 -@@ -57,6 +57,7 @@ HASH *hash_create (int nelem, int lower) +Index: mutt/hash.c +=================================================================== +--- mutt.orig/hash.c 2011-01-19 02:28:26.220198262 -0300 ++++ mutt/hash.c 2011-01-19 02:29:05.175030480 -0300 +@@ -57,6 +57,7 @@ if (nelem == 0) nelem = 2; table->nelem = nelem; @@ -2348,7 +2345,7 @@ diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c table->table = safe_calloc (nelem, sizeof (struct hash_elem *)); if (lower) { -@@ -71,6 +72,29 @@ HASH *hash_create (int nelem, int lower) +@@ -71,6 +72,29 @@ return table; } @@ -2378,7 +2375,7 @@ diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c /* table hash table to update * key key to hash on * data data to associate with `key' -@@ -90,6 +114,7 @@ int hash_insert (HASH * table, const cha +@@ -90,6 +114,7 @@ { ptr->next = table->table[h]; table->table[h] = ptr; @@ -2386,7 +2383,7 @@ diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c } else { -@@ -112,6 +137,7 @@ int hash_insert (HASH * table, const cha +@@ -112,6 +137,7 @@ else table->table[h] = ptr; ptr->next = tmp; @@ -2394,7 +2391,7 @@ diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c } return h; } -@@ -142,6 +168,7 @@ void hash_delete_hash (HASH * table, int +@@ -142,6 +168,7 @@ if (destroy) destroy (ptr->data); FREE (&ptr); @@ -2402,10 +2399,11 @@ diff -udprP mutt-1.5.20.orig/hash.c mutt-1.5.20/hash.c ptr = *last; } -diff -udprP mutt-1.5.20.orig/hash.h mutt-1.5.20/hash.h ---- mutt-1.5.20.orig/hash.h 2009-03-31 09:52:43.000000000 +0300 -+++ mutt-1.5.20/hash.h 2009-06-15 21:05:24.000000000 +0300 -@@ -28,7 +28,7 @@ struct hash_elem +Index: mutt/hash.h +=================================================================== +--- mutt.orig/hash.h 2011-01-19 02:28:26.318180235 -0300 ++++ mutt/hash.h 2011-01-19 02:29:05.175030480 -0300 +@@ -28,7 +28,7 @@ typedef struct { @@ -2414,7 +2412,7 @@ diff -udprP mutt-1.5.20.orig/hash.h mutt-1.5.20/hash.h struct hash_elem **table; unsigned int (*hash_string)(const unsigned char *, unsigned int); int (*cmp_string)(const char *, const char *); -@@ -41,6 +41,7 @@ HASH; +@@ -41,6 +41,7 @@ HASH *hash_create (int nelem, int lower); int hash_insert (HASH * table, const char *key, void *data, int allow_dup); @@ -2422,10 +2420,11 @@ diff -udprP mutt-1.5.20.orig/hash.h mutt-1.5.20/hash.h void *hash_find_hash (const HASH * table, int hash, const char *key); void hash_delete_hash (HASH * table, int hash, const char *key, const void *data, void (*destroy) (void *)); -diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c ---- mutt-1.5.20.orig/hdrline.c 2009-04-13 19:24:55.000000000 +0300 -+++ mutt-1.5.20/hdrline.c 2009-06-15 21:05:24.000000000 +0300 -@@ -211,6 +211,7 @@ int mutt_user_is_recipient (HEADER *h) +Index: mutt/hdrline.c +=================================================================== +--- mutt.orig/hdrline.c 2011-01-19 02:28:26.114217762 -0300 ++++ mutt/hdrline.c 2011-01-19 02:29:05.176030296 -0300 +@@ -211,6 +211,7 @@ * %E = number of messages in current thread * %f = entire from line * %F = like %n, unless from self @@ -2433,7 +2432,7 @@ diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c * %i = message-id * %l = number of lines in the message * %L = like %F, except `lists' are displayed first -@@ -219,12 +220,14 @@ int mutt_user_is_recipient (HEADER *h) +@@ -219,12 +220,14 @@ * %N = score * %O = like %L, except using address instead of name * %P = progress indicator for builtin pager @@ -2448,7 +2447,7 @@ diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c * %X = number of MIME attachments * %y = `x-label:' field (if present) * %Y = `x-label:' field (if present, tree unfolded, and != parent's x-label) -@@ -457,6 +460,12 @@ hdr_format_str (char *dest, +@@ -457,6 +460,12 @@ break; @@ -2461,7 +2460,7 @@ diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c case 'i': mutt_format_s (dest, destlen, prefix, hdr->env->message_id ? hdr->env->message_id : ""); break; -@@ -548,6 +557,15 @@ hdr_format_str (char *dest, +@@ -548,6 +557,15 @@ strfcpy(dest, NONULL(hfi->pager_progress), destlen); break; @@ -2477,7 +2476,7 @@ diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c case 's': if (flags & M_FORMAT_TREE && !hdr->collapsed) -@@ -637,6 +655,13 @@ hdr_format_str (char *dest, +@@ -637,6 +655,13 @@ mutt_format_s (dest, destlen, prefix, buf2); break; @@ -2491,23 +2490,11 @@ diff -udprP mutt-1.5.20.orig/hdrline.c mutt-1.5.20/hdrline.c case 'Z': ch = ' '; -diff -udprP mutt-1.5.20.orig/headers.c mutt-1.5.20/headers.c ---- mutt-1.5.20.orig/headers.c 2009-04-30 08:36:17.000000000 +0300 -+++ mutt-1.5.20/headers.c 2009-06-15 21:17:07.000000000 +0300 -@@ -114,6 +114,9 @@ void mutt_edit_headers (const char *edit - $edit_headers set, we remove References: as they're likely invalid; - we can simply compare strings as we don't generate References for - multiple Message-Ids in IRT anyways */ -+#ifdef USE_NNTP -+ if (!option (OPTNEWSSEND)) -+#endif - if (!n->in_reply_to || (msg->env->in_reply_to && - mutt_strcmp (n->in_reply_to->data, - msg->env->in_reply_to->data) != 0)) -diff -udprP mutt-1.5.20.orig/init.c mutt-1.5.20/init.c ---- mutt-1.5.20.orig/init.c 2009-06-01 19:29:32.000000000 +0300 -+++ mutt-1.5.20/init.c 2009-06-15 21:05:24.000000000 +0300 -@@ -2966,6 +2966,28 @@ void mutt_init (int skip_sys_rc, LIST *c +Index: mutt/init.c +=================================================================== +--- mutt.orig/init.c 2011-01-19 02:29:05.001062494 -0300 ++++ mutt/init.c 2011-01-19 02:29:05.177030112 -0300 +@@ -3093,6 +3093,28 @@ else Fqdn = safe_strdup(NONULL(Hostname)); @@ -2536,10 +2523,11 @@ diff -udprP mutt-1.5.20.orig/init.c mutt-1.5.20/init.c if ((p = getenv ("MAIL"))) Spoolfile = safe_strdup (p); else if ((p = getenv ("MAILDIR"))) -diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h ---- mutt-1.5.20.orig/init.h 2009-06-14 00:35:21.000000000 +0300 -+++ mutt-1.5.20/init.h 2009-06-15 21:15:03.000000000 +0300 -@@ -176,6 +176,20 @@ struct option_t MuttVars[] = { +Index: mutt/init.h +=================================================================== +--- mutt.orig/init.h 2011-01-19 02:29:05.147035632 -0300 ++++ mutt/init.h 2011-01-19 02:29:05.179029744 -0300 +@@ -176,6 +176,20 @@ ** If \fIset\fP, Mutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ @@ -2560,7 +2548,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "assumed_charset", DT_STR, R_NONE, UL &AssumedCharset, UL 0}, /* ** .pp -@@ -322,6 +336,14 @@ struct option_t MuttVars[] = { +@@ -328,6 +342,14 @@ ** follow these menus. The option is \fIunset\fP by default because many ** visual terminals don't permit making the cursor invisible. */ @@ -2575,7 +2563,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h #if defined(USE_SSL) { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" }, /* -@@ -797,6 +819,16 @@ struct option_t MuttVars[] = { +@@ -804,6 +826,16 @@ ** sent to both the list and your address, resulting in two copies ** of the same email for you. */ @@ -2592,7 +2580,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "force_name", DT_BOOL, R_NONE, OPTFORCENAME, 0 }, /* ** .pp -@@ -879,6 +911,27 @@ struct option_t MuttVars[] = { +@@ -886,6 +918,27 @@ ** a regular expression that will match the whole name so mutt will expand ** ``Franklin'' to ``Franklin, Steve''. */ @@ -2620,7 +2608,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "hdr_format", DT_SYN, R_NONE, UL "index_format", 0 }, /* */ -@@ -1255,6 +1308,7 @@ struct option_t MuttVars[] = { +@@ -1267,6 +1320,7 @@ ** .dt %E .dd number of messages in current thread ** .dt %f .dd sender (address + real name), either From: or Return-Path: ** .dt %F .dd author name, or recipient name if the message is from you @@ -2628,22 +2616,22 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h ** .dt %H .dd spam attribute(s) of this message ** .dt %i .dd message-id of the current message ** .dt %l .dd number of lines in the message (does not work with maildir, -@@ -1270,12 +1324,14 @@ struct option_t MuttVars[] = { +@@ -1282,12 +1336,14 @@ ** stashed the message: list name or recipient name ** if not sent to a list - ** .dt %P .dd progress indicator for the builtin pager (how much of the file has been displayed) -+ ** .dt %R .dd `x-comment-to:' field (if present and compiled with nntp support) + ** .dt %P .dd progress indicator for the built-in pager (how much of the file has been displayed) ++ ** .dt %R .dd ``x-comment-to:'' field (if present and compiled with nntp support) ** .dt %s .dd subject of the message ** .dt %S .dd status of the message (``N''/``D''/``d''/``!''/``r''/\(as) ** .dt %t .dd ``To:'' field (recipients) ** .dt %T .dd the appropriate character from the $$to_chars string ** .dt %u .dd user (login) name of the author ** .dt %v .dd first name of the author, or the recipient if the message is from you -+ ** .dt %W .dd name of organization of author (`organization:' field) ++ ** .dt %W .dd name of organization of author (``organization:'' field) ** .dt %X .dd number of attachments ** (please see the ``$attachments'' section for possible speed effects) ** .dt %y .dd ``X-Label:'' field, if present -@@ -1310,6 +1366,21 @@ struct option_t MuttVars[] = { +@@ -1322,6 +1378,21 @@ ** Note that these expandos are supported in ** ``$save-hook'', ``$fcc-hook'' and ``$fcc-save-hook'', too. */ @@ -2665,7 +2653,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "ispell", DT_PATH, R_NONE, UL &Ispell, UL ISPELL }, /* ** .pp -@@ -1533,6 +1604,15 @@ struct option_t MuttVars[] = { +@@ -1556,6 +1627,15 @@ ** menu, attachments which cannot be decoded in a reasonable manner will ** be attached to the newly composed message if this option is \fIset\fP. */ @@ -2681,7 +2669,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h #ifdef MIXMASTER { "mix_entry_format", DT_STR, R_NONE, UL &MixEntryFormat, UL "%4n %c %-16s %a" }, /* -@@ -1580,6 +1660,77 @@ struct option_t MuttVars[] = { +@@ -1606,6 +1686,77 @@ ** See also $$read_inc, $$write_inc and $$net_inc. */ #endif @@ -2759,7 +2747,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "pager", DT_PATH, R_NONE, UL &Pager, UL "builtin" }, /* ** .pp -@@ -2079,6 +2230,16 @@ struct option_t MuttVars[] = { +@@ -2131,6 +2282,16 @@ { "post_indent_str", DT_SYN, R_NONE, UL "post_indent_string", 0 }, /* */ @@ -2776,7 +2764,7 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "postpone", DT_QUAD, R_NONE, OPT_POSTPONE, M_ASKYES }, /* ** .pp -@@ -2479,6 +2640,28 @@ struct option_t MuttVars[] = { +@@ -2534,6 +2695,28 @@ ** Command to use when spawning a subshell. By default, the user's login ** shell from \fC/etc/passwd\fP is used. */ @@ -2805,9 +2793,9 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h { "sig_dashes", DT_BOOL, R_NONE, OPTSIGDASHES, 1 }, /* ** .pp -@@ -3337,6 +3520,14 @@ struct option_t MuttVars[] = { - ** Also see the $$read_inc, $$net_inc and $$time_inc variables and the - ** ``$tuning'' section of the manual for performance considerations. +@@ -3455,6 +3638,14 @@ + ** xterm_set_titles has been set. This string is identical in formatting + ** to the one used by ``$$status_format''. */ +#ifdef USE_NNTP + { "x_comment_to", DT_BOOL, R_NONE, OPTXCOMMENTTO, 0 }, @@ -2820,10 +2808,11 @@ diff -udprP mutt-1.5.20.orig/init.h mutt-1.5.20/init.h /*--*/ { NULL, 0, 0, 0, 0 } }; -diff -udprP mutt-1.5.20.orig/keymap.c mutt-1.5.20/keymap.c ---- mutt-1.5.20.orig/keymap.c 2008-11-29 23:09:10.000000000 +0200 -+++ mutt-1.5.20/keymap.c 2009-06-15 21:05:24.000000000 +0300 -@@ -654,7 +654,6 @@ void km_init (void) +Index: mutt/keymap.c +=================================================================== +--- mutt.orig/keymap.c 2011-01-19 02:28:26.107219050 -0300 ++++ mutt/keymap.c 2011-01-19 02:29:05.180029560 -0300 +@@ -780,7 +780,6 @@ km_bindkey ("", MENU_MAIN, OP_DISPLAY_MESSAGE); km_bindkey ("x", MENU_PAGER, OP_EXIT); @@ -2831,10 +2820,11 @@ diff -udprP mutt-1.5.20.orig/keymap.c mutt-1.5.20/keymap.c km_bindkey ("", MENU_PAGER, OP_PREV_LINE); km_bindkey ("", MENU_PAGER, OP_NEXT_PAGE); km_bindkey ("", MENU_PAGER, OP_PREV_PAGE); -diff -udprP mutt-1.5.20.orig/mailbox.h mutt-1.5.20/mailbox.h ---- mutt-1.5.20.orig/mailbox.h 2009-04-30 08:36:17.000000000 +0300 -+++ mutt-1.5.20/mailbox.h 2009-06-15 21:05:24.000000000 +0300 -@@ -74,6 +74,9 @@ int mx_is_imap (const char *); +Index: mutt/mailbox.h +=================================================================== +--- mutt.orig/mailbox.h 2011-01-19 02:29:05.107042992 -0300 ++++ mutt/mailbox.h 2011-01-19 02:29:05.180029560 -0300 +@@ -75,6 +75,9 @@ #ifdef USE_POP int mx_is_pop (const char *); #endif @@ -2844,9 +2834,10 @@ diff -udprP mutt-1.5.20.orig/mailbox.h mutt-1.5.20/mailbox.h int mx_access (const char*, int); int mx_check_empty (const char *); -diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c ---- mutt-1.5.20.orig/main.c 2009-06-01 19:29:32.000000000 +0300 -+++ mutt-1.5.20/main.c 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/main.c +=================================================================== +--- mutt.orig/main.c 2011-01-19 02:29:04.669123574 -0300 ++++ mutt/main.c 2011-01-19 02:29:05.181029376 -0300 @@ -60,6 +60,10 @@ #include #endif @@ -2858,7 +2849,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c static const char *ReachingUs = N_("\ To contact the developers, please mail to .\n\ To report a bug, please visit http://bugs.mutt.org/.\n"); -@@ -133,6 +137,8 @@ options:\n\ +@@ -134,6 +138,8 @@ " -e \tspecify a command to be executed after initialization\n\ -f \tspecify which mailbox to read\n\ -F \tspecify an alternate muttrc file\n\ @@ -2867,7 +2858,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c -H \tspecify a draft file to read header and body from\n\ -i \tspecify a file which Mutt should include in the body\n\ -m \tspecify a default mailbox type\n\ -@@ -255,6 +261,12 @@ static void show_version (void) +@@ -254,6 +260,12 @@ "-USE_POP " #endif @@ -2880,7 +2871,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c #ifdef USE_IMAP "+USE_IMAP " #else -@@ -522,6 +534,9 @@ static void start_curses (void) +@@ -528,6 +540,9 @@ #define M_NOSYSRC (1<<2) /* -n */ #define M_RO (1<<3) /* -R */ #define M_SELECT (1<<4) /* -y */ @@ -2890,7 +2881,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c int main (int argc, char **argv) { -@@ -594,7 +609,11 @@ int main (int argc, char **argv) +@@ -600,7 +615,11 @@ argv[nargc++] = argv[optind]; } @@ -2902,7 +2893,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c switch (i) { case 'A': -@@ -691,6 +710,20 @@ int main (int argc, char **argv) +@@ -697,6 +716,20 @@ flags |= M_SELECT; break; @@ -2923,7 +2914,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c case 'z': flags |= M_IGNORE; break; -@@ -978,6 +1011,18 @@ int main (int argc, char **argv) +@@ -984,6 +1017,18 @@ } else if (flags & M_SELECT) { @@ -2942,7 +2933,7 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c if (!Incoming) { mutt_endwin _("No incoming mailboxes defined."); exit (1); -@@ -993,6 +1038,15 @@ int main (int argc, char **argv) +@@ -999,6 +1044,15 @@ if (!folder[0]) strfcpy (folder, NONULL(Spoolfile), sizeof (folder)); @@ -2958,10 +2949,11 @@ diff -udprP mutt-1.5.20.orig/main.c mutt-1.5.20/main.c mutt_expand_path (folder, sizeof (folder)); mutt_str_replace (&CurrentFolder, folder); -diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h ---- mutt-1.5.20.orig/mutt.h 2009-06-13 01:15:42.000000000 +0300 -+++ mutt-1.5.20/mutt.h 2009-06-15 21:05:24.000000000 +0300 -@@ -229,6 +229,9 @@ enum +Index: mutt/mutt.h +=================================================================== +--- mutt.orig/mutt.h 2011-01-19 02:29:05.149035264 -0300 ++++ mutt/mutt.h 2011-01-19 02:29:05.181029376 -0300 +@@ -241,6 +241,9 @@ M_PGP_KEY, M_XLABEL, M_MIMEATTACH, @@ -2971,7 +2963,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h /* Options for Mailcap lookup */ M_EDIT, -@@ -285,6 +288,12 @@ enum +@@ -297,6 +300,12 @@ #endif OPT_SUBJECT, OPT_VERIFYSIG, /* verify PGP signatures */ @@ -2984,7 +2976,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h /* THIS MUST BE THE LAST VALUE. */ OPT_MAX -@@ -300,6 +309,7 @@ enum +@@ -312,6 +321,7 @@ #define SENDMAILX (1<<6) #define SENDKEY (1<<7) #define SENDRESEND (1<<8) @@ -2992,7 +2984,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h /* flags to _mutt_select_file() */ #define M_SEL_BUFFY (1<<0) -@@ -319,6 +329,8 @@ enum +@@ -331,6 +341,8 @@ OPTASCIICHARS, OPTASKBCC, OPTASKCC, @@ -3001,7 +2993,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h OPTATTACHSPLIT, OPTAUTOEDIT, OPTAUTOTAG, -@@ -396,6 +408,9 @@ enum +@@ -409,6 +421,9 @@ OPTMETOO, OPTMHPURGE, OPTMIMEFORWDECODE, @@ -3011,7 +3003,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h OPTNARROWTREE, OPTPAGERSTOP, OPTPIPEDECODE, -@@ -477,6 +492,16 @@ enum +@@ -494,6 +509,16 @@ OPTPGPAUTOINLINE, OPTPGPREPLYINLINE, @@ -3028,7 +3020,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h /* pseudo options */ OPTAUXSORT, /* (pseudo) using auxillary sort function */ -@@ -497,6 +522,7 @@ enum +@@ -514,6 +539,7 @@ OPTSORTSUBTHREADS, /* (pseudo) used when $sort_aux changes */ OPTNEEDRESCORE, /* (pseudo) set when the `score' command is used */ OPTATTACHMSG, /* (pseudo) used by attach-message */ @@ -3036,7 +3028,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h OPTKEEPQUIET, /* (pseudo) shut up the message and refresh * functions while we are executing an * external program. -@@ -507,6 +533,12 @@ enum +@@ -524,6 +550,12 @@ OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */ OPTUNBUFFEREDINPUT, /* (pseudo) don't use key buffer */ @@ -3049,7 +3041,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h OPTMAX }; -@@ -585,6 +617,13 @@ typedef struct envelope +@@ -603,6 +635,13 @@ char *supersedes; char *date; char *x_label; @@ -3063,7 +3055,7 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h BUFFER *spam; LIST *references; /* message references (in reverse order) */ LIST *in_reply_to; /* in-reply-to header content */ -@@ -751,6 +790,9 @@ typedef struct header +@@ -774,6 +813,9 @@ ENVELOPE *env; /* envelope information */ BODY *content; /* list of MIME parts */ char *path; @@ -3072,8 +3064,8 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h +#endif char *tree; /* character string to print thread tree */ - struct thread *thread; -@@ -766,7 +808,7 @@ typedef struct header + THREAD *thread; +@@ -789,7 +831,7 @@ int refno; /* message number on server */ #endif @@ -3082,10 +3074,11 @@ diff -udprP mutt-1.5.20.orig/mutt.h mutt-1.5.20/mutt.h void *data; /* driver-specific data */ #endif -diff -udprP mutt-1.5.20.orig/muttlib.c mutt-1.5.20/muttlib.c ---- mutt-1.5.20.orig/muttlib.c 2009-05-19 03:11:35.000000000 +0300 -+++ mutt-1.5.20/muttlib.c 2009-06-15 21:05:24.000000000 +0300 -@@ -301,7 +301,7 @@ void mutt_free_header (HEADER **h) +Index: mutt/muttlib.c +=================================================================== +--- mutt.orig/muttlib.c 2011-01-19 02:29:05.111042256 -0300 ++++ mutt/muttlib.c 2011-01-19 02:29:05.182029192 -0300 +@@ -337,7 +337,7 @@ #ifdef MIXMASTER mutt_free_list (&(*h)->chain); #endif @@ -3094,7 +3087,7 @@ diff -udprP mutt-1.5.20.orig/muttlib.c mutt-1.5.20/muttlib.c FREE (&(*h)->data); #endif FREE (h); /* __FREE_CHECKED__ */ -@@ -689,6 +689,13 @@ void mutt_free_envelope (ENVELOPE **p) +@@ -725,6 +725,13 @@ FREE (&(*p)->supersedes); FREE (&(*p)->date); FREE (&(*p)->x_label); @@ -3108,7 +3101,7 @@ diff -udprP mutt-1.5.20.orig/muttlib.c mutt-1.5.20/muttlib.c mutt_buffer_free (&(*p)->spam); -@@ -1470,6 +1477,14 @@ int mutt_save_confirm (const char *s, st +@@ -1578,6 +1585,14 @@ } } @@ -3123,10 +3116,11 @@ diff -udprP mutt-1.5.20.orig/muttlib.c mutt-1.5.20/muttlib.c if (stat (s, st) != -1) { if (magic == -1) -diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c ---- mutt-1.5.20.orig/mx.c 2009-06-11 07:29:41.000000000 +0300 -+++ mutt-1.5.20/mx.c 2009-06-15 21:05:24.000000000 +0300 -@@ -343,6 +343,22 @@ int mx_is_pop (const char *p) +Index: mutt/mx.c +=================================================================== +--- mutt.orig/mx.c 2011-01-19 02:29:05.112042072 -0300 ++++ mutt/mx.c 2011-01-19 02:29:05.183029008 -0300 +@@ -347,6 +347,22 @@ } #endif @@ -3149,7 +3143,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c int mx_get_magic (const char *path) { struct stat st; -@@ -360,6 +376,11 @@ int mx_get_magic (const char *path) +@@ -364,6 +380,11 @@ return M_POP; #endif /* USE_POP */ @@ -3161,7 +3155,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c if (stat (path, &st) == -1) { dprint (1, (debugfile, "mx_get_magic(): unable to stat %s: %s (errno %d).\n", -@@ -669,6 +690,12 @@ CONTEXT *mx_open_mailbox (const char *pa +@@ -691,6 +712,12 @@ break; #endif /* USE_POP */ @@ -3174,7 +3168,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c default: rc = -1; break; -@@ -761,6 +788,12 @@ static int sync_mailbox (CONTEXT *ctx, i +@@ -803,6 +830,12 @@ rc = pop_sync_mailbox (ctx, index_hint); break; #endif /* USE_POP */ @@ -3187,7 +3181,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c } #if 0 -@@ -787,6 +820,16 @@ int mx_close_mailbox (CONTEXT *ctx, int +@@ -888,6 +921,16 @@ ctx->closing = 1; @@ -3204,7 +3198,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c if (ctx->readonly || ctx->dontwrite) { /* mailbox is readonly or we don't want to write */ -@@ -1336,6 +1379,11 @@ int mx_check_mailbox (CONTEXT *ctx, int +@@ -1464,6 +1507,11 @@ case M_POP: return (pop_check_mailbox (ctx, index_hint)); #endif /* USE_POP */ @@ -3216,7 +3210,7 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c } } -@@ -1396,6 +1444,15 @@ MESSAGE *mx_open_message (CONTEXT *ctx, +@@ -1524,6 +1572,15 @@ } #endif /* USE_POP */ @@ -3232,52 +3226,54 @@ diff -udprP mutt-1.5.20.orig/mx.c mutt-1.5.20/mx.c default: dprint (1, (debugfile, "mx_open_message(): function not implemented for mailbox type %d.\n", ctx->magic)); FREE (&msg); -@@ -1477,6 +1534,9 @@ int mx_close_message (MESSAGE **msg) - #ifdef USE_POP - || (*msg)->magic == M_POP - #endif +@@ -1599,6 +1656,9 @@ + int r = 0; + + if ((*msg)->magic == M_MH || (*msg)->magic == M_MAILDIR +#ifdef USE_NNTP + || (*msg)->magic == M_NNTP +#endif - ) + || (*msg)->magic == M_IMAP || (*msg)->magic == M_POP) { r = safe_fclose (&(*msg)->fp); -diff -udprP mutt-1.5.20.orig/mx.h mutt-1.5.20/mx.h ---- mutt-1.5.20.orig/mx.h 2008-11-11 21:55:47.000000000 +0200 -+++ mutt-1.5.20/mx.h 2009-06-15 21:05:24.000000000 +0300 -@@ -40,6 +40,9 @@ enum - #ifdef USE_POP - , M_POP - #endif -+#ifdef USE_NNTP -+ , M_NNTP -+#endif - }; - - WHERE short DefaultMagic INITVAL (M_MBOX); -diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c ---- mutt-1.5.20.orig/newsrc.c 1970-01-01 03:00:00.000000000 +0300 -+++ mutt-1.5.20/newsrc.c 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/mx.h +=================================================================== +--- mutt.orig/mx.h 2011-01-19 02:29:04.672123022 -0300 ++++ mutt/mx.h 2011-01-19 02:29:05.184028824 -0300 +@@ -34,6 +34,9 @@ + M_MMDF, + M_MH, + M_MAILDIR, ++#ifdef USE_NNTP ++ M_NNTP, ++#endif + M_IMAP, + M_POP + #ifdef USE_COMPRESSED +Index: mutt/newsrc.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/newsrc.c 2011-01-19 02:29:05.185028640 -0300 @@ -0,0 +1,1170 @@ +/* + * Copyright (C) 1998 Brandon Long + * Copyright (C) 1999 Andrej Gritsenko + * Copyright (C) 2000-2009 Vsevolod Volkov -+ * ++ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. -+ * ++ * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. -+ * ++ * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ ++ */ + +#if HAVE_CONFIG_H +# include "config.h" @@ -3394,7 +3390,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + data->num = x; + mutt_newsgroup_stat (data); + dprint (2, (debugfile, "parse_line: Newsgroup %s\n", data->group)); -+ ++ + return 0; +} + @@ -3596,8 +3592,8 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + * again. Hmm, if a system has broken mtimes, this might mean the file + * is reloaded every time, which we'd have to fix. + * -+ * a newsrc file is a line per newsgroup, with the newsgroup, then a -+ * ':' denoting subscribed or '!' denoting unsubscribed, then a ++ * a newsrc file is a line per newsgroup, with the newsgroup, then a ++ * ':' denoting subscribed or '!' denoting unsubscribed, then a + * comma separated list of article numbers and ranges. + */ +NNTP_SERVER *mutt_select_newsserver (char *server) @@ -3694,13 +3690,13 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + return serv; +} + -+/* ++/* + * full status flags are not supported by nntp, but we can fake some + * of them. This is how: + * Read = a read message number is in the .newsrc + * New = a message is new since we last read this newsgroup + * Old = anything else -+ * So, Read is marked as such in the newsrc, old is anything that is ++ * So, Read is marked as such in the newsrc, old is anything that is + * "skipped" in the newsrc, and new is anything not in the newsrc nor + * in the cache. By skipped, I mean before the last unread message + */ @@ -3821,7 +3817,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + if (data->entries[x].first == data->entries[x].last) + snprintf (line, len, "%d%n", data->entries[x].first, &i); + else -+ snprintf (line, len, "%d-%d%n", ++ snprintf (line, len, "%d-%d%n", + data->entries[x].first, data->entries[x].last, &i); + len -= i; + line += i; @@ -3863,7 +3859,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + } + + /* -+ * Set up to fake initial sequence from 1 to the article before the ++ * Set up to fake initial sequence from 1 to the article before the + * first article in our list + */ + data->num = 0; @@ -3874,7 +3870,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + if (series) /* search for first unread */ + { + /* -+ * We don't actually check sequential order, since we mark ++ * We don't actually check sequential order, since we mark + * "missing" entries as read/deleted + */ + last = ctx->hdrs[x]->article_num; @@ -3884,7 +3880,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + if (data->num >= data->max) + { + data->max = data->max * 2; -+ safe_realloc (&data->entries, ++ safe_realloc (&data->entries, + data->max * sizeof (NEWSRC_ENTRY)); + } + data->entries[data->num].first = first; @@ -3908,7 +3904,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + if (data->num >= data->max) + { + data->max = data->max * 2; -+ safe_realloc (&data->entries, ++ safe_realloc (&data->entries, + data->max * sizeof (NEWSRC_ENTRY)); + } + data->entries[data->num].first = first; @@ -4261,7 +4257,7 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + tm->tm_sec, h->env->message_id); + fputs (buf, f); + if (h->env->references) -+ mutt_write_references (h->env->references, f, 10); ++ mutt_write_references (h->env->references, f, -10); + snprintf (buf, sizeof(buf), "\t%ld\t%d\tXref: %s\n", (long int) h->content->length, + (int) h->lines, NONULL(h->env->xref)); + if (fputs (buf, f) == EOF) @@ -4429,29 +4425,30 @@ diff -udprP mutt-1.5.20.orig/newsrc.c mutt-1.5.20/newsrc.c + } + } +} -diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c ---- mutt-1.5.20.orig/nntp.c 1970-01-01 03:00:00.000000000 +0300 -+++ mutt-1.5.20/nntp.c 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/nntp.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/nntp.c 2011-01-19 02:29:05.186028456 -0300 @@ -0,0 +1,1588 @@ +/* + * Copyright (C) 1998 Brandon Long + * Copyright (C) 1999 Andrej Gritsenko + * Copyright (C) 2000-2007 Vsevolod Volkov -+ * ++ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. -+ * ++ * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. -+ * ++ * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ ++ */ + +#if HAVE_CONFIG_H +# include "config.h" @@ -4842,7 +4839,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + p = b; + colon = NULL; + /* skip to end of word */ -+ while (*p && (*p != ' ') && (*p != '\t')) ++ while (*p && (*p != ' ') && (*p != '\t')) + { + if (*p == ':') + colon = p; @@ -4879,7 +4876,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + int ret; + HEADER *h = ctx->hdrs[ctx->msgcount]; + -+ mutt_mktemp (tempfile); ++ mutt_mktemp (tempfile, sizeof(tempfile)); + if (!(f = safe_fopen (tempfile, "w+"))) + return -1; + @@ -4964,7 +4961,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + * XOVER returns a tab separated list of: + * id|subject|from|date|Msgid|references|bytes|lines|xref + * -+ * This has to duplicate some of the functionality of ++ * This has to duplicate some of the functionality of + * mutt_read_rfc822_header(), since it replaces the call to that (albeit with + * a limited number of headers which are "parsed" by placement in the list) + */ @@ -5000,7 +4997,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + break; + case 1: + hdr->env->subject = safe_strdup (b); -+ /* Now we need to do the things which would normally be done in ++ /* Now we need to do the things which would normally be done in + * mutt_read_rfc822_header() */ + if (hdr->env->subject) + { @@ -5255,7 +5252,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + return 0; +} + -+/* ++/* + * currently, nntp "mailbox" is "newsgroup" + */ +int nntp_open_mailbox (CONTEXT *ctx) @@ -5336,7 +5333,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + return -1; + } + -+ sscanf (buf + 4, "%d %u %u %s", &count, &nntp_data->firstMessage, ++ sscanf (buf + 4, "%d %u %u %s", &count, &nntp_data->firstMessage, + &nntp_data->lastMessage, buf); + + nntp_data->deleted = 0; @@ -5378,7 +5375,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + mutt_message (m); + + cache->index = ctx->hdrs[msgno]->index; -+ mutt_mktemp (path); ++ mutt_mktemp (path, sizeof(path)); + cache->path = safe_strdup (path); + if (!(msg->fp = safe_fopen (path, "w+"))) + { @@ -5397,7 +5394,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + msg->fp, ctx->tagged); + if (ret == 1) + { -+ mutt_error (_("Article %d not found on server"), ++ mutt_error (_("Article %d not found on server"), + ctx->hdrs[msgno]->article_num); + dprint (1, (debugfile, "nntp_fetch_message: %s\n", buf)); + } @@ -5414,16 +5411,16 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + ctx->hdrs[msgno]->env = mutt_read_rfc822_header (msg->fp, ctx->hdrs[msgno], 0, 0); + /* fix content length */ + fseek(msg->fp, 0, SEEK_END); -+ ctx->hdrs[msgno]->content->length = ftell (msg->fp) - ++ ctx->hdrs[msgno]->content->length = ftell (msg->fp) - + ctx->hdrs[msgno]->content->offset; + -+ /* this is called in mutt before the open which fetches the message, ++ /* this is called in mutt before the open which fetches the message, + * which is probably wrong, but we just call it again here to handle + * the problem instead of fixing it. + */ + mutt_parse_mime_message (ctx, ctx->hdrs[msgno]); + -+ /* These would normally be updated in mx_update_context(), but the ++ /* These would normally be updated in mx_update_context(), but the + * full headers aren't parsed with XOVER, so the information wasn't + * available then. + */ @@ -5926,7 +5923,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + mx_alloc_memory (ctx); + ctx->hdrs[ctx->msgcount] = mutt_new_header (); + ctx->hdrs[ctx->msgcount]->index = ctx->msgcount; -+ ++ + mutt_message (_("Fetching %s from server..."), msgid); + ret = nntp_read_header (ctx, msgid, 0); + /* since nntp_read_header() may set read flag, we must reset it */ @@ -5987,7 +5984,7 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + return -1; + } + -+ snprintf (buf, sizeof (buf), "XPAT References %d-%d *%s*\r\n", ++ snprintf (buf, sizeof (buf), "XPAT References %d-%d *%s*\r\n", + nntp_data->firstMessage, nntp_data->lastLoaded, msgid); + + cc.ctx = ctx; @@ -6021,29 +6018,30 @@ diff -udprP mutt-1.5.20.orig/nntp.c mutt-1.5.20/nntp.c + FREE (&cc.child); + return ret; +} -diff -udprP mutt-1.5.20.orig/nntp.h mutt-1.5.20/nntp.h ---- mutt-1.5.20.orig/nntp.h 1970-01-01 03:00:00.000000000 +0300 -+++ mutt-1.5.20/nntp.h 2009-06-15 21:05:24.000000000 +0300 +Index: mutt/nntp.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/nntp.h 2011-01-19 02:29:05.187028272 -0300 @@ -0,0 +1,136 @@ +/* + * Copyright (C) 1998 Brandon Long + * Copyright (C) 1999 Andrej Gritsenko + * Copyright (C) 2000-2007 Vsevolod Volkov -+ * ++ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. -+ * ++ * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. -+ * ++ * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ ++ */ + +#ifndef _NNTP_H_ +#define _NNTP_H_ 1 @@ -6161,10 +6159,11 @@ diff -udprP mutt-1.5.20.orig/nntp.h mutt-1.5.20/nntp.h +NNTP_SERVER *CurrentNewsSrv INITVAL (NULL); + +#endif /* _NNTP_H_ */ -diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c ---- mutt-1.5.20.orig/pager.c 2009-06-03 23:48:31.000000000 +0300 -+++ mutt-1.5.20/pager.c 2009-06-15 21:05:24.000000000 +0300 -@@ -1059,6 +1059,11 @@ fill_buffer (FILE *f, LOFF_T *last_pos, +Index: mutt/pager.c +=================================================================== +--- mutt.orig/pager.c 2011-01-19 02:29:05.115041520 -0300 ++++ mutt/pager.c 2011-01-19 02:29:05.189027904 -0300 +@@ -1085,6 +1085,11 @@ return b_read; } @@ -6176,7 +6175,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, int flags, ansi_attr *pa, int cnt, -@@ -1512,6 +1517,16 @@ static struct mapping_t PagerHelpExtra[] +@@ -1542,6 +1547,16 @@ { NULL, 0 } }; @@ -6193,7 +6192,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c /* This pager is actually not so simple as it once was. It now operates in -@@ -1553,6 +1568,10 @@ mutt_pager (const char *banner, const ch +@@ -1583,6 +1598,10 @@ int old_PagerIndexLines; /* some people want to resize it * while inside the pager... */ @@ -6204,7 +6203,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c if (!(flags & M_SHOWCOLOR)) flags |= M_SHOWFLAT; -@@ -1592,7 +1611,11 @@ mutt_pager (const char *banner, const ch +@@ -1622,7 +1641,11 @@ if (IsHeader (extra)) { strfcpy (tmphelp, helpstr, sizeof (tmphelp)); @@ -6217,7 +6216,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer); } if (!InHelp) -@@ -2465,6 +2488,15 @@ search_next: +@@ -2511,6 +2534,15 @@ CHECK_READONLY; CHECK_ACL(M_ACL_WRITE, "flag message"); @@ -6233,7 +6232,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c mutt_set_flag (Context, extra->hdr, M_FLAG, !extra->hdr->flagged); redraw = REDRAW_STATUS | REDRAW_INDEX; if (option (OPTRESOLVE)) -@@ -2498,6 +2530,60 @@ search_next: +@@ -2544,6 +2576,60 @@ redraw = REDRAW_FULL; break; @@ -6294,7 +6293,7 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c case OP_REPLY: CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra)); CHECK_ATTACH; -@@ -2544,7 +2630,7 @@ search_next: +@@ -2590,7 +2676,7 @@ CHECK_ATTACH; if (IsMsgAttach (extra)) mutt_attach_forward (extra->fp, extra->hdr, extra->idx, @@ -6303,10 +6302,11 @@ diff -udprP mutt-1.5.20.orig/pager.c mutt-1.5.20/pager.c else ci_send_message (SENDFORWARD, NULL, NULL, extra->ctx, extra->hdr); redraw = REDRAW_FULL; -diff -udprP mutt-1.5.20.orig/parse.c mutt-1.5.20/parse.c ---- mutt-1.5.20.orig/parse.c 2009-06-01 19:29:32.000000000 +0300 -+++ mutt-1.5.20/parse.c 2009-06-15 21:05:24.000000000 +0300 -@@ -89,7 +89,7 @@ char *mutt_read_rfc822_line (FILE *f, ch +Index: mutt/parse.c +=================================================================== +--- mutt.orig/parse.c 2011-01-19 02:28:25.988240940 -0300 ++++ mutt/parse.c 2011-01-19 02:29:05.194026984 -0300 +@@ -89,7 +89,7 @@ /* not reached */ } @@ -6315,7 +6315,7 @@ diff -udprP mutt-1.5.20.orig/parse.c mutt-1.5.20/parse.c { LIST *t, *lst = NULL; char *m; -@@ -1067,6 +1067,17 @@ int mutt_parse_rfc822_line (ENVELOPE *e, +@@ -1067,6 +1067,17 @@ e->from = rfc822_parse_adrlist (e->from, p); matched = 1; } @@ -6333,7 +6333,7 @@ diff -udprP mutt-1.5.20.orig/parse.c mutt-1.5.20/parse.c break; case 'i': -@@ -1149,6 +1160,27 @@ int mutt_parse_rfc822_line (ENVELOPE *e, +@@ -1149,6 +1160,27 @@ } break; @@ -6361,7 +6361,7 @@ diff -udprP mutt-1.5.20.orig/parse.c mutt-1.5.20/parse.c case 'r': if (!ascii_strcasecmp (line + 1, "eferences")) { -@@ -1257,6 +1289,20 @@ int mutt_parse_rfc822_line (ENVELOPE *e, +@@ -1257,6 +1289,20 @@ e->x_label = safe_strdup(p); matched = 1; } @@ -6382,10 +6382,11 @@ diff -udprP mutt-1.5.20.orig/parse.c mutt-1.5.20/parse.c default: break; -diff -udprP mutt-1.5.20.orig/pattern.c mutt-1.5.20/pattern.c ---- mutt-1.5.20.orig/pattern.c 2009-06-03 23:48:31.000000000 +0300 -+++ mutt-1.5.20/pattern.c 2009-06-15 21:05:24.000000000 +0300 -@@ -91,6 +91,9 @@ Flags[] = +Index: mutt/pattern.c +=================================================================== +--- mutt.orig/pattern.c 2011-01-19 02:29:04.609134614 -0300 ++++ mutt/pattern.c 2011-01-19 02:29:05.195026800 -0300 +@@ -92,6 +92,9 @@ { 'U', M_UNREAD, 0, NULL }, { 'v', M_COLLAPSED, 0, NULL }, { 'V', M_CRYPT_VERIFIED, 0, NULL }, @@ -6395,7 +6396,7 @@ diff -udprP mutt-1.5.20.orig/pattern.c mutt-1.5.20/pattern.c { 'x', M_REFERENCE, 0, eat_regexp }, { 'X', M_MIMEATTACH, 0, eat_range }, { 'y', M_XLABEL, 0, eat_regexp }, -@@ -1204,6 +1207,10 @@ mutt_pattern_exec (struct pattern_t *pat +@@ -1213,6 +1216,10 @@ } case M_UNREFERENCED: return (pat->not ^ (h->thread && !h->thread->child)); @@ -6406,7 +6407,7 @@ diff -udprP mutt-1.5.20.orig/pattern.c mutt-1.5.20/pattern.c } mutt_error (_("error: unknown op %d (report this error)."), pat->op); return (-1); -@@ -1285,6 +1292,7 @@ int mutt_pattern_func (int op, char *pro +@@ -1294,6 +1301,7 @@ progress_t progress; strfcpy (buf, NONULL (Context->pattern), sizeof (buf)); @@ -6414,10 +6415,11 @@ diff -udprP mutt-1.5.20.orig/pattern.c mutt-1.5.20/pattern.c if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0]) return (-1); -diff -udprP mutt-1.5.20.orig/po/POTFILES.in mutt-1.5.20/po/POTFILES.in ---- mutt-1.5.20.orig/po/POTFILES.in 2008-11-11 21:55:47.000000000 +0200 -+++ mutt-1.5.20/po/POTFILES.in 2009-06-15 21:05:24.000000000 +0300 -@@ -46,6 +46,8 @@ mutt_ssl_gnutls.c +Index: mutt/po/POTFILES.in +=================================================================== +--- mutt.orig/po/POTFILES.in 2011-01-19 02:29:04.672123022 -0300 ++++ mutt/po/POTFILES.in 2011-01-19 02:29:05.195026800 -0300 +@@ -47,6 +47,8 @@ mutt_tunnel.c muttlib.c mx.c @@ -6426,10 +6428,11 @@ diff -udprP mutt-1.5.20.orig/po/POTFILES.in mutt-1.5.20/po/POTFILES.in pager.c parse.c pattern.c -diff -udprP mutt-1.5.20.orig/postpone.c mutt-1.5.20/postpone.c ---- mutt-1.5.20.orig/postpone.c 2009-06-14 00:28:37.000000000 +0300 -+++ mutt-1.5.20/postpone.c 2009-06-15 21:05:24.000000000 +0300 -@@ -124,15 +124,26 @@ int mutt_num_postponed (int force) +Index: mutt/postpone.c +=================================================================== +--- mutt.orig/postpone.c 2011-01-19 02:29:04.593137558 -0300 ++++ mutt/postpone.c 2011-01-19 02:29:05.196026616 -0300 +@@ -125,15 +125,26 @@ if (LastModify < st.st_mtime) { @@ -6456,10 +6459,11 @@ diff -udprP mutt-1.5.20.orig/postpone.c mutt-1.5.20/postpone.c } return (PostCount); -diff -udprP mutt-1.5.20.orig/protos.h mutt-1.5.20/protos.h ---- mutt-1.5.20.orig/protos.h 2009-06-13 02:38:52.000000000 +0300 -+++ mutt-1.5.20/protos.h 2009-06-15 21:05:24.000000000 +0300 -@@ -115,6 +115,7 @@ HASH *mutt_make_id_hash (CONTEXT *); +Index: mutt/protos.h +=================================================================== +--- mutt.orig/protos.h 2011-01-19 02:29:04.780103152 -0300 ++++ mutt/protos.h 2011-01-19 02:29:05.197026432 -0300 +@@ -110,6 +110,7 @@ HASH *mutt_make_subj_hash (CONTEXT *); LIST *mutt_make_references(ENVELOPE *e); @@ -6467,10 +6471,11 @@ diff -udprP mutt-1.5.20.orig/protos.h mutt-1.5.20/protos.h char *mutt_read_rfc822_line (FILE *, char *, size_t *); ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short, short); -diff -udprP mutt-1.5.20.orig/recvattach.c mutt-1.5.20/recvattach.c ---- mutt-1.5.20.orig/recvattach.c 2009-05-19 03:11:35.000000000 +0300 -+++ mutt-1.5.20/recvattach.c 2009-06-15 21:05:24.000000000 +0300 -@@ -1110,6 +1110,15 @@ void mutt_view_attachments (HEADER *hdr) +Index: mutt/recvattach.c +=================================================================== +--- mutt.orig/recvattach.c 2011-01-19 02:29:05.005061758 -0300 ++++ mutt/recvattach.c 2011-01-19 02:29:05.197026432 -0300 +@@ -1119,6 +1119,15 @@ } #endif @@ -6486,7 +6491,7 @@ diff -udprP mutt-1.5.20.orig/recvattach.c mutt-1.5.20/recvattach.c if (WithCrypto && hdr->security & ~PGP_TRADITIONAL_CHECKED) { mutt_message _( -@@ -1201,10 +1210,33 @@ void mutt_view_attachments (HEADER *hdr) +@@ -1210,10 +1219,33 @@ case OP_FORWARD_MESSAGE: CHECK_ATTACH; mutt_attach_forward (fp, hdr, idx, idxlen, @@ -6521,10 +6526,11 @@ diff -udprP mutt-1.5.20.orig/recvattach.c mutt-1.5.20/recvattach.c case OP_REPLY: case OP_GROUP_REPLY: case OP_LIST_REPLY: -diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c ---- mutt-1.5.20.orig/recvcmd.c 2009-06-12 20:24:17.000000000 +0300 -+++ mutt-1.5.20/recvcmd.c 2009-06-15 21:05:24.000000000 +0300 -@@ -401,7 +401,7 @@ static BODY ** copy_problematic_attachme +Index: mutt/recvcmd.c +=================================================================== +--- mutt.orig/recvcmd.c 2011-01-19 02:28:26.270189064 -0300 ++++ mutt/recvcmd.c 2011-01-19 02:29:05.198026248 -0300 +@@ -401,7 +401,7 @@ static void attach_forward_bodies (FILE * fp, HEADER * hdr, ATTACHPTR ** idx, short idxlen, BODY * cur, @@ -6533,7 +6539,7 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c { short i; short mime_fwd_all = 0; -@@ -547,7 +547,7 @@ _("Can't decode all tagged attachments. +@@ -547,7 +547,7 @@ tmpfp = NULL; /* now that we have the template, send it. */ @@ -6542,7 +6548,7 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c return; bail: -@@ -574,7 +574,7 @@ _("Can't decode all tagged attachments. +@@ -574,7 +574,7 @@ */ static void attach_forward_msgs (FILE * fp, HEADER * hdr, @@ -6551,12 +6557,12 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c { HEADER *curhdr = NULL; HEADER *tmphdr; -@@ -679,23 +679,23 @@ static void attach_forward_msgs (FILE * +@@ -679,23 +679,23 @@ else mutt_free_header (&tmphdr); - ci_send_message (0, tmphdr, *tmpbody ? tmpbody : NULL, -+ ci_send_message (flags, tmphdr, *tmpbody ? tmpbody : NULL, ++ ci_send_message (flags, tmphdr, *tmpbody ? tmpbody : NULL, NULL, curhdr); } @@ -6579,7 +6585,7 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c } } -@@ -753,28 +753,40 @@ attach_reply_envelope_defaults (ENVELOPE +@@ -753,28 +753,40 @@ return -1; } @@ -6634,7 +6640,7 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c mutt_make_misc_reply_headers (env, Context, curhdr, curenv); if (parent) -@@ -835,6 +847,13 @@ void mutt_attach_reply (FILE * fp, HEADE +@@ -835,6 +847,13 @@ char prefix[SHORT_STRING]; int rc; @@ -6648,10 +6654,11 @@ diff -udprP mutt-1.5.20.orig/recvcmd.c mutt-1.5.20/recvcmd.c if (check_all_msg (idx, idxlen, cur, 0) == -1) { nattach = count_tagged (idx, idxlen); -diff -udprP mutt-1.5.20.orig/rfc1524.c mutt-1.5.20/rfc1524.c ---- mutt-1.5.20.orig/rfc1524.c 2009-05-30 20:20:08.000000000 +0300 -+++ mutt-1.5.20/rfc1524.c 2009-06-15 21:05:24.000000000 +0300 -@@ -569,13 +569,13 @@ int rfc1524_expand_filename (char *namet +Index: mutt/rfc1524.c +=================================================================== +--- mutt.orig/rfc1524.c 2011-01-19 02:28:26.009237078 -0300 ++++ mutt/rfc1524.c 2011-01-19 02:29:05.199026064 -0300 +@@ -570,13 +570,13 @@ * safe_fopen(). */ @@ -6667,7 +6674,7 @@ diff -udprP mutt-1.5.20.orig/rfc1524.c mutt-1.5.20/rfc1524.c return 2; if ((ofp = fopen (oldfile,"r")) == NULL) return 3; -@@ -590,3 +590,8 @@ int mutt_rename_file (char *oldfile, cha +@@ -591,3 +591,8 @@ mutt_unlink (oldfile); return 0; } @@ -6676,19 +6683,21 @@ diff -udprP mutt-1.5.20.orig/rfc1524.c mutt-1.5.20/rfc1524.c +{ + return _mutt_rename_file (oldfile, newfile, 0); +} -diff -udprP mutt-1.5.20.orig/rfc1524.h mutt-1.5.20/rfc1524.h ---- mutt-1.5.20.orig/rfc1524.h 2008-11-11 21:55:47.000000000 +0200 -+++ mutt-1.5.20/rfc1524.h 2009-06-15 21:05:24.000000000 +0300 -@@ -40,5 +40,6 @@ int rfc1524_expand_command (BODY *, char +Index: mutt/rfc1524.h +=================================================================== +--- mutt.orig/rfc1524.h 2011-01-19 02:28:26.302183178 -0300 ++++ mutt/rfc1524.h 2011-01-19 02:29:05.199026064 -0300 +@@ -40,5 +40,6 @@ int rfc1524_expand_filename (char *, char *, char *, size_t); int rfc1524_mailcap_lookup (BODY *, char *, rfc1524_entry *, int); int mutt_rename_file (char *, char *); +int _mutt_rename_file (char *, char *, int); #endif /* _RFC1524_H */ -diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c ---- mutt-1.5.20.orig/send.c 2009-06-13 02:38:52.000000000 +0300 -+++ mutt-1.5.20/send.c 2009-06-15 21:13:13.000000000 +0300 +Index: mutt/send.c +=================================================================== +--- mutt.orig/send.c 2011-01-19 02:29:04.781102968 -0300 ++++ mutt/send.c 2011-01-19 02:29:05.200025881 -0300 @@ -44,6 +44,11 @@ #include #include @@ -6701,7 +6710,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c #ifdef MIXMASTER #include "remailer.h" #endif -@@ -213,17 +218,51 @@ static int edit_address (ADDRESS **a, /* +@@ -213,17 +218,51 @@ return 0; } @@ -6760,7 +6769,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (en->subject) { -@@ -259,6 +298,14 @@ static int edit_envelope (ENVELOPE *en) +@@ -259,6 +298,14 @@ return 0; } @@ -6775,7 +6784,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c static void process_user_recips (ENVELOPE *env) { LIST *uh = UserHeader; -@@ -271,6 +318,14 @@ static void process_user_recips (ENVELOP +@@ -271,6 +318,14 @@ env->cc = rfc822_parse_adrlist (env->cc, uh->data + 3); else if (ascii_strncasecmp ("bcc:", uh->data, 4) == 0) env->bcc = rfc822_parse_adrlist (env->bcc, uh->data + 4); @@ -6790,7 +6799,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c } } -@@ -309,6 +364,12 @@ static void process_user_header (ENVELOP +@@ -309,6 +364,12 @@ else if (ascii_strncasecmp ("to:", uh->data, 3) != 0 && ascii_strncasecmp ("cc:", uh->data, 3) != 0 && ascii_strncasecmp ("bcc:", uh->data, 4) != 0 && @@ -6803,7 +6812,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c ascii_strncasecmp ("subject:", uh->data, 8) != 0 && ascii_strncasecmp ("return-path:", uh->data, 12) != 0) { -@@ -657,6 +718,10 @@ void mutt_add_to_reference_headers (ENVE +@@ -657,6 +718,10 @@ if (pp) *pp = p; if (qq) *qq = q; @@ -6814,7 +6823,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c } static void -@@ -719,6 +784,16 @@ envelope_defaults (ENVELOPE *env, CONTEX +@@ -719,6 +784,16 @@ if (flags & SENDREPLY) { @@ -6831,7 +6840,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (tag) { HEADER *h; -@@ -865,7 +940,18 @@ void mutt_set_followup_to (ENVELOPE *e) +@@ -865,7 +940,18 @@ * it hasn't already been set */ @@ -6851,7 +6860,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c { if (mutt_is_list_cc (0, e->to, e->cc)) { -@@ -1026,6 +1112,9 @@ static int send_message (HEADER *msg) +@@ -1027,6 +1113,9 @@ #endif #if USE_SMTP @@ -6861,7 +6870,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (SmtpUrl) return mutt_smtp_send (msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc, tempfile, -@@ -1137,6 +1226,13 @@ ci_send_message (int flags, /* send mod +@@ -1138,6 +1227,13 @@ int rv = -1; @@ -6875,7 +6884,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (!flags && !msg && quadoption (OPT_RECALL) != M_NO && mutt_num_postponed (1)) { -@@ -1167,6 +1263,22 @@ ci_send_message (int flags, /* send mod +@@ -1168,6 +1264,22 @@ { if ((flags = mutt_get_postponed (ctx, msg, &cur, fcc, sizeof (fcc))) < 0) goto cleanup; @@ -6898,7 +6907,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c } if (flags & (SENDPOSTPONED|SENDRESEND)) -@@ -1278,11 +1390,16 @@ ci_send_message (int flags, /* send mod +@@ -1262,11 +1374,16 @@ if (flags & SENDREPLY) mutt_fix_reply_recipients (msg->env); @@ -6907,7 +6916,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c + msg->env->newsgroups = safe_strdup (((NNTP_DATA *)ctx->data)->group); +#endif + - if (! (flags & SENDMAILX) && + if (! (flags & (SENDMAILX|SENDBATCH)) && ! (option (OPTAUTOEDIT) && option (OPTEDITHDRS)) && ! ((flags & SENDREPLY) && option (OPTFASTREPLY))) { @@ -6916,7 +6925,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c goto cleanup; } -@@ -1539,6 +1656,11 @@ main_loop: +@@ -1534,6 +1651,11 @@ if (i == -1) { /* abort */ @@ -6928,7 +6937,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c mutt_message _("Mail not sent."); goto cleanup; } -@@ -1571,6 +1693,9 @@ main_loop: +@@ -1566,6 +1688,9 @@ } } @@ -6938,7 +6947,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (!has_recips (msg->env->to) && !has_recips (msg->env->cc) && !has_recips (msg->env->bcc)) { -@@ -1604,6 +1729,19 @@ main_loop: +@@ -1599,6 +1724,19 @@ mutt_error _("No subject specified."); goto main_loop; } @@ -6958,7 +6967,7 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (msg->content->next) msg->content = mutt_make_multipart (msg->content); -@@ -1810,7 +1948,12 @@ full_fcc: +@@ -1805,7 +1943,12 @@ } } else if (!option (OPTNOCURSES) && ! (flags & SENDMAILX)) @@ -6972,9 +6981,10 @@ diff -udprP mutt-1.5.20.orig/send.c mutt-1.5.20/send.c if (WithCrypto && (msg->security & ENCRYPT)) FREE (&pgpkeylist); -diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c ---- mutt-1.5.20.orig/sendlib.c 2009-06-14 18:46:11.000000000 +0300 -+++ mutt-1.5.20/sendlib.c 2009-06-15 21:51:17.000000000 +0300 +Index: mutt/sendlib.c +=================================================================== +--- mutt.orig/sendlib.c 2011-01-19 02:29:04.966068932 -0300 ++++ mutt/sendlib.c 2011-01-19 02:29:05.201025698 -0300 @@ -46,6 +46,10 @@ #include #include @@ -6986,7 +6996,36 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c #ifdef HAVE_SYSEXITS_H #include #else /* Make sure EX_OK is defined */ -@@ -1868,6 +1872,9 @@ int mutt_write_rfc822_header (FILE *fp, +@@ -1543,6 +1547,14 @@ + { + LIST **ref = NULL; + int refcnt = 0, refmax = 0; ++ int multiline = 1; ++ int space = 0; ++ ++ if (trim < 0) ++ { ++ trim = -trim; ++ multiline = 0; ++ } + + for ( ; (trim == 0 || refcnt < trim) && r ; r = r->next) + { +@@ -1553,9 +1565,11 @@ + + while (refcnt-- > 0) + { +- fputc (' ', f); ++ if (multiline || space) ++ fputc (' ', f); ++ space = 1; + fputs (ref[refcnt]->data, f); +- if (refcnt >= 1) ++ if (multiline && refcnt >= 1) + fputc ('\n', f); + } + +@@ -1962,6 +1976,9 @@ mutt_write_address_list (env->to, fp, 4, 0); } else if (mode > 0) @@ -6996,7 +7035,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c fputs ("To: \n", fp); if (env->cc) -@@ -1876,6 +1883,9 @@ int mutt_write_rfc822_header (FILE *fp, +@@ -1970,6 +1987,9 @@ mutt_write_address_list (env->cc, fp, 4, 0); } else if (mode > 0) @@ -7005,8 +7044,8 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c +#endif fputs ("Cc: \n", fp); - if (env->bcc) -@@ -1887,8 +1897,28 @@ int mutt_write_rfc822_header (FILE *fp, + if (env->bcc && should_write_bcc) +@@ -1981,8 +2001,28 @@ } } else if (mode > 0) @@ -7035,7 +7074,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c if (env->subject) mutt_write_one_header (fp, "Subject", env->subject, NULL, 0, 0); else if (mode == 1) -@@ -1907,6 +1937,9 @@ int mutt_write_rfc822_header (FILE *fp, +@@ -2001,6 +2041,9 @@ fputs ("Reply-To: \n", fp); if (env->mail_followup_to) @@ -7045,7 +7084,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c { fputs ("Mail-Followup-To: ", fp); mutt_write_address_list (env->mail_followup_to, fp, 18, 0); -@@ -2245,11 +2278,30 @@ mutt_invoke_sendmail (ADDRESS *from, /* +@@ -2339,11 +2382,30 @@ const char *msg, /* file containing message */ int eightbit) /* message contains 8bit chars */ { @@ -7077,7 +7116,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c ps = s; i = 0; while ((ps = strtok (ps, " "))) -@@ -2273,6 +2325,10 @@ mutt_invoke_sendmail (ADDRESS *from, /* +@@ -2367,6 +2429,10 @@ i++; } @@ -7088,7 +7127,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c if (eightbit && option (OPTUSE8BITMIME)) args = add_option (args, &argslen, &argsmax, "-B8BITMIME"); -@@ -2304,6 +2360,9 @@ mutt_invoke_sendmail (ADDRESS *from, /* +@@ -2398,6 +2464,9 @@ args = add_args (args, &argslen, &argsmax, to); args = add_args (args, &argslen, &argsmax, cc); args = add_args (args, &argslen, &argsmax, bcc); @@ -7098,7 +7137,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c if (argslen == argsmax) safe_realloc (&args, sizeof (char *) * (++argsmax)); -@@ -2384,6 +2443,9 @@ void mutt_prepare_envelope (ENVELOPE *en +@@ -2478,6 +2547,9 @@ rfc2047_encode_string (&env->x_label); if (env->subject) @@ -7108,7 +7147,7 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c { rfc2047_encode_string (&env->subject); } -@@ -2504,6 +2566,10 @@ int mutt_bounce_message (FILE *fp, HEADE +@@ -2598,6 +2670,10 @@ } rfc822_write_address (resent_from, sizeof (resent_from), from, 0); @@ -7119,10 +7158,11 @@ diff -udprP mutt-1.5.20.orig/sendlib.c mutt-1.5.20/sendlib.c ret = _mutt_bounce_message (fp, h, to, resent_from, from); rfc822_free_address (&from); -diff -udprP mutt-1.5.20.orig/sort.c mutt-1.5.20/sort.c ---- mutt-1.5.20.orig/sort.c 2008-11-11 21:55:47.000000000 +0200 -+++ mutt-1.5.20/sort.c 2009-06-15 21:05:24.000000000 +0300 -@@ -151,6 +151,15 @@ static int compare_order (const void *a, +Index: mutt/sort.c +=================================================================== +--- mutt.orig/sort.c 2011-01-19 02:28:25.957246644 -0300 ++++ mutt/sort.c 2011-01-19 02:29:05.202025514 -0300 +@@ -151,6 +151,15 @@ HEADER **ha = (HEADER **) a; HEADER **hb = (HEADER **) b; @@ -7138,10 +7178,11 @@ diff -udprP mutt-1.5.20.orig/sort.c mutt-1.5.20/sort.c /* no need to auxsort because you will never have equality here */ return (SORTCODE ((*ha)->index - (*hb)->index)); } -diff -udprP mutt-1.5.20.orig/url.c mutt-1.5.20/url.c ---- mutt-1.5.20.orig/url.c 2009-06-01 19:29:32.000000000 +0300 -+++ mutt-1.5.20/url.c 2009-06-15 21:05:24.000000000 +0300 -@@ -39,6 +39,8 @@ static struct mapping_t UrlMap[] = +Index: mutt/url.c +=================================================================== +--- mutt.orig/url.c 2011-01-19 02:28:25.981242228 -0300 ++++ mutt/url.c 2011-01-19 02:29:05.203025330 -0300 +@@ -39,6 +39,8 @@ { "imaps", U_IMAPS }, { "pop", U_POP }, { "pops", U_POPS }, @@ -7150,10 +7191,11 @@ diff -udprP mutt-1.5.20.orig/url.c mutt-1.5.20/url.c { "mailto", U_MAILTO }, { "smtp", U_SMTP }, { "smtps", U_SMTPS }, -diff -udprP mutt-1.5.20.orig/url.h mutt-1.5.20/url.h ---- mutt-1.5.20.orig/url.h 2008-11-11 21:55:47.000000000 +0200 -+++ mutt-1.5.20/url.h 2009-06-15 21:05:24.000000000 +0300 -@@ -8,6 +8,8 @@ typedef enum url_scheme +Index: mutt/url.h +=================================================================== +--- mutt.orig/url.h 2011-01-19 02:28:25.966244988 -0300 ++++ mutt/url.h 2011-01-19 02:29:05.203025330 -0300 +@@ -8,6 +8,8 @@ U_POPS, U_IMAP, U_IMAPS, @@ -7162,29 +7204,11 @@ diff -udprP mutt-1.5.20.orig/url.h mutt-1.5.20/url.h U_SMTP, U_SMTPS, U_MAILTO, -diff -udprP mutt-1.5.20.orig/Makefile.am mutt-1.5.20/Makefile.am ---- mutt-1.5.20.orig/Makefile.am 2009-01-05 04:11:29.000000000 +0200 -+++ mutt-1.5.20/Makefile.am 2009-06-15 21:05:24.000000000 +0300 -@@ -53,6 +53,7 @@ EXTRA_mutt_SOURCES = account.c bcache.c - mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \ - mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \ - pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \ -+ nntp.c newsrc.c \ - smime.c smtp.c utf8.c wcwidth.c \ - bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h - -@@ -64,6 +65,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP O - mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \ - mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \ - rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ -+ nntp.h ChangeLog.nntp \ - _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ - mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ - README.SSL smime.h \ -diff -udprP mutt-1.5.20.orig/Makefile.in mutt-1.5.20/Makefile.in ---- mutt-1.5.20.orig/Makefile.in 2009-06-09 09:50:44.000000000 +0300 -+++ mutt-1.5.20/Makefile.in 2009-06-15 21:05:24.000000000 +0300 -@@ -372,6 +372,7 @@ EXTRA_mutt_SOURCES = account.c bcache.c +Index: mutt/Makefile.am +=================================================================== +--- mutt.orig/Makefile.am 2011-01-19 02:29:05.108042808 -0300 ++++ mutt/Makefile.am 2011-01-19 02:29:05.203025330 -0300 +@@ -58,6 +58,7 @@ mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \ mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \ pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \ @@ -7192,59 +7216,19 @@ diff -udprP mutt-1.5.20.orig/Makefile.in mutt-1.5.20/Makefile.in smime.c smtp.c utf8.c wcwidth.c \ bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h -@@ -383,6 +384,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP O +@@ -69,6 +70,7 @@ mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \ mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \ rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ + nntp.h ChangeLog.nntp \ _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ - README.SSL smime.h \ -@@ -637,6 +639,8 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_tunnel.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/muttlib.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mx.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newsrc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nntp.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pager.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patchlist.Po@am__quote@ -diff -udprP mutt-1.5.20.orig/configure mutt-1.5.20/configure ---- mutt-1.5.20.orig/configure 2009-06-09 09:50:42.000000000 +0300 -+++ mutt-1.5.20/configure 2009-06-15 21:05:24.000000000 +0300 -@@ -1478,6 +1478,7 @@ Optional Features: - Force use of an external dotlock program - --enable-pop Enable POP3 support - --enable-imap Enable IMAP support -+ --enable-nntp Enable NNTP support - --enable-smtp include internal SMTP relay support - --enable-debug Enable debugging support - --enable-flock Use flock() to lock files -@@ -14198,6 +14199,20 @@ fi - fi - done - -+# Check whether --enable-nntp or --disable-nntp was given. -+if test "${enable_nntp+set}" = set; then -+ enableval="$enable_nntp" -+ if test x$enableval = xyes ; then -+ cat >>confdefs.h <<\_ACEOF -+#define USE_NNTP 1 -+_ACEOF -+ -+ MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS nntp.o newsrc.o" -+ need_socket="yes" -+ fi -+ -+fi; -+ - - - for ac_func in strftime -diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc ---- mutt-1.5.20.orig/doc/Muttrc 2009-06-14 21:53:24.000000000 +0300 -+++ mutt-1.5.20/doc/Muttrc 2009-06-15 21:05:24.000000000 +0300 -@@ -281,6 +281,28 @@ attachments -I message/external-body + README.SSL smime.h group.h \ +Index: mutt/doc/Muttrc +=================================================================== +--- mutt.orig/doc/Muttrc 2011-01-19 02:29:05.117041152 -0300 ++++ mutt/doc/Muttrc 2011-01-19 02:29:05.205024962 -0300 +@@ -281,6 +281,28 @@ # of the value as shown above if included. # # @@ -7253,27 +7237,27 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: ask_follow_up +# Type: boolean +# Default: no -+# -+# ++# ++# +# If set, Mutt will prompt you for follow-up groups before editing +# the body of an outgoing message. -+# -+# ++# ++# +# set ask_x_comment_to=no +# +# Name: ask_x_comment_to +# Type: boolean +# Default: no -+# -+# ++# ++# +# If set, Mutt will prompt you for x-comment-to field before editing +# the body of an outgoing message. -+# -+# ++# ++# # set attach_format="%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " # # Name: attach_format -@@ -466,6 +488,17 @@ attachments -I message/external-body +@@ -466,6 +488,17 @@ # set certificate_file=~/.mutt/certificates # # @@ -7282,16 +7266,16 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: catchup_newsgroup +# Type: quadoption +# Default: ask-yes -+# -+# ++# ++# +# If this variable is set, Mutt will mark all articles in newsgroup +# as read when you quit the newsgroup (catchup newsgroup). -+# -+# ++# ++# # set charset="" # # Name: charset -@@ -1121,6 +1154,19 @@ attachments -I message/external-body +@@ -1122,6 +1155,19 @@ # of the same email for you. # # @@ -7300,18 +7284,18 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: followup_to_poster +# Type: quadoption +# Default: ask-yes -+# -+# ++# ++# +# If this variable is set and the keyword "poster" is present in +# Followup-To header, follow-up to newsgroup function is not +# permitted. The message will be mailed to the submitter of the +# message via mail. -+# -+# ++# ++# # set force_name=no # # Name: force_name -@@ -1231,6 +1277,28 @@ attachments -I message/external-body +@@ -1232,6 +1278,28 @@ # ``Franklin'' to ``Franklin, Steve''. # # @@ -7320,12 +7304,12 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: group_index_format +# Type: string +# Default: "%4C %M%N %5s %-45.45f %d" -+# -+# ++# ++# +# This variable allows you to customize the newsgroup browser display to +# your personal taste. This string is similar to ``index_format'', but +# has its own set of printf()-like sequences: -+# ++# +# %C current newsgroup number +# %d description of newsgroup (becomes from server) +# %f newsgroup name @@ -7335,12 +7319,12 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# %s number of unread articles in newsgroup +# %>X right justify the rest of the string and pad with character "X" +# %|X pad to the end of the line with character "X" -+# -+# ++# ++# # set hdrs=yes # # Name: hdrs -@@ -1779,6 +1847,7 @@ attachments -I message/external-body +@@ -1780,6 +1848,7 @@ # %E number of messages in current thread # %f sender (address + real name), either From: or Return-Path: # %F author name, or recipient name if the message is from you @@ -7348,22 +7332,22 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc # %H spam attribute(s) of this message # %i message-id of the current message # %l number of lines in the message (does not work with maildir, -@@ -1794,12 +1863,14 @@ attachments -I message/external-body +@@ -1795,12 +1864,14 @@ # stashed the message: list name or recipient name # if not sent to a list - # %P progress indicator for the builtin pager (how much of the file has been displayed) -+# %R `x-comment-to:' field (if present and compiled with nntp support) + # %P progress indicator for the built-in pager (how much of the file has been displayed) ++# %R ``x-comment-to:'' field (if present and compiled with nntp support) # %s subject of the message # %S status of the message (``N''/``D''/``d''/``!''/``r''/*) # %t ``To:'' field (recipients) # %T the appropriate character from the $to_chars string # %u user (login) name of the author # %v first name of the author, or the recipient if the message is from you -+# %W name of organization of author (`organization:' field) ++# %W name of organization of author (``organization:'' field) # %X number of attachments # (please see the ``attachments'' section for possible speed effects) # %y ``X-Label:'' field, if present -@@ -1835,6 +1906,22 @@ attachments -I message/external-body +@@ -1836,6 +1907,22 @@ # ``save-hook'', ``fcc-hook'' and ``fcc-save-hook'', too. # # @@ -7372,21 +7356,21 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: inews +# Type: path +# Default: "" -+# -+# ++# ++# +# If set, specifies the program and arguments used to deliver news posted +# by Mutt. Otherwise, mutt posts article using current connection to +# news server. The following printf-style sequence is understood: -+# ++# +# %s newsserver name -+# ++# +# Example: set inews="/usr/local/bin/inews -hS" -+# -+# ++# ++# # set ispell="ispell" # # Name: ispell -@@ -2188,6 +2275,18 @@ attachments -I message/external-body +@@ -2205,6 +2292,18 @@ # be attached to the newly composed message if this option is set. # # @@ -7395,17 +7379,17 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: mime_subject +# Type: boolean +# Default: yes -+# -+# ++# ++# +# If unset, 8-bit ``subject:'' line in article header will not be +# encoded according to RFC2047 to base64. This is useful when message +# is Usenet article, because MIME for news is nonstandard feature. -+# -+# ++# ++# # set mix_entry_format="%4n %c %-16s %a" # # Name: mix_entry_format -@@ -2254,6 +2353,118 @@ attachments -I message/external-body +@@ -2271,6 +2370,118 @@ # See also $read_inc, $write_inc and $net_inc. # # @@ -7414,117 +7398,117 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: news_cache_dir +# Type: path +# Default: "~/.mutt" -+# -+# ++# ++# +# This variable pointing to directory where Mutt will save cached news +# articles headers in. If unset, headers will not be saved at all +# and will be reloaded each time when you enter to newsgroup. -+# -+# ++# ++# +# set news_server="" +# +# Name: news_server +# Type: string +# Default: "" -+# -+# ++# ++# +# This variable specifies domain name or address of NNTP server. It +# defaults to the newsserver specified in the environment variable +# $NNTPSERVER or contained in the file /etc/nntpserver. You can also +# specify username and an alternative port for each newsserver, ie: -+# ++# +# [news[s]://][username[:password]@]newsserver[:port] -+# -+# ++# ++# +# set newsrc="~/.newsrc" +# +# Name: newsrc +# Type: path +# Default: "~/.newsrc" -+# -+# ++# ++# +# The file, containing info about subscribed newsgroups - names and +# indexes of read articles. The following printf-style sequence +# is understood: -+# ++# +# %s newsserver name -+# -+# ++# ++# +# set nntp_context=1000 +# +# Name: nntp_context +# Type: number +# Default: 1000 -+# -+# ++# ++# +# This variable defines number of articles which will be in index when +# newsgroup entered. If active newsgroup have more articles than this +# number, oldest articles will be ignored. Also controls how many +# articles headers will be saved in cache when you quit newsgroup. -+# -+# ++# ++# +# set nntp_load_description=yes +# +# Name: nntp_load_description +# Type: boolean +# Default: yes -+# -+# ++# ++# +# This variable controls whether or not descriptions for each newsgroup +# must be loaded when newsgroup is added to list (first time list +# loading or new newsgroup adding). -+# -+# ++# ++# +# set nntp_user="" +# +# Name: nntp_user +# Type: string +# Default: "" -+# -+# ++# ++# +# Your login name on the NNTP server. If unset and NNTP server requires +# authentification, Mutt will prompt you for your account name when you +# connect to newsserver. -+# -+# ++# ++# +# set nntp_pass="" +# +# Name: nntp_pass +# Type: string +# Default: "" -+# -+# ++# ++# +# Your password for NNTP account. -+# -+# ++# ++# +# set nntp_poll=60 +# +# Name: nntp_poll +# Type: number +# Default: 60 -+# -+# ++# ++# +# The time in seconds until any operations on newsgroup except post new +# article will cause recheck for new news. If set to 0, Mutt will +# recheck newsgroup on each operation in index (stepping, read article, +# etc.). -+# -+# ++# ++# +# set nntp_reconnect=ask-yes +# +# Name: nntp_reconnect +# Type: quadoption +# Default: ask-yes -+# -+# ++# ++# +# Controls whether or not Mutt will try to reconnect to newsserver when +# connection lost. -+# -+# ++# ++# # set pager="builtin" # # Name: pager -@@ -2969,6 +3180,19 @@ attachments -I message/external-body +@@ -2986,6 +3197,19 @@ # string after the inclusion of a message which is being replied to. # # @@ -7533,18 +7517,18 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: post_moderated +# Type: quadoption +# Default: ask-yes -+# -+# ++# ++# +# If set to yes, Mutt will post article to newsgroup that have +# not permissions to posting (e.g. moderated). Note: if newsserver +# does not support posting to that newsgroup or totally read-only, that +# posting will not have an effect. -+# -+# ++# ++# # set postpone=ask-yes # # Name: postpone -@@ -3543,6 +3767,41 @@ attachments -I message/external-body +@@ -3563,6 +3787,41 @@ # shell from /etc/passwd is used. # # @@ -7553,40 +7537,40 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: save_unsubscribed +# Type: boolean +# Default: no -+# -+# ++# ++# +# When set, info about unsubscribed newsgroups will be saved into +# ``newsrc'' file and into cache. -+# -+# ++# ++# +# set show_new_news=yes +# +# Name: show_new_news +# Type: boolean +# Default: yes -+# -+# ++# ++# +# If set, newsserver will be asked for new newsgroups on entering +# the browser. Otherwise, it will be done only once for a newsserver. +# Also controls whether or not number of new articles of subscribed +# newsgroups will be then checked. -+# -+# ++# ++# +# set show_only_unread=no +# +# Name: show_only_unread +# Type: boolean +# Default: no -+# -+# ++# ++# +# If set, only subscribed newsgroups that contain unread articles +# will be displayed in browser. -+# -+# ++# ++# # set sig_dashes=yes # # Name: sig_dashes -@@ -4748,3 +5007,14 @@ attachments -I message/external-body +@@ -4785,3 +5044,14 @@ # ``tuning'' section of the manual for performance considerations. # # @@ -7595,13 +7579,23 @@ diff -udprP mutt-1.5.20.orig/doc/Muttrc mutt-1.5.20/doc/Muttrc +# Name: x_comment_to +# Type: boolean +# Default: no -+# -+# ++# ++# +# If set, Mutt will add ``X-Comment-To:'' field (that contains full +# name of original article author) to article that followuped to newsgroup. -+# -+# ---- a/PATCHES -+++ b/PATCHES -@@ -0,0 +1 @@ -+vvv.nntp ++# ++# +Index: mutt/headers.c +=================================================================== +--- mutt.orig/headers.c 2011-01-19 02:29:04.912078868 -0300 ++++ mutt/headers.c 2011-01-19 02:29:05.206024778 -0300 +@@ -114,6 +114,9 @@ + $edit_headers set, we remove References: as they're likely invalid; + we can simply compare strings as we don't generate References for + multiple Message-Ids in IRT anyways */ ++#ifdef USE_NNTP ++ if (!option (OPTNEWSSEND)) ++#endif + if (msg->env->in_reply_to && + (!n->in_reply_to || mutt_strcmp (n->in_reply_to->data, + msg->env->in_reply_to->data) != 0)) diff --git a/debian/patches/series b/debian/patches/series index 49dac3d..e788b34 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -62,8 +62,8 @@ mutt-patched/sidebar-sorted mutt-patched/sidebar-utf8 mutt-patched/multiple-fcc -# not applying cleanly at the moment -#mutt-patched/nntp +# taken from http://mutt.org.ua/download/mutt-1.5.21/patch-1.5.21.vvv.nntp.gz +mutt-patched/nntp # unapplied patches for custom packages # not-applied/chdir diff --git a/debian/rules b/debian/rules index 4dc943c..be8f16d 100755 --- a/debian/rules +++ b/debian/rules @@ -104,7 +104,7 @@ ifeq ($(BUILD_PATCHED),yes) autoreconf --install --include=m4 cd $(objdir)-patched && \ env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ - ../configure $(confflags) + ../configure --enable-nntp $(confflags) echo '#include "config-debian.h"' >> $(objdir)-patched/config.h diff --git a/make-package.sh b/make-package.sh new file mode 100755 index 0000000..1670dce --- /dev/null +++ b/make-package.sh @@ -0,0 +1,2 @@ +#!/bin/sh +debuild -i.git -I.git