alias group bob joe
with no commas (mailx compatibility)
+Changes since 0.92.7
+--------------------
+
+- [patch-0.92.7.handler.empty_cc_bcc.1] fixed bug in edit_envelope() which
+ caused the message to be aborted if the cc or bcc field was empty
+
+- buffer used to store the error message in mutt_pattern_comp() called
+ sizeof() on the wrong variable
+
+- renamed $header_format to $index_format ($hdr_format is still accepted)
+
+- [patch-0.92.7.vikas.postpone.1] fixed typo for binding the `postpone'
+ menu, and changes the menu to use $index_format for display of postponed
+ messages
+
+- mutt_error() is now a function pointer which either has the value of
+ mutt_curses_error() or mutt_nocurses_error() which simplifies the muttrc
+ parsing code
+
+- "source '~/bin/myscript|'" was fixed so that it works correctly
+
+- [patch-0.92.7.me.mh_sync.1] fixed bug where syncing mh mailboxes silently
+ failed
+
+- [patch-0.92.7.me.pattern.1] fixes bug with mismatched backtics in the
+ pattern language
+
+- mutt_default_from() no longer sets the "real name" portion of the return
+ address so that it can be delayed until after execution of send-hook
+ commands
+
+
+PGP-related changes since 0.92.6i
+---------------------------------
+
+- [patch-0.92.6i.tlr.pgp_longids.1] Correct the
+ calculation of 64 bit "v4" key IDs.
+
-Changes since 0.92.7
+Changes since 0.92.8
--------------------
-- [patch-0.92.7.handler.empty_cc_bcc.1] fixed bug in edit_envelope() which
- caused the message to be aborted if the cc or bcc field was empty
+- [patch-0.90.12i.jmydaes.command-complete.1] Command completion
-- buffer used to store the error message in mutt_pattern_comp() called
- sizeof() on the wrong variable
+- [patch-0.92.8.mtsirkin.attach-viewer.1] When viewing
+ attachments, fall back to the attachment's file name if
+ no description is available.
-- renamed $header_format to $index_format ($hdr_format is still accepted)
+- [patch-0.92.8i.ds.attachmsg.1] Attach messages from the compose menu.
-- [patch-0.92.7.vikas.postpone.1] fixed typo for binding the `postpone'
- menu, and changes the menu to use $index_format for display of postponed
- messages
+- [patch-0.92.8i.tlr.make_string_context.1] Fix a
+ segmentation fault when invoking mutt -p from the
+ command line.
-- mutt_error() is now a function pointer which either has the value of
- mutt_curses_error() or mutt_nocurses_error() which simplifies the muttrc
- parsing code
+- [patch-0.92.8i.tlr.mh_sequences.1] Don't generate
+ .mh_sequences files for maildir folders.
-- "source '~/bin/myscript|'" was fixed so that it works correctly
+- fix a NULL pointer deference in hdrline.c
-- [patch-0.92.7.me.mh_sync.1] fixed bug where syncing mh mailboxes silently
- failed
+- [patch-0.92.8i.jmy.hook-bugfix.1] Fix a segmentation
+ fault in the send-hook code.
-- [patch-0.92.7.me.pattern.1] fixes bug with mismatched backtics in the
- pattern language
+- [patch-0.92.8i.tlr.addrbook.1] Untag all aliases before
+ entering the address-book menu.
-- mutt_default_from() no longer sets the "real name" portion of the return
- address so that it can be delayed until after execution of send-hook
- commands
+- Enforce a non-NULL QueryCmd in the beginning of
+ mutt_query_complete() and mutt_query_menu().
+- Make all query.c functions except mutt_query_complete()
+ and mutt_query_menu() static.
-PGP-related changes since 0.92.6i
+- The latest IMAP patch from Andy Sloane has been added.
+
+PGP related Changes since 0.92.8i
---------------------------------
-- [patch-0.92.6i.tlr.pgp_longids.1] Correct the
- calculation of 64 bit "v4" key IDs.
+- [patch-0.92.8i.maj.MIC_alg.1] Properly initializes a
+ variable in the PGP part of the Compose menu.
+
+- [patch-0.92.8i.tlr.pgpkey_dflt.1] Avoid possible
+ segmentation faults when determining the default value
+ of the PGP key selection prompt.
+
+- [patch-0.92.8i.wk.opgp_5bytelength.1] Recognize
+ OpenPGP's public key algorithm #20 (i.e., ElGamal for
+ Signing and Encrypting).
+
+- Moved doc/pgp-Notes.txt to doc/PGP-Notes.txt, and
+ updated that part of the documentation.
+
OP_CHANGE_DIRECTORY "change directories"
OP_CHECK_NEW "check mailboxes for new mail"
OP_COMPOSE_ATTACH_FILE "attach a file(s) to this message"
+OP_COMPOSE_ATTACH_MESSAGE "attach a message(s) to this message"
OP_COMPOSE_EDIT_BCC "edit the BCC list"
OP_COMPOSE_EDIT_CC "edit the CC list"
OP_COMPOSE_EDIT_DESCRIPTION "edit attachment description"
The user manual is in doc/manual.txt.
-PGP users please read doc/pgp-Notes.txt before proceeding.
+PGP users please read doc/PGP-Notes.txt before proceeding.
For more information, see the Mutt home page,
http://www.cs.hmc.edu/~me/mutt/index.html.
The primary distribution point for Mutt is
-ftp://ftp.cs.hmc.edu/pub/me/mutt. See the home page for mirror sites.
+ftp://ftp.cs.hmc.edu/pub/me/mutt. See the home page for
+mirror sites.
Michael Elkins <me@cs.hmc.edu>, January 22, 1998
Thomas Roessler <roessler@guug.de>, February 3, 1998
/* Do you want support for the POP3 protocol? (--enable-pop) */
#undef USE_POP
+/* Do you want support for the IMAP protocol? (--enable-imap) */
+#undef USE_IMAP
+
/*
* Is mail spooled to the user's home directory? If defined, MAILPATH should
* be set to the filename of the spool mailbox relative the the home
/* count the number of aliases */
for (aliasp = aliases; aliasp; aliasp = aliasp->next)
+ {
+ aliasp->tagged = 0;
menu->max++;
+ }
menu->data = AliasTable = (ALIAS **) safe_calloc (menu->max, sizeof (ALIAS *));
if (a->description)
strfcpy (descrip, a->description, sizeof (descrip));
+ else if (a->filename)
+ snprintf (descrip, sizeof (descrip), "---Attachment: %s : %s",
+ a->filename, type);
else
snprintf (descrip, sizeof (descrip), "---Attachment: %s", type);
}
builtin = 1;
else
{
- mutt_make_string (buf, sizeof (buf), PagerFmt, cur);
+ mutt_make_string (buf, sizeof (buf), PagerFmt, Context, cur);
fputs (buf, fpout);
fputs ("\n\n", fpout);
}
int old_sortre = option (OPTSORTRE);
buffer[0] = 0;
- if (mutt_get_field (":", buffer, sizeof (buffer), 0) != 0 || !buffer[0])
+ if (mutt_get_field (":", buffer, sizeof (buffer), M_COMMAND) != 0 || !buffer[0])
return;
err.data = errbuf;
err.dsize = sizeof (errbuf);
#include "mime.h"
#include "attach.h"
#include "mapping.h"
+#include "mailbox.h"
#include <string.h>
#include <sys/stat.h>
mutt_error("This doesn't make sense if you don't want to sign the message.");
else
{
+ /* Copy the existing MIC algorithm into place */
+ strfcpy(input_micalg, PgpSignMicalg, sizeof(input_micalg));
+
if(mutt_get_field("MIC algorithm: ", input_micalg, sizeof(input_micalg), 0) == 0)
{
if(strcasecmp(input_micalg, "pgp-md5") && strcasecmp(input_micalg, "pgp-sha1")
&& strcasecmp(input_micalg, "pgp-rmd160"))
{
- mutt_error("Unknown MIC algorithm!");
- strfcpy(input_micalg, "x-unknown", sizeof(input_micalg));
+ mutt_error("Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160");
+ }
+ else {
+ safe_free((void **) &PgpSignMicalg);
+ PgpSignMicalg = safe_strdup(input_micalg);
}
- safe_free((void **) &PgpSignMicalg);
- PgpSignMicalg = safe_strdup(input_micalg);
}
}
}
return (0);
}
+static struct mapping_t AttachMsgHelp[] = {
+ { "Exit", OP_EXIT },
+ { "Help", OP_HELP },
+ { "Attach Message", OP_GENERIC_SELECT_ENTRY },
+ { NULL }
+};
+
+
+static void attach_msg_make_entry (char *s, size_t l, MUTTMENU *menu, int num)
+{
+ CONTEXT *tmp = Context;
+
+ Context = (CONTEXT *) menu->data;
+ index_make_entry (s, l, menu, num);
+ Context = tmp;
+}
+
+static HEADER *select_msg (CONTEXT *ctx)
+{
+ MUTTMENU *menu;
+ int i, done=0, r=-1;
+ char helpstr[SHORT_STRING];
+ char title[SHORT_STRING];
+
+ snprintf(title, sizeof (title), "Messages to attach from folder %s",
+ ctx->path);
+
+ menu = mutt_new_menu ();
+ menu->make_entry = attach_msg_make_entry;
+ menu->menu = MENU_GENERIC;
+ menu->max = ctx->msgcount;
+ menu->title = title;
+ menu->data = ctx;
+ menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_GENERIC,
+ AttachMsgHelp);
+
+ while (!done)
+ {
+ switch (i = mutt_menuLoop (menu))
+ {
+ case OP_GENERIC_SELECT_ENTRY:
+ r = menu->current;
+ done = 1;
+ break;
+
+ case OP_EXIT:
+ done = 1;
+ break;
+ }
+ }
+
+ mutt_menuDestroy (&menu);
+ return (r > -1 ? ctx->hdrs[ctx->v2r[r]] : NULL);
+}
+
/* return values:
*
* 1 message should be postponed
int op = 0;
int loop = 1;
int fccSet = 0; /* has the user edited the Fcc: field ? */
+ CONTEXT *ctx = NULL;
+ HEADER *hdr = NULL;
idx = mutt_gen_attach_list (msg->content, idx, &idxlen, &idxmax, 0, 1);
case OP_COMPOSE_ATTACH_FILE:
+ case OP_COMPOSE_ATTACH_MESSAGE:
+
fname[0] = 0;
- if (mutt_enter_fname ("Attach file", fname, sizeof (fname),
- &menu->redraw, 0) == -1)
- break;
+ {
+ char* prompt;
+ int flag;
+
+ if (op == OP_COMPOSE_ATTACH_FILE)
+ {
+ prompt = "Attach file";
+ flag = 0;
+ }
+ else
+ {
+ prompt = "Open mailbox to attach message from";
+ flag = 1;
+ }
+
+ if (mutt_enter_fname (prompt, fname, sizeof (fname), &menu->redraw,
+ flag) == -1)
+ {
+ break;
+ }
+ }
+
if (!fname[0])
continue;
mutt_expand_path (fname, sizeof (fname));
break;
}
+ if (op == OP_COMPOSE_ATTACH_MESSAGE)
+ {
+ menu->redraw = REDRAW_FULL;
+
+ ctx = mx_open_mailbox (fname, 0, NULL);
+ if (ctx == NULL)
+ {
+ mutt_perror (fname);
+ break;
+ }
+
+ if (!ctx->msgcount)
+ {
+ mx_close_mailbox (ctx);
+ safe_free ((void **) &ctx);
+ mutt_error ("No messages in that folder.");
+ break;
+ }
+
+ hdr = select_msg (ctx);
+ if (hdr == NULL)
+ {
+ mx_close_mailbox (ctx);
+ safe_free ((void **) &ctx);
+ break;
+ }
+ }
+
if (idxlen == idxmax)
{
safe_realloc ((void **) &idx, sizeof (ATTACHPTR *) * (idxmax += 5));
}
idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
- if ((idx[idxlen]->content = mutt_make_attach (fname)) != NULL)
+
+ if (op == OP_COMPOSE_ATTACH_FILE)
+ idx[idxlen]->content = mutt_make_file_attach (fname);
+ else
+ idx[idxlen]->content = mutt_make_message_attach (ctx, hdr);
+
+ if (idx[idxlen]->content != NULL)
{
idx[idxlen]->level = (idxlen > 0) ? idx[idxlen-1]->level : 0;
menu->current = idxlen++;
mutt_update_tree (idx, idxlen);
menu->max = idxlen;
- menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
+ if (op == OP_COMPOSE_ATTACH_FILE)
+ menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
}
else
{
- mutt_error ("Unable to attach file!");
+ mutt_error ("Unable to attach!");
safe_free ((void **) &idx[idxlen]);
}
break;
}
fclose (fp);
- if ((idx[idxlen]->content = mutt_make_attach (fname)) == NULL)
+ if ((idx[idxlen]->content = mutt_make_file_attach (fname)) == NULL)
{
mutt_error ("What we have here is a failure to make an attachment");
continue;
/* Do you want support for the POP3 protocol? (--enable-pop) */
#undef USE_POP
+/* Do you want support for the IMAP protocol? (--enable-imap) */
+#undef USE_IMAP
+
/*
* Is mail spooled to the user's home directory? If defined, MAILPATH should
* be set to the filename of the spool mailbox relative the the home
--enable-hidden-host Only use the domain name for local addresses"
ac_help="$ac_help
--enable-pop Enable POP3 support"
+ac_help="$ac_help
+ --enable-imap Enable IMAP support"
ac_help="$ac_help
--enable-flock Use flock() to lock files"
ac_help="$ac_help
-VERSION=0.92.8
+VERSION=0.92.9
SUBVERSION=''
echo $ac_n "checking for prefix""... $ac_c" 1>&6
-echo "configure:561: checking for prefix" >&5
+echo "configure:563: checking for prefix" >&5
if test x$prefix = xNONE; then
mutt_cv_prefix=$ac_default_prefix
else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:572: checking for $ac_word" >&5
+echo "configure:574: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:601: checking for $ac_word" >&5
+echo "configure:603: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:651: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 659 "configure"
+#line 661 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:688: checking whether we are using GNU C" >&5
+echo "configure:690: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:712: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:714: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:740: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:742: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:796: checking for a BSD compatible install" >&5
+echo "configure:798: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:849: checking for $ac_word" >&5
+echo "configure:851: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "pgpk", so it can be a program name with args.
set dummy pgpk; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:890: checking for $ac_word" >&5
+echo "configure:892: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PGPK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "pgp", so it can be a program name with args.
set dummy pgp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:935: checking for $ac_word" >&5
+echo "configure:937: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PGP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ispell", so it can be a program name with args.
set dummy ispell; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:999: checking for $ac_word" >&5
+echo "configure:1001: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ISPELL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1036: checking how to run the C preprocessor" >&5
+echo "configure:1038: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1051 "configure"
+#line 1053 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1068 "configure"
+#line 1070 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
if test "${with_slang+set}" = set; then
withval="$with_slang"
echo $ac_n "checking if -ltermlib is required""... $ac_c" 1>&6
-echo "configure:1100: checking if -ltermlib is required" >&5
+echo "configure:1102: checking if -ltermlib is required" >&5
if eval "test \"`echo '$''{'mutt_cv_bsdish'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1108 "configure"
+#line 1110 "configure"
#include "confdefs.h"
#include <sys/param.h>
#endif
}
EOF
-if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
mutt_cv_bsdish=yes
else
echo "$ac_t""$mutt_cv_bsdish" 1>&6
echo $ac_n "checking for S-Lang""... $ac_c" 1>&6
-echo "configure:1138: checking for S-Lang" >&5
+echo "configure:1140: checking for S-Lang" >&5
if test $withval = yes; then
if test -d $srcdir/../slang; then
mutt_cv_slang=$srcdir/../slang/src
echo $ac_n "checking if I can compile a test SLang program""... $ac_c" 1>&6
-echo "configure:1184: checking if I can compile a test SLang program" >&5
+echo "configure:1186: checking if I can compile a test SLang program" >&5
cat > conftest.$ac_ext <<EOF
-#line 1186 "configure"
+#line 1188 "configure"
#include "confdefs.h"
int main() {
SLtt_get_terminfo ();
; return 0; }
EOF
-if { (eval echo configure:1193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:1221: checking for initscr in -lncurses" >&5
+echo "configure:1223: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1229 "configure"
+#line 1231 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
initscr()
; return 0; }
EOF
-if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1263: checking for $ac_hdr" >&5
+echo "configure:1265: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
+#line 1270 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for start_color""... $ac_c" 1>&6
-echo "configure:1314: checking for start_color" >&5
+echo "configure:1316: checking for start_color" >&5
if eval "test \"`echo '$''{'ac_cv_func_start_color'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1319 "configure"
+#line 1321 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char start_color(); below. */
; return 0; }
EOF
-if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_start_color=yes"
else
for ac_func in typeahead bkgdset curs_set meta use_default_colors
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1367: checking for $ac_func" >&5
+echo "configure:1369: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1372 "configure"
+#line 1374 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in resizeterm
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1422: checking for $ac_func" >&5
+echo "configure:1424: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1427 "configure"
+#line 1429 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1479: checking for ANSI C header files" >&5
+echo "configure:1481: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1484 "configure"
+#line 1486 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1509 "configure"
+#line 1511 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1527 "configure"
+#line 1529 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1548 "configure"
+#line 1550 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1587: checking for $ac_hdr" >&5
+echo "configure:1589: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1592 "configure"
+#line 1594 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1625: checking return type of signal handlers" >&5
+echo "configure:1627: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1630 "configure"
+#line 1632 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:1667: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:1669: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1672 "configure"
+#line 1674 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:1684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1706: checking size of long" >&5
+echo "configure:1708: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1714 "configure"
+#line 1716 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1746: checking for pid_t" >&5
+echo "configure:1748: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1751 "configure"
+#line 1753 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
for ac_func in setegid srand48 strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1782: checking for $ac_func" >&5
+echo "configure:1784: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1787 "configure"
+#line 1789 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in strcasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1838: checking for $ac_func" >&5
+echo "configure:1840: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1843 "configure"
+#line 1845 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
mutt_cv_snprintf=no
echo $ac_n "checking for snprintf""... $ac_c" 1>&6
-echo "configure:1895: checking for snprintf" >&5
+echo "configure:1897: checking for snprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1900 "configure"
+#line 1902 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char snprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_snprintf=yes"
else
fi
echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
-echo "configure:1947: checking for vsnprintf" >&5
+echo "configure:1949: checking for vsnprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1952 "configure"
+#line 1954 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vsnprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vsnprintf=yes"
else
for ac_func in ftruncate
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2005: checking for $ac_func" >&5
+echo "configure:2007: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2012 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for chsize in -lx""... $ac_c" 1>&6
-echo "configure:2055: checking for chsize in -lx" >&5
+echo "configure:2057: checking for chsize in -lx" >&5
ac_lib_var=`echo x'_'chsize | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2063 "configure"
+#line 2065 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
chsize()
; return 0; }
EOF
-if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in strftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2108: checking for $ac_func" >&5
+echo "configure:2110: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2113 "configure"
+#line 2115 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:2158: checking for strftime in -lintl" >&5
+echo "configure:2160: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2166 "configure"
+#line 2168 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strftime()
; return 0; }
EOF
-if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in regcomp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2230: checking for $ac_func" >&5
+echo "configure:2232: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2235 "configure"
+#line 2237 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
mutt_cv_mailpath=$withval
else
echo $ac_n "checking where new mail is stored""... $ac_c" 1>&6
-echo "configure:2329: checking where new mail is stored" >&5
+echo "configure:2331: checking where new mail is stored" >&5
if eval "test \"`echo '$''{'mutt_cv_mailpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking if $mutt_cv_mailpath is world writable""... $ac_c" 1>&6
-echo "configure:2358: checking if $mutt_cv_mailpath is world writable" >&5
+echo "configure:2360: checking if $mutt_cv_mailpath is world writable" >&5
if eval "test \"`echo '$''{'mutt_cv_worldwrite'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2366 "configure"
+#line 2368 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
exit (1);
}
EOF
-if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
mutt_cv_worldwrite=yes
else
else
echo $ac_n "checking if $mutt_cv_mailpath is group writable""... $ac_c" 1>&6
-echo "configure:2405: checking if $mutt_cv_mailpath is group writable" >&5
+echo "configure:2407: checking if $mutt_cv_mailpath is group writable" >&5
if eval "test \"`echo '$''{'mutt_cv_groupwrite'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2413 "configure"
+#line 2415 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
exit (1);
}
EOF
-if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
mutt_cv_groupwrite=yes
else
mutt_cv_sharedir=$withval
else
echo $ac_n "checking where to put architecture-independent data files""... $ac_c" 1>&6
-echo "configure:2463: checking where to put architecture-independent data files" >&5
+echo "configure:2465: checking where to put architecture-independent data files" >&5
if eval "test \"`echo '$''{'mutt_cv_sharedir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
EOF
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2531: checking for socket in -lsocket" >&5
+echo "configure:2533: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2539 "configure"
+#line 2541 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
socket()
; return 0; }
EOF
-if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2578: checking for gethostbyname in -lnsl" >&5
+echo "configure:2580: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2586 "configure"
+#line 2588 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
+# Check whether --enable-imap or --disable-imap was given.
+if test "${enable_imap+set}" = set; then
+ enableval="$enable_imap"
+ cat >> confdefs.h <<\EOF
+#define USE_IMAP 1
+EOF
+
+ echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+echo "configure:2639: checking for socket in -lsocket" >&5
+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2647 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket();
+
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lsocket $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:2686: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2694 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lnsl $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LIBOBJS="$LIBOBJS imap.o"
+
+fi
+
+
# Check whether --enable-flock or --disable-flock was given.
if test "${enable_flock+set}" = set; then
enableval="$enable_flock"
dnl Process this file with autoconf to produce a configure script.
AC_INIT(mutt.h)
AC_CONFIG_HEADER(config.h)
-VERSION=0.92.8
+VERSION=0.92.9
SUBVERSION=''
AC_MSG_CHECKING(for prefix)
LIBOBJS="$LIBOBJS pop.o"
])
+AC_ARG_ENABLE(imap, [ --enable-imap Enable IMAP support],
+[ AC_DEFINE(USE_IMAP)
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(nsl, gethostbyname)
+ LIBOBJS="$LIBOBJS imap.o"
+])
+
AC_ARG_ENABLE(flock, [ --enable-flock Use flock() to lock files],
[if test $enableval = yes; then
AC_DEFINE(USE_FLOCK)
STATE s;
if (flags & M_CM_PREFIX)
- _mutt_make_string (prefix, sizeof (prefix), NONULL (Prefix), hdr, 0);
+ _mutt_make_string (prefix, sizeof (prefix), NONULL (Prefix), Context, hdr, 0);
if ((flags & M_CM_NOHEADER) == 0)
{
{
if (h) h->lines = 0;
- mutt_make_string (buf, sizeof (buf), NONULL (DeleteFmt), (p) ? p : h);
+ mutt_make_string (buf, sizeof (buf), NONULL (DeleteFmt), NULL,
+ (p) ? p : h);
/* Go through deleted attachment headers, weed Content-Length,
* Content-Type and Content-Transfer-Encoding
}
}
- _mutt_make_string (s, l, NONULL (HdrFmt), h, flag);
+ _mutt_make_string (s, l, NONULL (HdrFmt), Context, h, flag);
}
int index_color (int index_no)
- Some notes on Mutt's PGP integration
+
+
+
+ USING PGP FROM WITHIN MUTT
+
- 1997-12-04, tlr <roessler@guug.de>
-
- Last updated: 1998-03-11, tlr
+ Thomas Roessler <roessler@guug.de>
+ Fri Jun 5 12:28:52 CEST 1998
While encryption, verification and signing of messages are
IDs are then passed to the external PGP binary on the
command line.
+The current document contains a short description of the
+PGP related configuration options mutt permits you to set,
+and some frequently asked questions and tips with respect
+to using Mutt with PGP.
-Recent Changes
---------------
-
-$pgp_pubring, $pgp_language, $pgp_secring, and $pgp are gone.
-They have been replaced by the following variables:
- pgp_v2_language pgp_v5_language
- pgp_v2_pubring pgp_v5_pubring
- pgp_v2_secring pgp_v5_secring
- pgp_v2 pgp_v5
+PGP settings
+------------
-For all of these variables, we use "reasonable" defaults.
-This includes a fix for the outstanding "pkr/skr" problem
-for people using pgp 5.
-
-$pgp_version has been split up into a bunch of variables:
+There are quite a few aspects of mutt's PGP usage you may
+want to customize. First, you can use different versions
+of PGP for composing and decrypting/verifying messages,
+and for handling key ring stuff. These versions are
+controlled by the following set of variables:
pgp_default_version
pgp_send_version
pgp_receive_version
pgp_key_version
-The latter three may be set to the value "default" (which
-is the default ;-); in this case, the value of
-$pgp_default_version will be used instead.
+Valid values for all of these variables include "pgp5" and
+"pgp2".
+
+The last three variables may be set to "default" (which is
+the default); in this case, the value of
+$pgp_default_version will be used.
+
+
+$pgp_send_version controls the version of pgp used for
+composing new messages. $pgp_receive_version is used for
+decrypting messages and verifying signatures.
+$pgp_key_version is the one which is used for key ring
+operations (importing keys from messages, exporting keys
+from your public key ring).
+
+Since the different PGP versions may use different key
+rings and need different language settings, the following
+variables can be used to configure these aspects:
-$pgp_send_version is the version of pgp used for composing
-new messages. $pgp_receive version is used for decrypting
-messages and verifying signatures. $pgp_key_version is the
-one which is used for key ring operations (extracting keys
-from messages, extracting keys from your public key ring).
+ - Language settings:
+ $pgp_v2_language, $pgp_v5_language
-Valid values for _all_ variables include "pgp5", "pgp3",
-"pgp2"; "pgp3" and "pgp5" are equivalent. "g10" has been
-removed for now: The program has changed it's name to
-GNUPG; Support for that program will be included soon.
-Support will be added as soon as the current state of the
-code turns out to be stable.
+ - Public key ring:
+ $pgp_v2_pubring, $pgp_v5_pubring
+ - Secret key ring:
+ $pgp_v2_secring, $pgp_v5_secring
+
+ - PGP itself:
+ $pgp_v2, $pgp_v5
+
+ Note that PGP 5 comes in several binaries (pgps, pgpk,
+ pgpv, pgp). Mutt assumes that these binaries reside
+ in the same directory; $pgp_v5 should point to the
+ "pgp" binary from PGP 5.
+
+For all of these variables, we use "reasonable" defaults
+which should work for most users.
+
+Support for the GNU Privacy Guard (GPG) is currently
+worked on.
+
+
+The value of the variable $pgp_sign_micalg will show up in
+the "micalg" parameter of MIME headers when creating RFC
+2015 signatures.
-A new variable named $pgp_sign_micalg has been introduced.
-It contains the default message integrity check algorithm.
Valid values are "pgp-md5", "pgp-sha1", and "pgp-rmd160".
+
If you select a signing key using the "sign as" option on
the compose menu, mutt will automagically figure out the
-correct value to insert here, but it does not know about
-the user's default key.
+correct value to put into this variable, but it does not
+know about the user's default key.
-So if you are using an RSA key for signing, set this
-variable to "pgp-md5", if you use a PGP 5 DSS key for
-signing, say "pgp-sha1" here. The value of this variable
-will show up in the "micalg" parameter of MIME headers
-when creating RFC 2015 signatures.
+So if you are (by default) using an RSA key for signing,
+set this variable to "pgp-md5", if you use a PGP 5 DSS key
+for signing, say "pgp-sha1".
MIME, non-textual body parts and similar things. Anyway,
if you really want to generate these old-style
attachments, include the following macro in your ~/.muttrc
-(line breaks for readibility, this is actually one line):
+(line breaks for readability, this is actually one line):
macro compose S "Fpgp +verbose=0 -fast
+clearsig=on\ny^T^Uapplication/pgp; format=text;
For PGP 2.6, a German version called "muttde" is available
as well.
-
When multiple commands are used, they must be separated by a semicolon (;).
<tscreen><verb>
set realname='Mutt user' ; ignore x-
-</verb><tscreen>
+</verb></tscreen>
The hash mark, or pound sign
(``#''), is used as a ``comment'' character. You can use it to
annotate your initialization file. All text after the comment character
/* add the attribution */
if (Attribution)
{
- mutt_make_string (tmp, sizeof (tmp) - 1, Attribution, Context->hdrs[n]);
+ mutt_make_string (tmp, sizeof (tmp) - 1, Attribution, Context, Context->hdrs[n]);
strcat (tmp, "\n");
}
mutt_alias_menu ((char *) buf, buflen, Aliases);
return (1);
}
+ else if (flags & M_COMMAND)
+ {
+ buf[curpos] = 0;
+ if (mutt_command_complete ((char *) buf, buflen, curpos))
+ {
+ redraw = M_REDRAW_INIT;
+ continue;
+ }
+ }
else if (flags & (M_FILE | M_EFILE))
{
buf[curpos] = 0;
#include "mutt.h"
#include "mutt_curses.h"
#include "sort.h"
+#include "mx.h"
void mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf)
{
{
h->deleted = 0;
ctx->deleted--;
+/* if you undelete a message, the imap server will probably need to know. */
+ if(ctx->magic==M_IMAP)
+ {
+ h->changed = 1;
+ ctx->changed = 1;
+ }
}
break;
struct binding_t OpCompose[] = {
{ "attach-file", OP_COMPOSE_ATTACH_FILE, "a" },
+ { "attach-message", OP_COMPOSE_ATTACH_MESSAGE, "A" },
{ "edit-bcc", OP_COMPOSE_EDIT_BCC, "b" },
{ "edit-cc", OP_COMPOSE_EDIT_CC, "c" },
{ "copy-file", OP_SAVE, "C" },
WHERE char *HdrFmt;
WHERE char *Homedir;
WHERE char *Hostname;
+#ifdef USE_IMAP
+WHERE char *ImapUser INITVAL (NULL);
+WHERE char *ImapPass INITVAL (NULL);
+WHERE short ImapCheckTime;
+#endif
WHERE char *InReplyTo;
WHERE char *Inbox;
WHERE char *Ispell;
* %u = user (login) name of author
* %Z = status flags */
+struct hdr_format_info
+{
+ CONTEXT *ctx;
+ HEADER *hdr;
+};
+
static const char *
hdr_format_str (char *dest,
size_t destlen,
unsigned long data,
format_flag flags)
{
- HEADER *hdr = (HEADER *) data;
+ struct hdr_format_info *hfi = (struct hdr_format_info *) data;
+ HEADER *hdr;
+ CONTEXT *ctx;
char fmt[SHORT_STRING], buf2[SHORT_STRING], ch, *p;
int do_locales, i;
int optional = (flags & M_FORMAT_OPTIONAL);
size_t len;
+ hdr = hfi->hdr;
+ ctx = hfi->ctx;
+
dest[0] = 0;
switch (op)
{
case 'a':
- snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
- snprintf (dest, destlen, fmt, hdr->env->from->mailbox);
+ if(hdr->env->from && hdr->env->from->mailbox)
+ {
+ snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
+ snprintf (dest, destlen, fmt, hdr->env->from->mailbox);
+ }
+ dest[0] = '\0';
break;
case 'B':
break;
case 'b':
- if ((p = strrchr (Context->path, '/')))
- strncpy (dest, p + 1, destlen);
- else
- strncpy (dest, Context->path, destlen);
- break;
+ if(ctx)
+ {
+ if ((p = strrchr (ctx->path, '/')))
+ strfcpy (dest, p + 1, destlen);
+ else
+ strfcpy (dest, ctx->path, destlen);
+ break;
+ }
+ else
+ strfcpy(dest, "(null)", destlen);
case 'c':
mutt_pretty_size (buf2, sizeof (buf2), (long) hdr->content->length);
break;
case 'm':
- snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
- snprintf (dest, destlen, fmt, Context->msgcount);
+ if(ctx)
+ {
+ snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
+ snprintf (dest, destlen, fmt, ctx->msgcount);
+ }
+ else
+ strfcpy(dest, "(null)", destlen);
break;
case 'n':
ch = '!';
else if (hdr->replied)
ch = 'r';
- else if (hdr->read && (Context->msgnotreadyet != hdr->msgno))
+ else if (hdr->read && (ctx && ctx->msgnotreadyet != hdr->msgno))
ch = '-';
else if (hdr->old)
ch = 'O';
snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
snprintf (buf2, sizeof (buf2),
"%c%c%c",
- (hdr->read && (Context->msgnotreadyet != hdr->msgno))
+ (hdr->read && (ctx && ctx->msgnotreadyet != hdr->msgno))
? (hdr->replied ? 'r' : ' ') : (hdr->old ? 'O' : 'N'),
hdr->deleted ? 'D' : (hdr->attach_del ? 'd' : ch),
hdr->tagged ? '*' :
}
void
-_mutt_make_string (char *dest, size_t destlen, const char *s, HEADER *hdr, format_flag flags)
+_mutt_make_string (char *dest, size_t destlen, const char *s, CONTEXT *ctx, HEADER *hdr, format_flag flags)
{
- mutt_FormatString (dest, destlen, s, hdr_format_str, (unsigned long) hdr, flags);
+ struct hdr_format_info hfi;
+
+ hfi.hdr = hdr;
+ hfi.ctx = ctx;
+
+ mutt_FormatString (dest, destlen, s, hdr_format_str, (unsigned long) &hfi, flags);
}
else
strfcpy (path, p, sizeof (path));
mutt_expand_path (path, sizeof (path));
- if ((body = mutt_make_attach (path)))
+ if ((body = mutt_make_file_attach (path)))
{
body->description = safe_strdup (q);
for (parts = msg->content; parts->next; parts = parts->next) ;
if (data & (M_SENDHOOK | M_SAVEHOOK | M_FCCHOOK))
{
- if ((pat = mutt_pattern_comp (pattern.data, (data & M_SENDHOOK) ? M_FULL_MSG : 0, err)) == NULL)
+ if ((pat = mutt_pattern_comp (pattern.data, (data & M_SAVEHOOK) ? M_FULL_MSG : 0, err)) == NULL)
goto error;
}
else
if (hook->type & type)
if ((mutt_pattern_exec (hook->pattern, 0, ctx, hdr) > 0) ^ hook->rx.not)
{
- mutt_make_string (path, pathlen, hook->command, hdr);
+ mutt_make_string (path, pathlen, hook->command, ctx, hdr);
return 0;
}
#include "mutt_curses.h"
#include "mx.h"
#include "mailbox.h"
+#include "globals.h"
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
/* Minimal support for IMAP 4rev1 */
{
IMAP_FATAL = 1,
IMAP_NEW_MAIL,
+ IMAP_EXPUNGE,
IMAP_BYE
};
IMAP_CACHE cache[IMAP_CACHE_LEN];
} IMAP_DATA;
-static char ImapUser[SHORT_STRING] = { 0 };
-static char ImapPass[SHORT_STRING] = { 0 };
+/* simple read buffering to speed things up. */
+static int imap_readchar (int fd, char *c)
+{
+ static char inbuf[LONG_STRING];
+ static int bufpos=0, available=0;
+
+ if (bufpos>=available)
+ {
+ available = read (fd, inbuf, sizeof(inbuf));
+ bufpos = 0;
+ if (available <= 0)
+ return available; /* returns 0 for EOF or -1 for other error */
+ }
+ *c = inbuf[bufpos];
+ bufpos++;
+ return 1;
+}
static int imap_read_line (char *buf, size_t buflen, int fd)
{
for (i = 0; i < buflen; i++)
{
- if (read (fd, &ch, 1) != 1)
+ if (imap_readchar (fd, &ch) != 1)
return (-1);
if (ch == '\n')
break;
dprint (1, (debugfile, "imap_parse_fetch(): bogus FLAGS entry: %s\n", s));
return (-1); /* parse error */
}
+ /* we're about to get a new set of headers, so clear the old ones. */
+ h->deleted=0; h->flagged=0;
+ h->replied=0; h->read=0;
s++;
state = 1;
}
while (isdigit (*s))
*ptmp++ = *s++;
*ptmp = 0;
+ h->content->length = atoi (tmp);
}
else if (*s == ')')
s++; /* end of request */
{
char *pn;
int count;
+ int n, ind;
s = imap_next_word (s);
/* new mail arrived */
count = atoi (pn);
- if (count <= ctx->msgcount)
- {
- /* something is wrong because the server reported fewer messages
- * than we previously saw
- */
- mutt_error ("Fatal error. Message count is out of sync!");
- ((IMAP_DATA *) ctx->data)->status = IMAP_FATAL;
- mx_fastclose_mailbox (ctx);
- return (-1);
- }
- else
- {
- ((IMAP_DATA *) ctx->data)->status = IMAP_NEW_MAIL;
- ((IMAP_DATA *) ctx->data)->newMailCount = count;
- }
+ if (((IMAP_DATA *) ctx->data)->status != IMAP_EXPUNGE) {
+ if (count <= ctx->msgcount)
+ {
+ /* something is wrong because the server reported fewer messages
+ * than we previously saw
+ */
+ mutt_error ("Fatal error. Message count is out of sync!");
+ ((IMAP_DATA *) ctx->data)->status = IMAP_FATAL;
+ mx_fastclose_mailbox (ctx);
+ return (-1);
+ }
+ else
+ {
+ ((IMAP_DATA *) ctx->data)->status = IMAP_NEW_MAIL;
+ ((IMAP_DATA *) ctx->data)->newMailCount = count;
+ }
+ }
+ }
+ else if (strncasecmp ("EXPUNGE", s, 7) == 0)
+ {
+ /* a message was removed; reindex remaining messages */
+ /* (which amounts to decrementing indices of messages */
+ /* with an index greater than the deleted one. */
+ ind = atoi (pn) - 1;
+ for (n = 0; n < ctx->msgcount; n++)
+ if (ctx->hdrs[n]->index > ind)
+ ctx->hdrs[n]->index--;
}
}
else if (strncasecmp ("BYE", s, 3) == 0)
char buf[LONG_STRING];
char bufout[LONG_STRING];
char host[SHORT_STRING];
+ char user[SHORT_STRING];
+ char pass[SHORT_STRING];
char mailbox[_POSIX_PATH_MAX];
char seq[16];
int count = 0;
int n;
char *pc;
- pc = ctx->path;
- if (*pc != '{')
+ if (ctx->path[0] != '{')
return (-1);
- pc++;
- n = 0;
- while (*pc && *pc != '}')
+ for(n = 0, pc = ctx->path + 1; *pc && *pc != '}' && n < sizeof(host) - 1;
+ n++, pc++)
host[n++] = *pc++;
+ if(*pc != '}')
+ return -1;
host[n] = 0;
- if (!*pc)
- return (-1);
pc++;
strfcpy (mailbox, pc, sizeof (mailbox));
- if (!ImapUser[0])
- strfcpy (ImapUser, Username, sizeof (ImapUser));
- if (mutt_get_field ("IMAP Username: ", ImapUser, sizeof (ImapUser), 0) != 0 ||
- !ImapUser[0])
+ if (!ImapUser)
{
- ImapUser[0] = 0;
- return (-1);
+ strfcpy (user, Username, sizeof (user));
+ if (mutt_get_field ("IMAP Username: ", user, sizeof (user), 0) != 0 ||
+ !user[0])
+ {
+ user[0] = 0;
+ return (-1);
+ }
}
+ else
+ strfcpy (user, ImapUser, sizeof (user));
- snprintf (buf, sizeof (buf), "Password for %s@%s: ", ImapUser, host);
- ImapPass[0] = 0;
- if (mutt_get_field (buf, ImapPass, sizeof (ImapPass), M_PASS) != 0 ||
- !ImapPass[0])
+ if (!ImapPass)
{
- return (-1);
+ pass[0]=0;
+ snprintf (buf, sizeof (buf), "Password for %s@%s: ", user, host);
+ if (mutt_get_field (buf, pass, sizeof (pass), M_PASS) != 0 ||
+ !pass[0])
+ {
+ return (-1);
+ }
}
+ else
+ strfcpy (pass, ImapPass, sizeof (pass));
memset (&sin, 0, sizeof (sin));
sin.sin_port = htons (IMAP_PORT);
mutt_message ("Logging in...");
imap_make_sequence (seq, sizeof (seq), ctx);
- snprintf (buf, sizeof (buf), "%s LOGIN %s %s\r\n", seq, ImapUser, ImapPass);
+ snprintf (buf, sizeof (buf), "%s LOGIN %s %s\r\n", seq, user, pass);
if (imap_exec (buf, sizeof (buf), ctx, seq, buf) != 0)
{
+ /* Most likely an invalid login; clear username and password for re-entry. */
+ FREE (&ImapUser);
+ FREE (&ImapPass);
imap_error ("imap_open_mailbox()", buf);
return (-1);
}
+ /* If they have a successful login, we may as well cache the user/password. */
+ if (!ImapUser)
+ ImapUser = safe_strdup (user);
+ if (!ImapPass)
+ ImapPass = safe_strdup (pass);
mutt_message ("Selecting %s...", mailbox);
imap_make_sequence (seq, sizeof (seq), ctx);
}
while (strncmp (seq, buf, strlen (seq)) != 0);
- mutt_message ("Fetching message headers...");
ctx->hdrmax = count;
ctx->hdrs = safe_malloc (count * sizeof (HEADER *));
ctx->v2r = safe_malloc (count * sizeof (int));
for (ctx->msgcount = 0; ctx->msgcount < count; )
{
+ snprintf (buf, sizeof (buf), "Fetching message headers... [%d/%d]",
+ ctx->msgcount + 1, count);
+ mutt_message (buf);
ctx->hdrs[ctx->msgcount] = mutt_new_header ();
/* `count' can get modified if new mail arrives while fetching the
return 0;
}
-static int make_delete_list (char *list, size_t listlen, CONTEXT *ctx)
-{
- int first = -1, last = -1;
- int n;
- char tmp[LONG_STRING];
-
- *list = 0;
- for (n=0; n<ctx->msgcount; n++)
- {
- if (ctx->hdrs[n]->deleted)
- {
- if (first < 0)
- {
- first = n;
- last = n;
- }
- else if (last != n - 1)
- {
- if (first != last)
- snprintf (tmp, sizeof (tmp), "%d:%d", first + 1, last + 1);
- else
- snprintf (tmp, sizeof (tmp), "%d", first + 1);
- if (list[0])
- strcat (list, ",");
- strcat (list, tmp);
- first = last = n;
- }
- else
- last = n;
- }
- }
-
- if (first >= 0)
- {
- if (first != last)
- snprintf (tmp, sizeof (tmp), "%d:%d", first + 1, last + 1);
- else
- snprintf (tmp, sizeof (tmp), "%d", first + 1);
- if (list[0])
- strcat (list, ",");
- strcat (list, tmp);
- }
-
- return 0;
-}
-
int imap_sync_mailbox (CONTEXT *ctx)
{
char seq[8];
int n;
/* save status changes */
- mutt_message ("Saving message status flags...");
for (n = 0; n < ctx->msgcount; n++)
{
- if (!ctx->hdrs[n]->deleted && ctx->hdrs[n]->changed)
+ snprintf (tmp, sizeof (tmp), "Saving message status flags... [%d/%d]", n+1,
+ ctx->msgcount);
+ mutt_message (tmp);
+ if (ctx->hdrs[n]->deleted || ctx->hdrs[n]->changed)
{
+ *tmp = 0;
if (ctx->hdrs[n]->read)
strcat (tmp, "\\Seen ");
if (ctx->hdrs[n]->flagged)
strcat (tmp, "\\Flagged ");
if (ctx->hdrs[n]->replied)
- strcat (tmp, "\\Answered");
+ strcat (tmp, "\\Answered ");
+ if (ctx->hdrs[n]->deleted)
+ strcat (tmp, "\\Deleted");
mutt_remove_trailing_ws (tmp);
+ if (!*tmp) continue; /* imapd doesn't like empty flags. */
imap_make_sequence (seq, sizeof (seq), ctx);
- snprintf (buf, sizeof (buf), "%s STORE %d FLAGS.SILENT (%s)\r\n", seq, tmp);
+ snprintf (buf, sizeof (buf), "%s STORE %d FLAGS.SILENT (%s)\r\n", seq,
+ ctx->hdrs[n]->index + 1, tmp);
if (imap_exec (buf, sizeof (buf), ctx, seq, buf) != 0)
{
imap_error ("imap_sync_mailbox()", buf);
}
}
- mutt_message ("Marking messages as deleted...");
- make_delete_list (tmp, sizeof (tmp), ctx);
+ mutt_message ("Expunging messages from server...");
+ ((IMAP_DATA *) ctx->data)->status = IMAP_EXPUNGE;
imap_make_sequence (seq, sizeof (seq), ctx);
- snprintf (buf, sizeof (buf), "%s STORE %s +FLAGS.SILENT (\\Deleted)\r\n", seq, tmp);
+ snprintf (buf, sizeof (buf), "%s EXPUNGE\r\n", seq);
if (imap_exec (buf, sizeof (buf), ctx, seq, buf) != 0)
{
imap_error ("imap_sync_mailbox()", buf);
return (-1);
}
-
+ ((IMAP_DATA *) ctx->data)->status = 0;
+ /* WARNING: Messages need to be reindexed at this point after the expunge, or */
+ /* mutt will become -very- confused unless it's quitting. */
return 0;
}
{
char seq[8];
char buf[LONG_STRING];
+ static time_t checktime=0;
int msgcount = ctx->msgcount;
+ if (ImapCheckTime)
+ {
+ time_t k=time(NULL);
+ if (checktime && (k-checktime < ImapCheckTime)) return 0;
+ checktime=k;
+ }
+
imap_make_sequence (seq, sizeof (seq), ctx);
snprintf (buf, sizeof (buf), "%s NOOP\r\n", seq);
if (imap_exec (buf, sizeof (buf), ctx, seq, buf) != 0)
return (r);
}
+/* helper function for completion. Changes the dest buffer if
+ necessary/possible to aid completion.
+ dest == completion result gets here.
+ src == candidate for completion.
+ try == user entered data for completion.
+ len == length of dest buffer.
+*/
+static void candidate (char *dest, char *try, char *src, int len)
+{
+ int l;
+
+ if (strstr (src, try) == src)
+ {
+ if (dest[0] == 0)
+ {
+ strncpy (dest, src, len);
+ strncat (dest, " ", len);
+ }
+ else
+ {
+ for (l = 0; src[l] && src[l] == dest[l]; l++);
+ dest[l] = 0;
+ }
+ }
+}
+
+int mutt_command_complete (char *buffer, size_t len, int pos)
+{
+ char cmd[STRING];
+ char completed[STRING] = { 0 };
+ char *pt;
+ int num;
+
+ if (buffer[0] == 0)
+ return 0;
+ strncpy (cmd, buffer, pos);
+ pt = cmd;
+ pt[pos] = 0;
+ while (!isspace (*pt))
+ pt++;
+ *pt = 0;
+
+ pt = buffer + pos;
+ while ((pt > buffer) && !isspace (*pt))
+ pt--;
+ if (pt == buffer) /* complete cmd */
+ {
+ for (num = 0; Commands[num].name; num++)
+ candidate (completed, cmd, Commands[num].name, sizeof (completed));
+
+ if (completed[0] == 0)
+ return 0;
+ strncpy (buffer, completed, len);
+ }
+ else if (!strncasecmp (cmd, "set", 3)
+ || !strncasecmp (cmd, "unset", 5)
+ || !strncasecmp (cmd, "toggle", 6))
+ { /* complete variables */
+ pt++;
+ if (*pt == 0)
+ return 0;
+ strncpy (cmd, pt, sizeof (cmd));
+ for (num = 0; MuttVars[num].option; num++)
+ candidate (completed, cmd, MuttVars[num].option, sizeof (completed));
+ if (completed[0] == 0)
+ return 0;
+ strncpy (pt, completed, buffer + len - pt);
+ }
+ else
+ return 0;
+ return 1;
+}
+
char *mutt_getnamebyvalue (int val, const struct mapping_t *map)
{
int i;
{ "help", DT_BOOL, R_BOTH, OPTHELP, 1 },
{ "history", DT_NUM, R_NONE, UL &HistSize, 10 },
{ "hostname", DT_STR, R_NONE, UL &Fqdn, 0 },
+#ifdef USE_IMAP
+ { "imap_user", DT_STR, R_NONE, UL &ImapUser, UL 0 },
+ { "imap_pass", DT_STR, R_NONE, UL &ImapPass, UL 0 },
+ { "imap_checkinterval", DT_NUM, R_NONE, UL &ImapCheckTime, 0 },
+#endif
{ "in_reply_to", DT_STR, R_NONE, UL &InReplyTo, UL "%i; from %n on %{!%a, %b %d, %Y at %I:%M:%S%p %Z}" },
{ "include", DT_QUAD, R_NONE, OPT_INCLUDE, M_ASKYES },
{ "indent_string", DT_STR, R_NONE, UL &Prefix, UL "> " },
"-USE_FLOCK"
#endif
);
-
puts (
+#ifdef USE_IMAP
+ "+USE_IMAP "
+#else
+ "-USE_IMAP "
+#endif
+
#ifdef USE_POP
"+USE_POP "
#else
#ifdef BUFFY_SIZE
- "+BUFFY_SIZE "
+ "+BUFFY_SIZE"
#else
- "-BUFFY_SIZE "
+ "-BUFFY_SIZE"
#endif
-
+ );
+ puts (
#ifdef EXACT_ADDRESS
"+"
#else
{
if (a)
{
- a->next = mutt_make_attach (t->data);
+ a->next = mutt_make_file_attach (t->data);
a = a->next;
}
else
- msg->content = a = mutt_make_attach (t->data);
+ msg->content = a = mutt_make_file_attach (t->data);
if (!a)
{
if (!option (OPTNOCURSES))
}
}
- snprintf (path, sizeof (path), "%s/%s", ctx->path, ".mh_sequences");
- mh_sequences = fopen (path, "w");
- if (mh_sequences == NULL)
+ if(ctx->magic == M_MH)
{
- mutt_message ("fopen %s failed", path);
- }
- else
- {
- fprintf (mh_sequences, "unseen: ");
- for (i = 0; i < ctx->msgcount; i++)
- if ((ctx->hdrs[i]->read == 0) && !(ctx->hdrs[i]->deleted))
- fprintf (mh_sequences, "%s ", ctx->hdrs[i]->path);
- fprintf (mh_sequences, "\n");
- fclose (mh_sequences);
+ snprintf (path, sizeof (path), "%s/%s", ctx->path, ".mh_sequences");
+ mh_sequences = fopen (path, "w");
+ if (mh_sequences == NULL)
+ {
+ mutt_message ("fopen %s failed", path);
+ }
+ else
+ {
+ fprintf (mh_sequences, "unseen: ");
+ for (i = 0; i < ctx->msgcount; i++)
+ if ((ctx->hdrs[i]->read == 0) && !(ctx->hdrs[i]->deleted))
+ fprintf (mh_sequences, "%s ", ctx->hdrs[i]->path);
+ fprintf (mh_sequences, "\n");
+ fclose (mh_sequences);
+ }
}
return (rc);
#define CH_TXTPLAIN (1<<11) /* generate text/plain MIME headers */
/* flags for mutt_enter_string() */
-#define M_ALIAS 1 /* do alias "completion" by calling up the alias-menu */
-#define M_FILE (1<<1) /* do file completion */
-#define M_EFILE (1<<2) /* do file completion, plus incoming folders */
-#define M_CMD (1<<3) /* do completion on previous word */
-#define M_PASS (1<<4) /* password mode (no echo) */
-#define M_CLEAR (1<<5) /* clear input if printable character is pressed */
+#define M_ALIAS 1 /* do alias "completion" by calling up the alias-menu */
+#define M_FILE (1<<1) /* do file completion */
+#define M_EFILE (1<<2) /* do file completion, plus incoming folders */
+#define M_CMD (1<<3) /* do completion on previous word */
+#define M_PASS (1<<4) /* password mode (no echo) */
+#define M_CLEAR (1<<5) /* clear input if printable character is pressed */
+#define M_COMMAND (1<<6) /* do command completion */
/* flags for mutt_get_token() */
#define M_TOKEN_EQUAL 1 /* treat '=' as a special */
#include "pgp.h"
#endif
-
-
+#ifdef USE_IMAP
+#include "imap.h"
+#endif
#ifdef BUFFY_SIZE
#include "buffy.h"
{
_mutt_make_string (buffer,
COLS-9 < sizeof (buffer) ? COLS-9 : sizeof (buffer),
- NONULL (PagerFmt), extra->hdr, M_FORMAT_MAKEPRINT);
+ NONULL (PagerFmt), Context, extra->hdr, M_FORMAT_MAKEPRINT);
}
printw ("%-*.*s -- (", COLS-10, COLS-10, IsHeader (extra) ? buffer : banner);
if (last_pos < sb.st_size - 1)
{
for (l = id_defaults; l; l = l->next)
- if (!strcasecmp (whatfor, l->what))
+ if (!strcasecmp (whatfor, NONULL(l->what)))
{
- strcpy (resp, l->dflt);
+ strcpy (resp, NONULL(l->dflt));
break;
}
}
case 3: return "RSA";
case 16: return "ElG";
case 17: return "DSA";
+ case 20: return "ElG";
default: return "unk";
}
}
case 1:
case 2:
case 16:
+ case 20:
return 1;
default:
return 0;
case 1:
case 3:
case 17:
+ case 20:
return 1;
default:
return 0;
partial = 0;
material -= 2;
}
- else
+ else if(b < 255)
{
material = 1 << (b & 0x1f);
partial = 1;
material -= 1;
}
+ else /* b == 255 */
+ {
+ unsigned char buf[4];
+ if( fread( buf, 4, 1, fp ) < 1)
+ {
+ mutt_perror("fread");
+ goto bail;
+ }
+ /*assert( sizeof(material) >= 4 );*/
+ material = buf[0] << 24;
+ material |= buf[1] << 16;
+ material |= buf[2] << 8;
+ material |= buf[3];
+ partial = 0;
+ material -= 5;
+ }
if(read_material(material, &used, fp) == -1)
goto bail;
if (alg == 17)
skip_bignum(buff, l, j, &j, 3);
- else if(alg == 16)
+ else if(alg == 16 || alg == 20 )
skip_bignum(buff, l, j, &j, 2);
len = (buff[j] << 8) + buff[j+1];
{
CONTEXT *ctx = (CONTEXT *) menu->data;
- mutt_make_string (s, slen, NONULL (HdrFmt), ctx->hdrs[entry]);
+ mutt_make_string (s, slen, NONULL (HdrFmt), ctx, ctx->hdrs[entry]);
}
static HEADER *select_msg (void)
safe_free ((void **) &PostContext);
return (-1);
}
- hdr->content = mutt_make_attach (file);
+ hdr->content = mutt_make_file_attach (file);
hdr->content->use_disp = 0; /* no content-disposition */
hdr->content->unlink = 1; /* delete when we are done */
}
#define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#')
-#define mutt_make_string(A,B,C,D) _mutt_make_string(A,B,C,D,0)
-void _mutt_make_string (char *, size_t, const char *, HEADER *, format_flag);
+#define mutt_make_string(A,B,C,D,E) _mutt_make_string(A,B,C,D,E,0)
+void _mutt_make_string (char *, size_t, const char *, CONTEXT *,
+ HEADER *, format_flag);
int mutt_extract_token (BUFFER *, BUFFER *, int);
ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
BODY *mutt_dup_body (BODY *);
-BODY *mutt_make_attach (const char *);
+BODY *mutt_make_file_attach (const char *);
+BODY *mutt_make_message_attach (CONTEXT *, HEADER *);
BODY *mutt_make_multipart (BODY *);
BODY *mutt_new_body (void);
BODY *mutt_parse_multipart (FILE *, const char *, long, int);
int mutt_check_mime_type (const char *);
int mutt_check_month (const char *);
int mutt_check_overwrite (const char *, const char *, char *, size_t, int);
+int mutt_command_complete (char *, size_t, int);
int mutt_complete (char *);
int mutt_compose_attachment (BODY *a);
int mutt_copy_bytes (FILE *, FILE *, size_t);
return first;
}
-int query_search (MUTTMENU *m, regex_t *re, int n)
+static int query_search (MUTTMENU *m, regex_t *re, int n)
{
ENTRY *table = (ENTRY *) m->data;
/* This is the callback routine from mutt_menuLoop() which is used to generate
* a menu entry for the requested item number.
*/
-void query_entry (char *s, size_t slen, MUTTMENU *m, int num)
+static void query_entry (char *s, size_t slen, MUTTMENU *m, int num)
{
ENTRY *table = (ENTRY *) m->data;
char buf[SHORT_STRING] = "";
table[num].data->other);
}
-int query_tag (MUTTMENU *menu, int n)
+static int query_tag (MUTTMENU *menu, int n)
{
return (((ENTRY *) menu->data)[n].tagged = !((ENTRY *) menu->data)[n].tagged);
}
{
QUERY *results = NULL;
+ if (!QueryCmd)
+ {
+ mutt_error ("Query command not defined.");
+ return 0;
+ }
+
results = run_query (buf, 1);
if (results)
{
void mutt_query_menu (char *buf, size_t buflen)
{
+ if (!QueryCmd)
+ {
+ mutt_error ("Query command not defined.");
+ return;
+ }
+
if (buf == NULL)
{
char buffer[STRING] = "";
if (results == NULL)
{
- if (!QueryCmd)
- {
- mutt_error ("Query command not defined.");
- return;
- }
/* Prompt for Query */
if (mutt_get_field ("Query: ", buf, buflen, 0) == 0 && buf[0])
{
s[0] = 0;
if (m->type == TYPEMESSAGE && (!strcasecmp ("rfc822", m->subtype) ||
!strcasecmp ("news", m->subtype)) && MsgFmt[0])
- _mutt_make_string (s, sizeof (s), MsgFmt, m->hdr,
+ _mutt_make_string (s, sizeof (s), MsgFmt, NULL, m->hdr,
M_FORMAT_FORCESUBJ | M_FORMAT_MAKEPRINT);
mutt_pretty_size (size, sizeof (size), m->length);
-const char *ReleaseDate = "1998-05-14";
+const char *ReleaseDate = "1998-06-06";
if (Attribution)
{
- mutt_make_string (buffer, sizeof (buffer), Attribution, cur);
+ mutt_make_string (buffer, sizeof (buffer), Attribution, ctx, cur);
fputs (buffer, out);
fputc ('\n', out);
}
mutt_copy_message (out, ctx, cur, flags, CH_DECODE);
if (PostIndentString)
{
- mutt_make_string (buffer, sizeof (buffer), PostIndentString, cur);
+ mutt_make_string (buffer, sizeof (buffer), PostIndentString, ctx, cur);
fputs (buffer, out);
fputc ('\n', out);
}
return 0;
}
-static BODY *make_forward (CONTEXT *ctx, HEADER *hdr)
-{
- char buffer[LONG_STRING];
- BODY *body;
- FILE *fpout;
-
- mutt_mktemp (buffer);
- if ((fpout = safe_fopen (buffer, "w")) == NULL)
- return NULL;
-
- body = mutt_new_body ();
- body->type = TYPEMESSAGE;
- body->subtype = safe_strdup ("rfc822");
- body->filename = safe_strdup (buffer);
- body->unlink = 1;
- body->use_disp = 0;
-
- /* this MUST come after setting ->filename because we reuse buffer[] */
- strfcpy (buffer, "Forwarded message from ", sizeof (buffer));
- rfc822_write_address (buffer + 23, sizeof (buffer) - 23, hdr->env->from);
- body->description = safe_strdup (buffer);
-
- mutt_parse_mime_message (ctx, hdr);
- mutt_copy_message (fpout, ctx, hdr,
- option (OPTMIMEFORWDECODE) ? M_CM_DECODE : 0,
- CH_XMIT | (option (OPTMIMEFORWDECODE) ? (CH_MIME | CH_TXTPLAIN ) : 0));
-
- fclose (fpout);
- mutt_update_encoding (body);
- return (body);
-}
-
static int default_to (ADDRESS **to, ENVELOPE *env, int group)
{
char prompt[STRING];
if (InReplyTo)
{
strfcpy (buffer, "In-Reply-To: ", sizeof (buffer));
- mutt_make_string (buffer + 13, sizeof (buffer) - 13, InReplyTo, cur);
+ mutt_make_string (buffer + 13, sizeof (buffer) - 13, InReplyTo, ctx, cur);
tmp = env->userhdrs;
while (tmp && tmp->next)
tmp = tmp->next;
else if (flags & SENDFORWARD)
{
/* set the default subject for the message. */
- mutt_make_string (buffer, sizeof (buffer), ForwFmt, cur);
+ mutt_make_string (buffer, sizeof (buffer), ForwFmt, ctx, cur);
env->subject = safe_strdup (buffer);
}
if (cur)
{
- tmp = make_forward (ctx, cur);
+ tmp = mutt_make_message_attach (ctx, cur);
if (last)
last->next = tmp;
else
{
if (ctx->hdrs[ctx->v2r[i]]->tagged)
{
- tmp = make_forward (ctx, ctx->hdrs[ctx->v2r[i]]);
+ tmp = mutt_make_message_attach (ctx, ctx->hdrs[ctx->v2r[i]]);
if (last)
{
last->next = tmp;
safe_free ((void **) &info);
}
-BODY *mutt_make_attach (const char *path)
+BODY *mutt_make_message_attach (CONTEXT *ctx, HEADER *hdr)
+{
+ char buffer[LONG_STRING];
+ BODY *body;
+ FILE *fpout;
+
+ mutt_mktemp (buffer);
+ if ((fpout = safe_fopen (buffer, "w")) == NULL)
+ return NULL;
+
+ body = mutt_new_body ();
+ body->type = TYPEMESSAGE;
+ body->subtype = safe_strdup ("rfc822");
+ body->filename = safe_strdup (buffer);
+ body->unlink = 1;
+ body->use_disp = 0;
+
+ /* this MUST come after setting ->filename because we reuse buffer[] */
+ strfcpy (buffer, "Forwarded message from ", sizeof (buffer));
+ rfc822_write_address (buffer + 23, sizeof (buffer) - 23, hdr->env->from);
+ body->description = safe_strdup (buffer);
+
+ mutt_parse_mime_message (ctx, hdr);
+ mutt_copy_message (fpout, ctx, hdr,
+ option (OPTMIMEFORWDECODE) ? M_CM_DECODE : 0,
+ CH_XMIT | (option (OPTMIMEFORWDECODE) ? (CH_MIME | CH_TXTPLAIN ) : 0));
+
+ fclose (fpout);
+ mutt_update_encoding (body);
+ return (body);
+}
+
+BODY *mutt_make_file_attach (const char *path)
{
BODY *att;
CONTENT *info;