summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--alpine/addrbook.c2
-rw-r--r--alpine/alpine.c1
-rw-r--r--alpine/colorconf.c4
-rw-r--r--alpine/confscroll.c28
-rw-r--r--alpine/confscroll.h4
-rw-r--r--alpine/context.c4
-rw-r--r--alpine/flagmaint.c2
-rw-r--r--alpine/ldapconf.c6
-rw-r--r--alpine/listsel.c2
-rw-r--r--alpine/osdep/mswin.rc8
-rw-r--r--alpine/print.c2
-rw-r--r--alpine/roleconf.c6
-rw-r--r--alpine/setup.c43
-rw-r--r--alpine/smime.c4
-rw-r--r--alpine/takeaddr.c2
-rwxr-xr-xconfigure20
-rw-r--r--doc/alpine.12
-rw-r--r--doc/tech-notes/index.html2
-rw-r--r--doc/tech-notes/tech-notes.txt2
-rw-r--r--imap/src/c-client/mail.c1
-rw-r--r--imap/src/c-client/mail.h4
-rw-r--r--imap/src/c-client/utf8.c19
-rw-r--r--imap/src/c-client/utf8.h1
-rw-r--r--mapi/pmapi.c2
-rw-r--r--mapi/pmapi.rc8
-rw-r--r--pico/main.c4
-rw-r--r--pico/search.c25
-rw-r--r--pith/charconv/utf8.c11
-rw-r--r--pith/charconv/utf8.h1
-rw-r--r--pith/detach.c4
-rw-r--r--pith/pine.hlp14
-rw-r--r--po/Makefile.in8
-rw-r--r--regex/regcomp.c5
34 files changed, 167 insertions, 86 deletions
diff --git a/VERSION b/VERSION
index 4b0fa5fd..1e38b29b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.20.3
+2.20.4
diff --git a/alpine/addrbook.c b/alpine/addrbook.c
index 937d6a5c..cb87f28d 100644
--- a/alpine/addrbook.c
+++ b/alpine/addrbook.c
@@ -6956,7 +6956,7 @@ abook_select_screen(struct pine *ps)
(void) conf_scroll_screen(ps, &screen, first_line,
/* TRANSLATORS: Print something1 using something2.
abooks is something1 */
- _("SELECT ADDRESS BOOK"), _("abooks"), 0);
+ _("SELECT ADDRESS BOOK"), _("abooks"), 0, NULL);
}
else
q_status_message(SM_ORDER|SM_DING, 3, 3, _("No address books defined!"));
diff --git a/alpine/alpine.c b/alpine/alpine.c
index e8aa4bd1..b444c17e 100644
--- a/alpine/alpine.c
+++ b/alpine/alpine.c
@@ -299,6 +299,7 @@ main(int argc, char **argv)
exit(-1);
}
+ mail_parameters(NULL, SET_UCS4WIDTH, (void *) pith_ucs4width);
mail_parameters(NULL, SET_QUOTA, (void *) pine_parse_quota);
/* set some default timeouts in case pinerc is remote */
mail_parameters(NULL, SET_OPENTIMEOUT, (void *)(long)30);
diff --git a/alpine/colorconf.c b/alpine/colorconf.c
index 7b8a23fe..83250489 100644
--- a/alpine/colorconf.c
+++ b/alpine/colorconf.c
@@ -106,7 +106,7 @@ color_config_screen(struct pine *ps, int edit_exceptions)
: _("SETUP COLOR"),
/* TRANSLATORS: Print something1 using something2.
configuration is something1 */
- _("configuration"), 0)){
+ _("configuration"), 0, NULL)){
case 0:
break;
@@ -2918,7 +2918,7 @@ color_edit_screen(struct pine *ps, CONF_S **cl)
rv = conf_scroll_screen(ps, &screen, first_line,
ew == Post ? _("SETUP COLOR EXCEPTIONS")
: _("SETUP COLOR"),
- _("configuration"), 1);
+ _("configuration"), 1, NULL);
opt_screen = saved_screen;
ps->mangled_screen = 1;
diff --git a/alpine/confscroll.c b/alpine/confscroll.c
index 53c2c82a..efa8dc4e 100644
--- a/alpine/confscroll.c
+++ b/alpine/confscroll.c
@@ -458,7 +458,7 @@ save_include(struct pine *ps, struct variable *v, int allow_hard_to_config_remot
* this function.
*/
int
-conf_scroll_screen(struct pine *ps, OPT_SCREEN_S *screen, CONF_S *start_line, char *title, char *pdesc, int multicol)
+conf_scroll_screen(struct pine *ps, OPT_SCREEN_S *screen, CONF_S *start_line, char *title, char *pdesc, int multicol, int *pos)
{
char tmp[MAXPATH+1];
char *utf8str;
@@ -1317,6 +1317,11 @@ no_down:
case MC_RESIZE:
ClearScreen();
ps->mangled_screen = 1;
+ if(pos){
+ *pos = get_confline_number(screen->current);
+ done++;
+ retval = 0;
+ }
break;
default:
@@ -4716,6 +4721,27 @@ snip_confline(CONF_S **p)
}
}
+int
+get_confline_number(CONF_S *conf)
+{
+ int pos;
+ CONF_S *p;
+
+ for (p = first_confline(conf), pos = 0; p != conf; p = next_confline(p), pos++);
+
+ return pos;
+}
+
+
+CONF_S *
+set_confline_number(CONF_S *conf, int pos)
+{
+ CONF_S *p;
+ int i;
+ for(p = first_confline(conf), i = 0; p && i < pos; p=next_confline(p), i++);
+ return p;
+}
+
/*
*
diff --git a/alpine/confscroll.h b/alpine/confscroll.h
index b48683c3..9fbe6754 100644
--- a/alpine/confscroll.h
+++ b/alpine/confscroll.h
@@ -78,10 +78,12 @@ extern EditWhich ew;
/* exported protoypes */
-int conf_scroll_screen(struct pine *, OPT_SCREEN_S *, CONF_S *, char *, char *, int);
+int conf_scroll_screen(struct pine *, OPT_SCREEN_S *, CONF_S *, char *, char *, int, int *);
void standard_radio_setup(struct pine *, CONF_S **, struct variable *, CONF_S **);
int standard_radio_var(struct pine *, struct variable *);
int delete_user_vals(struct variable *);
+int get_confline_number(CONF_S *);
+CONF_S *set_confline_number(CONF_S *, int);
CONF_S *new_confline(CONF_S **);
void free_conflines(CONF_S **);
CONF_S *first_confline(CONF_S *);
diff --git a/alpine/context.c b/alpine/context.c
index 457b99ef..173450c7 100644
--- a/alpine/context.c
+++ b/alpine/context.c
@@ -275,7 +275,7 @@ go_again:
memset(&screen, 0, sizeof(screen));
screen.ro_warning = readonly_warning;
ret = conf_scroll_screen(ps, &screen, first_line, cs->title,
- cs->print_string, 0);
+ cs->print_string, 0, NULL);
free_contexts(&top);
@@ -470,7 +470,7 @@ context_select_screen(struct pine *ps, CONT_SCR_S *cs, int ro_warn)
memset(&screen, 0, sizeof(screen));
screen.ro_warning = readonly_warning;
(void) conf_scroll_screen(ps, &screen, first_line, cs->title,
- cs->print_string, 0);
+ cs->print_string, 0, NULL);
opt_screen = saved_screen;
ps->mangled_screen = 1;
return(cs->selected);
diff --git a/alpine/flagmaint.c b/alpine/flagmaint.c
index b6fbf25d..acdccb1d 100644
--- a/alpine/flagmaint.c
+++ b/alpine/flagmaint.c
@@ -165,7 +165,7 @@ try_again:
*/
if(conf_scroll_screen(ps, &screen, first_line,
_("FLAG MAINTENANCE"),
- _("configuration"), 0) == FLAG_ADD_RETURN){
+ _("configuration"), 0, NULL) == FLAG_ADD_RETURN){
int flags, r;
char keyword[500];
char nickname[500];
diff --git a/alpine/ldapconf.c b/alpine/ldapconf.c
index bedbf7a4..66cc3f02 100644
--- a/alpine/ldapconf.c
+++ b/alpine/ldapconf.c
@@ -471,7 +471,7 @@ ldap_addr_select(struct pine *ps, ADDR_CHOOSE_S *ac, LDAP_CHOOSE_S **result,
memset(&screen, 0, sizeof(screen));
/* TRANSLATORS: Print something1 using something2.
"this" is something1 */
- switch(conf_scroll_screen(ps,&screen,first_line,ac->title,_("this"),0)){
+ switch(conf_scroll_screen(ps,&screen,first_line,ac->title,_("this"),0, NULL)){
case ADDR_SELECT_EXIT_VAL:
retval = -1;
break;
@@ -722,7 +722,7 @@ directory_config(struct pine *ps, int edit_exceptions)
/* TRANSLATORS: Print something1 using something2.
"servers" is something1 */
(void)conf_scroll_screen(ps, &screen, first_line,
- _("SETUP DIRECTORY SERVERS"), _("servers"), 0);
+ _("SETUP DIRECTORY SERVERS"), _("servers"), 0, NULL);
ps->mangled_screen = 1;
}
@@ -1758,7 +1758,7 @@ dir_edit_screen(struct pine *ps, LDAP_SERV_S *def, char *title, char **raw_serve
screen.ro_warning = saved_screen ? saved_screen->deferred_ro_warning : 0;
/* TRANSLATORS: Print something1 using something2.
servers is something1 */
- rv = conf_scroll_screen(ps, &screen, first_line, tmp, _("servers"), 0);
+ rv = conf_scroll_screen(ps, &screen, first_line, tmp, _("servers"), 0, NULL);
/*
* Now look at the fake variables and extract the information we
diff --git a/alpine/listsel.c b/alpine/listsel.c
index 7d70e289..aa8f105d 100644
--- a/alpine/listsel.c
+++ b/alpine/listsel.c
@@ -191,7 +191,7 @@ select_from_list_screen(LIST_SEL_S *lsel, long unsigned int flags, char *title,
}
memset(&screen, 0, sizeof(screen));
- switch(conf_scroll_screen(ps_global, &screen, first_line, title, pdesc, 0)){
+ switch(conf_scroll_screen(ps_global, &screen, first_line, title, pdesc, 0, NULL)){
case 1:
ret = 0;
break;
diff --git a/alpine/osdep/mswin.rc b/alpine/osdep/mswin.rc
index af9440ba..521a9b12 100644
--- a/alpine/osdep/mswin.rc
+++ b/alpine/osdep/mswin.rc
@@ -244,8 +244,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,20,3,0
- PRODUCTVERSION 2,20,3,0
+ FILEVERSION 2,20,4,0
+ PRODUCTVERSION 2,20,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -267,12 +267,12 @@ BEGIN
#else
VALUE "FileDescription", "Alpine\0"
#endif
- VALUE "FileVersion", "2.20.3\0"
+ VALUE "FileVersion", "2.20.4\0"
VALUE "InternalName", "alpine\0"
VALUE "LegalCopyright", "Copyright 2006-2009 University of Washington, Copyright 2013-2014\0"
VALUE "OriginalFilename", "alpine.exe\0"
VALUE "ProductName", "alpine\0"
- VALUE "ProductVersion", "2.20.3\0"
+ VALUE "ProductVersion", "2.20.4\0"
END
END
BLOCK "VarFileInfo"
diff --git a/alpine/print.c b/alpine/print.c
index e9d17481..98688a2b 100644
--- a/alpine/print.c
+++ b/alpine/print.c
@@ -497,7 +497,7 @@ select_printer(struct pine *ps, int edit_exceptions)
switch(conf_scroll_screen(ps, &screen, start_line,
edit_exceptions ? _("SETUP PRINTER EXCEPTIONS")
: _("SETUP PRINTER"),
- _("printer config"), 0)){
+ _("printer config"), 0, NULL)){
case 0:
break;
diff --git a/alpine/roleconf.c b/alpine/roleconf.c
index effc29c4..d5d34e1f 100644
--- a/alpine/roleconf.c
+++ b/alpine/roleconf.c
@@ -203,7 +203,7 @@ role_select_screen(struct pine *ps, ACTION_S **role, int alt_compose)
/* TRANSLATORS: Print something1 using something2.
"roles" is something1 */
(void)conf_scroll_screen(ps, &screen, first_line, _("SELECT ROLE"),
- _("roles"), 0);
+ _("roles"), 0, NULL);
if(sel_pat){
*role = sel_pat->action;
@@ -374,7 +374,7 @@ uh_oh:
screen.deferred_ro_warning = readonly_warning;
/* TRANSLATORS: Print something1 using something2.
"rules" is something1 */
- switch(conf_scroll_screen(ps, &screen, first_line, title, _("rules"), 0)){
+ switch(conf_scroll_screen(ps, &screen, first_line, title, _("rules"), 0, NULL)){
case 0:
break;
@@ -4909,7 +4909,7 @@ role_config_edit_screen(struct pine *ps, PAT_S *def, char *title, long int rflag
/* TRANSLATORS: Print something1 using something2.
"roles" is something1 */
rv = conf_scroll_screen(ps, &screen, first_line, title, _("roles"),
- (edit_incol && pico_usingcolor()) ? 1 : 0);
+ (edit_incol && pico_usingcolor()) ? 1 : 0, NULL);
/*
* Now look at the fake variables and extract the information we
diff --git a/alpine/setup.c b/alpine/setup.c
index 57d34aba..d651c1f5 100644
--- a/alpine/setup.c
+++ b/alpine/setup.c
@@ -62,7 +62,7 @@ void
option_screen(struct pine *ps, int edit_exceptions)
{
char tmp[MAXPATH+1], *pval, **lval;
- int i, j, ln = 0, readonly_warning = 0;
+ int i, j, ln = 0, readonly_warning = 0, pos;
struct variable *vtmp;
CONF_S *ctmpa = NULL, *ctmpb, *first_line = NULL;
FEATURE_S *feature;
@@ -107,6 +107,10 @@ option_screen(struct pine *ps, int edit_exceptions)
if(ps->fix_fixed_warning)
offer_to_fix_pinerc(ps);
+ pos = -1;
+ do { /* Beginning of BIG LOOP */
+ ctmpa = first_line = NULL;
+
/*
* First, find longest variable name
*/
@@ -426,35 +430,36 @@ option_screen(struct pine *ps, int edit_exceptions)
}
vsave = save_config_vars(ps, expose_hidden_config);
- first_line = first_sel_confline(first_line);
-
+ first_line = pos < 0 ? first_sel_confline(first_line) : set_confline_number(first_line, pos);
+ pos = -1;
memset(&screen, 0, sizeof(screen));
screen.ro_warning = readonly_warning;
/* TRANSLATORS: Print something1 using something2.
"configuration" is something1 */
- switch(conf_scroll_screen(ps, &screen, first_line,
+ switch(conf_scroll_screen(ps, &screen, first_line,
edit_exceptions ? CONFIG_SCREEN_TITLE_EXC
: CONFIG_SCREEN_TITLE,
- _("configuration"), 0)){
- case 0:
- break;
+ _("configuration"), 0, &pos)){
+ case 0:
+ break;
- case 1:
- write_pinerc(ps, ew, WRP_NONE);
- break;
+ case 1:
+ write_pinerc(ps, ew, WRP_NONE);
+ break;
- case 10:
- revert_to_saved_config(ps, vsave, expose_hidden_config);
- if(prc)
- prc->outstanding_pinerc_changes = 0;
+ case 10:
+ revert_to_saved_config(ps, vsave, expose_hidden_config);
+ if(prc)
+ prc->outstanding_pinerc_changes = 0;
- break;
+ break;
- default:
- q_status_message(SM_ORDER,7,10,
+ default:
+ q_status_message(SM_ORDER,7,10,
"conf_scroll_screen bad ret, not supposed to happen");
- break;
- }
+ break;
+ }
+ } while (pos >= 0);
pval = PVAL(&ps->vars[V_SORT_KEY], ew);
if(vsave[V_SORT_KEY].saved_user_val.p && pval
diff --git a/alpine/smime.c b/alpine/smime.c
index 6f2665c7..ca18b3ee 100644
--- a/alpine/smime.c
+++ b/alpine/smime.c
@@ -726,7 +726,7 @@ smime_config_screen(struct pine *ps, int edit_exceptions)
: _("SETUP S/MIME"),
/* TRANSLATORS: Print something1 using something2.
configuration is something1 */
- _("configuration"), 0)){
+ _("configuration"), 0, NULL)){
case 0:
break;
@@ -1468,7 +1468,7 @@ void manage_certificates(struct pine *ps, WhichCerts ctype)
_("MANAGE CERTIFICATES"),
/* TRANSLATORS: Print something1 using something2.
configuration is something1 */
- _("configuration"), 0);
+ _("configuration"), 0, NULL);
} while (rv != 0);
ps->mangled_screen = 1;
diff --git a/alpine/takeaddr.c b/alpine/takeaddr.c
index abb63e37..5c13d8a9 100644
--- a/alpine/takeaddr.c
+++ b/alpine/takeaddr.c
@@ -2805,7 +2805,7 @@ take_to_export(struct pine *ps, LINES_TO_TAKE *lines_to_take)
q_status_message(SM_ORDER, 3, 3, _("No lines to export"));
else{
memset(&screen, 0, sizeof(screen));
- conf_scroll_screen(ps, &screen, first_line, _("Take Export"), NULL, 0);
+ conf_scroll_screen(ps, &screen, first_line, _("Take Export"), NULL, 0, NULL);
}
}
diff --git a/configure b/configure
index 03ab0074..7dc091c5 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Rev:17 by chappa@washington.edu.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for alpine 2.20.3.
+# Generated by GNU Autoconf 2.69 for alpine 2.20.4.
#
# Report bugs to <chappa@washington.edu>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='alpine'
PACKAGE_TARNAME='alpine'
-PACKAGE_VERSION='2.20.3'
-PACKAGE_STRING='alpine 2.20.3'
+PACKAGE_VERSION='2.20.4'
+PACKAGE_STRING='alpine 2.20.4'
PACKAGE_BUGREPORT='chappa@washington.edu'
PACKAGE_URL=''
@@ -1466,7 +1466,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.20.3 to adapt to many kinds of systems.
+\`configure' configures alpine 2.20.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1536,7 +1536,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of alpine 2.20.3:";;
+ short | recursive ) echo "Configuration of alpine 2.20.4:";;
esac
cat <<\_ACEOF
@@ -1830,7 +1830,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-alpine configure 2.20.3
+alpine configure 2.20.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2436,7 +2436,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.20.3, which was
+It was created by alpine $as_me 2.20.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3305,7 +3305,7 @@ fi
# Define the identity of the package.
PACKAGE='alpine'
- VERSION='2.20.3'
+ VERSION='2.20.4'
cat >>confdefs.h <<_ACEOF
@@ -21303,7 +21303,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.20.3, which was
+This file was extended by alpine $as_me 2.20.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21369,7 +21369,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.20.3
+alpine config.status 2.20.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/doc/alpine.1 b/doc/alpine.1
index c75cbcc3..7802696e 100644
--- a/doc/alpine.1
+++ b/doc/alpine.1
@@ -1,4 +1,4 @@
-.TH alpine 1 "Version 2.20.3"
+.TH alpine 1 "Version 2.20.4"
.SH NAME
alpine \- an Alternatively Licensed Program for Internet News and Email
.SH SYNTAX
diff --git a/doc/tech-notes/index.html b/doc/tech-notes/index.html
index 34905862..c09ac7cc 100644
--- a/doc/tech-notes/index.html
+++ b/doc/tech-notes/index.html
@@ -3,7 +3,7 @@
<BODY>
<H1>Alpine Technical Notes</H1>
-Version 2.20.3, February 2015
+Version 2.20.4, March 2015
<H2><A NAME="TOC">Table of Contents</A></H2><P>
diff --git a/doc/tech-notes/tech-notes.txt b/doc/tech-notes/tech-notes.txt
index 366aae46..f868fa47 100644
--- a/doc/tech-notes/tech-notes.txt
+++ b/doc/tech-notes/tech-notes.txt
@@ -1,7 +1,7 @@
Alpine Technical Notes
- Version 2.20.3, February 2015
+ Version 2.20.4, March 2015
Table of Contents
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index 03952d2e..da703a0d 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -650,6 +650,7 @@ void *mail_parameters (MAILSTREAM *stream,long function,void *value)
if (r = smtp_parameters (function,value)) ret = r;
if (r = env_parameters (function,value)) ret = r;
if (r = tcp_parameters (function,value)) ret = r;
+ if (r = utf8_parameters (function,value)) ret = r;
if (stream && stream->dtb) {/* if have stream, do for its driver only */
if (r = (*stream->dtb->parameters) (function,value)) ret = r;
}
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h
index 2accc85b..7595bf59 100644
--- a/imap/src/c-client/mail.h
+++ b/imap/src/c-client/mail.h
@@ -142,7 +142,8 @@
#define SET_RFC822OUTPUTFULL (long) 160
#define GET_BLOCKENVINIT (long) 161
#define SET_BLOCKENVINIT (long) 162
-
+#define GET_UCS4WIDTH (long) 163
+#define SET_UCS4WIDTH (long) 164
/* 2xx: environment */
#define GET_USERNAME (long) 201
#define SET_USERNAME (long) 202
@@ -1325,6 +1326,7 @@ typedef void *(*mailcache_t) (MAILSTREAM *stream,unsigned long msgno,long op);
typedef long (*mailproxycopy_t) (MAILSTREAM *stream,char *sequence,
char *mailbox,long options);
typedef long (*tcptimeout_t) (long overall,long last, char *host);
+typedef long (*ucs4width_t) (unsigned long c);
typedef void *(*authchallenge_t) (void *stream,unsigned long *len);
typedef long (*authrespond_t) (void *stream,char *s,unsigned long size);
typedef long (*authcheck_t) (void);
diff --git a/imap/src/c-client/utf8.c b/imap/src/c-client/utf8.c
index 3f75ed98..e734a6bb 100644
--- a/imap/src/c-client/utf8.c
+++ b/imap/src/c-client/utf8.c
@@ -38,6 +38,7 @@
* details.
*/
+static ucs4width_t ucs4width = NIL;
/* Character set conversion tables */
@@ -2315,6 +2316,7 @@ unsigned long ucs4_titlecase (unsigned long c)
long ucs4_width (unsigned long c)
{
long ret;
+ ucs4width_t uw = (ucs4width_t) utf8_parameters(GET_UCS4WIDTH, NIL);
/* out of range, not-a-char, or surrogates */
if ((c > UCS4_MAXUNICODE) || ((c & 0xfffe) == 0xfffe) ||
((c >= UTF16_SURR) && (c <= UTF16_MAXSURR))) ret = U4W_NOTUNCD;
@@ -2341,7 +2343,8 @@ long ucs4_width (unsigned long c)
case 2: /* double-width */
break;
case 3: /* ambiguous width */
- ret = (c >= 0x2100) ? 2 : 1;/* need to do something better than this */
+ ret = uw ? (*uw)(c) /* this is better than the line below */
+ : (c >= 0x2100) ? 2 : 1;/* need to do something better than this */
break;
}
return ret;
@@ -2581,3 +2584,17 @@ unsigned long ucs4_decompose_recursive (unsigned long c,void **more)
}
return c;
}
+
+void *utf8_parameters (long function,void *value)
+{
+ void *ret;
+
+ switch(function){
+ case SET_UCS4WIDTH:
+ ucs4width = (ucs4width_t) value;
+ case GET_UCS4WIDTH:
+ ret = (void *) ucs4width;
+ break;
+ }
+ return ret;
+}
diff --git a/imap/src/c-client/utf8.h b/imap/src/c-client/utf8.h
index 105f856d..d080c1b0 100644
--- a/imap/src/c-client/utf8.h
+++ b/imap/src/c-client/utf8.h
@@ -582,3 +582,4 @@ long utf8_strwidth (unsigned char *s);
long utf8_textwidth (SIZEDTEXT *utf8);
unsigned long ucs4_decompose (unsigned long c,void **more);
unsigned long ucs4_decompose_recursive (unsigned long c,void **more);
+void *utf8_parameters (long function, void *value);
diff --git a/mapi/pmapi.c b/mapi/pmapi.c
index c0d10a91..9c71fb30 100644
--- a/mapi/pmapi.c
+++ b/mapi/pmapi.c
@@ -1952,7 +1952,7 @@ BOOL APIENTRY DllMain(
now = time((time_t *)0);
tm_now = localtime(&now);
- fprintf(ms_global->dfd, "pmapi32.dll for Alpine Version 2.20.3\r\n");
+ fprintf(ms_global->dfd, "pmapi32.dll for Alpine Version 2.20.4\r\n");
fprintf(ms_global->dfd, " Build date: %s\r\n", datestamp);
fprintf(ms_global->dfd,
" please report all bugs to chappa@gmx.com\r\n");
diff --git a/mapi/pmapi.rc b/mapi/pmapi.rc
index d9207349..b1d991a0 100644
--- a/mapi/pmapi.rc
+++ b/mapi/pmapi.rc
@@ -98,8 +98,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,20,3,0
- PRODUCTVERSION 2,20,3,0
+ FILEVERSION 2,20,4,0
+ PRODUCTVERSION 2,20,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x29L
@@ -117,14 +117,14 @@ BEGIN
VALUE "Comments", "alpine info: http://patches.freeiz.com/alpine\0"
VALUE "CompanyName", "Patches for Alpine\0"
VALUE "FileDescription", "Simple MAPI DLL for Alpine for Windows\0"
- VALUE "FileVersion", "2.20.3\0"
+ VALUE "FileVersion", "2.20.4\0"
VALUE "InternalName", "pmapi32\0"
VALUE "LegalCopyright", "Copyright ? University of Washington 2006-2009, Eduardo Chappa 2013-2014\0"
VALUE "LegalTrademarks", "Apache License, Version 2.0\0"
VALUE "OriginalFilename", "pmapi32.dll\0"
VALUE "PrivateBuild", " \0"
VALUE "ProductName", "Simple MAPI for Alpine for Windows\0"
- VALUE "ProductVersion", "2.20.3\0"
+ VALUE "ProductVersion", "2.20.4\0"
VALUE "SpecialBuild", " \0"
END
END
diff --git a/pico/main.c b/pico/main.c
index 312e0836..9fe41789 100644
--- a/pico/main.c
+++ b/pico/main.c
@@ -166,6 +166,10 @@ main(int argc, char *argv[])
int use_system = 0;
char *err = NULL;
+#ifndef _WINDOWS
+ utf8_parameters(SET_UCS4WIDTH, pith_ucs4width);
+#endif /* _WINDOWS */
+
set_input_timeout(600);
Pmaster = NULL; /* turn OFF composer functionality */
km_popped = 0;
diff --git a/pico/search.c b/pico/search.c
index f2a5389f..e90a403f 100644
--- a/pico/search.c
+++ b/pico/search.c
@@ -712,11 +712,6 @@ srpat(char *utf8prompt, UCS *defpat, size_t defpatlen, int repl_mode, int flags)
menu_pat[i].key = (CTRL|'R');
KS_OSDATASET(&menu_pat[i], KS_NONE);
- menu_pat[++i].name = "^^";
- menu_pat[i].label = bol ? N_("End Line") : eol ? N_("Anywhere") : N_("Bgn Line") ;
- menu_pat[i].key = (CTRL|'^');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
if(!repl_mode){
menu_pat[++i].name = "^T";
menu_pat[i].label = N_("LineNumber");
@@ -748,6 +743,11 @@ srpat(char *utf8prompt, UCS *defpat, size_t defpatlen, int repl_mode, int flags)
menu_pat[i].key = (CTRL|'P');
KS_OSDATASET(&menu_pat[i], KS_NONE);
+ menu_pat[++i].name = "^^";
+ menu_pat[i].label = bol ? N_("End Line") : eol ? N_("Anywhere") : N_("Bgn Line") ;
+ menu_pat[i].key = (CTRL|'^');
+ KS_OSDATASET(&menu_pat[i], KS_NONE);
+
menu_pat[++i].name = NULL;
b = utf8_to_ucs4_cpystr(utf8prompt);
@@ -908,17 +908,7 @@ readpattern(char *utf8prompt, int text_mode, int flags)
menu_pat[i].key = (CTRL|'V');
KS_OSDATASET(&menu_pat[i], KS_NONE);
- menu_pat[++i].name = "^^";
- menu_pat[i].label = bol ? N_("End Line") : eol ? N_("Anywhere") : N_("Bgn Line") ;
- menu_pat[i].key = (CTRL|'^');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
if(text_mode){
- menu_pat[++i].name = "^^";
- menu_pat[i].label = N_("Begn of Line");
- menu_pat[i].key = (CTRL|'^');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
menu_pat[++i].name = "^T";
menu_pat[i].label = N_("LineNumber");
menu_pat[i].key = (CTRL|'T');
@@ -938,6 +928,11 @@ readpattern(char *utf8prompt, int text_mode, int flags)
menu_pat[i].label = N_("FullJustify");
menu_pat[i].key = (CTRL|'U');
KS_OSDATASET(&menu_pat[i], KS_NONE);
+
+ menu_pat[++i].name = "^^";
+ menu_pat[i].label = bol ? N_("End Line") : eol ? N_("Anywhere") : N_("Bgn Line") ;
+ menu_pat[i].key = (CTRL|'^');
+ KS_OSDATASET(&menu_pat[i], KS_NONE);
}
menu_pat[++i].name = "^P";
diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c
index d2f34e61..29341f71 100644
--- a/pith/charconv/utf8.c
+++ b/pith/charconv/utf8.c
@@ -24,6 +24,8 @@ static char rcsid[] = "$Id: utf8.c 1184 2008-12-16 23:52:15Z hubert@u.washington
#ifdef _WINDOWS
/* wingdi.h uses ERROR (!) and we aren't using the c-client ERROR so... */
#undef ERROR
+#else
+#define _XOPEN_SOURCE
#endif
#include <system.h>
@@ -98,6 +100,15 @@ wcellwidth(UCS ucs)
#endif
}
+int
+pith_ucs4width(UCS ucs)
+{
+#ifndef _WINDOWS
+ return wcwidth((wchar_t) ucs);
+#else
+ return 0;
+#endif /* _WINDOWS */
+}
/*
* Argument is a UCS-4 wide character.
diff --git a/pith/charconv/utf8.h b/pith/charconv/utf8.h
index 5a974636..9db7c0fc 100644
--- a/pith/charconv/utf8.h
+++ b/pith/charconv/utf8.h
@@ -97,6 +97,7 @@ char *utf8_to_charset(char *, char *, int);
char *comatose(long);
char *tose(long);
void line_paint(int, struct display_line *, int *);
+int pith_ucs4width(UCS);
#if !defined(_WINDOWS) && HAVE_LANGINFO_H && defined(CODESET)
char *nl_langinfo_codeset_wrapper(void);
diff --git a/pith/detach.c b/pith/detach.c
index 2b61dfd6..0e0a07be 100644
--- a/pith/detach.c
+++ b/pith/detach.c
@@ -209,7 +209,9 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
* If the charset is unlabeled or unknown replace it
* with the user's configured unknown charset.
*/
- if(!charset || !strucmp(charset, UNKNOWN_CHARSET) || !strucmp(charset, "us-ascii")){
+ if(!charset || !strucmp(charset, UNKNOWN_CHARSET)
+ || !strucmp(charset, "MISSING_PARAMETER_VALUE")
+ || !strucmp(charset, "us-ascii")){
if(charset)
fs_give((void **) &charset);
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 31e20a0a..630c301d 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 70 2015-03-15 22:39:47
+Alpine Commit 71 2015-03-25 20:26:58
============= h_news =================
<HTML>
<HEAD>
@@ -202,6 +202,15 @@ Additions include:
Ctrl-^ toggles the prompt to search for a string at the end of a
line, and pressing Ctrl-^ one more time searches for the string
anywhere in the text.
+
+ <LI> If the charset of a message can not be determined, use the value set
+ in the <A HREF="h_config_unk_char_set"><!--#echo var="VAR_unknown-character-set"--></A> for its value.
+
+ <LI> Resizing setup screen will redraw screen.
+
+ <LI> Unix Alpine only. Experimental: If Alpine/Pico finds a UCS4 code
+ in the width ambiguous zone, it will use other means to determine
+ the width, such as call wcwidth.
</UL>
<P>
@@ -22976,7 +22985,8 @@ Of course, if the unlabeled message is actually in some other character set,
then you may see garbage on your screen.
<P>
Instead of just unlabeled text, this option also affects text which is labeled
-with the charsets &quot;X-Unknown&quot; or &quot;US-ASCII&quot;.
+with the charsets &quot;X-Unknown&quot;, &quot;MISSING_PARAMETER_VALUE&quot;
+or &quot;US-ASCII&quot;.
<P>
In the Setup/Config screen you may choose from a list of all the
diff --git a/po/Makefile.in b/po/Makefile.in
index 90bc5c3f..f5034456 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -11,7 +11,7 @@
# Origin: gettext-0.16
PACKAGE = alpine
-VERSION = 2.20.3
+VERSION = 2.20.4
PACKAGE_BUGREPORT = chappa@washington.edu
SHELL = /bin/sh
@@ -34,12 +34,12 @@ INSTALL_DATA = ${INSTALL} -m 644
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/echappa/backup/011115.0/alpine/alpinegit/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, $(MKDIR_P) is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/echappa/backup/011115.0/alpine/alpinegit/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/echappa/backup/011115.0/alpine/alpinegit/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh -d
+install_sh = $(SHELL) ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh
MKDIR_P = /usr/bin/mkdir -p
mkdir_p = $(MKDIR_P)
diff --git a/regex/regcomp.c b/regex/regcomp.c
index 0d083167..5072f7fa 100644
--- a/regex/regcomp.c
+++ b/regex/regcomp.c
@@ -212,7 +212,10 @@ regcomp(regex_t *preg, const char *pattern, int cflags)
return(REG_ESPACE);
}
p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
- assert(p->ssize >= len);
+ if(p->ssize < len || p->ssize > LONG_MAX / sizeof(sop)){
+ free((char *)g);
+ return REG_INVARG;
+ }
p->strip = (sop *)malloc(p->ssize * sizeof(sop));
p->slen = 0;
if (p->strip == NULL) {