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-108-g379426a


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-108-g379426a
Date: Sat, 25 Sep 2010 16:00:54 +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=379426a154fe7ef116f2610acd0d0fa2e6a35cc7

The branch, master has been updated
       via  379426a154fe7ef116f2610acd0d0fa2e6a35cc7 (commit)
       via  6eff29e930330cfc498c58419b8675c913d62b31 (commit)
       via  d0a2801a8f77882ae959ec528607f9dc471552f8 (commit)
       via  98558025e65058796d86a99eed2498d68600f5dc (commit)
       via  8672f9f048ee10a7298f17ec6273025607ffba43 (commit)
      from  92ea03b0e897a00ac5369a31ae3640730aeff4db (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 379426a154fe7ef116f2610acd0d0fa2e6a35cc7
Author: Sergey Poznyakoff <address@hidden>
Date:   Sat Sep 25 17:37:31 2010 +0300

    Fix prog streams.
    
    * libmailutils/prog_stream.c (REDIRECT_STDIN_P)
    (REDIRECT_STDOUT_P): Fix macros.
    * libmailutils/stream.c (mu_stream_open): If stream is open
    with MU_STREAM_APPEND, reposition to its end.
    (_stream_write_unbuffered): Do not signal EACCESS for MU_STREAM_APPEND
    streams.
    
    * mail/pipe.c (mail_pipe): Rewrite using streams instead of FILEs.
    * mail/send.c (fill_body): Likewise.
    * mail/write.c (mail_write): Likewise.

commit 6eff29e930330cfc498c58419b8675c913d62b31
Author: Sergey Poznyakoff <address@hidden>
Date:   Sat Sep 25 16:17:15 2010 +0300

    Remove unnecessary use of FILEs in imap4d and pop3d.
    
    * imap4d/imap4d.c (imap4d_mainloop): Take two file descriptor as
    arguments.  All uses updated.
    * imap4d/imap4d.h (io_setio): Change signature.
    * imap4d/io.c (io_setio): Take two file descriptor as
    arguments.  All uses updated.
    * pop3d/extra.c (pop3d_setio): Take two file descriptor as
    arguments.  All uses updated.
    * pop3d/pop3d.c (pop3d_mainloop): Likewise.
    * pop3d/pop3d.h (pop3d_setio): Change signature.

commit d0a2801a8f77882ae959ec528607f9dc471552f8
Author: Sergey Poznyakoff <address@hidden>
Date:   Sat Sep 25 15:37:31 2010 +0300

    Cleanup in bufferization code.
    
    * examples/musocio.c: Use default stream buffer size.
    * imap4d/io.c: Likewise.
    * libmailutils/dbgstream.c: Likewise.
    * libmailutils/iostream.c: Likewise.
    * libmailutils/xscript-stream.c: Likewise.
    * libmu_auth/gsasl.c: Likewise.
    * libmu_auth/tls.c: Likewise.
    * libproto/pop/mbox.c: Likewise.
    * libproto/pop/pop3_stream.c: Likewise.
    * pop3d/extra.c: Likewise.
    
    * libmailutils/file_stream.c (mu_file_stream_create)
    (mu_fd_stream_create): File streams are fully buffered by default.
    * libmailutils/stdio_stream.c (mu_stdio_stream_create): Stdio streams
    are line buffered by default.

commit 98558025e65058796d86a99eed2498d68600f5dc
Author: Sergey Poznyakoff <address@hidden>
Date:   Sat Sep 25 15:34:12 2010 +0300

    Bugfixes.
    
    * libmailutils/streamcpy.c (mu_stream_copy): Use the number of bytes
    actually read.
    * libmailutils/base64.c (_base64_encoder): Return mu_filter_again
    if not all data has been consumed on mu_filter_lastbuf.
    * libmailutils/message_stream.c (scan_stream): Fix calculation of
    body_end.
    (_body_obj_size): Fix calculation of body size.
    * libproto/mailer/smtp_data.c (_mu_smtp_data_begin): Set full buffering
    on the MU_TRANSPORT_OUTPUT stream.

commit 8672f9f048ee10a7298f17ec6273025607ffba43
Author: Sergey Poznyakoff <address@hidden>
Date:   Sat Sep 25 13:22:07 2010 +0300

    Finish switching to new gnulib (see 52d2552d23).
    
    * configure.ac: Use libmuaux.a instead of libmuaux.la.
    * examples/Makefile.am: Likewise.
    * examples/cpp/Makefile.am: Likewise.
    * imap4d/Makefile.am: Likewise.
    * mapi/Makefile.am: Likewise.
    * mh/Makefile.am: Likewise.
    * pop3d/Makefile.am: Likewise.
    
    Remove old files from POTFILES.in (see c42bddb0b8).
    
    * po/POTFILES.in: Remove comsat/oldcfg.c.
    
    Build testsuites after the programs they are to test.
    
    * frm/Makefile.am (SUBDIRS): Put . before tests.
    * messages/Makefile.am: Likewise.
    * readmsg/Makefile.am: Likewise.
    * sieve/Makefile.am: Likewise.
    
    Remove leftovers from CVS times:
    
    * .cvsignore: Remove.
    * am/.cvsignore: Remove.
    * lib/.cvsignore: Remove.
    * po/.cvsignore

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

Summary of changes:
 .cvsignore                    |   17 ----
 am/.cvsignore                 |  121 --------------------------
 configure.ac                  |    4 +-
 examples/Makefile.am          |   12 ++--
 examples/cpp/Makefile.am      |    4 +-
 examples/musocio.c            |    6 +-
 frm/Makefile.am               |    2 +-
 imap4d/Makefile.am            |    2 +-
 imap4d/imap4d.c               |   14 ++--
 imap4d/imap4d.h               |    2 +-
 imap4d/io.c                   |   19 ++--
 lib/.cvsignore                |  191 -----------------------------------------
 libmailutils/base64.c         |    7 ++-
 libmailutils/dbgstream.c      |    2 +-
 libmailutils/file_stream.c    |   10 ++-
 libmailutils/iostream.c       |    2 +-
 libmailutils/message_stream.c |    8 +-
 libmailutils/prog_stream.c    |    4 +-
 libmailutils/stdio_stream.c   |    1 +
 libmailutils/stream.c         |   13 ++-
 libmailutils/streamcpy.c      |    4 +-
 libmailutils/xscript-stream.c |    2 +-
 libmu_auth/gsasl.c            |    4 +-
 libmu_auth/tls.c              |    6 +-
 libproto/mailer/smtp_data.c   |    1 +
 libproto/pop/mbox.c           |    2 +-
 libproto/pop/pop3_stream.c    |    2 +-
 mail/pipe.c                   |   36 ++++----
 mail/send.c                   |   48 ++++++-----
 mail/write.c                  |   62 +++++++-------
 mapi/Makefile.am              |    2 +-
 messages/Makefile.am          |    2 +-
 mh/Makefile.am                |    2 +-
 po/.cvsignore                 |   22 -----
 po/POTFILES.in                |    1 -
 pop3d/Makefile.am             |    2 +-
 pop3d/extra.c                 |   14 ++--
 pop3d/pop3d.c                 |   13 ++--
 pop3d/pop3d.h                 |    2 +-
 readmsg/Makefile.am           |    2 +-
 sieve/Makefile.am             |    2 +-
 41 files changed, 174 insertions(+), 498 deletions(-)
 delete mode 100644 .cvsignore
 delete mode 100644 am/.cvsignore
 delete mode 100644 lib/.cvsignore
 delete mode 100644 po/.cvsignore

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 54b1921..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.bootstrap
-ABOUT-NLS
-COPYING
-INSTALL
-Makefile
-Makefile.in
-_*
-aclocal.m4
-autom4te.cache
-config.h
-config.h.in
-config.log
-config.status
-configure
-intl
-libtool
-stamp-h1
diff --git a/am/.cvsignore b/am/.cvsignore
deleted file mode 100644
index 75a2477..0000000
--- a/am/.cvsignore
+++ /dev/null
@@ -1,121 +0,0 @@
-Makefile
-Makefile.in
-absolute-header.m4
-alloca.m4
-argp.m4
-autobuild.m4
-canonicalize-lgpl.m4
-chdir-long.m4
-chown.m4
-codeset.m4
-d-ino.m4
-d-type.m4
-des.m4
-dirfd.m4
-dirname.m4
-dos.m4
-double-slash-root.m4
-dup2.m4
-eealloc.m4
-environ.m4
-eoverflow.m4
-errno_h.m4
-error.m4
-exitfail.m4
-extensions.m4
-fchdir.m4
-fcntl-safer.m4
-fcntl_h.m4
-float_h.m4
-fnmatch.m4
-fseeko.m4
-getcwd-abort-bug.m4
-getcwd-path-max.m4
-getcwd.m4
-getdelim.m4
-getline.m4
-getlogin_r.m4
-getopt.m4
-getpass.m4
-gettext.m4
-glibc21.m4
-glob.m4
-gnulib-cache.m4
-gnulib-common.m4
-gnulib-comp.m4
-gnulib-tool.m4
-iconv.m4
-include_next.m4
-inline.m4
-intl.m4
-intldir.m4
-intlmacosx.m4
-intmax.m4
-intmax_t.m4
-inttostr.m4
-inttypes-h.m4
-inttypes-pri.m4
-inttypes_h.m4
-lchown.m4
-lib-ld.m4
-lib-link.m4
-lib-prefix.m4
-localcharset.m4
-longdouble.m4
-longlong.m4
-lseek.m4
-lstat.m4
-malloc.m4
-malloca.m4
-mbrtowc.m4
-mbstate_t.m4
-mbswidth.m4
-mempcpy.m4
-memrchr.m4
-openat.m4
-pathmax.m4
-po.m4
-printf.m4
-progtest.m4
-rawmemchr.m4
-readlink.m4
-realloc.m4
-regex.m4
-save-cwd.m4
-setenv.m4
-signed.m4
-size_max.m4
-sleep.m4
-snprintf.m4
-ssize_t.m4
-stdbool.m4
-stdint.m4
-stdint_h.m4
-stdio_h.m4
-stdlib_h.m4
-strcase.m4
-strchrnul.m4
-strdup.m4
-strerror.m4
-string_h.m4
-strings_h.m4
-strndup.m4
-strnlen.m4
-strtok_r.m4
-sys_stat_h.m4
-sysexits.m4
-threadlib.m4
-unistd-safer.m4
-unistd_h.m4
-vasnprintf.m4
-vasprintf.m4
-vsnprintf.m4
-wchar.m4
-wchar_t.m4
-wctype.m4
-wcwidth.m4
-wint_t.m4
-xalloc.m4
-xgetcwd.m4
-xsize.m4
-xstrndup.m4
diff --git a/configure.ac b/configure.ac
index bd8ea66..13cf4fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,7 @@ AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux')
 AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)')
 
 AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)')
-AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a 
../libmu_cfg/libmu_cfg.la ../lib/libmuaux.la')
+AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a 
../libmu_cfg/libmu_cfg.la ../lib/libmuaux.a')
 
 # There are two sets of include directories: MU_LIB_COMMON_INCLUDES, used
 # by the libraries, and MU_APP_COMMON_INCLUDES, which is used by applications.
@@ -1083,7 +1083,7 @@ GINT_INIT([gint],[1.8 with-guile],
            MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/$(PACKAGE)/sieve-modules'
            MU_GUILE_SIEVE_MOD_DATA='$(MU_GUILE_SIEVE_MOD_DATA_X)'
            GINT_INCLUDES='${MU_APP_COMMON_INCLUDES}'
-           GINT_LDADD=../lib/libmuaux.la
+           GINT_LDADD=../lib/libmuaux.a
           ],[useguile=no])
 
 AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"])
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 8a7a6f3..e4c5eb9 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -64,7 +64,7 @@ mod_LTLIBRARIES = numaddr.la
 INCLUDES = @MU_LIB_COMMON_INCLUDES@ 
 
 LDADD = \
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MAILUTILS}\
  @MU_COMMON_LIBRARIES@
 
@@ -73,20 +73,20 @@ numaddr_la_LIBADD = ${MU_LIB_SIEVE}
 numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
 
 msg_send_LDADD =\
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MAILER}\
  @address@hidden
  ${MU_LIB_MAILUTILS}
 
 mta_CPPFLAGS=-I${top_srcdir}/lib -I${top_builddir}/lib
 mta_LDADD =\
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MBOX}\
  ${MU_LIB_MAILER}\
  ${MU_LIB_MAILUTILS}
 
 sfrom_LDADD =\
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MBOX}\
  ${MU_LIB_IMAP}\
  ${MU_LIB_POP}\
@@ -99,7 +99,7 @@ sfrom_LDADD =\
 
 pop3client_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
 pop3client_LDADD = \
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_POP}\
  ${MU_LIB_AUTH}\
  @address@hidden
@@ -107,7 +107,7 @@ pop3client_LDADD = \
  @READLINE_LIBS@
 
 nntpclient_LDADD = \
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_NNTP}\
  ${MU_LIB_AUTH}\
  @address@hidden
diff --git a/examples/cpp/Makefile.am b/examples/cpp/Makefile.am
index 32da62f..8176c6c 100644
--- a/examples/cpp/Makefile.am
+++ b/examples/cpp/Makefile.am
@@ -37,7 +37,7 @@ noinst_PROGRAMS = @MU_CXX_EXAMPLES_BUILD@
 INCLUDES = @MU_LIB_COMMON_INCLUDES@ 
 
 AM_LDFLAGS = \
- ../../lib/libmuaux.la\
+ ../../lib/libmuaux.a\
  ../../libmu_cpp/libmu_cpp.la\
  ${MU_LIB_MAILUTILS}\
  @MU_COMMON_LIBRARIES@
@@ -55,7 +55,7 @@ sfrom_SOURCES = sfrom.cc
 url_parse_SOURCES = url-parse.cc
 
 LDADD =\
- ../../lib/libmuaux.la\
+ ../../lib/libmuaux.a\
  ../../libmu_cpp/libmu_cpp.la\
  ${MU_LIB_MBOX}\
  ${MU_LIB_IMAP}\
diff --git a/examples/musocio.c b/examples/musocio.c
index 66bf346..d19a200 100644
--- a/examples/musocio.c
+++ b/examples/musocio.c
@@ -85,11 +85,11 @@ main (int argc, char * argv [])
     }
 
   MU_ASSERT (mu_stdio_stream_create (&in, MU_STDIN_FD, 0));
-  mu_stream_set_buffer (in, mu_buffer_line, 1024);
+  mu_stream_set_buffer (in, mu_buffer_line, 0);
   MU_ASSERT (mu_stdio_stream_create (&out, MU_STDOUT_FD, 0));
-  mu_stream_set_buffer (out, mu_buffer_line, 1024);
+  mu_stream_set_buffer (out, mu_buffer_line, 0);
   MU_ASSERT (mu_socket_stream_create (&sock, argv[1], MU_STREAM_RDWR));
-  mu_stream_set_buffer (sock, mu_buffer_line, 1024);
+  mu_stream_set_buffer (sock, mu_buffer_line, 0);
   MU_ASSERT (mu_stream_open (sock));
   
   pid = fork ();
diff --git a/frm/Makefile.am b/frm/Makefile.am
index f4b86fa..fdb1bfb 100644
--- a/frm/Makefile.am
+++ b/frm/Makefile.am
@@ -20,7 +20,7 @@
 
 INCLUDES = @MU_APP_COMMON_INCLUDES@ 
 
-SUBDIRS = tests
+SUBDIRS = . tests
 
 bin_PROGRAMS = frm from
 frm_SOURCES = frm.c common.c frm.h
diff --git a/imap4d/Makefile.am b/imap4d/Makefile.am
index a0bd98b..3c06e97 100644
--- a/imap4d/Makefile.am
+++ b/imap4d/Makefile.am
@@ -83,7 +83,7 @@ imap4d_LDADD = \
 imap4d_DEPENDENCIES = \
  @address@hidden
  @address@hidden
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MBOX}\
  ${MU_LIB_MAILUTILS}
 
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 0c65ec2..90a6252 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -96,7 +96,7 @@ static const char *imap4d_capa[] = {
   NULL
 };
 
-static int imap4d_mainloop (int, FILE *, FILE *);
+static int imap4d_mainloop (int, int);
 
 static error_t
 imap4d_parse_opt (int key, char *arg, struct argp_state *state)
@@ -397,16 +397,16 @@ imap4d_child_signal_setup (RETSIGTYPE (*handler) (int 
signo))
 }
 
 static int
-imap4d_mainloop (int fd, FILE *infile, FILE *outfile)
+imap4d_mainloop (int ifd, int ofd)
 {
   imap4d_tokbuf_t tokp;
   char *text;
-  int debug_mode = isatty (fd);
+  int debug_mode = isatty (ifd);
 
   imap4d_child_signal_setup (imap4d_child_signal);
-  io_setio (infile, outfile);
+  io_setio (ifd, ofd);
 
-  if (imap4d_preauth_setup (fd) == 0)
+  if (imap4d_preauth_setup (ifd) == 0)
     {
       if (debug_mode)
        {
@@ -451,7 +451,7 @@ imap4d_connection (int fd, struct sockaddr *sa, int salen, 
void *data,
   idle_timeout = timeout;
   if (imap4d_transcript != transcript)
     imap4d_transcript = transcript;
-  imap4d_mainloop (fd, fdopen (fd, "r"), fdopen (fd, "w"));
+  imap4d_mainloop (fd, fd);
   return 0;
 }
 
@@ -612,7 +612,7 @@ main (int argc, char **argv)
     {
       /* Make sure we are in the root directory.  */
       chdir ("/");
-      status = imap4d_mainloop (fileno (stdin), stdin, stdout);
+      status = imap4d_mainloop (MU_STDIN_FD, MU_STDOUT_FD);
     }
 
   if (status)
diff --git a/imap4d/imap4d.h b/imap4d/imap4d.h
index 612505e..30b32e1 100644
--- a/imap4d/imap4d.h
+++ b/imap4d/imap4d.h
@@ -224,7 +224,7 @@ extern int io_stream_completion_response (mu_stream_t str,
                                          const char *format, ...)
                                     MU_PRINTFLIKE(4,5);
 int io_getline (char **pbuf, size_t *psize, size_t *pnbytes);
-void io_setio (FILE*, FILE*);
+void io_setio (int, int);
 void io_flush (void);
 int io_wait_input (int);
   
diff --git a/imap4d/io.c b/imap4d/io.c
index 726cfaa..23e8054 100644
--- a/imap4d/io.c
+++ b/imap4d/io.c
@@ -22,24 +22,25 @@
 mu_stream_t iostream;
 
 void
-io_setio (FILE *in, FILE *out)
+io_setio (int ifd, int ofd)
 {
   mu_stream_t str, istream, ostream;
   
-  if (!in)
+  if (ifd == -1)
     imap4d_bye (ERR_NO_IFILE);
-  if (!out)
+  if (ofd == -1)
     imap4d_bye (ERR_NO_OFILE);
 
-  if (mu_stdio_stream_create (&istream, fileno (in), 
-                              MU_STREAM_READ | MU_STREAM_AUTOCLOSE))
+  if (mu_stdio_stream_create (&istream, ifd,
+                             MU_STREAM_READ | MU_STREAM_AUTOCLOSE))
     imap4d_bye (ERR_STREAM_CREATE);
-  mu_stream_set_buffer (istream, mu_buffer_line, 1024);
+  mu_stream_set_buffer (istream, mu_buffer_line, 0);
   
-  if (mu_stdio_stream_create (&ostream, fileno (out), 
+  if (mu_stdio_stream_create (&ostream, ofd, 
                               MU_STREAM_WRITE | MU_STREAM_AUTOCLOSE))
     imap4d_bye (ERR_STREAM_CREATE);
-
+  mu_stream_set_buffer (ostream, mu_buffer_line, 0);
+  
   /* Combine the two streams into an I/O one. */
   if (mu_iostream_create (&str, istream, ostream))
     imap4d_bye (ERR_STREAM_CREATE);
@@ -51,7 +52,7 @@ io_setio (FILE *in, FILE *out)
                        MU_STREAM_WRITE | MU_STREAM_RDTHRU))
     imap4d_bye (ERR_STREAM_CREATE);
   /* Change buffering scheme: filter streams are fully buffered by default. */
-  mu_stream_set_buffer (iostream, mu_buffer_line, 1024);
+  mu_stream_set_buffer (iostream, mu_buffer_line, 0);
   
   if (imap4d_transcript)
     {
diff --git a/lib/.cvsignore b/lib/.cvsignore
deleted file mode 100644
index c077bd5..0000000
--- a/lib/.cvsignore
+++ /dev/null
@@ -1,191 +0,0 @@
-*.lo
-.deps
-.libs
-Makefile
-Makefile.in
-alloca.c
-alloca.h
-alloca.in.h
-argp-ba.c
-argp-eexst.c
-argp-fmtstream.c
-argp-fmtstream.h
-argp-fs-xinl.c
-argp-help.c
-argp-namefrob.h
-argp-parse.c
-argp-pin.c
-argp-pv.c
-argp-pvh.c
-argp-xinl.c
-argp.h
-asnprintf.c
-asprintf.c
-at-func.c
-basename.c
-canonicalize-lgpl.c
-canonicalize.h
-chdir-long.c
-chdir-long.h
-chown.c
-config.charset
-creat-safer.c
-des.c
-des.h
-dirent.h
-dirent.in.h
-dirfd.c
-dirfd.h
-dirname.c
-dirname.h
-dup-safer.c
-dup2.c
-errno.h
-errno.in.h
-error.c
-error.h
-exitfail.c
-exitfail.h
-fchdir.c
-fchmodat.c
-fchown-stub.c
-fchownat.c
-fcntl--.h
-fcntl-safer.h
-fcntl.h
-fcntl.in.h
-fd-safer.c
-float+.h
-float.h
-float.in.h
-fnmatch.c
-fnmatch.h
-fnmatch.in.h
-fnmatch_loop.c
-fseeko.c
-fstatat.c
-getcwd.c
-getdelim.c
-getline.c
-getlogin_r.c
-getopt.c
-getopt.h
-getopt.in.h
-getopt1.c
-getopt_int.h
-getpass.c
-getpass.h
-gettext.h
-glob-libc.h
-glob.c
-glob.h
-glob.in.h
-gnulib.mk
-intprops.h
-lchown.c
-libmailutils.la
-libmuaux.la
-localcharset.c
-localcharset.h
-lseek.c
-lstat.c
-lstat.h
-malloc.c
-malloca.c
-malloca.h
-malloca.valgrind
-mbswidth.c
-mbswidth.h
-mempcpy.c
-memrchr.c
-mkdirat.c
-obstack.c
-obstack.h
-open-safer.c
-openat-die.c
-openat-priv.h
-openat-proc.c
-openat.c
-openat.h
-pathmax.h
-pipe-safer.c
-printf-args.c
-printf-args.h
-printf-parse.c
-printf-parse.h
-rawmemchr.c
-rawmemchr.valgrind
-readlink.c
-realloc.c
-ref-add.sed
-ref-add.sin
-ref-del.sed
-ref-del.sin
-regcomp.c
-regex.c
-regex.h
-regex_internal.c
-regex_internal.h
-regexec.c
-same-inode.h
-save-cwd.c
-save-cwd.h
-setenv.c
-setenv.h
-size_max.h
-sleep.c
-snprintf.c
-stdbool.h
-stdbool.in.h
-stdint.h
-stdint.in.h
-stdio-impl.h
-stdio-write.c
-stdio.h
-stdio.in.h
-stdlib.h
-stdlib.in.h
-strcasecmp.c
-strchrnul.c
-strchrnul.valgrind
-strdup.c
-streq.h
-strerror.c
-string.h
-string.in.h
-strings.h
-strings.in.h
-stripslash.c
-strncasecmp.c
-strndup.c
-strnlen.c
-strtok_r.c
-sys
-sys_stat.h
-sys_stat.in.h
-sysexits.h
-sysexits.in.h
-unistd--.h
-unistd-safer.h
-unistd.h
-unistd.in.h
-unitypes.h
-uniwidth.h
-unsetenv.c
-vasnprintf.c
-vasnprintf.h
-vasprintf.c
-vsnprintf.c
-wchar.h
-wchar.in.h
-wctype.h
-wctype.in.h
-wcwidth.c
-xalloc-die.c
-xalloc.h
-xgetcwd.c
-xgetcwd.h
-xmalloc.c
-xsize.h
-xstrndup.c
-xstrndup.h
diff --git a/libmailutils/base64.c b/libmailutils/base64.c
index d3ec098..2b65cad 100644
--- a/libmailutils/base64.c
+++ b/libmailutils/base64.c
@@ -187,6 +187,7 @@ _base64_encoder (void *xd MU_ARG_UNUSED,
   size_t isize;
   char *optr;
   size_t osize;
+  enum mu_filter_result res;
   
   switch (cmd)
     {
@@ -247,9 +248,13 @@ _base64_encoder (void *xd MU_ARG_UNUSED,
   /* Consumed may grow bigger than isize if cmd is mu_filter_lastbuf */
   if (consumed > iobuf->isize)
     consumed = iobuf->isize;
+  if (cmd == mu_filter_lastbuf && consumed < iobuf->isize)
+    res = mu_filter_again;
+  else
+    res = mu_filter_ok;
   iobuf->isize = consumed;
   iobuf->osize = nbytes;
-  return mu_filter_ok;
+  return res;
 }
 
 static struct _mu_filter_record _base64_filter = {
diff --git a/libmailutils/dbgstream.c b/libmailutils/dbgstream.c
index b03f299..18f8834 100644
--- a/libmailutils/dbgstream.c
+++ b/libmailutils/dbgstream.c
@@ -79,7 +79,7 @@ mu_dbgstream_create(mu_stream_t *pref, mu_debug_t debug, 
mu_log_level_t level,
   
   sp->debug = debug;
   sp->level = level;
-  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 1024);
+  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 0);
   *pref = (mu_stream_t) sp;
   return 0;
 }
diff --git a/libmailutils/file_stream.c b/libmailutils/file_stream.c
index dccbd0d..814e80d 100644
--- a/libmailutils/file_stream.c
+++ b/libmailutils/file_stream.c
@@ -294,7 +294,10 @@ mu_file_stream_create (mu_stream_t *pstream, const char 
*filename, int flags)
                                   filename, -1,
                                   flags | MU_STREAM_SEEK | 
MU_STREAM_AUTOCLOSE);
   if (rc == 0)
-    *pstream = (mu_stream_t) fstr;
+    {
+      *pstream = (mu_stream_t) fstr;
+      mu_stream_set_buffer ((mu_stream_t) fstr, mu_buffer_full, 0);
+    }
   return rc;
 }
 
@@ -306,7 +309,10 @@ mu_fd_stream_create (mu_stream_t *pstream, char *filename, 
int fd, int flags)
                                   sizeof (struct _mu_file_stream),
                                   filename, fd, flags);
   if (rc == 0)
-    *pstream = (mu_stream_t) fstr;
+    {
+      *pstream = (mu_stream_t) fstr;
+      mu_stream_set_buffer ((mu_stream_t) fstr, mu_buffer_full, 0);
+    }
   return rc;
 }
 
diff --git a/libmailutils/iostream.c b/libmailutils/iostream.c
index 1a7da7e..36efe15 100644
--- a/libmailutils/iostream.c
+++ b/libmailutils/iostream.c
@@ -253,7 +253,7 @@ mu_iostream_create (mu_stream_t *pref, mu_stream_t in, 
mu_stream_t out)
   mu_stream_ref (out);
   sp->transport[_MU_STREAM_OUTPUT] = out;
 
-  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 1024);
+  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 0);
   *pref = (mu_stream_t) sp;
   return 0;
 }
diff --git a/libmailutils/message_stream.c b/libmailutils/message_stream.c
index 63476b9..30c440d 100644
--- a/libmailutils/message_stream.c
+++ b/libmailutils/message_stream.c
@@ -205,7 +205,9 @@ scan_stream (struct _mu_message_stream *str)
   rc = mu_stream_seek (stream, 0, MU_SEEK_CUR, &body_start);
   if (rc)
     return rc;
-  mu_stream_size (stream, &body_end);
+  rc = mu_stream_size (stream, &body_end);
+  if (rc)
+    return rc;
   
   if (!env_from)
     {
@@ -240,7 +242,7 @@ scan_stream (struct _mu_message_stream *str)
   str->date = env_date;
 
   str->body_start = body_start;
-  str->body_end = body_end;
+  str->body_end = body_end - 1;
   
   return 0;
 }
@@ -369,7 +371,7 @@ _body_obj_size (mu_body_t body, size_t *size)
   struct _mu_message_stream *str = mu_message_get_owner (msg);
 
   if (size)
-    *size = str->body_end - str->body_start;
+    *size = str->body_end - str->body_start + 1;
   return 0;
 }
 
diff --git a/libmailutils/prog_stream.c b/libmailutils/prog_stream.c
index ef35361..7ef63a3 100644
--- a/libmailutils/prog_stream.c
+++ b/libmailutils/prog_stream.c
@@ -67,8 +67,8 @@ _prog_stream_unregister (struct _mu_prog_stream *stream)
 # define getmaxfd() 64
 #endif
 
-#define REDIRECT_STDIN_P(f) ((f) & (MU_STREAM_WRITE|MU_STREAM_RDWR))
-#define REDIRECT_STDOUT_P(f) ((f) & (MU_STREAM_READ|MU_STREAM_RDWR))
+#define REDIRECT_STDIN_P(f) ((f) & MU_STREAM_WRITE)
+#define REDIRECT_STDOUT_P(f) ((f) & MU_STREAM_READ)
 
 static int
 start_program_filter (pid_t *pid, int *p, int argc, char **argv,
diff --git a/libmailutils/stdio_stream.c b/libmailutils/stdio_stream.c
index 93ff011..f525d9c 100644
--- a/libmailutils/stdio_stream.c
+++ b/libmailutils/stdio_stream.c
@@ -65,6 +65,7 @@ mu_stdio_stream_create (mu_stream_t *pstream, int fd, int 
flags)
     return rc;
   fstr->stream.open = NULL;
   transport = (mu_stream_t) fstr;
+  mu_stream_set_buffer (transport, mu_buffer_line, 0);
   
   /* Wrap it in cache, if required */
   if (need_cache)
diff --git a/libmailutils/stream.c b/libmailutils/stream.c
index 8d725fe..425a4eb 100644
--- a/libmailutils/stream.c
+++ b/libmailutils/stream.c
@@ -294,8 +294,15 @@ mu_stream_open (mu_stream_t stream)
 {
   int rc;
 
-  if (stream->open && (rc = stream->open (stream)))
-    return mu_stream_seterr (stream, rc, 1);
+  if (stream->open)
+    {
+      if ((rc = stream->open (stream)))
+       return mu_stream_seterr (stream, rc, 1);
+      if ((stream->flags & (MU_STREAM_APPEND|MU_STREAM_SEEK)) ==
+         (MU_STREAM_APPEND|MU_STREAM_SEEK) &&
+         (rc = mu_stream_seek (stream, 0, MU_SEEK_END, NULL)))
+       return mu_stream_seterr (stream, rc, 1);
+    }
   stream->bytes_in = stream->bytes_out = 0;
   return 0;
 }
@@ -596,7 +603,7 @@ _stream_write_unbuffered (mu_stream_t stream,
   if (!stream->write) 
     return mu_stream_seterr (stream, ENOSYS, 0);
 
-  if (!(stream->flags & MU_STREAM_WRITE)) 
+  if (!(stream->flags & (MU_STREAM_WRITE|MU_STREAM_APPEND))) 
     return mu_stream_seterr (stream, EACCES, 1);
 
   if (stream->flags & _MU_STR_ERR)
diff --git a/libmailutils/streamcpy.c b/libmailutils/streamcpy.c
index 4812667..13742e7 100644
--- a/libmailutils/streamcpy.c
+++ b/libmailutils/streamcpy.c
@@ -104,8 +104,8 @@ mu_stream_copy (mu_stream_t dst, mu_stream_t src, mu_off_t 
size,
        status = mu_stream_write (dst, buf, n, NULL);
        if (status)
          break;
-       size -= rdsize;
-       total += rdsize;
+       size -= n;
+       total += n;
       }
   else
     while ((status = mu_stream_read (src, buf, bufsize, &n)) == 0
diff --git a/libmailutils/xscript-stream.c b/libmailutils/xscript-stream.c
index b065e81..caabf28 100644
--- a/libmailutils/xscript-stream.c
+++ b/libmailutils/xscript-stream.c
@@ -435,7 +435,7 @@ mu_xscript_stream_create(mu_stream_t *pref, mu_stream_t 
transport,
       free (sp);
       return ENOMEM;
     }
-  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 1024);
+  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 0);
   *pref = (mu_stream_t) sp;
   return 0;
 }
diff --git a/libmu_auth/gsasl.c b/libmu_auth/gsasl.c
index ddcc7d0..c4e98f5 100644
--- a/libmu_auth/gsasl.c
+++ b/libmu_auth/gsasl.c
@@ -172,7 +172,7 @@ gsasl_encoder_stream (mu_stream_t *pstr, mu_stream_t 
transport,
                                _gsasl_encoder,
                                flt, flags);
   if (rc == 0)
-    mu_stream_set_buffer (*pstr, mu_buffer_line, 1024);
+    mu_stream_set_buffer (*pstr, mu_buffer_line, 0);
   return rc;
 }
 
@@ -188,7 +188,7 @@ gsasl_decoder_stream (mu_stream_t *pstr, mu_stream_t 
transport,
                                _gsasl_decoder,
                                flt, flags);
   if (rc == 0)
-    mu_stream_set_buffer (*pstr, mu_buffer_line, 1024);
+    mu_stream_set_buffer (*pstr, mu_buffer_line, 0);
   return rc;
 }
 
diff --git a/libmu_auth/tls.c b/libmu_auth/tls.c
index a32abd4..e31b856 100644
--- a/libmu_auth/tls.c
+++ b/libmu_auth/tls.c
@@ -300,13 +300,13 @@ _mu_tls_io_stream_create (mu_stream_t *pstream,
     {
       sp->stream.read = _tls_io_read; 
       sp->stream.wait = _tls_rd_wait;
-      mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_full, 1024);
+      mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_full, 0);
     }
   else
     {
       sp->stream.write = _tls_io_write;
       sp->stream.wait = _tls_wr_wait;
-      mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 1024);
+      mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 0);
     }
   sp->stream.flush = _tls_io_flush;
   sp->stream.close = _tls_io_close;
@@ -653,7 +653,7 @@ _mu_tls_stream_create (mu_stream_t *pstream,
       return rc;
     }
 
-  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 1024);
+  mu_stream_set_buffer ((mu_stream_t) sp, mu_buffer_line, 0);
   *pstream = (mu_stream_t) sp;
   return 0;
 }
diff --git a/libproto/mailer/smtp_data.c b/libproto/mailer/smtp_data.c
index d9f558f..e96fa80 100644
--- a/libproto/mailer/smtp_data.c
+++ b/libproto/mailer/smtp_data.c
@@ -46,6 +46,7 @@ _mu_smtp_data_begin (mu_smtp_t smtp)
   if (mu_smtp_trace_mask (smtp, MU_SMTP_TRACE_QRY, MU_XSCRIPT_PAYLOAD))
     _mu_smtp_xscript_level (smtp, MU_XSCRIPT_PAYLOAD);
 
+  smtp->savebuf.type = MU_TRANSPORT_OUTPUT;
   if (mu_stream_ioctl (smtp->carrier, MU_IOCTL_GET_TRANSPORT_BUFFER,
                       &smtp->savebuf) == 0)
     {
diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c
index b1403f7..0bf17fa 100644
--- a/libproto/pop/mbox.c
+++ b/libproto/pop/mbox.c
@@ -149,7 +149,7 @@ pop_open (mu_mailbox_t mbox, int flags)
 #endif /* WITH_TLS */
 
   /* FIXME: How to configure buffer size? */
-  mu_stream_set_buffer (stream, mu_buffer_line, 1024);
+  mu_stream_set_buffer (stream, mu_buffer_line, 0);
 
   status = mu_pop3_create (&mpd->pop3);
   if (status)
diff --git a/libproto/pop/pop3_stream.c b/libproto/pop/pop3_stream.c
index c202b56..446e5eb 100644
--- a/libproto/pop/pop3_stream.c
+++ b/libproto/pop/pop3_stream.c
@@ -184,7 +184,7 @@ mu_pop3_stream_create (mu_pop3_t pop3, mu_stream_t *pstream)
   sp->pop3 = pop3;
   sp->flags = 0;
   str = (mu_stream_t) sp;
-  mu_stream_set_buffer (str, mu_buffer_line, 1024);
+  mu_stream_set_buffer (str, mu_buffer_line, 0);
 
   status = mu_pop3_filter_create (pstream, str);
   mu_stream_unref (str);
diff --git a/mail/pipe.c b/mail/pipe.c
index bb7ab0a..f139edf 100644
--- a/mail/pipe.c
+++ b/mail/pipe.c
@@ -27,13 +27,10 @@
 int
 mail_pipe (int argc, char **argv)
 {
-  mu_message_t msg;
-  mu_stream_t stream;
+  int rc;
+  mu_stream_t outstr;
   char *cmd;
-  FILE *tube;
   msgset_t *list, *mp;
-  char buffer[512];
-  size_t n = 0;
 
   if (argc > 2)
     cmd = argv[--argc];
@@ -41,30 +38,35 @@ mail_pipe (int argc, char **argv)
     return 1;
 
   if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &list))
-      return 1;
+    return 1;
 
-  tube = popen (cmd, "w");
+  rc = mu_prog_stream_create (&outstr, cmd, MU_STREAM_WRITE);
+  if (rc == 0)
+    rc = mu_stream_open (outstr);
+  if (rc)
+    {
+      mu_error (_("cannot open `%s': %s"), cmd, mu_strerror (rc));
+      return 1;
+    }
 
   for (mp = list; mp; mp = mp->next)
     {
+      mu_message_t msg;
+      mu_stream_t stream;
+      
       if (util_get_message (mbox, mp->msg_part[0], &msg) == 0)
        {
          mu_message_get_streamref (msg, &stream);
-         /* FIXME: Use mu_stream_copy */
-         while (mu_stream_read (stream, buffer, sizeof (buffer) - 1, &n) == 0
-                && n != 0)
-           {
-             buffer[n] = '\0';
-             fprintf (tube, "%s", buffer);
-           }
+         mu_stream_copy (outstr, stream, 0, NULL);
          mu_stream_destroy (&stream);
          if (mailvar_get (NULL, "page", mailvar_type_boolean, 0) == 0)
-           fprintf (tube, "\f\n");
+           mu_stream_write (outstr, "\f\n", 2, NULL);
        }
       util_mark_read (msg);
     }
-
+  mu_stream_close (outstr);
+  mu_stream_destroy (&outstr);
   msgset_free (list);
-  pclose (tube);
+
   return 0;
 }
diff --git a/mail/send.c b/mail/send.c
index b5becf2..fd14900 100644
--- a/mail/send.c
+++ b/mail/send.c
@@ -299,32 +299,27 @@ compose_destroy (compose_env_t *env)
   free (env->outfiles);
 }
 
-/* FIXME: Can we use mu_stream_t instead of FILE? If so,
-   replace the loop with a call to mu_stream_copy. */
 static int
-fill_body (mu_message_t msg, FILE *file)
+fill_body (mu_message_t msg, mu_stream_t instr)
 {
+  int rc;
   mu_body_t body = NULL;
   mu_stream_t stream = NULL;
-  char *buf = NULL;
-  size_t n = 0;
-  int nullbody = 1;
-
+  mu_off_t n;
+  
   mu_message_get_body (msg, &body);
   mu_body_get_streamref (body, &stream);
-  
-  while (getline (&buf, &n, file) >= 0)
-    {
-      size_t len = strlen (buf);
-      if (len)
-       nullbody = 0;
-      mu_stream_write (stream, buf, len, NULL);
-    }
+
+  rc = mu_stream_copy (stream, instr, 0, &n);
   mu_stream_destroy (&stream);
-  if (buf)
-    free (buf);
 
-  if (nullbody)
+  if (rc)
+    {
+      mu_error (_("cannot copy temporary stream: %s"), mu_strerror (rc));
+      return 1;
+    }
+  
+  if (n == 0)
     {
       if (mailvar_get (NULL, "nullbody", mailvar_type_boolean, 0) == 0)
        {
@@ -437,7 +432,6 @@ mail_send0 (compose_env_t * env, int save_to)
   int done = 0;
   int fd;
   char *filename;
-  FILE *file;
   char *savefile = NULL;
   int int_cnt;
   char *escape;
@@ -570,8 +564,16 @@ mail_send0 (compose_env_t * env, int save_to)
 
   if (util_header_expand (&env->header) == 0)
     {
-      file = fopen (filename, "r");
-      if (file != NULL)
+      int rc;
+      mu_stream_t instr;
+
+      rc = mu_file_stream_create (&instr, filename, MU_STREAM_READ);
+      if (rc == 0)
+       rc = mu_stream_open (instr);
+      if (rc)
+       mu_error (_("cannot open temporary stream `%s' for reading: %s"),
+                 filename, mu_strerror (rc));
+      else
        {
          mu_message_t msg = NULL;
          int rc;
@@ -580,8 +582,8 @@ mail_send0 (compose_env_t * env, int save_to)
          mu_message_create (&msg, NULL);
          
          /* Fill the body.  */
-         rc = fill_body (msg, file);
-         fclose (file);
+         rc = fill_body (msg, instr);
+         mu_stream_destroy (&instr);
 
          if (rc == 0)
            {
diff --git a/mail/write.c b/mail/write.c
index ffaa44f..d7e017d 100644
--- a/mail/write.c
+++ b/mail/write.c
@@ -28,10 +28,8 @@
 int
 mail_write (int argc, char **argv)
 {
-  mu_message_t msg;
-  mu_body_t bod;
-  mu_stream_t stream;
-  FILE *output;
+  int rc;
+  mu_stream_t output;
   char *filename = NULL;
   msgset_t *msglist = NULL, *mp;
   int sender = 0;
@@ -58,7 +56,7 @@ mail_write (int argc, char **argv)
   if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &msglist))
     {
       if (filename)
-          free (filename);
+       free (filename);
       return 1;
     }
 
@@ -72,54 +70,58 @@ mail_write (int argc, char **argv)
        }
     }
 
-  output = fopen (filename, "a");
-  if (!output)
+  rc = mu_file_stream_create (&output, filename,
+                             MU_STREAM_APPEND|MU_STREAM_CREAT);
+  if (rc == 0)
+    rc = mu_stream_open (output);
+  if (rc)
     {
-      util_error (_("can't open %s: %s"), filename, strerror (errno));
+      util_error (_("can't open %s: %s"), filename, mu_strerror (rc));
       free (filename);
-      fclose (output);
       msgset_free (msglist);
       return 1;
     }
 
   for (mp = msglist; mp; mp = mp->next)
     {
+      mu_message_t msg;
+      mu_body_t body;
+      mu_stream_t stream;
       mu_attribute_t attr;
-      char buffer[512];
-      size_t n = 0;
 
       if (util_get_message (mbox, mp->msg_part[0], &msg))
         continue;
 
-      mu_message_get_body (msg, &bod);
+      mu_message_get_body (msg, &body);
 
-      mu_body_size (bod, &size);
-      total_size += size;
-      mu_body_lines (bod, &size);
-      total_lines += size;
+      mu_body_get_streamref (body, &stream);
+      rc = mu_stream_copy (output, stream, 0, NULL);
+      mu_stream_destroy (&stream);
 
-      /* FIXME: Use mu_stream_copy */
-      mu_body_get_streamref (bod, &stream);
-      /* should there be a separator? */
-      while (mu_stream_read (stream, buffer, sizeof (buffer) - 1, &n) == 0
-            && n != 0)
+      if (rc == 0)
        {
-         buffer[n] = '\0';
-         fprintf (output, "%s", buffer);
+         mu_body_size (body, &size);
+         total_size += size;
+         mu_body_lines (body, &size);
+         total_lines += size;
+         
+         /* mark as saved. */
+         
+         mu_message_get_attribute (msg, &attr);
+         mu_attribute_set_userflag (attr, MAIL_ATTRIBUTE_SAVED);
        }
-      mu_stream_destroy (&stream);
-      
-      /* mark as saved. */
-
-      mu_message_get_attribute (msg, &attr);
-      mu_attribute_set_userflag (attr, MAIL_ATTRIBUTE_SAVED);
+      else
+       mu_error (_("cannot save %lu: %s"),
+                 (unsigned long) mp->msg_part[0], mu_strerror (rc));
     }
 
+  mu_stream_close (output);
+  mu_stream_destroy (&output);
+  
   fprintf (ofile, "\"%s\" %3lu/%-5lu\n", filename,
           (unsigned long) total_lines, (unsigned long) total_size);
 
   free (filename);
-  fclose (output);
   msgset_free (msglist);
   return 0;
 }
diff --git a/mapi/Makefile.am b/mapi/Makefile.am
index 9682f7a..fddc3bf 100644
--- a/mapi/Makefile.am
+++ b/mapi/Makefile.am
@@ -26,7 +26,7 @@ lib_LTLIBRARIES = libmapi.la
 /* FIXME:  This should be part of the default includes.  */
 EXTRA_DIST = mapi.h
 
-libmapi_LDADD = ../lib/libmuaux.la ${MU_LIB_MAILUTILS} 
+libmapi_LDADD = ../lib/libmuaux.a ${MU_LIB_MAILUTILS} 
 
 libmapi_la_SOURCES = \
  MAPIAddress.c \
diff --git a/messages/Makefile.am b/messages/Makefile.am
index a6e49ac..dbbbdd7 100644
--- a/messages/Makefile.am
+++ b/messages/Makefile.am
@@ -20,7 +20,7 @@
 
 INCLUDES = @MU_APP_COMMON_INCLUDES@ 
 
-SUBDIRS = tests
+SUBDIRS = . tests
 
 bin_PROGRAMS = messages
 messages_SOURCES = messages.c
diff --git a/mh/Makefile.am b/mh/Makefile.am
index 2fdb487..8cb3f09 100644
--- a/mh/Makefile.am
+++ b/mh/Makefile.am
@@ -96,7 +96,7 @@ INCLUDES = @MU_APP_COMMON_INCLUDES@
 AM_CPPFLAGS = -D_GNU_SOURCE -DMHLIBDIR=\"$(mhlibdir)\" -DMHBINDIR=\"$(bindir)\"
 mh_LIBS = \
  ./libmh.a\
- ../lib/libmuaux.la\
+ ../lib/libmuaux.a\
  ${MU_LIB_MBOX}\
  ${MU_LIB_IMAP}\
  ${MU_LIB_POP}\
diff --git a/po/.cvsignore b/po/.cvsignore
deleted file mode 100644
index cd3a432..0000000
--- a/po/.cvsignore
+++ /dev/null
@@ -1,22 +0,0 @@
-*.gmo
-*.mo
-*.po
-.reference
-LINGUAS
-Makefile
-Makefile.in
-Makefile.in.in
-Makevars
-Makevars.template
-POTFILES
-Rules-quot
-boldquot.sed
address@hidden
address@hidden
-insert-header.sed
-insert-header.sin
-mailutils.pot
-quot.sed
-remove-potcdate.sed
-remove-potcdate.sin
-stamp-po
diff --git a/po/POTFILES.in b/po/POTFILES.in
index de5feee..aa42c6f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,6 @@
 #
 
 comsat/action.c
-comsat/oldcfg.c
 comsat/comsat.c
 
 config/mailutils-config.c
diff --git a/pop3d/Makefile.am b/pop3d/Makefile.am
index 8a73ede..171733f 100644
--- a/pop3d/Makefile.am
+++ b/pop3d/Makefile.am
@@ -64,7 +64,7 @@ popauth_SOURCES = popauth.c
 popauth_LDADD = ${MU_APP_LIBRARIES} ${MU_LIB_MAILUTILS} @MU_COMMON_LIBRARIES@
 pop3d_DEPENDENCIES = \
  @MU_AUTHLIBS_DEPENDENCY@ \
- ../lib/libmuaux.la \
+ ../lib/libmuaux.a \
  ${MU_LIB_MBOX}\
  ${MU_LIB_MH}\
  ${MU_LIB_MAILDIR}\
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 380435d..4821ad4 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -127,21 +127,21 @@ pop3d_abquit (int reason)
 }
 
 void
-pop3d_setio (FILE *in, FILE *out)
+pop3d_setio (int ifd, int ofd)
 {
   mu_stream_t str, istream, ostream;
   
-  if (!in)
+  if (ifd == -1)
     pop3d_abquit (ERR_NO_IFILE);
-  if (!out)
+  if (ofd == -1)
     pop3d_abquit (ERR_NO_OFILE);
 
-  if (mu_stdio_stream_create (&istream, fileno (in), 
+  if (mu_stdio_stream_create (&istream, ifd, 
                               MU_STREAM_READ | MU_STREAM_AUTOCLOSE))
     pop3d_abquit (ERR_NO_IFILE);
-  mu_stream_set_buffer (istream, mu_buffer_line, 1024);
+  mu_stream_set_buffer (istream, mu_buffer_line, 0);
   
-  if (mu_stdio_stream_create (&ostream, fileno (out), 
+  if (mu_stdio_stream_create (&ostream, ofd, 
                               MU_STREAM_WRITE | MU_STREAM_AUTOCLOSE))
     pop3d_abquit (ERR_NO_OFILE);
 
@@ -156,7 +156,7 @@ pop3d_setio (FILE *in, FILE *out)
                        MU_STREAM_WRITE | MU_STREAM_RDTHRU))
     pop3d_abquit (ERR_NO_IFILE);
   /* Change buffering scheme: filter streams are fully buffered by default. */
-  mu_stream_set_buffer (iostream, mu_buffer_line, 1024);
+  mu_stream_set_buffer (iostream, mu_buffer_line, 0);
   
   if (pop3d_transcript)
     {
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 0d46c5a..a614786 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -208,11 +208,10 @@ pop3d_get_client_address (int fd, struct sockaddr_in *pcs)
 /* The main part of the daemon. This function reads input from the client and
    executes the proper functions. Also handles the bulk of error reporting.
    Arguments:
-      fd        --  socket descriptor (for diagnostics)
-      infile    --  input stream
-      outfile   --  output stream */
+      ifd       --  input descriptor
+      ofd       --  output descriptor  */
 int
-pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
+pop3d_mainloop (int ifd, int ofd)
 {
   int status = OK;
   char buffer[512];
@@ -221,7 +220,7 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
 
   mu_set_signals (pop3d_child_signal, sigtab, MU_ARRAY_SIZE (sigtab));
 
-  pop3d_setio (infile, outfile);
+  pop3d_setio (ifd, ofd);
 
   state = initial_state;
 
@@ -299,7 +298,7 @@ pop3d_connection (int fd, struct sockaddr *sa, int salen, 
void *data,
   idle_timeout = timeout;
   if (pop3d_transcript != transcript)
     pop3d_transcript = transcript;
-  pop3d_mainloop (fd, fdopen (fd, "r"), fdopen (fd, "w"));
+  pop3d_mainloop (fd, fd);
   return 0;
 }
 
@@ -430,7 +429,7 @@ main (int argc, char **argv)
     {
       /* Make sure we are in the root directory.  */
       chdir ("/");
-      status = pop3d_mainloop (fileno (stdin), stdin, stdout);
+      status = pop3d_mainloop (MU_STDIN_FD, MU_STDOUT_FD);
     }
   
   if (status)
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index 25dc034..a80c872 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -241,7 +241,7 @@ extern int pop3d_touchlock      (void);
 extern int pop3d_unlock         (void);
 extern void pop3d_outf          (const char *fmt, ...) MU_PRINTFLIKE(1,2);
 
-extern void pop3d_setio         (FILE *in, FILE *out);
+extern void pop3d_setio         (int, int);
 extern char *pop3d_readline     (char *, size_t);
 extern void pop3d_flush_output  (void);
 
diff --git a/readmsg/Makefile.am b/readmsg/Makefile.am
index 844b1fe..0522a9e 100644
--- a/readmsg/Makefile.am
+++ b/readmsg/Makefile.am
@@ -20,7 +20,7 @@
 
 INCLUDES = @MU_APP_COMMON_INCLUDES@ 
 
-SUBDIRS = tests
+SUBDIRS = . tests
 
 bin_PROGRAMS = readmsg
 readmsg_SOURCES = readmsg.c msglist.c readmsg.h
diff --git a/sieve/Makefile.am b/sieve/Makefile.am
index 8a6eda2..1d9a0bb 100644
--- a/sieve/Makefile.am
+++ b/sieve/Makefile.am
@@ -18,7 +18,7 @@
 ##   02110-1301 USA
 
 INCLUDES = @MU_APP_COMMON_INCLUDES@ 
-SUBDIRS  = tests
+SUBDIRS  = . tests
 EXTRA_DIST = examples
 
 bin_PROGRAMS = sieve


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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