Commit 8ef7c0ad 8ef7c0ad473e5271fb349a69c819675e242235a2 by Sergey Poznyakoff

Implement two new Scheme functions.

* NEWS: Update.
* configure.ac: Version 2.99.97
* libmu_scm/mu_mailbox.c (mu-mailbox-sync)
(mu-mailbox-flush): New functions.
1 parent 4c2e6902
GNU mailutils NEWS -- history of user-visible changes. 2012-05-31
GNU mailutils NEWS -- history of user-visible changes. 2012-06-07
Copyright (C) 2002-2012 Free Software Foundation, Inc.
See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 2.99.96 (Git)
Version 2.99.97 (Git)
This version is a major rewrite of GNU Mailutils. Quite a few parts
of the basic framework were rewritten from scratch, while some others
......@@ -254,6 +254,24 @@ See <http://mailutils.org/wiki/debug_level>.
** Configuration file support (libmu_cfg) rewritten.
* New Scheme primitives
** mu-mailbox-sync
Synchronizes the changes done to the mailbox with its external
storage.
** mu-mailbox-expunge
Similar to mu-mailbox-sync, but also permanently removes messages
marked for deletion.
** mu-mailbox-flush
Marks all messages as seen, and synchronizes the changes with the
mailbox external storage. Depending on its second argument, removes
messages marked for deletion.
Version 2.2 - 2010-09-08
......
......@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
AC_INIT([GNU Mailutils], [2.99.96], [bug-mailutils@gnu.org], [mailutils])
AC_INIT([GNU Mailutils], [2.99.97], [bug-mailutils@gnu.org], [mailutils])
AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules])
......
......@@ -373,6 +373,51 @@ SCM_DEFINE_PUBLIC (scm_mu_mailbox_expunge, "mu-mailbox-expunge", 1, 0, 0,
}
#undef FUNC_NAME
SCM_DEFINE_PUBLIC (scm_mu_mailbox_sync, "mu-mailbox-sync", 1, 0, 0,
(SCM mbox),
"Synchronize changes to @var{mbox} with its storage.")
#define FUNC_NAME s_scm_mu_mailbox_sync
{
struct mu_mailbox *mum;
int status;
SCM_ASSERT (mu_scm_is_mailbox (mbox), mbox, SCM_ARG1, FUNC_NAME);
mum = (struct mu_mailbox *) SCM_CDR (mbox);
status = mu_mailbox_sync (mum->mbox);
if (status)
mu_scm_error (FUNC_NAME, status,
"Sync failed for mailbox ~A",
scm_list_1 (mbox));
return SCM_BOOL_T;
}
#undef FUNC_NAME
SCM_DEFINE_PUBLIC (scm_mu_mailbox_flush, "mu-mailbox-flush", 1, 1, 0,
(SCM mbox, SCM expunge),
"Mark all messages in @var{mbox} as seen and synchronize all changes with "
"its storage. If @var{expunge} is @samp{#t}, expunge deleted messages "
"as well.")
#define FUNC_NAME s_scm_mu_mailbox_flush
{
struct mu_mailbox *mum;
int status, do_expunge = 0;
SCM_ASSERT (mu_scm_is_mailbox (mbox), mbox, SCM_ARG1, FUNC_NAME);
mum = (struct mu_mailbox *) SCM_CDR (mbox);
if (!SCM_UNBNDP (expunge))
{
SCM_ASSERT (scm_is_bool (expunge), expunge, SCM_ARG2, FUNC_NAME);
do_expunge = expunge == SCM_BOOL_T;
}
status = mu_mailbox_flush (mum->mbox, do_expunge);
if (status)
mu_scm_error (FUNC_NAME, status,
"Flush failed for mailbox ~A",
scm_list_1 (mbox));
return SCM_BOOL_T;
}
#undef FUNC_NAME
SCM_DEFINE_PUBLIC (scm_mu_mailbox_append_message, "mu-mailbox-append-message", 2, 0, 0,
(SCM mbox, SCM mesg),
"Appends message @var{mesg} to the mailbox @var{mbox}.")
......