summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--alpine/mailpart.c3
-rw-r--r--alpine/osdep/mswin.rc8
-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--mapi/pmapi.c2
-rw-r--r--mapi/pmapi.rc8
-rw-r--r--pico/browse.c2
-rw-r--r--pico/estruct.h14
-rw-r--r--pico/search.c392
-rw-r--r--pith/pine.hlp19
-rw-r--r--pith/smime.c10
-rw-r--r--pith/smkeys.c4
-rw-r--r--pith/takeaddr.c9
-rw-r--r--po/Makefile.in2
17 files changed, 312 insertions, 189 deletions
diff --git a/VERSION b/VERSION
index 1e38b29b..099548ba 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.20.4
+2.20.5
diff --git a/alpine/mailpart.c b/alpine/mailpart.c
index e7fd43b9..be16f6dd 100644
--- a/alpine/mailpart.c
+++ b/alpine/mailpart.c
@@ -2546,6 +2546,7 @@ scroll_attachment(char *title, STORE_S *store, SourceType src, HANDLE_S *handles
return(scrolltool(&sargs));
}
+#ifdef SMIME
void
display_smime_info_att(struct pine *ps, ATTACH_S *a)
{
@@ -2557,7 +2558,7 @@ display_smime_info_att(struct pine *ps, ATTACH_S *a)
display_smime_info(ps, a->body->nested.msg->env, a->body->nested.msg->body);
}
-
+#endif /* SMIME */
int
process_attachment_cmd(int cmd, MSGNO_S *msgmap, SCROLL_S *sparms)
diff --git a/alpine/osdep/mswin.rc b/alpine/osdep/mswin.rc
index 521a9b12..17f8c2da 100644
--- a/alpine/osdep/mswin.rc
+++ b/alpine/osdep/mswin.rc
@@ -244,8 +244,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,20,4,0
- PRODUCTVERSION 2,20,4,0
+ FILEVERSION 2,20,5,0
+ PRODUCTVERSION 2,20,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -267,12 +267,12 @@ BEGIN
#else
VALUE "FileDescription", "Alpine\0"
#endif
- VALUE "FileVersion", "2.20.4\0"
+ VALUE "FileVersion", "2.20.5\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.4\0"
+ VALUE "ProductVersion", "2.20.5\0"
END
END
BLOCK "VarFileInfo"
diff --git a/configure b/configure
index 7dc091c5..779de061 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.4.
+# Generated by GNU Autoconf 2.69 for alpine 2.20.5.
#
# 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.4'
-PACKAGE_STRING='alpine 2.20.4'
+PACKAGE_VERSION='2.20.5'
+PACKAGE_STRING='alpine 2.20.5'
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.4 to adapt to many kinds of systems.
+\`configure' configures alpine 2.20.5 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.4:";;
+ short | recursive ) echo "Configuration of alpine 2.20.5:";;
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.4
+alpine configure 2.20.5
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.4, which was
+It was created by alpine $as_me 2.20.5, 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.4'
+ VERSION='2.20.5'
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.4, which was
+This file was extended by alpine $as_me 2.20.5, 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.4
+alpine config.status 2.20.5
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 7802696e..9321b156 100644
--- a/doc/alpine.1
+++ b/doc/alpine.1
@@ -1,4 +1,4 @@
-.TH alpine 1 "Version 2.20.4"
+.TH alpine 1 "Version 2.20.5"
.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 c09ac7cc..c7fa29a1 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.4, March 2015
+Version 2.20.5, 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 f868fa47..0123ee81 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.4, March 2015
+ Version 2.20.5, March 2015
Table of Contents
diff --git a/mapi/pmapi.c b/mapi/pmapi.c
index 9c71fb30..3a1c3c75 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.4\r\n");
+ fprintf(ms_global->dfd, "pmapi32.dll for Alpine Version 2.20.5\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 b1d991a0..dbb9a99e 100644
--- a/mapi/pmapi.rc
+++ b/mapi/pmapi.rc
@@ -98,8 +98,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,20,4,0
- PRODUCTVERSION 2,20,4,0
+ FILEVERSION 2,20,5,0
+ PRODUCTVERSION 2,20,5,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.4\0"
+ VALUE "FileVersion", "2.20.5\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.4\0"
+ VALUE "ProductVersion", "2.20.5\0"
VALUE "SpecialBuild", " \0"
END
END
diff --git a/pico/browse.c b/pico/browse.c
index d30ad2d1..87f1ecec 100644
--- a/pico/browse.c
+++ b/pico/browse.c
@@ -1598,7 +1598,7 @@ FileBrowse(char *dir, size_t dirlen, char *fn, size_t fnlen,
case 'W':
case (CTRL|'W'):
i = 0;
- flags = SR_FORWARD;
+ flags = SR_ORIGMEN | SR_FORWARD | SR_NOEXACT;
while(!i){
switch(readpattern(_("File name to find"), FALSE, flags)){
diff --git a/pico/estruct.h b/pico/estruct.h
index ff3261c0..3cad44b4 100644
--- a/pico/estruct.h
+++ b/pico/estruct.h
@@ -84,11 +84,15 @@
#define CFFLBF 0x0010 /* Last cmd was full buf fill */
#define CFFLPA 0x0020 /* Last cmd was paragraph fill */
-/* Constants for search type */
-#define SR_FORWARD 0x0001 /* search forward */
-#define SR_BACKWRD 0x0010 /* search backward */
-#define SR_BEGLINE 0x0100 /* search pattern at beginning of line */
-#define SR_ENDLINE 0x1000 /* search pattern at end of line */
+/* Constants for search functions */
+#define SR_ORIGMEN 0x0001 /* search original menu */
+#define SR_OPTNMEN 0x0002 /* search options menu */
+#define SR_FORWARD 0x0010 /* search forward */
+#define SR_BACKWRD 0x0020 /* search backward */
+#define SR_BEGLINE 0x0040 /* search pattern at beginning of line */
+#define SR_ENDLINE 0x0080 /* search pattern at end of line */
+#define SR_EXACTSR 0x0100 /* search exact pattern */
+#define SR_NOEXACT 0x0200 /* search case insensitive */
/*
diff --git a/pico/search.c b/pico/search.c
index e90a403f..69979702 100644
--- a/pico/search.c
+++ b/pico/search.c
@@ -50,6 +50,47 @@ char *sucs4_to_utf8_cpystr(UCS *, int);
return(RV); \
}
+/* The search menu leaves a number of keys free, some are taken
+ * as subcommands of the search command, and some are taken are
+ * editing commands. This leaves the following keys open:
+ * ^J, ^N, ^O, ^P, ^R, ^T, ^U, ^V, ^W, ^X and ^Y.
+ * Out of these keys, ^J, ^N, ^P and ^X are not defined as commands, however,
+ * in some patches ^N, ^P and ^X are defined. ^N is defined as part of
+ * an editing command, ^P and ^X are defined to delete paragraphs and to
+ * remove text to the end of file, so only ^J is undefined.
+ */
+
+#define REPLACE_KEY 2 /* the location of the replace key in the array below */
+
+EXTRAKEYS menu_srchpat[] = {
+ {"^Y", N_("FirstLine"), (CTRL|'Y')},
+ {"^V", N_("LastLine"), (CTRL|'V')},
+ {"^R", N_("No Replace"), (CTRL|'R')},
+ {"^^", N_("Optns Menu"), (CTRL|'^')}, /* toggle this menu or options menu */
+ {"^T", N_("LineNumber"), (CTRL|'T')},
+ {"^W", N_("Start of Para"), (CTRL|'W')},
+ {"^O", N_("End of Para"), (CTRL|'O')},
+ {"^U", N_("FullJustify"), (CTRL|'U')},
+ {NULL, NULL, 0},
+ {NULL, NULL, 0}
+};
+
+#define EXACTSR_KEY 1 /* toggle an exact or approximate search */
+#define BGNLINE_KEY 3 /* the location of Bgn Line command in the array below */
+#define ENDLINE_KEY 4 /* the location of End Line command in the array below */
+#define BSEARCH_KEY 5 /* the location of the bsearch key in the array below */
+EXTRAKEYS menu_srchopt[] = {
+ {"^^", N_("Orig Menu"), (CTRL|'^')}, /* toggle original or options menu */
+ {"^X", N_("Exact"), (CTRL|'X')}, /* toggle exact vs non exact */
+ {"^R", N_("No Replace"), (CTRL|'R')}, /* toggle replace or not replace */
+ {"^V", N_("Bgn Line"), (CTRL|'V')}, /* toggle Bgn Line or anywhere */
+ {"^N", N_("End Line"), (CTRL|'N')}, /* toggle End Line or anywhere */
+ {"^P", N_("BackSearch"), (CTRL|'P')}, /* toggle Backward or forward */
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ {NULL, NULL, 0}
+};
/*
* Search forward. Get a search string from the user, and search, beginning at
@@ -130,7 +171,8 @@ forwsearch(int f, int n)
FWS_RETURN(0);
defpat[0] = '\0';
- flags = SR_FORWARD; /* search forward by default */
+ /* defaults: usual menu, search forward, not case sensitive */
+ flags = SR_ORIGMEN | SR_FORWARD | SR_NOEXACT;
/* ask the user for the text of a pattern */
while(1){
@@ -164,66 +206,112 @@ forwsearch(int f, int n)
pico_refresh(FALSE, 1);
update();
break;
+
case (CTRL|'P'):
- if(flags & SR_FORWARD){
+ if(flags & SR_ORIGMEN){
+ /* Undefined still */
+ }
+ if(flags & SR_OPTNMEN){
+ if(flags & SR_FORWARD){
flags &= ~SR_FORWARD;
flags |= SR_BACKWRD;
- } else {
+ } else {
flags &= ~SR_BACKWRD;
flags |= SR_FORWARD;
+ }
}
break;
case (CTRL|'V'):
- gotoeob(0, 1);
- mlerase();
- FWS_RETURN(TRUE);
+ if(flags & SR_ORIGMEN){
+ gotoeob(0, 1);
+ mlerase();
+ FWS_RETURN(TRUE);
+ } else if (flags & SR_OPTNMEN){
+ if(flags & SR_ENDLINE)
+ flags &= ~SR_ENDLINE;
+ if(flags & SR_BEGLINE)
+ flags &= ~SR_BEGLINE;
+ else
+ flags |= SR_BEGLINE;
+ }
+ break;
+
+ case (CTRL|'N'):
+ if(flags & SR_ORIGMEN){
+ /* undefined still */
+ } else if (flags & SR_OPTNMEN){
+ if(flags & SR_BEGLINE)
+ flags &= ~SR_BEGLINE;
+ if(flags & SR_ENDLINE)
+ flags &= ~SR_ENDLINE;
+ else
+ flags |= SR_ENDLINE;
+ }
+ break;
case (CTRL|'Y'):
- gotobob(0, 1);
- mlerase();
- FWS_RETURN(TRUE);
+ if(flags & SR_ORIGMEN){
+ gotobob(0, 1);
+ mlerase();
+ FWS_RETURN(TRUE);
+ }
case (CTRL|'^'):
- if(!(flags & (SR_BEGLINE|SR_ENDLINE))){
- flags |= SR_BEGLINE;
- } else if (flags & SR_BEGLINE){
- flags &= ~SR_BEGLINE;
- flags |= SR_ENDLINE;
+ if (flags & SR_ORIGMEN){
+ flags &= ~SR_ORIGMEN;
+ flags |= SR_OPTNMEN;
} else {
- flags &= ~SR_ENDLINE;
- flags |= SR_FORWARD;
+ flags &= ~SR_OPTNMEN;
+ flags |= SR_ORIGMEN;
+ }
+ break;
+
+ case (CTRL|'X'):
+ if(flags & SR_OPTNMEN){
+ if (flags & SR_NOEXACT){
+ flags &= ~SR_NOEXACT;
+ flags |= SR_EXACTSR;
+ } else {
+ flags &= ~SR_EXACTSR;
+ flags |= SR_NOEXACT;
+ }
+ if((curwp->w_bufp->b_mode & MDEXACT) == 0)
+ curwp->w_bufp->b_mode |= MDEXACT;
+ else
+ curwp->w_bufp->b_mode &= ~MDEXACT;
}
break;
case (CTRL|'T') :
- switch(status = readnumpat(_("Search to Line Number : "))){
- case -1 :
- emlwrite(_("Search to Line Number Cancelled"), NULL);
- FWS_RETURN(FALSE);
-
- case 0 :
- emlwrite(_("Line number must be greater than zero"), NULL);
- FWS_RETURN(FALSE);
-
- case -2 :
- emlwrite(_("Line number must contain only digits"), NULL);
- FWS_RETURN(FALSE);
+ if(flags & SR_ORIGMEN){
+ switch(status = readnumpat(_("Search to Line Number : "))){
+ case -1 :
+ emlwrite(_("Search to Line Number Cancelled"), NULL);
+ FWS_RETURN(FALSE);
+
+ case 0 :
+ emlwrite(_("Line number must be greater than zero"), NULL);
+ FWS_RETURN(FALSE);
+
+ case -2 :
+ emlwrite(_("Line number must contain only digits"), NULL);
+ FWS_RETURN(FALSE);
- case -3 :
- continue;
-
- default :
- gotoline(0, status);
- mlerase();
- FWS_RETURN(TRUE);
+ case -3 :
+ continue;
+
+ default :
+ gotoline(0, status);
+ mlerase();
+ FWS_RETURN(TRUE);
+ }
}
-
break;
case (CTRL|'W'):
- {
+ if(flags & SR_ORIGMEN){
LINE *linep = curwp->w_dotp;
int offset = curwp->w_doto;
@@ -242,24 +330,29 @@ forwsearch(int f, int n)
gotobop(0, 1);
gotobol(0, 1);
}
+ mlerase();
+ FWS_RETURN(TRUE);
}
-
- mlerase();
- FWS_RETURN(TRUE);
+ break;
case (CTRL|'O'):
- if(curwp->w_dotp != curbp->b_linep){
+ if(flags & SR_ORIGMEN){
+ if(curwp->w_dotp != curbp->b_linep){
gotoeop(0, 1);
forwchar(0, 1);
+ }
+ mlerase();
+ FWS_RETURN(TRUE);
}
-
- mlerase();
- FWS_RETURN(TRUE);
+ break;
case (CTRL|'U'):
- fillbuf(0, 1);
- mlerase();
- FWS_RETURN(TRUE);
+ if(flags & SR_ORIGMEN){
+ fillbuf(0, 1);
+ mlerase();
+ FWS_RETURN(TRUE);
+ }
+ break;
case (CTRL|'R'): /* toggle replacement option */
repl_mode = !repl_mode;
@@ -685,71 +778,61 @@ srpat(char *utf8prompt, UCS *defpat, size_t defpatlen, int repl_mode, int flags)
{
register int s;
int i = 0;
- int bsearch;
- int bol;
- int eol;
+ int toggle, bsearch, bol, eol, exact;
UCS *b;
UCS prompt[NPMT];
UCS *promptp;
- EXTRAKEYS menu_pat[9];
+ EXTRAKEYS menu_pat[10];
bsearch = flags & SR_BACKWRD;
bol = flags & SR_BEGLINE;
eol = flags & SR_ENDLINE;
-
- menu_pat[i = 0].name = "^Y";
- menu_pat[i].label = N_("FirstLine");
- menu_pat[i].key = (CTRL|'Y');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^V";
- menu_pat[i].label = N_("LastLine");
- menu_pat[i].key = (CTRL|'V');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^R";
- menu_pat[i].label = repl_mode ? N_("No Replace") : N_("Replace");
- menu_pat[i].key = (CTRL|'R');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- if(!repl_mode){
- menu_pat[++i].name = "^T";
- menu_pat[i].label = N_("LineNumber");
- menu_pat[i].key = (CTRL|'T');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^W";
- /* TRANSLATORS: Start of paragraph */
- menu_pat[i].label = N_("Start of Para");
- menu_pat[i].key = (CTRL|'W');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^O";
- menu_pat[i].label = N_("End of Para");
- menu_pat[i].key = (CTRL|'O');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^U";
- /* TRANSLATORS: Instead of justifying (formatting) just a
- single paragraph, Full Justify justifies the entire
- message. */
- menu_pat[i].label = N_("FullJustify");
- menu_pat[i].key = (CTRL|'U');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
+ exact = flags & SR_EXACTSR;
+ toggle = 0; /* reserved for future use */
+
+ memset(&menu_pat, 0, 10*sizeof(EXTRAKEYS));
+ /* add exceptions here based on the location of the items in the menu */
+ for(i = 0; i < 10; i++){
+ if(flags & SR_ORIGMEN){
+ menu_pat[i].name = menu_srchpat[10*toggle + i].name;
+ menu_pat[i].label = menu_srchpat[10*toggle + i].label;
+ menu_pat[i].key = menu_srchpat[10*toggle + i].key;
+ if(toggle == 0){
+ if (i == REPLACE_KEY)
+ menu_pat[i].label = repl_mode ? N_("No Replace")
+ : N_("Replace");
+ }
+ } else if(flags & SR_OPTNMEN){
+ menu_pat[i].name = menu_srchopt[i].name;
+ menu_pat[i].label = menu_srchopt[i].label;
+ menu_pat[i].key = menu_srchopt[i].key;
+ switch(i){
+ case EXACTSR_KEY:
+ menu_pat[i].label = exact ? N_("No Exact")
+ : N_("Exact");
+ break;
+ case REPLACE_KEY:
+ menu_pat[i].label = repl_mode ? N_("No Replace")
+ : N_("Replace");
+ break;
+ case BSEARCH_KEY:
+ menu_pat[i].label = bsearch ? N_("Srch Fwd")
+ : N_("Srch Back");
+ break;
+ case BGNLINE_KEY:
+ menu_pat[i].label = bol ? N_("Anywhere")
+ : N_("Bgn Line");
+ break;
+ case ENDLINE_KEY:
+ menu_pat[i].label = eol ? N_("Anywhere")
+ : N_("End Line");
+ break;
+ default : break;
+ }
+ if(menu_pat[i].name)
+ KS_OSDATASET(&menu_pat[i], KS_NONE);
+ }
}
-
- menu_pat[++i].name = "^P";
- menu_pat[i].label = bsearch ? N_("Forward") : N_("Backward") ;
- 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);
if(b){
ucs4_strncpy(prompt, b, NPMT);
@@ -771,6 +854,12 @@ srpat(char *utf8prompt, UCS *defpat, size_t defpatlen, int repl_mode, int flags)
if(b) ucs4_strncat(prompt, b, ucs4_strlen(b));
prompt[NPMT-1] = '\0';
}
+ if(exact){
+ fs_give((void **) &b);
+ b = utf8_to_ucs4_cpystr(N_(" exactly for"));
+ if(b) ucs4_strncat(prompt, b, ucs4_strlen(b));
+ prompt[NPMT-1] = '\0';
+ }
if(b) fs_give((void **) &b);
}
@@ -888,60 +977,59 @@ readpattern(char *utf8prompt, int text_mode, int flags)
{
register int s;
int i;
- int bsearch, bol, eol;
+ int toggle, bsearch, bol, eol, exact;
UCS *b;
UCS tpat[NPAT+20];
UCS *tpatp;
- EXTRAKEYS menu_pat[8];
+ EXTRAKEYS menu_pat[10];
bsearch = flags & SR_BACKWRD;
bol = flags & SR_BEGLINE;
eol = flags & SR_ENDLINE;
-
- menu_pat[i = 0].name = "^Y";
- menu_pat[i].label = N_("FirstLine");
- menu_pat[i].key = (CTRL|'Y');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^V";
- menu_pat[i].label = N_("LastLine");
- menu_pat[i].key = (CTRL|'V');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- if(text_mode){
- menu_pat[++i].name = "^T";
- menu_pat[i].label = N_("LineNumber");
- menu_pat[i].key = (CTRL|'T');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^W";
- menu_pat[i].label = N_("Start of Para");
- menu_pat[i].key = (CTRL|'W');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^O";
- menu_pat[i].label = N_("End of Para");
- menu_pat[i].key = (CTRL|'O');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = "^U";
- 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);
+ exact = flags & SR_EXACTSR;
+ toggle = 0; /* reserved for future use */
+
+ memset(&menu_pat, 0, 10*sizeof(EXTRAKEYS));
+ /* add exceptions here based on the location of the items in the menu */
+ for(i = 0; i < 10; i++){
+ if(flags & SR_ORIGMEN){
+ menu_pat[i].name = menu_srchpat[10*toggle + i].name;
+ menu_pat[i].label = menu_srchpat[10*toggle + i].label;
+ menu_pat[i].key = menu_srchpat[10*toggle + i].key;
+ if(toggle == 0){
+ if (i == REPLACE_KEY)
+ memset(&menu_pat[i], 0, sizeof(EXTRAKEYS));
+ if (i > REPLACE_KEY && !text_mode)
+ memset(&menu_pat[i], 0, sizeof(EXTRAKEYS));
+ }
+ } else if(flags & SR_OPTNMEN){
+ menu_pat[i].name = menu_srchopt[i].name;
+ menu_pat[i].label = menu_srchopt[i].label;
+ menu_pat[i].key = menu_srchopt[i].key;
+ switch(i){
+ case EXACTSR_KEY:
+ menu_pat[i].label = exact ? N_("No Exact")
+ : N_("Exact");
+ break;
+ case BSEARCH_KEY:
+ menu_pat[i].label = bsearch ? N_("Srch Fwd")
+ : N_("Srch Back");
+ break;
+ case BGNLINE_KEY:
+ menu_pat[i].label = bol ? N_("Anywhere")
+ : N_("Bgn Line");
+ break;
+ case ENDLINE_KEY:
+ menu_pat[i].label = eol ? N_("Anywhere")
+ : N_("End Line");
+ break;
+ default : break;
+ }
+ if(menu_pat[i].name)
+ KS_OSDATASET(&menu_pat[i], KS_NONE);
+ }
}
- menu_pat[++i].name = "^P";
- menu_pat[i].label = bsearch ? N_("Forward") : N_("Backward") ;
- menu_pat[i].key = (CTRL|'P');
- KS_OSDATASET(&menu_pat[i], KS_NONE);
-
- menu_pat[++i].name = NULL;
-
b = utf8_to_ucs4_cpystr(utf8prompt);
if(b){
ucs4_strncpy(tpat, b, NPAT+20);
@@ -962,6 +1050,12 @@ readpattern(char *utf8prompt, int text_mode, int flags)
b = utf8_to_ucs4_cpystr(N_(" at end of line"));
if(b) ucs4_strncat(tpat, b, ucs4_strlen(b));
tpat[NPAT+20-1] = '\0';
+ }
+ if (exact){
+ fs_give((void **) &b);
+ b = utf8_to_ucs4_cpystr(N_(" exactly for"));
+ if(b) ucs4_strncat(tpat, b, ucs4_strlen(b));
+ tpat[NPAT+20-1] = '\0';
}
if(b) fs_give((void **) &b);
}
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 630c301d..7eb2f955 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 71 2015-03-25 20:26:58
+Alpine Commit 72 2015-03-31 12:22:49
============= h_news =================
<HTML>
<HEAD>
@@ -211,11 +211,28 @@ Additions include:
<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.
+
+ <LI> Pico: Code reorganization in the search command to make it easier to
+ add subcommands of the search command.
+
+ <LI> Pico: Search command can do a case sensitive match. Use the Ctrl-^
+ subcommand of the search command to bring this choice into view.
+
+ <LI> For a multipart/alternative message, the Take Address command will
+ work on the part that is being read.
</UL>
+
<P>
Bugs that have been addressed include:
<UL>
+ <LI> SMIME: Crash when a certificate has an invalid date of validity. Also
+ Alpine will use the function ASN1_TIME_print to determine the date
+ of validity. Reported by Ben Stienstra.
+
+ <LI> SMIME: Crash when atempting to unlock the password file and an
+ incorrect password is entered.
+
<LI> SMIME: Crash when checking the signature of a message that contains
a RFC822 attached message. Reported by Holger Trapp and Bj&ouml;rn
Krellner.
diff --git a/pith/smime.c b/pith/smime.c
index 99c80c03..9cef212b 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -561,22 +561,20 @@ load_pkey_with_prompt(char *fpath, char *text, char *prompt)
if(in != NULL){
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, "");
if(pkey != NULL) return pkey;
- }
+ } else return NULL;
if(pith_smime_enter_password)
while(pkey == NULL && rc != 1){
- if(in != NULL){
- do {
+ do {
rc = (*pith_smime_enter_password)(prompt, (char *)pass, sizeof(pass));
} while (rc!=0 && rc!=1 && rc>0);
(void) BIO_reset(in);
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, (char *)pass);
- BIO_free(in);
- }
- else rc = 1;
}
+ BIO_free(in);
+
return pkey;
}
diff --git a/pith/smkeys.c b/pith/smkeys.c
index 1c9b4cc1..35228914 100644
--- a/pith/smkeys.c
+++ b/pith/smkeys.c
@@ -380,7 +380,9 @@ smime_get_date(ASN1_GENERALIZEDTIME *tm)
struct tm smtm;
(void) BIO_reset(mb);
- ASN1_UTCTIME_print(mb, tm);
+ if(ASN1_TIME_print(mb, tm) == 0)
+ return cpystr(_("Invalid"));
+
(void) BIO_flush(mb);
BIO_read(mb, iobuf, sizeof(iobuf));
diff --git a/pith/takeaddr.c b/pith/takeaddr.c
index 717a1e88..1fb22ef6 100644
--- a/pith/takeaddr.c
+++ b/pith/takeaddr.c
@@ -1824,6 +1824,8 @@ grab_addrs_from_body(MAILSTREAM *stream, long int msgno,
gf_io_t pc;
SourceType src = CharStar;
int added = 0, failure;
+ char *partno = "1";
+ ATTACH_S *a = ps_global->atmts;
dprint((9, "\n - grab_addrs_from_body - \n"));
@@ -1848,7 +1850,12 @@ grab_addrs_from_body(MAILSTREAM *stream, long int msgno,
gf_set_so_writec(&pc, so);
- failure = !get_body_part_text(stream, body, msgno, "1", 0L, pc,
+ if(body->type == TYPEMULTIPART
+ && strucmp(body->subtype, "ALTERNATIVE") == 0
+ && a && a+1 && (a+1)->shown)
+ partno = "2";
+
+ failure = !get_body_part_text(stream, body, msgno, partno, 0L, pc,
NULL, NULL, GBPT_NONE);
gf_clear_so_writec(so);
diff --git a/po/Makefile.in b/po/Makefile.in
index f5034456..78dba2e7 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -11,7 +11,7 @@
# Origin: gettext-0.16
PACKAGE = alpine
-VERSION = 2.20.4
+VERSION = 2.20.5
PACKAGE_BUGREPORT = chappa@washington.edu
SHELL = /bin/sh