+++ /dev/null
-Index: enter.c
-===================================================================
-RCS file: /home/roessler/cvs/mutt/enter.c,v
-retrieving revision 2.30
-retrieving revision 2.31
-diff -u -r2.30 -r2.31
---- enter.c 2001/01/08 23:09:30 2.30
-+++ enter.c 2001/04/09 14:37:26 2.31
-@@ -198,8 +198,11 @@
- wchar_t *tempbuf = 0;
- size_t templen = 0;
- history_class_t hclass;
-+ wchar_t wc;
-+ mbstate_t mbstate;
-
- int rv = 0;
-+ memset (&mbstate, 0, sizeof (mbstate));
-
- if (state->wbuf)
- {
-@@ -611,14 +614,34 @@
- /* use the raw keypress */
- ch = LastKey;
-
-+ /* this probably shouldn't happen */
-+ if (ch & ~0xff)
-+ continue;
-+
-+ /* gather the octets into a wide character */
-+ {
-+ char c;
-+ size_t k;
-+
-+ c = ch;
-+ k = mbrtowc (&wc, &c, 1, &mbstate);
-+ if (k == (size_t)(-2))
-+ continue;
-+ else if (k && k != 1)
-+ {
-+ memset (&mbstate, 0, sizeof (mbstate));
-+ continue;
-+ }
-+ }
-+
- if (first && (flags & M_CLEAR))
- {
- first = 0;
-- if (IsWPrint (ch)) /* why? */
-+ if (IsWPrint (wc)) /* why? */
- state->curpos = state->lastchar = 0;
- }
-
-- if (CI_is_return (ch))
-+ if (wc == '\r' || wc == '\n')
- {
- /* Convert from wide characters */
- my_wcstombs (buf, buflen, state->wbuf, state->lastchar);
-@@ -637,7 +660,7 @@
- rv = 0;
- goto bye;
- }
-- else if (ch && (ch < ' ' || IsWPrint (ch))) /* why? */
-+ else if (wc && (wc < ' ' || IsWPrint (wc))) /* why? */
- {
- if (state->lastchar >= state->wbuflen)
- {
-@@ -645,7 +668,7 @@
- safe_realloc ((void **) &state->wbuf, state->wbuflen * sizeof (wchar_t));
- }
- memmove (state->wbuf + state->curpos + 1, state->wbuf + state->curpos, (state->lastchar - state->curpos) * sizeof (wchar_t));
-- state->wbuf[state->curpos++] = ch;
-+ state->wbuf[state->curpos++] = wc;
- state->lastchar++;
- }
- else
-diff -urN mutt-1.3.17.org/configure.in mutt-1.3.17/configure.in
---- mutt-1.3.17.org/configure.in Wed Apr 4 23:31:32 2001
-+++ mutt-1.3.17/configure.in Wed Apr 4 23:33:55 2001
-@@ -321,41 +321,8 @@
- fi
- AC_DEFINE_UNQUOTED(MAILPATH, "$mutt_cv_mailpath")
+diff -urN mutt-1.3.18.org/configure.in mutt-1.3.18/configure.in
+--- mutt-1.3.18.org/configure.in Wed May 9 17:47:59 2001
++++ mutt-1.3.18/configure.in Wed May 9 17:48:59 2001
+@@ -350,12 +350,10 @@
+ exit (1);
+ }], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
-- AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, mutt_cv_worldwrite, [AC_TRY_RUN([#include <sys/types.h>
--#include <sys/stat.h>
--
--int main (int argc, char **argv)
--{
-- struct stat s;
--
-- stat ("$mutt_cv_mailpath", &s);
-- if (s.st_mode & S_IWOTH) exit (0);
-- exit (1);
--}], mutt_cv_worldwrite=yes, mutt_cv_worldwrite=no, mutt_cv_worldwrite=no)])
--
-- mutt_cv_setgid=no
-- if test $mutt_cv_worldwrite = yes; then
-- AC_DEFINE(USE_DOTLOCK)
-- else
--
-- AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_TRY_RUN([#include <sys/types.h>
--#include <sys/stat.h>
--
--int main (int argc, char **argv)
--{
-- struct stat s;
--
-- stat ("$mutt_cv_mailpath", &s);
-- if (s.st_mode & S_IWGRP) exit (0);
-- exit (1);
--}], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
--
-- if test $mutt_cv_groupwrite = yes; then
-- AC_DEFINE(USE_DOTLOCK)
-- AC_DEFINE(USE_SETGID)
-- mutt_cv_setgid=yes
-- fi
-- fi
-+ AC_DEFINE(USE_DOTLOCK)
-+ AC_DEFINE(USE_SETGID)
+- if test $mutt_cv_groupwrite = yes; then
++ fi
+ AC_DEFINE(USE_DOTLOCK)
+ AC_DEFINE(USE_SETGID)
+ mutt_cv_setgid=yes
+- fi
+- fi
fi
AC_ARG_ENABLE(external_dotlock, [ --enable-external-dotlock Force use of an external dotlock program],