commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-291-gc5f1126


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-291-gc5f1126
Date: Thu, 16 Dec 2010 10:39:27 +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=c5f1126fe5883c0a8a22fb0ad8de18b8cfd6650e

The branch, master has been updated
       via  c5f1126fe5883c0a8a22fb0ad8de18b8cfd6650e (commit)
       via  074a14853c501529630b5b7c762cbb49711b5e73 (commit)
      from  45c0bb9011bdfb74d77d6ca90481441844612692 (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 c5f1126fe5883c0a8a22fb0ad8de18b8cfd6650e
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Dec 16 11:53:42 2010 +0200

    Mark unfinished interfaces as experimental so they're not built by default.
    
    * am/enable.m4 (MU_ENABLE_SUPPORT): Fix the usage of the last argument.
    * configure.ac: Check for --enable-experimental before any other checks.
    Mark cxx, python and nntp as experimental.
    * mh/tests/mhn.at: Make sure all mailboxes are writable.
    * mh/tests/testsuite.at (MTSTAILOR): Fix mailer URL.
    * po/POTFILES.in: Comment out unused sources.

commit 074a14853c501529630b5b7c762cbb49711b5e73
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Dec 16 10:49:44 2010 +0200

    Remove the leftovers of mu_debug_t and obsoleted sieve interfaces.
    
    * include/mailutils/cpp/debug.h: Remove.
    * include/mailutils/cpp/Makefile.am (cppinclude_HEADERS): Remove debug.h
    * libmu_cpp/debug.cc: Remove
    * libmu_cpp/Makefile.am (libmu_cpp_la_SOURCES): Remove debug.cc.
    * python/libmu_py/debug.c: Remove.
    * python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Remove debug.c
    * include/mailutils/cpp/mailbox.h: Remove objects and methods derived
    from mu_debug_t.
    * include/mailutils/cpp/mailer.h: Likewise.
    * include/mailutils/cpp/stream.h: Likewise.
    * libmu_cpp/mailbox.cc: Likewise.
    * libmu_cpp/mailer.cc: Likewise.
    * libmu_cpp/sieve.cc: Likewise.  Ditto for mu_sieve_printf_t,
    mu_sieve_parse_error_t.
    * include/mailutils/cpp/sieve.h: Likewise.
    
    * libmu_cpp/stream.cc: Remove objects and methods derived
    from mu_debug_t.
    (ProgStream::ProgStream): Use mu_command_stream_create (see FIXME).
    (FilterProgStream::FilterProgStream): Rewrite.
    
    * include/mailutils/python.h: Remove objects and methods derived
    from mu_debug_t.
    * python/libmu_py/filter.c (api_filter_iconv_create): Rewrite using
    mu_filter_create_args.
    
    * python/libmu_py/libmu_py.c: Likewise.
    * python/libmu_py/libmu_py.h: Likewise.
    * python/libmu_py/mailbox.c: Likewise.
    * python/libmu_py/mailer.c: Likewise.
    * python/libmu_py/stream.c: Likewise.
    * python/libmu_py/url.c: Likewise.
    * python/libmu_py/sieve.c: Likewise.  Same for mu_sieve_printf_t,
    mu_sieve_parse_error_t.

-----------------------------------------------------------------------

Summary of changes:
 am/enable.m4                      |   13 +-
 configure.ac                      |   30 +++--
 include/mailutils/cpp/Makefile.am |    1 -
 include/mailutils/cpp/debug.h     |   44 ------
 include/mailutils/cpp/mailbox.h   |    2 -
 include/mailutils/cpp/mailer.h    |    2 -
 include/mailutils/cpp/sieve.h     |    3 -
 include/mailutils/cpp/stream.h    |    2 +
 include/mailutils/python.h        |   11 --
 libmu_cpp/Makefile.am             |    1 -
 libmu_cpp/debug.cc                |   46 -------
 libmu_cpp/mailbox.cc              |   12 --
 libmu_cpp/mailer.cc               |   12 --
 libmu_cpp/sieve.cc                |   25 +----
 libmu_cpp/stream.cc               |   30 +++--
 mh/tests/mhn.at                   |   11 ++
 mh/tests/testsuite.at             |    2 +-
 po/POTFILES.in                    |    2 +-
 python/libmu_py/Makefile.am       |    1 -
 python/libmu_py/debug.c           |  175 ------------------------
 python/libmu_py/filter.c          |   10 +-
 python/libmu_py/libmu_py.c        |    1 -
 python/libmu_py/libmu_py.h        |    2 +
 python/libmu_py/mailbox.c         |   19 ---
 python/libmu_py/mailer.c          |   19 ---
 python/libmu_py/sieve.c           |  266 +++++++------------------------------
 python/libmu_py/stream.c          |   16 ++-
 python/libmu_py/url.c             |    1 -
 28 files changed, 132 insertions(+), 627 deletions(-)
 delete mode 100644 include/mailutils/cpp/debug.h
 delete mode 100644 libmu_cpp/debug.cc
 delete mode 100644 python/libmu_py/debug.c

diff --git a/am/enable.m4 b/am/enable.m4
index 0596812..80ea96e 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -34,16 +34,15 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
         esac],
                       [mu_cache_var=ifelse([$4],,yes,[$4])])
 
-       if test x"[$]mu_cache_var" = x"yes"; then
+       if test "[$]mu_cache_var" = "yes"; then
                ifelse([$2],,:,[$2])
        ifelse([$3],,,else
                [$3])
        fi
-       if test x"[$]mu_cache_var" = x"yes"; then
+       if test "[$]mu_cache_var" = "yes"; then
                AC_DEFINE([ENABLE_]mu_upcase,1,[Define this if you enable $1 
support])
         fi
-       AM_CONDITIONAL(mu_cond,
-                      [test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4])])
+       AM_CONDITIONAL(mu_cond, [test "[$]mu_cache_var" = "yes"])
        popdef([mu_cond])
        popdef([mu_cache_var])
        popdef([mu_upcase])
@@ -67,16 +66,16 @@ AC_DEFUN([MU_ENABLE_BUILD], [
         esac],
                       [mu_cache_var=ifelse([$5],,yes,[$5])])
 
-       if test x"[$]mu_cache_var" = x"yes"; then
+       if test "[$]mu_cache_var" = "yes"; then
                ifelse([$2],,:,[$2])
        ifelse([$3],,,else
                [$3])
        fi
-       if test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4]); then
+       if test "[$]mu_cache_var" = "yes"; then
                AC_DEFINE([MU_BUILD_]mu_upcase,1,[Define this if you build $1])
         fi
        AM_CONDITIONAL(mu_cond,
-                      [test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4])])
+                      [test "[$]mu_cache_var" = "yes"])
        
        popdef([mu_upcase])
        popdef([mu_cache_var])
diff --git a/configure.ac b/configure.ac
index 447701f..7924fc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,13 @@ fi
 
 MU_DEBUG_MODE
 
+# For adventurous characters: enable experimental/unfinished/buggy stuff
+AC_ARG_ENABLE([experimental],
+              AC_HELP_STRING([--enable-experimental],
+                             [build experimental and/or unfinished utilities]),
+              [mu_build_experimental="${enableval}"],
+              [mu_build_experimental=no])
+
 # Initialize authlibs
 
 AC_SUBST(MU_AUTHLIBS)
@@ -802,7 +809,8 @@ MU_ENABLE_SUPPORT([imap],
 MU_ENABLE_SUPPORT([pop],
          [MU_LIB_POP='${top_builddir}/libproto/pop/libmu_pop.la'])
 MU_ENABLE_SUPPORT([nntp],
-         [MU_LIB_NNTP='${top_builddir}/libproto/nntp/libmu_nntp.la'])
+         [MU_LIB_NNTP='${top_builddir}/libproto/nntp/libmu_nntp.la'],[],
+        [$mu_build_experimental])
 MU_ENABLE_SUPPORT([mh],
          [MU_LIB_MH='${top_builddir}/libproto/mh/libmu_mh.la'])
 MU_ENABLE_SUPPORT([maildir],
@@ -826,12 +834,6 @@ MU_ENABLE_SUPPORT(radius,
                                  mu_cv_enable_radius=yes],
                                 [mu_cv_enable_radius=no])]) 
 
-AC_ARG_ENABLE([experimental],
-              AC_HELP_STRING([--enable-experimental],
-                             [build experimental and/or unfinished utilities]),
-              [mu_build_experimental="${enableval}"],
-              [mu_build_experimental=no])
-
 if test x"$testpam" = x"yes"; then
        AC_CHECK_HEADERS(security/pam_appl.h)
        if test x"$ac_cv_header_security_pam_appl_h" = x"yes"; then
@@ -1097,7 +1099,7 @@ case "${enableval}" in
   yes) status_python=yes ;;
   no)  status_python=no ;;
   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;;
-esac],[status_python=yes])
+esac],[status_python=$mu_build_experimental])
 
 AC_SUBST(PYTHON_LIBS)
 AC_SUBST(PYTHON_INCLUDES)
@@ -1137,7 +1139,9 @@ AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = 
yes])
 AC_SUBST(MU_CXX_EXAMPLES_BUILD)
 MU_ENABLE_SUPPORT(cxx,
                  [MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'
-                   MU_LIB_CPP='${top_builddir}/libmu_cpp/libmu_cpp.la'])
+                   MU_LIB_CPP='${top_builddir}/libmu_cpp/libmu_cpp.la'],
+                 [],
+                 [$mu_build_experimental])
 
 # Default mailbox record
 # Note: 1. Support for mbox type is always enabled.
@@ -1181,14 +1185,18 @@ MU_ENABLE_BUILD(comsat)
 MU_ENABLE_BUILD(maidag)
 MU_ENABLE_BUILD(mail)
 MU_ENABLE_BUILD(sieve)
-MU_ENABLE_BUILD(guimb,,,[test "$useguile" = yes])
+if test "$useguile" = "yes"; then
+  MU_ENABLE_BUILD(guimb,,,[$useguile])
+fi
 MU_ENABLE_BUILD(messages)
 MU_ENABLE_BUILD(readmsg)
 MU_ENABLE_BUILD(dotlock)
 MU_ENABLE_BUILD(movemail)
 MU_ENABLE_BUILD(mimeview)
 
-MU_ENABLE_BUILD(mh,,,[test "$mu_cv_enable_mh" = yes])
+if test "$mu_cv_enable_mh" = yes; then
+  MU_ENABLE_BUILD(mh)
+fi
 
 AC_SUBST(MH_BIN_DIR)
 
diff --git a/include/mailutils/cpp/Makefile.am 
b/include/mailutils/cpp/Makefile.am
index ad52dc3..4efd102 100644
--- a/include/mailutils/cpp/Makefile.am
+++ b/include/mailutils/cpp/Makefile.am
@@ -19,7 +19,6 @@ cppinclude_HEADERS = \
  address.h\
  attribute.h\
  body.h\
- debug.h\
  envelope.h\
  error.h\
  filter.h\
diff --git a/include/mailutils/cpp/debug.h b/include/mailutils/cpp/debug.h
deleted file mode 100644
index 15db126..0000000
--- a/include/mailutils/cpp/debug.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General
-   Public License along with this library.  If not, see 
-   <http://www.gnu.org/licenses/>. */
-
-#ifndef _MUCPP_DEBUG_H
-#define _MUCPP_DEBUG_H
-
-#include <string>
-#include <errno.h>
-#include <mailutils/debug.h>
-#include <mailutils/cpp/error.h>
-
-namespace mailutils
-{
-
-class Debug
-{
- protected:
-  mu_debug_t debug;
-
- public:
-  Debug ();
-  Debug (const mu_debug_t);
-
-  void set_level (const mu_log_level_t level);
-};
-
-}
-
-#endif // not _MUCPP_DEBUG_H
-
diff --git a/include/mailutils/cpp/mailbox.h b/include/mailutils/cpp/mailbox.h
index fe2db9d..54b680e 100644
--- a/include/mailutils/cpp/mailbox.h
+++ b/include/mailutils/cpp/mailbox.h
@@ -22,7 +22,6 @@
 #include <errno.h>
 #include <mailutils/mailbox.h>
 #include <mailutils/cpp/error.h>
-#include <mailutils/cpp/debug.h>
 #include <mailutils/cpp/folder.h>
 #include <mailutils/cpp/message.h>
 #include <mailutils/cpp/url.h>
@@ -54,7 +53,6 @@ class MailboxBase
   void unlock ();
   mu_off_t get_size ();
 
-  Debug& get_debug ();
   Folder& get_folder ();
   Url& get_url ();
 
diff --git a/include/mailutils/cpp/mailer.h b/include/mailutils/cpp/mailer.h
index b4be0f0..9d20d30 100644
--- a/include/mailutils/cpp/mailer.h
+++ b/include/mailutils/cpp/mailer.h
@@ -22,7 +22,6 @@
 #include <string>
 #include <errno.h>
 #include <mailutils/mailer.h>
-#include <mailutils/cpp/debug.h>
 #include <mailutils/cpp/message.h>
 #include <mailutils/cpp/address.h>
 
@@ -45,7 +44,6 @@ class Mailer
   void send_message (const Message& msg, const Address& from,
                     const Address& to);
 
-  Debug& get_debug ();
 };
 
 }
diff --git a/include/mailutils/cpp/sieve.h b/include/mailutils/cpp/sieve.h
index c1814b8..641b6b6 100644
--- a/include/mailutils/cpp/sieve.h
+++ b/include/mailutils/cpp/sieve.h
@@ -44,9 +44,6 @@ class SieveMachine
   void disass ();
   void mailbox (const Mailbox& mbox);
   void message (const Message& msg);
-  void set_debug (mu_sieve_printf_t printer);
-  void set_error (mu_sieve_printf_t printer);
-  void set_parse_error (mu_sieve_parse_error_t printer);
   void set_logger (mu_sieve_action_log_t printer);
 };
 
diff --git a/include/mailutils/cpp/stream.h b/include/mailutils/cpp/stream.h
index 5f53e7b..80ab125 100644
--- a/include/mailutils/cpp/stream.h
+++ b/include/mailutils/cpp/stream.h
@@ -22,6 +22,8 @@
 #include <string>
 #include <errno.h>
 #include <mailutils/stream.h>
+#include <mailutils/prog.h>
+#include <mailutils/wordsplit.h>
 #include <mailutils/cpp/error.h>
 
 namespace mailutils
diff --git a/include/mailutils/python.h b/include/mailutils/python.h
index 81348fb..2505293 100644
--- a/include/mailutils/python.h
+++ b/include/mailutils/python.h
@@ -69,12 +69,6 @@ typedef struct
 typedef struct
 {
   PyObject_HEAD;
-  mu_debug_t dbg;
-} PyDebug;
-
-typedef struct
-{
-  PyObject_HEAD;
   mu_envelope_t env;
 } PyEnvelope;
 
@@ -158,7 +152,6 @@ extern int mu_py_init_address (void);
 extern int mu_py_init_attribute (void);
 extern int mu_py_init_auth (void);
 extern int mu_py_init_body (void);
-extern int mu_py_init_debug (void);
 extern int mu_py_init_envelope (void);
 extern int mu_py_init_header (void);
 extern int mu_py_init_folder (void);
@@ -182,7 +175,6 @@ extern PyTicket * PyTicket_NEW ();
 extern PyWicket * PyWicket_NEW ();
 extern PyAuthData * PyAuthData_NEW ();
 extern PyBody * PyBody_NEW ();
-extern PyDebug * PyDebug_NEW ();
 extern PyEnvelope * PyEnvelope_NEW ();
 extern PyFolder * PyFolder_NEW ();
 extern PyHeader * PyHeader_NEW ();
@@ -223,9 +215,6 @@ extern void mu_py_script_finish (void);
 extern int  mu_py_script_run (const char *filename,
                              mu_py_script_data *data);
 
-extern void mu_py_capture_stdout (mu_debug_t debug);
-extern void mu_py_capture_stderr (mu_debug_t debug);
-
 extern int  mu_py_script_process_mailbox (int argc, char *argv[],
                                          const char *python_filename,
                                          const char *module_name,
diff --git a/libmu_cpp/Makefile.am b/libmu_cpp/Makefile.am
index b89cd22..05c81ae 100644
--- a/libmu_cpp/Makefile.am
+++ b/libmu_cpp/Makefile.am
@@ -23,7 +23,6 @@ libmu_cpp_la_SOURCES = \
  address.cc\
  attribute.cc\
  body.cc\
- debug.cc\
  envelope.cc\
  filter.cc\
  folder.cc\
diff --git a/libmu_cpp/debug.cc b/libmu_cpp/debug.cc
deleted file mode 100644
index 95407c4..0000000
--- a/libmu_cpp/debug.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General
-   Public License along with this library.  If not, see
-   <http://www.gnu.org/licenses/>. */
-
-#include <mailutils/cpp/debug.h>
-
-using namespace mailutils;
-
-//
-// Debug
-//
-
-Debug :: Debug ()
-{
-  this->debug = NULL;
-}
-
-Debug :: Debug (const mu_debug_t debug)
-{
-  if (debug == 0)
-    throw Exception ("Debug::Debug", EINVAL);
-
-  this->debug = debug;
-}
-
-void
-Debug :: set_level (const mu_log_level_t level)
-{
-  int status = mu_debug_set_level (debug, level);
-  if (status)
-    throw Exception ("Debug::set_level", status);
-}
-
diff --git a/libmu_cpp/mailbox.cc b/libmu_cpp/mailbox.cc
index 56761fc..2db65ab 100644
--- a/libmu_cpp/mailbox.cc
+++ b/libmu_cpp/mailbox.cc
@@ -160,18 +160,6 @@ MailboxBase :: get_size ()
   return size;
 }
 
-Debug&
-MailboxBase :: get_debug ()
-{
-  mu_debug_t c_dbg;
-
-  int status = mu_mailbox_get_debug (mbox, &c_dbg);
-  if (status)
-    throw Exception ("MailboxBase::get_debug", status);
-
-  return *new Debug (c_dbg);
-}
-
 Folder&
 MailboxBase :: get_folder ()
 {
diff --git a/libmu_cpp/mailer.cc b/libmu_cpp/mailer.cc
index cde47ee..3d2546f 100644
--- a/libmu_cpp/mailer.cc
+++ b/libmu_cpp/mailer.cc
@@ -78,15 +78,3 @@ Mailer :: send_message (const Message& msg, const Address& 
from,
     throw Exception ("Mailer::send_message", status);
 }
 
-Debug&
-Mailer :: get_debug ()
-{
-  mu_debug_t c_dbg;
-
-  int status = mu_mailer_get_debug (mailer, &c_dbg);
-  if (status)
-    throw Exception ("Mailer::get_debug", status);
-
-  return *new Debug (c_dbg);
-}
-
diff --git a/libmu_cpp/sieve.cc b/libmu_cpp/sieve.cc
index 115840a..30667b1 100644
--- a/libmu_cpp/sieve.cc
+++ b/libmu_cpp/sieve.cc
@@ -25,7 +25,7 @@ using namespace mailutils;
 
 SieveMachine :: SieveMachine ()
 {
-  int status = mu_sieve_machine_init (&mach, NULL);
+  int status = mu_sieve_machine_init (&mach);
   if (status)
     throw Exception ("SieveMachine::SieveMachine", status);
 }
@@ -88,27 +88,4 @@ SieveMachine :: message (const Message& msg)
     throw Exception ("SieveMachine::message", status);
 }
 
-void
-SieveMachine :: set_debug (mu_sieve_printf_t printer)
-{
-  mu_sieve_set_debug (mach, printer);
-}
-
-void
-SieveMachine :: set_error (mu_sieve_printf_t printer)
-{
-  mu_sieve_set_error (mach, printer);
-}
-
-void
-SieveMachine :: set_parse_error (mu_sieve_parse_error_t printer)
-{
-  mu_sieve_set_parse_error (mach, printer);
-}
-
-void
-SieveMachine :: set_logger (mu_sieve_action_log_t printer)
-{
-  mu_sieve_set_logger (mach, printer);
-}
 
diff --git a/libmu_cpp/stream.cc b/libmu_cpp/stream.cc
index fe1b98a..0719497 100644
--- a/libmu_cpp/stream.cc
+++ b/libmu_cpp/stream.cc
@@ -211,11 +211,13 @@ StdioStream :: StdioStream (int fd, int flags)
 
 //
 // ProgStream
-//
+/* FIXME: This must be revised using the real prog_stream interface, instead
+   of the command_stream
+*/
 
 ProgStream :: ProgStream (const std::string& progname, int flags)
 {
-  int status = mu_prog_stream_create (&stm, progname.c_str (), flags);
+  int status = mu_command_stream_create (&stm, progname.c_str (), flags);
   if (status)
     throw Exception ("ProgStream::ProgStream", status);
 }
@@ -227,20 +229,28 @@ ProgStream :: ProgStream (const std::string& progname, 
int flags)
 FilterProgStream :: FilterProgStream (const std::string& progname,
                                      Stream& input)
 {
-  int status = mu_filter_prog_stream_create (&stm, progname.c_str (),
-                                            input.stm);
-  this->input = new Stream (input);
+  struct mu_prog_hints hints;
+  struct mu_wordsplit ws;
+  int status;
+
+  if (mu_wordsplit (progname.c_str (), &ws, MU_WRDSF_DEFFLAGS))
+    throw Exception ("FilterProgStream::FilterProgStream", errno); 
+  
+  hints.mu_prog_input = input.stm;
+  status = mu_prog_stream_create (&stm, ws.ws_wordv[0],
+                                 ws.ws_wordc, ws.ws_wordv,
+                                 MU_PROG_HINT_INPUT,
+                                 &hints,
+                                 MU_STREAM_READ);
+  mu_wordsplit_free (&ws);
   if (status)
     throw Exception ("FilterProgStream::FilterProgStream", status);
+  this->input = new Stream (input);
 }
 
 FilterProgStream :: FilterProgStream (const std::string& progname,
                                      Stream* input)
 {
-  int status = mu_filter_prog_stream_create (&stm, progname.c_str (),
-                                            input->stm);
-  this->input = new Stream (*input);
-  if (status)
-    throw Exception ("FilterProgStream::FilterProgStream", status);
+  FilterProgStream (progname, input);
 }
 
diff --git a/mh/tests/mhn.at b/mh/tests/mhn.at
index 8e78ebe..e47afb9 100644
--- a/mh/tests/mhn.at
+++ b/mh/tests/mhn.at
@@ -171,6 +171,7 @@ Allow me to sell you a couple?'
 MH_CHECK([mhn-storage],[mhn06 mhn-store-auto],[
 mkdir Mail/inbox
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
 
 mkdir out
 echo "mhn-storage: $curdir/out" >> $MH
@@ -187,6 +188,8 @@ storing message 4 part 2.2.2 as file 
out/4.2.2.2.octet-stream
 MH_CHECK([mhn-store-: all escapes],[mhn07 mhn-store_escapes],[
 mkdir Mail/inbox
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
+
 echo "mhn-store-application: %%-%m%P.%s-%p" >> $MH
 mhn +inbox -store 4 | remove_curdir || exit $?
 find . -name '%*'
@@ -205,6 +208,8 @@ MH_CHECK([mhn-store-: absolute path],[mhn08 
mhn-store_abspath],[
 mkdir Mail/inbox
 mkdir out
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
+
 echo "mhn-store-application: $curdir/out/%m%P.%s" >> $MH
 mhn +inbox -store 4 | remove_curdir || exit $?
 ],
@@ -219,6 +224,8 @@ MH_CHECK([mhn-store-: +folder],[mhn09 mhn-store+folder],[
 mkdir Mail/inbox
 mkdir Mail/app
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
+
 echo "mhn-store-application: +app" >> $MH
 mhn +inbox -store 4 | remove_curdir || exit $?
 ],
@@ -232,6 +239,8 @@ storing message 4 part 2.2.2 to folder +app as message 3
 MH_CHECK([mhn-store-: +],[mhn10 mhn-store+],[
 mkdir Mail/inbox
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
+
 echo "Current-Folder: inbox" > Mail/context
 cat >> $MH <<EOT
 mhn-store-application/octet-stream: +
@@ -245,6 +254,8 @@ mhn +inbox -store -part 2.2.1 4 | remove_curdir || exit $?
 MH_CHECK([mhn-store-: pipe],[mhn11 mhn-store-pipe],[
 mkdir Mail/inbox
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
+chmod +w Mail/inbox/4
+
 echo "Current-Folder: inbox" > Mail/context
 echo "mhn-store-text: | $abs_top_srcdir/mh/tests/mhed -" >> $MH
 mhn +inbox -store -part 1 4 | sed "s|$abs_top_srcdir/mh/tests/||;s|(cd 
\(.*\)\;|(cd home\;|;s|  *$||" || exit $?
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index 43487b8..e654a9c 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -35,7 +35,7 @@ cat > $MTSTAILOR <<EOT
 localname: darkstar
 localdomain: example.net
 username: mhtester
-url: sendmail://$abs_top_srcdir/examples/mta
+url: sendmail://$abs_top_builddir/examples/mta
 EOT
 
 MTA_DIAG=$curdir/mta.diag
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ddb2b8a..90d5cd9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -80,7 +80,7 @@ libmu_sieve/extensions/spamd.c
 libmu_sieve/extensions/timestamp.c
 libmu_sieve/extensions/vacation.c
 
-libproto/imap/folder.c
+# libproto/imap/folder.c
 libproto/mbox/mbox.c
 
 maidag/maidag.c
diff --git a/python/libmu_py/Makefile.am b/python/libmu_py/Makefile.am
index 4b70bff..1069d1b 100644
--- a/python/libmu_py/Makefile.am
+++ b/python/libmu_py/Makefile.am
@@ -23,7 +23,6 @@ libmu_py_la_SOURCES = \
  attribute.c \
  auth.c \
  body.c \
- debug.c \
  envelope.c \
  filter.c \
  folder.c \
diff --git a/python/libmu_py/debug.c b/python/libmu_py/debug.c
deleted file mode 100644
index bb9da85..0000000
--- a/python/libmu_py/debug.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General
-   Public License along with this library.  If not, see
-   <http://www.gnu.org/licenses/>. */
-
-#include "libmu_py.h"
-
-#define PY_MODULE "debug"
-#define PY_CSNAME "DebugType"
-
-static PyObject *
-_repr (PyObject *self)
-{
-  char buf[80];
-  sprintf (buf, "<" PY_MODULE "." PY_CSNAME " instance at %p>", self);
-  return PyString_FromString (buf);
-}
-
-static PyTypeObject PyDebugType = {
-  PyObject_HEAD_INIT(NULL)
-  0,                         /* ob_size */
-  PY_MODULE "." PY_CSNAME,   /* tp_name */
-  sizeof (PyDebug),          /* tp_basicsize */
-  0,                         /* tp_itemsize */
-  (destructor)_py_dealloc,   /* tp_dealloc */
-  0,                         /* tp_print */
-  0,                         /* tp_getattr; __getattr__ */
-  0,                         /* tp_setattr; __setattr__ */
-  0,                         /* tp_compare; __cmp__ */
-  _repr,                     /* tp_repr; __repr__ */
-  0,                         /* tp_as_number */
-  0,                         /* tp_as_sequence */
-  0,                         /* tp_as_mapping */
-  0,                         /* tp_hash; __hash__ */
-  0,                         /* tp_call; __call__ */
-  _repr,                     /* tp_str; __str__ */
-  0,                         /* tp_getattro */
-  0,                         /* tp_setattro */
-  0,                         /* tp_as_buffer */
-  Py_TPFLAGS_DEFAULT,        /* tp_flags */
-  "",                        /* tp_doc */
-  0,                         /* tp_traverse */
-  0,                         /* tp_clear */
-  0,                         /* tp_richcompare */
-  0,                         /* tp_weaklistoffset */
-  0,                         /* tp_iter */
-  0,                         /* tp_iternext */
-  0,                         /* tp_methods */
-  0,                         /* tp_members */
-  0,                         /* tp_getset */
-  0,                         /* tp_base */
-  0,                         /* tp_dict */
-  0,                         /* tp_descr_get */
-  0,                         /* tp_descr_set */
-  0,                         /* tp_dictoffset */
-  0,                         /* tp_init */
-  0,                         /* tp_alloc */
-  0,                         /* tp_new */
-};
-
-PyDebug *
-PyDebug_NEW ()
-{
-  return (PyDebug *)PyObject_NEW (PyDebug, &PyDebugType);
-}
-
-static PyObject *
-api_debug_set_level (PyObject *self, PyObject *args)
-{
-  int status, level;
-  PyDebug *py_dbg;
-
-  if (!PyArg_ParseTuple (args, "O!i", &PyDebugType, &py_dbg, &level))
-    return NULL;
-
-  status = mu_debug_set_level (py_dbg->dbg,
-                              MU_DEBUG_LEVEL_UPTO (level));
-  return _ro (PyInt_FromLong (status));
-}
-
-static PyMethodDef methods[] = {
-  { "set_level", (PyCFunction) api_debug_set_level, METH_VARARGS,
-    "" },
-
-  { NULL, NULL, 0, NULL }
-};
-
-static mu_debug_t _mu_prog_debug_stdout;
-static mu_debug_t _mu_prog_debug_stderr;
-
-static PyObject *
-_capture_stdout (PyObject *self, PyObject *args)
-{
-  char *buf = "";
-  if (!PyArg_ParseTuple (args, "s", &buf))
-    return NULL;
-  if (_mu_prog_debug_stdout)
-    mu_debug_printf (_mu_prog_debug_stdout, MU_DIAG_INFO, "%.*s",
-                    (int) strlen (buf), buf);
-  return _ro (Py_None);
-}
-
-static PyObject *
-_capture_stderr (PyObject *self, PyObject *args)
-{
-  char *buf = "";
-  if (!PyArg_ParseTuple (args, "s", &buf))
-    return NULL;
-  if (_mu_prog_debug_stderr)
-    mu_debug_printf (_mu_prog_debug_stderr, MU_DIAG_ERROR, "%.*s",
-                    (int) strlen (buf), buf);
-  return _ro (Py_None);
-}
-
-static PyMethodDef capture_stdout_method[] =
-{
-  { "write", _capture_stdout, 1 },
-  { NULL, NULL, 0, NULL }
-};
-
-static PyMethodDef capture_stderr_method[] =
-{
-  { "write", _capture_stderr, 1 },
-  { NULL, NULL, 0, NULL }
-};
-
-void
-mu_py_capture_stdout (mu_debug_t debug)
-{
-  PyObject *py_out;
-  _mu_prog_debug_stdout = debug;
-  py_out = Py_InitModule ("stdout", capture_stdout_method);
-  if (py_out)
-    PySys_SetObject ("stdout", py_out);
-}
-
-void
-mu_py_capture_stderr (mu_debug_t debug)
-{
-  PyObject *py_err;
-  _mu_prog_debug_stderr = debug;
-  py_err = Py_InitModule ("stderr", capture_stderr_method);
-  if (py_err)
-    PySys_SetObject ("stderr", py_err);
-}
-
-int
-mu_py_init_debug (void)
-{
-  PyDebugType.tp_new = PyType_GenericNew;
-  return PyType_Ready (&PyDebugType);
-}
-
-void
-_mu_py_attach_debug (void)
-{
-  PyObject *m;
-  if ((m = _mu_py_attach_module (PY_MODULE, methods)))
-    {
-      Py_INCREF (&PyDebugType);
-      PyModule_AddObject (m, PY_CSNAME, (PyObject *)&PyDebugType);
-    }
-}
diff --git a/python/libmu_py/filter.c b/python/libmu_py/filter.c
index 8e983e4..9c5a818 100644
--- a/python/libmu_py/filter.c
+++ b/python/libmu_py/filter.c
@@ -50,7 +50,8 @@ api_filter_iconv_create (PyObject *self, PyObject *args)
   char *fromcode = NULL;
   char *tocode = NULL;
   PyStream *py_stm, *py_transport;
-
+  const char *argv[4] = { "iconv", NULL, NULL, NULL };
+  
   if (!PyArg_ParseTuple (args, "OOssi",
                         &py_stm, &py_transport,
                         &fromcode, &tocode, &flags))
@@ -63,9 +64,10 @@ api_filter_iconv_create (PyObject *self, PyObject *args)
       return NULL;
     }
 
-  status = mu_filter_iconv_create (&py_stm->stm, py_transport->stm,
-                                  fromcode, tocode, flags,
-                                  mu_fallback_none);
+  argv[1] = fromcode;
+  argv[2] = tocode;
+  mu_filter_create_args (&py_stm->stm, py_transport->stm, argv[0], 3, argv,
+                        MU_FILTER_DECODE, flags);
   return _ro (PyInt_FromLong (status));
 }
 
diff --git a/python/libmu_py/libmu_py.c b/python/libmu_py/libmu_py.c
index e9792a2..1a3b211 100644
--- a/python/libmu_py/libmu_py.c
+++ b/python/libmu_py/libmu_py.c
@@ -72,7 +72,6 @@ mu_py_init (void)
   mu_py_init_attribute ();
   mu_py_init_auth ();
   mu_py_init_body ();
-  mu_py_init_debug ();
   mu_py_init_envelope ();
   mu_py_init_header ();
   mu_py_init_folder ();
diff --git a/python/libmu_py/libmu_py.h b/python/libmu_py/libmu_py.h
index 3b1d4cf..aa19393 100644
--- a/python/libmu_py/libmu_py.h
+++ b/python/libmu_py/libmu_py.h
@@ -45,6 +45,8 @@
 #include <mailutils/stream.h>
 #include <mailutils/url.h>
 #include <mailutils/python.h>
+#include <mailutils/wordsplit.h>
+#include <mailutils/prog.h>
 
 #define PY_PACKAGE_NAME "mailutils"
 #define PY_ROOT_NAME "c_api"
diff --git a/python/libmu_py/mailbox.c b/python/libmu_py/mailbox.c
index 5fc79cc..f1d03c7 100644
--- a/python/libmu_py/mailbox.c
+++ b/python/libmu_py/mailbox.c
@@ -340,22 +340,6 @@ api_mailbox_get_size (PyObject *self, PyObject *args)
 }
 
 static PyObject *
-api_mailbox_get_debug (PyObject *self, PyObject *args)
-{
-  int status;
-  PyMailbox *py_mbox;
-  PyDebug *py_dbg = PyDebug_NEW ();
-
-  if (!PyArg_ParseTuple (args, "O!", &PyMailboxType, &py_mbox))
-    return NULL;
-
-  status = mu_mailbox_get_debug (py_mbox->mbox, &py_dbg->dbg);
-
-  Py_INCREF (py_dbg);
-  return status_object (status, (PyObject *)py_dbg);
-}
-
-static PyObject *
 api_mailbox_get_folder (PyObject *self, PyObject *args)
 {
   int status;
@@ -444,9 +428,6 @@ static PyMethodDef methods[] = {
   { "get_size", (PyCFunction) api_mailbox_get_size, METH_VARARGS,
     "" },
 
-  { "get_debug", (PyCFunction) api_mailbox_get_debug, METH_VARARGS,
-    "" },
-
   { "get_folder", (PyCFunction) api_mailbox_get_folder, METH_VARARGS,
     "" },
 
diff --git a/python/libmu_py/mailer.c b/python/libmu_py/mailer.c
index b0e08e2..f8783b1 100644
--- a/python/libmu_py/mailer.c
+++ b/python/libmu_py/mailer.c
@@ -168,22 +168,6 @@ api_mailer_send_message (PyObject *self, PyObject *args)
   return _ro (PyInt_FromLong (status));
 }
 
-static PyObject *
-api_mailer_get_debug (PyObject *self, PyObject *args)
-{
-  int status;
-  PyMailer *py_mlr;
-  PyDebug *py_dbg = PyDebug_NEW ();
-
-  if (!PyArg_ParseTuple (args, "O!", &PyMailerType, &py_mlr))
-    return NULL;
-
-  status = mu_mailer_get_debug (py_mlr->mlr, &py_dbg->dbg);
-
-  Py_INCREF (py_dbg);
-  return status_object (status, (PyObject *)py_dbg);
-}
-
 static PyMethodDef methods[] = {
   { "create", (PyCFunction) api_mailer_create, METH_VARARGS,
     "Create mailer." },
@@ -200,9 +184,6 @@ static PyMethodDef methods[] = {
   { "send_message", (PyCFunction) api_mailer_send_message, METH_VARARGS,
     "" },
 
-  { "get_debug", (PyCFunction) api_mailer_get_debug, METH_VARARGS,
-    "" },
-
   { NULL, NULL, 0, NULL }
 };
 
diff --git a/python/libmu_py/sieve.c b/python/libmu_py/sieve.c
index d0b816a..2594020 100644
--- a/python/libmu_py/sieve.c
+++ b/python/libmu_py/sieve.c
@@ -94,15 +94,11 @@ api_sieve_machine_init (PyObject *self, PyObject *args)
 {
   int status;
   PySieveMachine *py_mach;
-  struct _mu_py_sieve_logger *s;
 
   if (!PyArg_ParseTuple (args, "O!", &PySieveMachineType, &py_mach))
     return NULL;
 
-  if (!(s = calloc (1, sizeof (*s))))
-    return NULL;
-
-  status = mu_sieve_machine_init (&py_mach->mach, s);
+  status = mu_sieve_machine_init (&py_mach->mach);
   return _ro (PyInt_FromLong (status));
 }
 
@@ -190,224 +186,71 @@ api_sieve_message (PyObject *self, PyObject *args)
   return _ro (PyInt_FromLong (status));
 }
 
-static int
-_sieve_error_printer (void *data, const char *fmt, va_list ap)
-{
-  char *buf = NULL;
-  size_t buflen = 0;
-  PyObject *py_args = PyTuple_New (1);
-
-  if (py_args)
-    {
-      struct _mu_py_sieve_logger *s = data;
-      PyObject *py_fnc = s->py_error_printer;
-
-      if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return 0;
-      PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
-      if (buf)
-       free (buf);
-
-      if (py_fnc && PyCallable_Check (py_fnc))
-       PyObject_CallObject (py_fnc, py_args);
-
-      Py_DECREF (py_args);
-    }
-  return 0;
-}
-
-static int
-_sieve_parse_error_printer (void *data, const char *filename, int lineno,
-                           const char *fmt, va_list ap)
-{
-  PyObject *py_args;
-  PyObject *py_dict;
-
-  py_dict = PyDict_New ();
-  if (py_dict)
-    {
-      char *buf = NULL;
-      size_t buflen = 0;
-
-      PyDict_SetItemString (py_dict, "filename",
-                           PyString_FromString (filename));
-      PyDict_SetItemString (py_dict, "lineno", PyInt_FromLong (lineno));
-
-      if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return 0;
-      PyDict_SetItemString (py_dict, "text",
-                           PyString_FromString (buf ? buf : ""));
-      if (buf)
-       free (buf);
-
-      py_args = PyTuple_New (1);
-      if (py_args)
-       {
-         struct _mu_py_sieve_logger *s = data;
-         PyObject *py_fnc = s->py_parse_error_printer;
-
-         Py_INCREF (py_dict);
-         PyTuple_SetItem (py_args, 0, py_dict);
-
-         if (py_fnc && PyCallable_Check (py_fnc))
-           PyObject_CallObject (py_fnc, py_args);
-
-         Py_DECREF (py_dict);
-         Py_DECREF (py_args);
-       }
-    }
-  return 0;
-}
-
-static int
-_sieve_debug_printer (void *data, const char *fmt, va_list ap)
-{
-  char *buf = NULL;
-  size_t buflen = 0;
-  PyObject *py_args = PyTuple_New (1);
-
-  if (py_args)
-    {
-      struct _mu_py_sieve_logger *s = data;
-      PyObject *py_fnc = s->py_debug_printer;
-
-      if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return 0;
-      PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
-      if (buf)
-       free (buf);
-
-      if (py_fnc && PyCallable_Check (py_fnc))
-       PyObject_CallObject (py_fnc, py_args);
-
-      Py_DECREF (py_args);
-    }
-  return 0;
-}
-
 static void
-_sieve_action_printer (void *data, const struct mu_locus *locus,
+_sieve_action_printer (void *data, mu_stream_t stream,
                       size_t msgno, mu_message_t msg,
                       const char *action, const char *fmt, va_list ap)
 {
   PyObject *py_args;
-  PyObject *py_dict;
+  PyObject *py_dict = PyDict_New ();
+  PyStream *py_stm;
 
-  py_dict = PyDict_New ();
-  if (py_dict)
+  if (!py_dict)
+    return;
+  py_stm = PyStream_NEW ();
+  if (py_stm)
     {
+      PyMessage *py_msg = PyMessage_NEW ();
       char *buf = NULL;
       size_t buflen = 0;
-      PyMessage *py_msg = PyMessage_NEW ();
 
-      py_msg->msg = msg;
-      Py_INCREF (py_msg);
-
-      PyDict_SetItemString (py_dict, "source_file",
-                           PyString_FromString (locus->source_file));
-      PyDict_SetItemString (py_dict, "source_line",
-                           PyInt_FromLong (locus->source_line));
-      PyDict_SetItemString (py_dict, "msgno",
-                           PyInt_FromLong (msgno));
-      PyDict_SetItemString (py_dict, "msg", (PyObject *)py_msg);
-      PyDict_SetItemString (py_dict, "action",
-                           PyString_FromString (action ? action : ""));
-
-      if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return;
-      PyDict_SetItemString (py_dict, "text",
-                           PyString_FromString (buf ? buf : ""));
-      if (buf)
-       free (buf);
-
-      py_args = PyTuple_New (1);
-      if (py_args)
+      if (py_msg)
        {
-         struct _mu_py_sieve_logger *s = data;
-         PyObject *py_fnc = s->py_action_printer;
-
-         Py_INCREF (py_dict);
-         PyTuple_SetItem (py_args, 0, py_dict);
-
-         if (py_fnc && PyCallable_Check (py_fnc))
-           PyObject_CallObject (py_fnc, py_args);
-
-         Py_DECREF (py_dict);
-         Py_DECREF (py_args);
+         PyStream *py_stm = PyStream_NEW ();
+         if (py_stm)
+           {
+             py_stm->stm = stream;
+             mu_stream_ref (stream);
+         
+             py_msg->msg = msg;
+             Py_INCREF (py_msg);
+
+             PyDict_SetItemString (py_dict, "msgno",
+                                   PyInt_FromLong (msgno));
+             PyDict_SetItemString (py_dict, "msg", (PyObject *)py_msg);
+             PyDict_SetItemString (py_dict, "action",
+                                   PyString_FromString (action ? action : ""));
+
+             if (mu_vasnprintf (&buf, &buflen, fmt, ap))
+               {
+                 mu_stream_unref (stream);
+                 return;
+               }
+             PyDict_SetItemString (py_dict, "text",
+                                   PyString_FromString (buf ? buf : ""));
+             free (buf);
+
+             py_args = PyTuple_New (1);
+             if (py_args)
+               {
+                 struct _mu_py_sieve_logger *s = data;
+                 PyObject *py_fnc = s->py_action_printer;
+
+                 Py_INCREF (py_dict);
+                 PyTuple_SetItem (py_args, 0, py_dict);
+                 
+                 if (py_fnc && PyCallable_Check (py_fnc))
+                   PyObject_CallObject (py_fnc, py_args);
+
+                 Py_DECREF (py_dict);
+                 Py_DECREF (py_args);
+               }
+           }
        }
     }
 }
 
 static PyObject *
-api_sieve_set_error (PyObject *self, PyObject *args)
-{
-  PySieveMachine *py_mach;
-  PyObject *py_fnc;
-
-  if (!PyArg_ParseTuple (args, "O!O", &PySieveMachineType, &py_mach, &py_fnc))
-    return NULL;
-
-  if (py_fnc && PyCallable_Check (py_fnc)) {
-    mu_sieve_machine_t mach = py_mach->mach;
-    struct _mu_py_sieve_logger *s = mu_sieve_get_data (mach);
-    s->py_error_printer = py_fnc;
-    Py_INCREF (py_fnc);
-    mu_sieve_set_error (py_mach->mach, _sieve_error_printer);
-  }
-  else {
-      PyErr_SetString (PyExc_TypeError, "");
-      return NULL;
-  }
-  return _ro (Py_None);
-}
-
-static PyObject *
-api_sieve_set_parse_error (PyObject *self, PyObject *args)
-{
-  PySieveMachine *py_mach;
-  PyObject *py_fnc;
-
-  if (!PyArg_ParseTuple (args, "O!O", &PySieveMachineType, &py_mach, &py_fnc))
-    return NULL;
-
-  if (py_fnc && PyCallable_Check (py_fnc)) {
-    mu_sieve_machine_t mach = py_mach->mach;
-    struct _mu_py_sieve_logger *s = mu_sieve_get_data (mach);
-    s->py_parse_error_printer = py_fnc;
-    Py_INCREF (py_fnc);
-    mu_sieve_set_parse_error (py_mach->mach, _sieve_parse_error_printer);
-  }
-  else {
-      PyErr_SetString (PyExc_TypeError, "");
-      return NULL;
-  }
-  return _ro (Py_None);
-}
-
-static PyObject *
-api_sieve_set_debug (PyObject *self, PyObject *args)
-{
-  PySieveMachine *py_mach;
-  PyObject *py_fnc;
-
-  if (!PyArg_ParseTuple (args, "O!O", &PySieveMachineType, &py_mach, &py_fnc))
-    return NULL;
-
-  if (py_fnc && PyCallable_Check (py_fnc)) {
-    mu_sieve_machine_t mach = py_mach->mach;
-    struct _mu_py_sieve_logger *s = mu_sieve_get_data (mach);
-    s->py_debug_printer = py_fnc;
-    Py_INCREF (py_fnc);
-    mu_sieve_set_debug (py_mach->mach, _sieve_debug_printer);
-  }
-  else {
-      PyErr_SetString (PyExc_TypeError, "");
-      return NULL;
-  }
-  return _ro (Py_None);
-}
-
-static PyObject *
 api_sieve_set_logger (PyObject *self, PyObject *args)
 {
   PySieveMachine *py_mach;
@@ -451,15 +294,6 @@ static PyMethodDef methods[] = {
     "Execute the code from the given instance of sieve machine "
     "'mach' over the 'message'. " },
 
-  { "set_debug", (PyCFunction) api_sieve_set_debug, METH_VARARGS,
-    "" },
-
-  { "set_error", (PyCFunction) api_sieve_set_error, METH_VARARGS,
-    "" },
-
-  { "set_parse_error", (PyCFunction) api_sieve_set_parse_error, METH_VARARGS,
-    "" },
-
   { "set_logger", (PyCFunction) api_sieve_set_logger, METH_VARARGS,
     "" },
 
diff --git a/python/libmu_py/stream.c b/python/libmu_py/stream.c
index fdcbcca..9901845 100644
--- a/python/libmu_py/stream.c
+++ b/python/libmu_py/stream.c
@@ -136,7 +136,7 @@ api_prog_stream_create (PyObject *self, PyObject *args)
                         &progname, &flags))
     return NULL;
 
-  status = mu_prog_stream_create (&py_stm->stm, progname, flags);
+  status = mu_command_stream_create (&py_stm->stm, progname, flags);
   return _ro (PyInt_FromLong (status));
 }
 
@@ -146,6 +146,8 @@ api_filter_prog_stream_create (PyObject *self, PyObject 
*args)
   int status;
   char *progname;
   PyStream *py_stm, *py_input;
+  struct mu_prog_hints hints;
+  struct mu_wordsplit ws;
 
   if (!PyArg_ParseTuple (args, "O!sO!",
                         &PyStreamType, &py_stm,
@@ -153,8 +155,16 @@ api_filter_prog_stream_create (PyObject *self, PyObject 
*args)
                         &PyStreamType, &py_input))
     return NULL;
 
-  status = mu_filter_prog_stream_create (&py_stm->stm, progname,
-                                        py_input->stm);
+  if (mu_wordsplit (progname, &ws, MU_WRDSF_DEFFLAGS))
+    return _ro (PyInt_FromLong (errno));
+
+  hints.mu_prog_input = py_input->stm;
+  status = mu_prog_stream_create (&py_stm->stm, ws.ws_wordv[0],
+                                 ws.ws_wordc, ws.ws_wordv,
+                                 MU_PROG_HINT_INPUT,
+                                 &hints,
+                                 MU_STREAM_READ);
+  mu_wordsplit_free (&ws);
   return _ro (PyInt_FromLong (status));
 }
 
diff --git a/python/libmu_py/url.c b/python/libmu_py/url.c
index 0d7875e..4a4f7a3 100644
--- a/python/libmu_py/url.c
+++ b/python/libmu_py/url.c
@@ -106,7 +106,6 @@ api_url_destroy (PyObject *self, PyObject *args)
 static PyObject *
 api_url_parse (PyObject *self, PyObject *args)
 {
-  int status;
   PyUrl *py_url;
 
   if (!PyArg_ParseTuple (args, "O!", &PyUrlType, &py_url))


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]