From f9461927f7d10d04b03301dee6fc53f7440b90cc Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 5 Sep 2013 00:53:23 -0600 Subject: * Experimental: Write the content-type of a message in lowercase, as some non-compliant servers do not understand uppercase content-type, such as those of GMX.de. * Transformation of UTF-8 to MUTF7 was not being done when creating a folder in an IMAP server. --- VERSION | 2 +- alpine/confscroll.c | 1 - alpine/folder.c | 36 +++++++++++++++++++++++++++++------- autom4te.cache/output.0 | 20 ++++++++++---------- autom4te.cache/output.2 | 20 ++++++++++---------- configure | 20 ++++++++++---------- pith/pine.hlp | 10 +++++++--- pith/send.c | 19 +++++++++++++++---- 8 files changed, 82 insertions(+), 46 deletions(-) diff --git a/VERSION b/VERSION index 22e3b6b0..7cd5929f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.11.3 +2.11.4 diff --git a/alpine/confscroll.c b/alpine/confscroll.c index b4aa3218..1879f47d 100644 --- a/alpine/confscroll.c +++ b/alpine/confscroll.c @@ -3679,7 +3679,6 @@ update_option_screen(struct pine *ps, OPT_SCREEN_S *screen, Pos *cursor_pos) } } else{ - dprint((1, "value = %s, tmp_20k = %s", ctmp->value, tmp_20k_buf)); w = utf8_width(tmp_20k_buf); want_width = ps->ttyo->screen_cols - ctmp->valoffset; if(w > want_width){ diff --git a/alpine/folder.c b/alpine/folder.c index 31d2031e..2d49ace2 100644 --- a/alpine/folder.c +++ b/alpine/folder.c @@ -30,6 +30,7 @@ or search for a folder name. #include "headers.h" +#include "../c-client/utf8aux.h" #include "folder.h" #include "keymenu.h" #include "status.h" @@ -4020,7 +4021,7 @@ add_new_folder(CONTEXT_S *context, EditWhich which, int varnum, char *add_folder { char tmp[MAX(MAXFOLDER,6*MAX_SCREEN_COLS)+1], nickname[32], *p = NULL, *return_val = NULL, buf[MAILTMPLEN], - buf2[MAILTMPLEN], def_in_prompt[MAILTMPLEN]; + buf2[MAILTMPLEN], def_in_prompt[MAILTMPLEN], orig_folder[2*MAXFOLDER+10]; HelpType help; PINERC_S *prc = NULL; int i, rc, offset, exists, cnt = 0, isdir = 0; @@ -4040,8 +4041,7 @@ add_new_folder(CONTEXT_S *context, EditWhich which, int varnum, char *add_folder dprint((4, "\n - add_new_folder - \n")); - add_folder[0] = '\0'; - nickname[0] = '\0'; + nickname[0] = orig_folder[0] = add_folder[0] = '\0'; inbox = (varnum == V_INBOX_PATH); if(inbox || context->use & CNTXT_INCMNG){ @@ -4477,6 +4477,17 @@ get_folder_name: removing_leading_and_trailing_white_space(&add_folder[offset]); + /* for non-local folders, transform UTF-8 to MUTF7 */ + if(offset > 0 && add_folder[0] == '{'){ + unsigned char *mutf7 = utf8_to_mutf7(&add_folder[offset]); + if(mutf7 != NULL){ + strncpy(orig_folder, &add_folder[offset], 2*MAXFOLDER+10); + strncpy(&add_folder[offset], mutf7, add_folderlen-offset); + add_folder[add_folderlen-1] = '\0'; + fs_give((void **)&mutf7); + } + } + if(rc == 0 && !(inbox || context->use & CNTXT_INCMNG) && check_for_move_mbox(add_folder, NULL, 0L, NULL)){ q_status_message(SM_ORDER, 6, 6, @@ -4590,6 +4601,17 @@ skip_over_folder_input: removing_leading_and_trailing_white_space(&add_folder[offset]); + /* for non-local folders, transform UTF-8 to MUTF7 */ + if(offset > 0 && add_folder[0] == '{'){ + unsigned char *mutf7 = utf8_to_mutf7(&add_folder[offset]); + if(mutf7 != NULL){ + strncpy(orig_folder, &add_folder[offset], 2*MAXFOLDER+10); + strncpy(&add_folder[offset], mutf7, add_folderlen-offset); + add_folder[add_folderlen-1] = '\0'; + fs_give((void **)&mutf7); + } + } + /* use default */ if(rc == 0 && !add_folder[offset]){ q_status_message(SM_ORDER, 4, 4, @@ -4633,7 +4655,7 @@ skip_over_folder_input: help = NO_HELP; if(!inbox && context->use & CNTXT_INCMNG){ - snprintf(tmp, sizeof(tmp), _("Nickname for folder \"%s\" : "), &add_folder[offset]); + snprintf(tmp, sizeof(tmp), _("Nickname for folder \"%s\" : "), orig_folder[0] ? orig_folder : &add_folder[offset]); tmp[sizeof(tmp)-1] = '\0'; while(1){ int flags = OE_APPEND_CURRENT; @@ -4896,19 +4918,19 @@ skip_over_folder_input: if(!inbox) q_status_message1(SM_ORDER, 0, 3, "Folder \"%s\" created", - add_folder); + orig_folder[0] ? orig_folder : add_folder); return_val = add_folder; } else if(context_isambig(add_folder)){ free_folder_list(context); q_status_message2(SM_ORDER, 0, 3, "%s \"%s\" created", - isdir ? "Directory" : "Folder", add_folder); + isdir ? "Directory" : "Folder", orig_folder[0] ? orig_folder : add_folder); return_val = add_folder; } else q_status_message1(SM_ORDER, 0, 3, "Folder \"%s\" created outside current collection", - add_folder); + orig_folder[0] ? orig_folder : add_folder); if(maildropfolder) fs_give((void **) &maildropfolder); diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 index 8749c1fe..ec107ab8 100644 --- a/autom4te.cache/output.0 +++ b/autom4te.cache/output.0 @@ -1,7 +1,7 @@ @%:@! /bin/sh @%:@ From configure.ac Rev:2 by chappa@washington.edu. @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for alpine 2.11.3. +@%:@ Generated by GNU Autoconf 2.69 for alpine 2.11.4. @%:@ @%:@ Report bugs to . @%:@ @@ -730,8 +730,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='alpine' PACKAGE_TARNAME='alpine' -PACKAGE_VERSION='2.11.3' -PACKAGE_STRING='alpine 2.11.3' +PACKAGE_VERSION='2.11.4' +PACKAGE_STRING='alpine 2.11.4' PACKAGE_BUGREPORT='chappa@washington.edu' PACKAGE_URL='' @@ -1594,7 +1594,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alpine 2.11.3 to adapt to many kinds of systems. +\`configure' configures alpine 2.11.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1664,7 +1664,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alpine 2.11.3:";; + short | recursive ) echo "Configuration of alpine 2.11.4:";; esac cat <<\_ACEOF @@ -1948,7 +1948,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alpine configure 2.11.3 +alpine configure 2.11.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2554,7 +2554,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alpine $as_me 2.11.3, which was +It was created by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3375,7 +3375,7 @@ fi # Define the identity of the package. PACKAGE='alpine' - VERSION='2.11.3' + VERSION='2.11.4' cat >>confdefs.h <<_ACEOF @@ -20094,7 +20094,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alpine $as_me 2.11.3, which was +This file was extended by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20160,7 +20160,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -alpine config.status 2.11.3 +alpine config.status 2.11.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/autom4te.cache/output.2 b/autom4te.cache/output.2 index 8749c1fe..ec107ab8 100644 --- a/autom4te.cache/output.2 +++ b/autom4te.cache/output.2 @@ -1,7 +1,7 @@ @%:@! /bin/sh @%:@ From configure.ac Rev:2 by chappa@washington.edu. @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for alpine 2.11.3. +@%:@ Generated by GNU Autoconf 2.69 for alpine 2.11.4. @%:@ @%:@ Report bugs to . @%:@ @@ -730,8 +730,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='alpine' PACKAGE_TARNAME='alpine' -PACKAGE_VERSION='2.11.3' -PACKAGE_STRING='alpine 2.11.3' +PACKAGE_VERSION='2.11.4' +PACKAGE_STRING='alpine 2.11.4' PACKAGE_BUGREPORT='chappa@washington.edu' PACKAGE_URL='' @@ -1594,7 +1594,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alpine 2.11.3 to adapt to many kinds of systems. +\`configure' configures alpine 2.11.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1664,7 +1664,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alpine 2.11.3:";; + short | recursive ) echo "Configuration of alpine 2.11.4:";; esac cat <<\_ACEOF @@ -1948,7 +1948,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alpine configure 2.11.3 +alpine configure 2.11.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2554,7 +2554,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alpine $as_me 2.11.3, which was +It was created by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3375,7 +3375,7 @@ fi # Define the identity of the package. PACKAGE='alpine' - VERSION='2.11.3' + VERSION='2.11.4' cat >>confdefs.h <<_ACEOF @@ -20094,7 +20094,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alpine $as_me 2.11.3, which was +This file was extended by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20160,7 +20160,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -alpine config.status 2.11.3 +alpine config.status 2.11.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure b/configure index 07217876..a9e426a2 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Rev:2 by chappa@washington.edu. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for alpine 2.11.3. +# Generated by GNU Autoconf 2.69 for alpine 2.11.4. # # Report bugs to . # @@ -730,8 +730,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='alpine' PACKAGE_TARNAME='alpine' -PACKAGE_VERSION='2.11.3' -PACKAGE_STRING='alpine 2.11.3' +PACKAGE_VERSION='2.11.4' +PACKAGE_STRING='alpine 2.11.4' PACKAGE_BUGREPORT='chappa@washington.edu' PACKAGE_URL='' @@ -1594,7 +1594,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alpine 2.11.3 to adapt to many kinds of systems. +\`configure' configures alpine 2.11.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1664,7 +1664,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alpine 2.11.3:";; + short | recursive ) echo "Configuration of alpine 2.11.4:";; esac cat <<\_ACEOF @@ -1948,7 +1948,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alpine configure 2.11.3 +alpine configure 2.11.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2554,7 +2554,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alpine $as_me 2.11.3, which was +It was created by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3375,7 +3375,7 @@ fi # Define the identity of the package. PACKAGE='alpine' - VERSION='2.11.3' + VERSION='2.11.4' cat >>confdefs.h <<_ACEOF @@ -20094,7 +20094,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alpine $as_me 2.11.3, which was +This file was extended by alpine $as_me 2.11.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20160,7 +20160,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -alpine config.status 2.11.3 +alpine config.status 2.11.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/pith/pine.hlp b/pith/pine.hlp index ce7d04be..1a0d3bed 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 27 2013-08-30 23:54:12 +Alpine Commit 29 2013-09-05 00:40:13 ============= h_news ================= @@ -179,6 +179,9 @@ Additions include:

    +
  • Experimental: Write the content-type of a message in lowercase, as some + non-compliant servers do not understand uppercase content-type, such as + those of GMX.de.
  • Opening a folder updates recent count in maildrops (this already works for other types of folders)
  • Automatically redraw screen after opening an attachment instead of @@ -191,9 +194,10 @@ Additions include:

    Bugs that have been addressed include:

      +
    • Transformation of UTF-8 to MUTF7 was not being done when creating a folder + in an IMAP server.
    • DATE tokens were not internally transformed to UTF-8, which made their - values appear garbled or incomplete in the screen. Reported by Werner - Scheinast. + values not appear complete in the screen. Reported by Werner Scheinast.
    • Fixes to configure script so that it will not require PAM for every system.
    • Fix to configure script so that it will use CPPFLAGS instead of CPPCFLAGS, and so the --with-ssl-include-dir option take effect diff --git a/pith/send.c b/pith/send.c index 273f59aa..ae649ab6 100644 --- a/pith/send.c +++ b/pith/send.c @@ -4419,6 +4419,17 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s) return(1); } +char * +ToLower(char *s, char *t) +{ + int i; + + for(i = 0; s != NULL && s[i] != '\0'; i++) + t[i] = s[i] + ((s[i] >= 'A' && s[i] <= 'Z') ? ('a' - 'A') : 0); + t[i] = '\0'; + + return t; +} /* * pine_write_body_header - another c-client clone. This time @@ -4441,11 +4452,11 @@ pine_write_body_header(struct mail_bodystruct *body, soutr_t f, void *s) if((so = so_get(CharStar, NULL, WRITE_ACCESS)) != NULL){ if(!(so_puts(so, "Content-Type: ") - && so_puts(so, body_types[body->type]) + && so_puts(so, ToLower(body_types[body->type], tmp)) && so_puts(so, "/") - && so_puts(so, body->subtype - ? body->subtype - : rfc822_default_subtype (body->type)))) + && so_puts(so, ToLower(body->subtype + ? body->subtype + : rfc822_default_subtype (body->type),tmp)))) return(pwbh_finish(0, so)); if(body->parameter){ -- cgit v1.2.3-54-g00ecf