[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Mailutils branch, master, updated. release-2.2-219-ge53b558
From: |
Sergey Poznyakoff |
Subject: |
[SCM] GNU Mailutils branch, master, updated. release-2.2-219-ge53b558 |
Date: |
Wed, 24 Nov 2010 20:41:23 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=e53b55870dd3c4166ea6658ea679d608e500172a
The branch, master has been updated
via e53b55870dd3c4166ea6658ea679d608e500172a (commit)
via bd228fc3d1f40f0f230db1d066fb5a330a0c35a9 (commit)
via 3f323ca9cee9fdb3a04f2f7269998fdc1f941f5e (commit)
via 36e8269d52475b4e4e5869873c835ead51d82ccb (commit)
via 2ef58f17e48b99f5c95c2c90e8ba9a4190663dd8 (commit)
from 27f9a867f4fcfaf29a22349043eaddcb60c2694e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e53b55870dd3c4166ea6658ea679d608e500172a
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Nov 24 21:38:19 2010 +0200
mh: move format files to a separate directory.
* mh/etc: New directory.
* mh/Makefile.am: New file.
* mh/components: Move to mh/etc.
* mh/mailutils-mh.eli: Move to mh/etc.
* mh/mhl.format: Move to mh/etc.
* mh/mhl.forward: Move to mh/etc.
* mh/mhl.repl: Move to mh/etc.
* mh/mhl.usenet: Move to mh/etc.
* mh/replcomps: Move to mh/etc.
* mh/replgroupcomps: Move to mh/etc.
* configure.ac (AC_CONFIG_FILES): Add mh/etc/Makefile.
* mh/Makefile.am (SUBDIRS): Add etc.
Move mhlib_DATA and related statements to mh/etc/Makefile.am
* mh/comp.c (formfile): Remove const qualifier.
(opt_handler): Use mh_find_file to set formfile.
* mh/forw.c: Likewise.
* mh/mh_init.c (mh_find_file): Make sure *resolved_name is always
set to the last tried name.
* mh/tests/comp.at: Remove directory components from the -from argument.
* mh/tests/forw.at: Likewise.
* mh/tests/mhl.at: Likewise.
* mh/tests/testsuite.at (MH_SETUP): Change mhetcdir value.
commit bd228fc3d1f40f0f230db1d066fb5a330a0c35a9
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Nov 24 20:36:56 2010 +0200
mh: set a compatible search path for format files; other minor fixes.
* mh/mh_format.c (builtin_friendly): If personal part is present,
return it. Otherwise, leave the address untouched.
(builtin_pers): Do not quote the return.
* mh/tests/inc.at: Reflect the above changes.
* mh/tests/scan.at: Likewise.
* mh/mh_list.c (eval_body): Offset each line.
* mh/tests/mhl.at: Test this change.
* mh/mhl.c: Use mh_find_file to resolve the argument to -form.
* mh/repl.c: Likewise.
Same for replgroupcomps, mhl.repl and -filter.
* mh/mhl.repl: New file.
* mh/mhl.usenet: New file.
* mh/Makefile.am (mhlib_DATA, EXTRA_DIST): Add new files.
commit 3f323ca9cee9fdb3a04f2f7269998fdc1f941f5e
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Nov 24 20:35:34 2010 +0200
wordsplit: fix whitespace trimming.
* libmailutils/string/wordsplit.c (mu_wordsplit_trimws): Do not
touch quoted nodes.
* libmailutils/tests/wordsplit.at: Test the above change.
commit 36e8269d52475b4e4e5869873c835ead51d82ccb
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Nov 24 18:34:36 2010 +0200
mh: fix the use of mhl.forward in forw.
* mh/mhl.forward: New file.
* mh/forw.c (mh_option): the -format option is boolean.
(mhl_filter): Rename to mhl_filter_file.
(opt_handler) <ARG_FORMAT>: Use default mhl.filter.
<ARG_NOFORMAT>: Set encap_clear.
<ARG_FILTER>: Use mh_find_file to determine filter file name.
(finish_draft): Use MHL filter file if encap == encap_mhl.
* mh/mh.h (mh_find_file): New prototype.
* mh/mh_init.c (mh_find_file): New file.
(mh_read_formfile): Use mh_find_file to locate the file.
* mh/tests/forw.at: Test forw -format.
* mh/tests/mhparam.at: Update the -all test.
* tests/testsuite.at (MH_SETUP): Set the "mhetcdir" component.
* mh/scan.c (opt_handler): Exit if mh_read_formfile failed.
commit 2ef58f17e48b99f5c95c2c90e8ba9a4190663dd8
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Nov 24 16:53:34 2010 +0200
New type of stream: static memory stream.
Static memory stream is a read-only stream whose transport is
an arbitrary area of memory. Such streams allow the programmer
to access C strings using streams interface.
* include/mailutils/stream.h (mu_static_memory_stream_create): New
proto.
* libmailutils/stream/memory_stream.c (mu_static_memory_stream_create): New
function.
* imap4d/append.c (imap4d_append0): Use static memory stream to
create a temporary message.
* imap4d/preauth.c (decode64_buf): Use static memory stream.
* libmailutils/base/rfc2047.c (mu_rfc2047_decode): Likewise.
* libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Likewise.
* libmu_auth/ldap.c (chk_md5, chk_sha, chk_ssha): Likewise.
* libmu_sieve/extensions/vacation.c (build_mime): Likewise.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 1 +
imap4d/append.c | 16 +++----
imap4d/preauth.c | 3 +-
include/mailutils/stream.h | 3 +
libmailutils/base/rfc2047.c | 8 +---
libmailutils/mime/mimehdr.c | 6 +--
libmailutils/stream/memory_stream.c | 30 ++++++++++++
libmailutils/string/wordsplit.c | 3 +
libmailutils/tests/wordsplit.at | 10 ++++
libmu_auth/ldap.c | 16 +++----
libmu_sieve/extensions/vacation.c | 4 +-
mh/Makefile.am | 19 +-------
mh/comp.c | 4 +-
mh/{ => etc}/components | 0
mh/{ => etc}/mailutils-mh.eli | 0
mh/{ => etc}/mhl.format | 0
mh/etc/mhl.forward | 15 ++++++
mh/etc/mhl.repl | 8 +++
mh/etc/mhl.usenet | 10 ++++
mh/{ => etc}/replcomps | 0
mh/{ => etc}/replgroupcomps | 0
mh/forw.c | 42 ++++++++---------
mh/mh.h | 2 +
mh/mh_format.c | 22 ++++++---
mh/mh_init.c | 84 ++++++++++++++++++++++++++++++++---
mh/mh_list.c | 4 +-
mh/mhl.c | 2 +-
mh/repl.c | 22 +++++-----
mh/scan.c | 3 +-
mh/tests/comp.at | 2 +-
mh/tests/forw.at | 73 ++++++++++++++++++++++++++++---
mh/tests/inc.at | 20 ++++----
mh/tests/mhl.at | 25 ++++++++++-
mh/tests/mhparam.at | 3 +-
mh/tests/scan.at | 24 +++++-----
mh/tests/testsuite.at | 5 ++-
36 files changed, 354 insertions(+), 135 deletions(-)
rename mh/{ => etc}/components (100%)
rename mh/{ => etc}/mailutils-mh.eli (100%)
rename mh/{ => etc}/mhl.format (100%)
create mode 100644 mh/etc/mhl.forward
create mode 100644 mh/etc/mhl.repl
create mode 100644 mh/etc/mhl.usenet
rename mh/{ => etc}/replcomps (100%)
rename mh/{ => etc}/replgroupcomps (100%)
diff --git a/configure.ac b/configure.ac
index 10d1e6a..4412729 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1397,6 +1397,7 @@ AC_CONFIG_FILES([
libmailutils/Makefile
messages/Makefile
mh/Makefile
+ mh/etc/Makefile
mimeview/Makefile
movemail/Makefile
po/Makefile.in
diff --git a/imap4d/append.c b/imap4d/append.c
index f610cff..8999b73 100644
--- a/imap4d/append.c
+++ b/imap4d/append.c
@@ -74,12 +74,6 @@ imap4d_append0 (mu_mailbox_t mbox, int flags, char
*date_time, char *text,
if (mu_message_create (&msg, &tm))
return 1;
- if (mu_memory_stream_create (&stream, MU_STREAM_RDWR))
- {
- mu_message_destroy (&msg, &tm);
- return 1;
- }
-
/* If a date_time is specified, the internal date SHOULD be set in the
resulting message; otherwise, the internal date of the resulting
message is set to the current date and time by default. */
@@ -96,10 +90,14 @@ imap4d_append0 (mu_mailbox_t mbox, int flags, char
*date_time, char *text,
tm = gmtime (&t);
- while (*text && mu_isblank (*text))
- text++;
+ text = mu_str_skip_class (text, MU_CTYPE_BLANK);
+
+ if (mu_static_memory_stream_create (&stream, text, strlen (text)))
+ {
+ mu_message_destroy (&msg, &tm);
+ return 1;
+ }
- mu_stream_write (stream, text, strlen (text), NULL);
mu_message_set_stream (msg, stream, &tm);
mu_message_set_size (msg, _append_size, &tm);
diff --git a/imap4d/preauth.c b/imap4d/preauth.c
index 014da68..ef36e72 100644
--- a/imap4d/preauth.c
+++ b/imap4d/preauth.c
@@ -192,10 +192,9 @@ decode64_buf (const char *name, unsigned char **pbuf,
size_t *psize)
name++;
namelen = strlen (name) - 1;
- mu_memory_stream_create (&str, 0);
+ mu_static_memory_stream_create (&str, name, namelen);
mu_filter_create (&flt, str, "base64", MU_FILTER_DECODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
- mu_stream_write (str, name, namelen, NULL);
mu_stream_read (flt, buf, sizeof buf, &size);
mu_stream_destroy (&flt);
*pbuf = malloc (size);
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index 444733e..ba8c9bc 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -205,6 +205,9 @@ int mu_prog_stream_create (mu_stream_t *pstream, const char
*progname, int flags
int mu_filter_prog_stream_create (mu_stream_t *pstream, const char *progname,
mu_stream_t input);
int mu_memory_stream_create (mu_stream_t *pstream, int flags);
+int mu_static_memory_stream_create (mu_stream_t *pstream, const void *mem,
+ size_t size);
+
int mu_mapfile_stream_create (mu_stream_t *pstream, const char *filename,
int flags);
int mu_socket_stream_create (mu_stream_t *pstream, const char *filename,
diff --git a/libmailutils/base/rfc2047.c b/libmailutils/base/rfc2047.c
index 29b3c4c..d634960 100644
--- a/libmailutils/base/rfc2047.c
+++ b/libmailutils/base/rfc2047.c
@@ -160,8 +160,7 @@ mu_rfc2047_decode (const char *tocode, const char *input,
char **ptostr)
if (status != 0)
break;
- mu_memory_stream_create (&in_stream, 0);
- mu_stream_write (in_stream, encoded_text, size, NULL);
+ mu_static_memory_stream_create (&in_stream, encoded_text, size);
mu_stream_seek (in_stream, 0, MU_SEEK_SET, NULL);
status = mu_decode_filter (&filter, in_stream, filter_type, fromcode,
tocode);
@@ -266,12 +265,9 @@ mu_rfc2047_encode (const char *charset, const char
*encoding,
else if (encoding[1] || !strchr ("BQ", encoding[0]))
return MU_ERR_BAD_2047_ENCODING;
- rc = mu_memory_stream_create (&input_stream, 0);
+ rc = mu_static_memory_stream_create (&input_stream, text, strlen (text));
if (rc)
return rc;
-
- mu_stream_write (input_stream, text, strlen (text), NULL);
- mu_stream_seek (input_stream, 0, MU_SEEK_SET, NULL);
rc = mu_filter_create (&output_stream, input_stream,
encoding, MU_FILTER_ENCODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
diff --git a/libmailutils/mime/mimehdr.c b/libmailutils/mime/mimehdr.c
index 863566c..21da8a8 100644
--- a/libmailutils/mime/mimehdr.c
+++ b/libmailutils/mime/mimehdr.c
@@ -506,10 +506,8 @@ mu_mimehdr_decode_param (const char *value, int flags,
size_t total = 0, pos;
size_t nbytes;
- rc = mu_memory_stream_create (&instr, 0);
- if (rc)
- break;
- rc = mu_stream_write (instr, data, strlen (data), NULL);
+ rc = mu_static_memory_stream_create (&instr, data,
+ strlen (data));
if (rc)
break;
diff --git a/libmailutils/stream/memory_stream.c
b/libmailutils/stream/memory_stream.c
index ed599dc..84aa534 100644
--- a/libmailutils/stream/memory_stream.c
+++ b/libmailutils/stream/memory_stream.c
@@ -224,3 +224,33 @@ mu_memory_stream_create (mu_stream_t *pstream, int flags)
return rc;
}
+int
+mu_static_memory_stream_create (mu_stream_t *pstream, const void *mem,
+ size_t size)
+{
+ mu_stream_t stream;
+ struct _mu_memory_stream *str;
+
+ str = (struct _mu_memory_stream *)
+ _mu_stream_create (sizeof (*str), MU_STREAM_READ | MU_STREAM_SEEK);
+
+ if (!str)
+ return ENOMEM;
+
+ str->ptr = (void*) mem;
+ str->size = size;
+ str->offset = 0;
+ str->capacity = size;
+
+ str->stream.flags |= _MU_STR_OPEN;
+ str->stream.read = _memory_read;
+ str->stream.size = _memory_size;
+ str->stream.ctl = _memory_ioctl;
+ str->stream.seek = _memory_seek;
+
+ stream = (mu_stream_t) str;
+ *pstream = stream;
+
+ return 0;
+}
+
diff --git a/libmailutils/string/wordsplit.c b/libmailutils/string/wordsplit.c
index b5397ee..5792393 100644
--- a/libmailutils/string/wordsplit.c
+++ b/libmailutils/string/wordsplit.c
@@ -946,6 +946,9 @@ mu_wordsplit_trimws (struct mu_wordsplit *wsp)
for (p = wsp->ws_head; p; p = p->next)
{
size_t n;
+
+ if (p->flags & _WSNF_QUOTE)
+ continue;
/* Skip leading whitespace: */
for (n = p->v.segm.beg; n < p->v.segm.end && ISWS (wsp->ws_input[n]);
diff --git a/libmailutils/tests/wordsplit.at b/libmailutils/tests/wordsplit.at
index 8bcd1bb..1131a51 100644
--- a/libmailutils/tests/wordsplit.at
+++ b/libmailutils/tests/wordsplit.at
@@ -324,5 +324,15 @@ TESTWSP([delimiter following empty quotes],[],[delim : ws
return_delims],
2: r
])
+TESTWSP([suppress ws trimming within quotes],[],
+[default delim , ws return_delims],
+[nocomponent,nonewline, formatfield="In message %{text}, "],
+[NF: 5
+0: nocomponent
+1: ,
+2: nonewline
+3: ,
+4: "formatfield=In message %{text}, "
+])
m4_popdef([TESTWSP])
diff --git a/libmu_auth/ldap.c b/libmu_auth/ldap.c
index 5de7834..6a763aa 100644
--- a/libmu_auth/ldap.c
+++ b/libmu_auth/ldap.c
@@ -598,10 +598,9 @@ chk_md5 (const char *db_pass, const char *pass)
mu_md5_process_bytes (pass, strlen (pass), &md5context);
mu_md5_finish_ctx (&md5context, md5digest);
- mu_memory_stream_create (&str, 0);
+ mu_static_memory_stream_create (&str, db_pass, strlen (db_pass));
mu_filter_create (&flt, str, "base64", MU_FILTER_DECODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
- mu_stream_write (str, db_pass, strlen (db_pass), NULL);
mu_stream_read (flt, (char*) d1, sizeof d1, NULL);
mu_stream_destroy (&flt);
@@ -620,11 +619,10 @@ chk_smd5 (const char *db_pass, const char *pass)
mu_stream_t str = NULL, flt = NULL;
size_t size;
- mu_memory_stream_create (&str, 0);
+ size = strlen (db_pass);
+ mu_static_memory_stream_create (&str, db_pass, size);
mu_filter_create (&flt, str, "base64", MU_FILTER_DECODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
- size = strlen (db_pass);
- mu_stream_write (str, db_pass, size, NULL);
d1 = malloc (size);
if (!d1)
@@ -665,10 +663,9 @@ chk_sha (const char *db_pass, const char *pass)
mu_sha1_process_bytes (pass, strlen (pass), &sha1context);
mu_sha1_finish_ctx (&sha1context, sha1digest);
- mu_memory_stream_create (&str, 0);
+ mu_static_memory_stream_create (&str, db_pass, strlen (db_pass));
mu_filter_create (&flt, str, "base64", MU_FILTER_DECODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
- mu_stream_write (str, db_pass, strlen (db_pass), NULL);
mu_stream_read (flt, (char*) d1, sizeof d1, NULL);
mu_stream_destroy (&flt);
@@ -687,11 +684,10 @@ chk_ssha (const char *db_pass, const char *pass)
mu_stream_t str = NULL, flt = NULL;
size_t size;
- mu_memory_stream_create (&str, 0);
+ size = strlen (db_pass);
+ mu_static_memory_stream_create (&str, db_pass, size);
mu_filter_create (&flt, str, "base64", MU_FILTER_DECODE,
MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
- size = strlen (db_pass);
- mu_stream_write (str, db_pass, size, NULL);
d1 = malloc (size);
if (!d1)
diff --git a/libmu_sieve/extensions/vacation.c
b/libmu_sieve/extensions/vacation.c
index 3e3b595..a4613a7 100644
--- a/libmu_sieve/extensions/vacation.c
+++ b/libmu_sieve/extensions/vacation.c
@@ -60,7 +60,7 @@ build_mime (mu_sieve_machine_t mach, mu_list_t tags,
mu_mime_t *pmime,
mu_message_create (&newmsg, NULL);
mu_message_get_body (newmsg, &body);
- if ((rc = mu_memory_stream_create (&input, MU_STREAM_RDWR)))
+ if ((rc = mu_static_memory_stream_create (&input, text, strlen (text))))
{
mu_sieve_error (mach,
_("cannot create temporary stream: %s"),
@@ -70,8 +70,6 @@ build_mime (mu_sieve_machine_t mach, mu_list_t tags,
mu_mime_t *pmime,
return 1;
}
- mu_stream_write (input, text, strlen (text), NULL);
-
if (mu_sieve_tag_lookup (tags, "mime", NULL))
{
mu_stream_t fstr;
diff --git a/mh/Makefile.am b/mh/Makefile.am
index a78eb65..3e951f8 100644
--- a/mh/Makefile.am
+++ b/mh/Makefile.am
@@ -15,9 +15,9 @@
## You should have received a copy of the GNU General Public License
## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-SUBDIRS = . tests
+SUBDIRS = . etc tests
bindir = @MH_BIN_DIR@
-mhlibdir = $(pkgdatadir)/mh
+
bin_PROGRAMS = \
ali\
anno\
@@ -83,10 +83,6 @@ libmh_a_SOURCES= \
whatnowenv.c
noinst_HEADERS = mh.h mh_alias.h mh_format.h mh_getopt.h
-LISPSRC = mailutils-mh.el
address@hidden@
-EXTRA_LISP = mailutils-mh.el
-
BUILT_SOURCES= \
mh_fmtgram.c \
pick-gram.c \
@@ -97,16 +93,7 @@ BUILT_SOURCES= \
MAINTAINERCLEANFILES=$(BUILT_SOURCES)
-mhlib_DATA = components replcomps replgroupcomps mhl.format $(LISPSRC)
-EXTRA_DIST = components replcomps replgroupcomps mhl.format\
- mailutils-mh.eli mh_fmtgram.y pick.y mh_alias.y mh_alias.l
-DISTCLEANFILES = mailutils-mh.el
-
-SUFFIXES = .eli .el
-mailutils-mh.el: mailutils-mh.eli
-
-.eli.el:
- sed "s,BINDIR,$(bindir),g;s,MHLIBDIR,$(mhlibdir),g" $< > $@
+EXTRA_DIST = mailutils-mh.eli mh_fmtgram.y pick.y mh_alias.y mh_alias.l
INCLUDES = @MU_APP_COMMON_INCLUDES@
AM_CPPFLAGS = -D_GNU_SOURCE -DMHLIBDIR=\"$(mhlibdir)\" -DMHBINDIR=\"$(bindir)\"
diff --git a/mh/comp.c b/mh/comp.c
index c604618..7b62b95 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -75,7 +75,7 @@ struct mh_option mh_option[] = {
struct mh_whatnow_env wh_env = { 0 };
static int initial_edit = 1;
static const char *whatnowproc;
-const char *formfile;
+char *formfile;
static int build_only = 0; /* --build flag */
static int use_draft = 0; /* --use flag */
static char *draftmessage = "new";
@@ -110,7 +110,7 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FORM:
- formfile = mh_expand_name (MHLIBDIR, arg, 0);
+ mh_find_file (arg, &formfile);
break;
case ARG_DRAFTMESSAGE:
diff --git a/mh/components b/mh/etc/components
similarity index 100%
rename from mh/components
rename to mh/etc/components
diff --git a/mh/mailutils-mh.eli b/mh/etc/mailutils-mh.eli
similarity index 100%
rename from mh/mailutils-mh.eli
rename to mh/etc/mailutils-mh.eli
diff --git a/mh/mhl.format b/mh/etc/mhl.format
similarity index 100%
rename from mh/mhl.format
rename to mh/etc/mhl.format
diff --git a/mh/etc/mhl.forward b/mh/etc/mhl.forward
new file mode 100644
index 0000000..3baed14
--- /dev/null
+++ b/mh/etc/mhl.forward
@@ -0,0 +1,15 @@
+; This is the default mhl.format file for Mailutils MH.
+;
+; GNU Mailutils -- a suite of utilities for electronic mail
+; Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+; Distributed under GPLv3+. See <http://gnu.org/licenses/gpl.html>.
+;
+width=80,overflowtext=,overflowoffset=10
+leftadjust,compress,compwidth=9
+Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
+From:
+To:
+cc:
+Subject:
+:
+body:nocomponent,overflowoffset=0,noleftadjust,nocompress
diff --git a/mh/etc/mhl.repl b/mh/etc/mhl.repl
new file mode 100644
index 0000000..007617b
--- /dev/null
+++ b/mh/etc/mhl.repl
@@ -0,0 +1,8 @@
+; Default format file for GNU repl
+;
+; GNU Mailutils -- a suite of utilities for electronic mail
+; Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+; Distributed under GPLv3+. See <http://gnu.org/licenses/gpl.html>.
+;
+:
+body:nocomponent,offset=9
diff --git a/mh/etc/mhl.usenet b/mh/etc/mhl.usenet
new file mode 100644
index 0000000..e669d1c
--- /dev/null
+++ b/mh/etc/mhl.usenet
@@ -0,0 +1,10 @@
+; USENET-style format file for GNU repl
+;
+; GNU Mailutils -- a suite of utilities for electronic mail
+; Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+; Distributed under GPLv3+. See <http://gnu.org/licenses/gpl.html>.
+;
+:
+message-id:nocomponent,nonewline,formatfield="In message %{text}, "
+from:nocomponent,formatfield="%(friendly{text}) writes:"
+body:component=">",overflowtext=">",overflowoffset=0
diff --git a/mh/replcomps b/mh/etc/replcomps
similarity index 100%
rename from mh/replcomps
rename to mh/etc/replcomps
diff --git a/mh/replgroupcomps b/mh/etc/replgroupcomps
similarity index 100%
rename from mh/replgroupcomps
rename to mh/etc/replgroupcomps
diff --git a/mh/forw.c b/mh/forw.c
index 4b12bb3..60baaaf 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -78,7 +78,7 @@ struct mh_option mh_option[] = {
{ "build" },
{ "file", MH_OPT_ARG, "msgfile" },
{ "form", MH_OPT_ARG, "formatfile" },
- { "format", MH_OPT_ARG, "string" },
+ { "format", MH_OPT_BOOL },
{ "draftfolder", MH_OPT_ARG, "folder" },
{ "nodraftfolder" },
{ "draftmessage" },
@@ -99,11 +99,13 @@ enum encap_type
encap_mime
};
-static char *formfile;
+char *formfile;
struct mh_whatnow_env wh_env = { 0 };
static int initial_edit = 1;
static const char *whatnowproc;
-static char *mhl_filter = NULL; /* --filter flag */
+
+static char *mhl_filter_file = NULL; /* --filter flag */
+
static int build_only = 0; /* --build flag */
static int annotate = 0; /* --annotate flag */
static enum encap_type encap = encap_clear; /* controlled by --format, --form
@@ -177,22 +179,25 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FORM:
- formfile = arg;
+ mh_find_file (arg, &formfile);
break;
case ARG_FORMAT:
if (is_true (arg))
{
encap = encap_mhl;
- break;
+ mh_find_file ("mhl.forward", &mhl_filter_file);
}
- /*FALLTHRU*/
- case ARG_NOFORMAT:
- if (encap == encap_mhl)
+ else
encap = encap_clear;
break;
+
+ case ARG_NOFORMAT:
+ encap = encap_clear;
+ break;
case ARG_FILTER:
+ mh_find_file (arg, &mhl_filter_file);
encap = encap_mhl;
break;
@@ -381,23 +386,16 @@ finish_draft ()
}
else
{
- if (!mhl_filter)
+ if (encap == encap_mhl)
{
- char *s = mh_expand_name (MHLIBDIR, "mhl.forward", 0);
- if (access (s, R_OK) == 0)
- mhl_filter = "mhl.forward";
- free (s);
+ if (mhl_filter_file)
+ {
+ format = mhl_format_compile (mhl_filter_file);
+ if (!format)
+ exit (1);
+ }
}
- if (mhl_filter)
- {
- char *s = mh_expand_name (MHLIBDIR, mhl_filter, 0);
- format = mhl_format_compile (s);
- if (!format)
- exit (1);
- free (s);
- }
-
if (annotate)
{
wh_env.anno_field = "Forwarded";
diff --git a/mh/mh.h b/mh/mh.h
index a4c66cf..21be165 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -314,6 +314,7 @@ void mh_msgset_free (mh_msgset_t *msgset);
void mh_msgset_uids (mu_mailbox_t mbox, mh_msgset_t *msgset);
char *mh_get_dir (void);
+int mh_find_file (const char *name, char **resolved_name);
char *mh_expand_name (const char *base, const char *name, int is_folder);
void mh_quote (const char *in, char **out);
void mh_expand_aliases (mu_message_t msg, mu_address_t *addr_to,
@@ -366,6 +367,7 @@ void mh_annotate (mu_message_t msg, char *field, char
*text, int date);
#define MHL_DISABLE_BODY 8
mu_list_t mhl_format_compile (char *name);
+
int mhl_format_run (mu_list_t fmt, int width, int length, int flags,
mu_message_t msg, mu_stream_t output);
void mhl_format_destroy (mu_list_t *fmt);
diff --git a/mh/mh_format.c b/mh/mh_format.c
index 523d943..a92fa5c 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -1583,7 +1583,20 @@ builtin_proper (struct mh_machine *mach)
static void
builtin_friendly (struct mh_machine *mach)
{
- /*FIXME: noop*/
+ mu_address_t addr;
+ const char *str;
+ int rc;
+
+ rc = mu_address_create (&addr, strobj_ptr (&mach->arg_str));
+ if (rc)
+ return;
+
+ if (mu_address_sget_personal (addr, 1, &str) == 0 && str)
+ {
+ strobj_free (&mach->arg_str);
+ strobj_create (&mach->arg_str, str);
+ }
+ mu_address_destroy (&addr);
}
/* addr addr string address@hidden or host!mbox rendering*/
@@ -1618,12 +1631,7 @@ builtin_pers (struct mh_machine *mach)
return;
if (mu_address_sget_personal (addr, 1, &str) == 0 && str)
- {
- char *p;
- mu_asprintf (&p, "\"%s\"", str);
- strobj_create (&mach->arg_str, p);
- free (p);
- }
+ strobj_create (&mach->arg_str, str);
mu_address_destroy (&addr);
}
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 2d2b0f4..45d725f 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -77,20 +77,34 @@ mh_read_formfile (char *name, char **pformat)
char *ptr;
size_t off = 0;
char *format_str;
-
- if (stat (name, &st))
+ char *file_name;
+ int rc;
+
+ rc = mh_find_file (name, &file_name);
+ if (rc)
+ {
+ mu_error (_("cannot access format file %s: %s"), name, strerror (rc));
+ return -1;
+ }
+
+ if (stat (file_name, &st))
{
- mu_error (_("cannot stat format file %s: %s"), name, strerror (errno));
+ mu_error (_("cannot stat format file %s: %s"), file_name,
+ strerror (errno));
+ free (file_name);
return -1;
}
- fp = fopen (name, "r");
+ fp = fopen (file_name, "r");
if (!fp)
{
- mu_error (_("cannot open format file %s: %s"), name, strerror (errno));
+ mu_error (_("cannot open format file %s: %s"), file_name,
+ strerror (errno));
+ free (file_name);
return -1;
}
-
+ free (file_name);
+
format_str = xmalloc (st.st_size+1);
while ((ptr = fgets (format_str + off, st.st_size - off + 1, fp)) != NULL)
{
@@ -520,6 +534,64 @@ mh_expand_name (const char *base, const char *name, int
is_folder)
}
int
+mh_find_file (const char *name, char **resolved_name)
+{
+ char *s;
+ int rc;
+
+ if (name[0] == '/' ||
+ (name[0] == '.' && name[1] == '/') ||
+ (name[0] == '.' && name[1] == '.' && name[2] == '/'))
+ {
+ *resolved_name = xstrdup (name);
+ if (access (name, R_OK) == 0)
+ return 0;
+ return errno;
+ }
+
+ if (name[0] == '~')
+ {
+ s = mu_tilde_expansion (name, "/", NULL);
+ *resolved_name = s;
+ if (access (s, R_OK) == 0)
+ return 0;
+ return errno;
+ }
+
+ s = mh_expand_name (NULL, name, 0);
+ if (access (s, R_OK) == 0)
+ {
+ *resolved_name = s;
+ return 0;
+ }
+ if (errno != ENOENT)
+ mu_diag_output (MU_DIAG_WARNING,
+ _("cannot access %s: %s"), s, mu_strerror (errno));
+ free (s);
+
+ s = mh_expand_name (mh_global_profile_get ("mhetcdir", MHLIBDIR), name, 0);
+ if (access (s, R_OK) == 0)
+ {
+ *resolved_name = s;
+ return 0;
+ }
+ if (errno != ENOENT)
+ mu_diag_output (MU_DIAG_WARNING,
+ _("cannot access %s: %s"), s, mu_strerror (errno));
+ free (s);
+
+ *resolved_name = xstrdup (name);
+ if (access (name, R_OK) == 0)
+ return 0;
+ rc = errno;
+ if (rc != ENOENT)
+ mu_diag_output (MU_DIAG_WARNING,
+ _("cannot access %s: %s"), s, mu_strerror (rc));
+
+ return rc;
+}
+
+int
mh_iterate (mu_mailbox_t mbox, mh_msgset_t *msgset,
mh_iterator_fp itr, void *data)
{
diff --git a/mh/mh_list.c b/mh/mh_list.c
index 4761ace..4bc9583 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -700,8 +700,6 @@ eval_body (struct eval_env *env)
if (env->bvar[B_DISABLE_BODY])
return 0;
- print_component_name (env);
-
env->prefix = env->svar[S_COMPONENT];
mu_message_get_body (env->msg, &body);
@@ -728,7 +726,7 @@ eval_body (struct eval_env *env)
while (mu_stream_readline (input, buf, sizeof buf, &n) == 0
&& n > 0)
{
- buf[n] = 0;
+ goto_offset (env, env->ivar[I_OFFSET]);
print (env, buf, 0);
nl = buf[n-1] == '\n';
}
diff --git a/mh/mhl.c b/mh/mhl.c
index 1d6635f..e81933d 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -99,7 +99,7 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FORM:
- formfile = arg;
+ mh_find_file (arg, &formfile);
break;
case ARG_WIDTH:
diff --git a/mh/repl.c b/mh/repl.c
index 8629d61..c7ca5b3 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -55,6 +55,7 @@ static struct argp_option options[] = {
{"form", ARG_FORM, N_("FILE"), 0, N_("read format from given file")},
{"format", ARG_FORMAT, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("include a copy of the message being replied; the message will be
processed using either the default filter \"mhl.reply\", or the filter
specified by --filter option") },
+ {"noformat", ARG_NOFORMAT, 0, OPTION_HIDDEN, "" },
{"inplace", ARG_INPLACE, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("* annotate the message in place")},
{"query", ARG_QUERY, N_("BOOL"), OPTION_ARG_OPTIONAL,
@@ -178,17 +179,15 @@ opt_handler (int key, char *arg, struct argp_state *state)
case ARG_FORM:
free (format_str);
format_str = NULL;
- s = mh_expand_name (MHLIBDIR, arg, 0);
- mh_read_formfile (s, &format_str);
- free (s);
+ if (mh_read_formfile (arg, &format_str))
+ exit (1);
break;
case ARG_GROUP:
if (is_true (arg))
{
- s = mh_expand_name (MHLIBDIR, "replgroupcomps", 0);
- mh_read_formfile (s, &format_str);
- free (s);
+ if (mh_read_formfile ("replgroupcomps", &format_str))
+ exit (1);
rcpt_mask |= RCPT_ALL;
}
else
@@ -229,18 +228,19 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FILTER:
- mhl_filter = arg;
+ mh_find_file (arg, &mhl_filter);
break;
case ARG_FORMAT:
if (is_true (arg))
- {
- if (!mhl_filter)
- mhl_filter = mh_expand_name (MHLIBDIR, "mhl.repl", 0);
- }
+ mh_find_file ("mhl.repl", &mhl_filter);
else
mhl_filter = NULL;
break;
+
+ case ARG_NOFORMAT:
+ mhl_filter = NULL;
+ break;
case ARG_FCC:
if (!has_fcc)
diff --git a/mh/scan.c b/mh/scan.c
index 05ec180..07908de 100644
--- a/mh/scan.c
+++ b/mh/scan.c
@@ -99,7 +99,8 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FORM:
- mh_read_formfile (arg, &format_str);
+ if (mh_read_formfile (arg, &format_str))
+ exit (1);
break;
case ARG_FORMAT:
diff --git a/mh/tests/comp.at b/mh/tests/comp.at
index ced3de9..4ffa81b 100644
--- a/mh/tests/comp.at
+++ b/mh/tests/comp.at
@@ -16,7 +16,7 @@
m4_pushdef([MH_KEYWORDS],[comp])
m4_pushdef([compcmd],[comp dnl
--form $abs_top_srcdir/mh/components dnl
+-form components dnl
-editor $abs_top_srcdir/mh/tests/mhed])
MH_CHECK([comp -file],[comp00 comp-file],[
diff --git a/mh/tests/forw.at b/mh/tests/forw.at
index 9d4b31d..16c83da 100644
--- a/mh/tests/forw.at
+++ b/mh/tests/forw.at
@@ -16,7 +16,7 @@
m4_pushdef([MH_KEYWORDS],[forw])
m4_pushdef([forwcmd],[forw dnl
--form $abs_top_srcdir/mh/components dnl
+-form components dnl
-editor $abs_top_srcdir/mh/tests/mhed])
MH_CHECK([forw msg],[forw00 forw-msg],[
@@ -80,7 +80,68 @@ Subject: test input
message body
])
-MH_CHECK([forw msgs],[forw01 forw-msgs],[
+MH_CHECK([forw -format msg],[forw01 forw-format-msg],[
+mkdir Mail/inbox
+AT_DATA([Mail/inbox/1],[From: gray
+To: root
+Subject: test input
+
+message body
+])
+
+dir=`pwd`
+echo quit | forwcmd -format +inbox 1 | sed "s|$dir/*||;s| *$||"
+echo == Mail/draft ==
+cat Mail/draft
+echo == Message ==
+# FIXME: AMD adds this header to the first message. Find a better way.
+# See also the same sed hacks below.
+sed '/^X-IMAPbase/d' Mail/inbox/1
+],
+[0],
+[-- Editor invocation: Mail/draft
+-- Input file:
+To:
+cc:
+Subject:
+--------
+
+------- Forwarded message
+From: gray
+To: root
+Subject: test input
+
+message body
+
+------- End of Forwarded message
+
+-- Input file end
+What now? draft left on "Mail/draft".
+== Mail/draft ==
+To:
+cc:
+Subject:
+--------
+
+------- Forwarded message
+From: gray
+To: root
+Subject: test input
+
+message body
+
+------- End of Forwarded message
+
+Seen by mhed
+== Message ==
+From: gray
+To: root
+Subject: test input
+
+message body
+])
+
+MH_CHECK([forw msgs],[forw02 forw-msgs],[
mkdir Mail/inbox
AT_DATA([Mail/inbox/1],[From: gray
To: root
@@ -171,7 +232,7 @@ Subject: 2nd message
2nd message body
])
-MH_CHECK([forw -build msg],[forw02 forw-build-msg],[
+MH_CHECK([forw -build msg],[forw03 forw-build-msg],[
mkdir Mail/inbox
AT_DATA([Mail/inbox/1],[From: gray
To: root
@@ -211,7 +272,7 @@ Subject: test input
message body
])
-MH_CHECK([forw -build -mime msgs],[forw03 forw-build-mime-msg],[
+MH_CHECK([forw -build -mime msgs],[forw04 forw-build-mime-msg],[
mkdir Mail/inbox
AT_DATA([Mail/inbox/1],[From: gray
To: root
@@ -257,7 +318,7 @@ Subject: 2nd message
2nd message body
])
-MH_CHECK([forw -draftfolder],[forw04 forw-draftfolder draftfolder],[
+MH_CHECK([forw -draftfolder],[forw05 forw-draftfolder draftfolder],[
mkdir Mail/inbox
mkdir Mail/drafts
AT_DATA([Mail/inbox/1],[From: gray
@@ -316,7 +377,7 @@ Subject: test input
message body
])
-MH_CHECK([forw -file],[forw05 forw-file],[
+MH_CHECK([forw -file],[forw06 forw-file],[
AT_DATA([infile],[From: gray
To: root
Subject: test input
diff --git a/mh/tests/inc.at b/mh/tests/inc.at
index e2150c8..22d17c6 100644
--- a/mh/tests/inc.at
+++ b/mh/tests/inc.at
@@ -22,8 +22,8 @@ inc -notruncate -file ./mbox1 | sed 's/ *$//'
cmp $abs_top_srcdir/testsuite/spool/mbox1 mbox1
],
[0],
-[ 1+ 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 1+ 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -36,8 +36,8 @@ echo "Next"
inc -truncate -file ./mbox1 | sed 's/ *$//'
],
[0],
-[ 1+ 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 1+ 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -50,8 +50,8 @@ mkdir Mail/new
inc +new -file ./mbox1 | sed 's/ *$//'
],
[0],
-[ 1+ 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 1+ 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -63,8 +63,8 @@ MUT_MBCOPY([$abs_top_srcdir/testsuite/spool/mbox1])
inc -changecur -file ./mbox1 | sed 's/ *$//'
],
[0],
-[ 6+ 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 7 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 6+ 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 7 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
8 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
9 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
10 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -78,8 +78,8 @@ inc -nochangecur -file ./mbox1 | sed 's/ *$//'
grep ^cur: Mail/inbox/.mh_sequences
],
[0],
-[ 6 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 7 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 6 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 7 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
8 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
9 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
10 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
diff --git a/mh/tests/mhl.at b/mh/tests/mhl.at
index c9c99da..a498e2d 100644
--- a/mh/tests/mhl.at
+++ b/mh/tests/mhl.at
@@ -18,7 +18,7 @@ m4_pushdef([MH_KEYWORDS],[mhl])
MH_CHECK([mhl],[mhl00],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox])
-mhl -form $abs_top_srcdir/mh/mhl.format Mail/inbox/2
+mhl -form mhl.format Mail/inbox/2
],
[0],
[ -- using template mhl.format --
@@ -34,5 +34,28 @@ X-Envelope-Sender: address@hidden
I don't see any wine
])
+MH_CHECK([mhl repl],[mhl01 mhl.repl],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox])
+mhl -form mhl.repl Mail/inbox/15
+],
+[0],
+[
+ Not the same thing a bit! You might just
+ as well say that "I see what I eat" is the same thing as "I eat
+ what I see"!
+])
+
+MH_CHECK([mhl usenet],[mhl02 mhl.usenet],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox])
+mhl -form mhl.usenet Mail/inbox/15
+],
+[0],
+[
+In message <address@hidden>, Hatter writes:
+>Not the same thing a bit! You might just
+>as well say that "I see what I eat" is the same thing as "I eat
+>what I see"!
+])
+
m4_popdef[MH_KEYWORDS])
# End of mhl.at
diff --git a/mh/tests/mhparam.at b/mh/tests/mhparam.at
index 7d602d5..a363c46 100644
--- a/mh/tests/mhparam.at
+++ b/mh/tests/mhparam.at
@@ -22,10 +22,11 @@ Sequence-Negation: not
Draft-Folder: Mail/drafts
Aliasfile: .mh_aliases
EOT
-mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path: Mail/;s/ */ /g'
+mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path:
Mail/;s/^mhetcdir:.*/mhetcdir: dir/;s/ */ /g'
],
[0],
[Path: Mail
+mhetcdir: dir
Sequence-Negation: not
Draft-Folder: Mail/drafts
Aliasfile: .mh_aliases
diff --git a/mh/tests/scan.at b/mh/tests/scan.at
index 9436742..9bd9888 100644
--- a/mh/tests/scan.at
+++ b/mh/tests/scan.at
@@ -22,8 +22,8 @@ echo "Current-Folder: inbox" > Mail/context
scan | sed 's/ *$//'
],
[0],
-[ 1 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 1 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -34,8 +34,8 @@ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
scan +inbox | sed 's/ *$//'
],
[0],
-[ 1 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
+[ 1 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy
toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0 Content-
@@ -43,7 +43,7 @@ scan +inbox | sed 's/ *$//'
MH_CHECK([scan -format],[scan02 scan-format],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail])
-scan +mbox1 -format '%4(msg) %(decode(friendly{from})) -
%(decode(friendly{to}))'
+scan +mbox1 -format '%4(msg) %{from} - %{to}'
],
[0],
[ 1 Foo Bar <address@hidden> - Bar <address@hidden>
@@ -59,11 +59,11 @@ echo '%4(msg) %(decode(friendly{from})) -
%(decode(friendly{to}))' > formfile
scan +mbox1 -form formfile
],
[0],
-[ 1 Foo Bar <address@hidden> - Bar <address@hidden>
- 2 Bar <address@hidden> - Foo Bar <address@hidden>
- 3 Sergey Poznyakoff <address@hidden> - Foo Bar <address@hidden>
- 4 Sergey Poznyakoff <address@hidden> - Foo Bar <address@hidden>
- 5 Sergey Poznyakoff <address@hidden> - Foo Bar <address@hidden>
+[ 1 Foo Bar - Bar
+ 2 Bar - Foo Bar
+ 3 Sergey Poznyakoff - Foo Bar
+ 4 Sergey Poznyakoff - Foo Bar
+ 5 Sergey Poznyakoff - Foo Bar
])
MH_CHECK([scan -reverse],[scan04 scan-reverse],[
@@ -74,8 +74,8 @@ scan +mbox1 -reverse | sed 's/ *$//'
[ 5 07/13 Sergey Poznyakoff Empty MIME Parts<<------- =_aaaaaaaaaa0
Content-
4 07/13 Sergey Poznyakoff Nested MIME<<------- =_aaaaaaaaaa0 Content-Type:
3 07/13 Sergey Poznyakoff Simple MIME<<------- =_aaaaaaaaaa0 Content-Type:
- 2 12/28 Bar <address@hidden Re: Jabberwocky<<It seems very pretty, but
it's
- 1 12/28 Foo Bar <address@hidden Jabberwocky<<`Twas brillig, and the
slithy toves
+ 2 12/28 Bar Re: Jabberwocky<<It seems very pretty, but it's
+ 1 12/28 Foo Bar Jabberwocky<<`Twas brillig, and the slithy toves
])
m4_popdef[MH_KEYWORDS])
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index f06f082..0b708f6 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -21,7 +21,10 @@ test -d Mail || mkdir Mail
dir=`pwd`
MH=$dir/mh_profile
export MH
-echo "Path: $dir/Mail" > $MH
+cat > $MH <<EOT
+Path: $dir/Mail
+mhetcdir: $abs_top_srcdir/mh/etc
+EOT
exec <&-
])
hooks/post-receive
--
GNU Mailutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Mailutils branch, master, updated. release-2.2-219-ge53b558,
Sergey Poznyakoff <=