Update to original mutt 1.10.0

OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=182
This commit is contained in:
2018-07-05 11:57:50 +00:00
committed by Git OBS Bridge
parent 326554610f
commit b202a3811c
20 changed files with 887 additions and 913 deletions

View File

@@ -1,52 +1,53 @@
---
handler.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
handler.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- handler.c
+++ handler.c 2017-09-11 12:06:12.982065389 +0000
@@ -821,6 +821,7 @@ static int text_enriched_handler(struct
enum
{
TEXT,
+ TEXT_GOTWC,
LANGLE,
TAG,
BOGUS_TAG,
@@ -858,7 +859,7 @@ static int text_enriched_handler(struct
+++ handler.c 2018-07-04 13:48:57.285110213 +0000
@@ -780,7 +780,7 @@ static void enriched_set_flags (const wc
static int text_enriched_handler (BODY *a, STATE *s)
{
enum {
- TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
+ TEXT, TEXT_GOTWC, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
} state = TEXT;
long bytes = a->length;
@@ -810,7 +810,7 @@ static int text_enriched_handler (BODY *
{
if (state != ST_EOF)
{
- if (!bytes || (wc = fgetwc(s->fpin)) == WEOF)
+ if (state != TEXT_GOTWC && (!bytes || (fscanf (s->fpin, "%lc", &wc)) == EOF))
state = ST_EOF;
- if (!bytes || (wc = fgetwc (s->fpin)) == WEOF)
+ if (state != TEXT_GOTWC && (!bytes || (wc = fgetwc (s->fpin)) == WEOF))
state = ST_EOF;
else
bytes--;
@@ -866,6 +867,8 @@ static int text_enriched_handler(struct
bytes--;
@@ -818,6 +818,8 @@ static int text_enriched_handler (BODY *
switch (state)
{
+ case TEXT_GOTWC:
+ state = TEXT;
case TEXT:
switch (wc)
{
@@ -926,9 +929,8 @@ static int text_enriched_handler(struct
enriched_flush(&stte, 1);
else
{
- ungetwc(wc, s->fpin);
bytes++;
- state = TEXT;
+ state = TEXT_GOTWC;
}
break;
case TEXT :
switch (wc)
{
@@ -878,9 +880,8 @@ static int text_enriched_handler (BODY *
enriched_flush (&stte, 1);
else
{
- ungetwc (wc, s->fpin);
bytes++;
- state = TEXT;
+ state = TEXT_GOTWC;
}
break;
@@ -1657,7 +1659,7 @@ void mutt_decode_attachment(struct Body
* all trailing spaces to improve interoperability; if $text_flowed is unset,
* simply verbatim copy input
@@ -1568,7 +1569,7 @@ void mutt_decode_attachment (BODY *b, ST
* strip all trailing spaces to improve interoperability;
* if $text_flowed is unset, simply verbatim copy input
*/
-static int text_plain_handler(struct Body *b, struct State *s)
+static int text_plain_handler(struct Body *b __attribute__((unused)), struct State *s)
-static int text_plain_handler (BODY *b, STATE *s)
+static int text_plain_handler (BODY *b __attribute__((unused)), STATE *s)
{
char *buf = NULL;
size_t l = 0, sz = 0;