diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-09-07 13:57:30 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-09-08 16:11:38 +0300 |
commit | 7bfe0ed907c5300d68fea2f2d4e53bac6dc78b60 (patch) | |
tree | 8c21e4247b3fab21be29fbea58b750f1fecb18ce /examples | |
parent | 62c5c62a7e8fd3524227cd241986d6ce4711b239 (diff) | |
download | mailutils-7bfe0ed907c5300d68fea2f2d4e53bac6dc78b60.tar.gz mailutils-7bfe0ed907c5300d68fea2f2d4e53bac6dc78b60.tar.bz2 |
Finish pop3 mailbox implementation.
* mailbox/msgscan.c: New file.
* mailbox/Makefile.am (libmailutils_la_SOURCES): Add it.
* include/mailutils/body.h (mu_body_set_get_stream): New prototype.
* include/mailutils/message.h (MU_SCAN_SEEK, MU_SCAN_SIZE): New
defines.
(mu_message_scan): New structure.
(mu_stream_scan_message): New prototype.
(mu_message_set_get_stream): New prototype.
* include/mailutils/stream.h (mu_stream_copy): Change signature: takes
4 arguments now.
* include/mailutils/sys/body.h (_mu_body) <_get_stream>: New method.
* include/mailutils/sys/message.h (_mu_message) <_get_stream>: New method.
* mailbox/body.c (_body_get_stream): Call _get_stream, if provided.
* mailbox/message.c (_message_get_stream): Call _get_stream, if provided.
* mailbox/stream.c (_stream_flush_buffer): Avoid infinite recursion:
call stream->seek directly.
* mailbox/streamcpy.c (mu_stream_copy): Return the number of bytes
actually copied in the fourth argument. All uses updated.
* mailbox/streamref.c (streamref_return): Do not propagate internal
flags.
(_streamref_readdelim): Ensure there is enough buffer space for the
mu_stream_readdelim call.
* libproto/pop/mbox.c: Finish client implementation.
* mail/print.c (mail_print_msg): Close pager before returning on
error.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/base64.c | 2 | ||||
-rw-r--r-- | examples/mucat.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/base64.c b/examples/base64.c index 226cde96b..aa6bdebd5 100644 --- a/examples/base64.c +++ b/examples/base64.c @@ -55,7 +55,7 @@ c_copy (mu_stream_t out, mu_stream_t in) } } else - MU_ASSERT (mu_stream_copy (out, in, 0)); + MU_ASSERT (mu_stream_copy (out, in, 0, NULL)); mu_stream_write (out, "\n", 1, NULL); mu_stream_close (out); mu_stream_close (in); diff --git a/examples/mucat.c b/examples/mucat.c index b8cb314f7..92f55eb24 100644 --- a/examples/mucat.c +++ b/examples/mucat.c @@ -69,14 +69,14 @@ main (int argc, char * argv []) MU_ASSERT (mu_stream_seek (in, skip_off, MU_SEEK_SET, NULL)); } - MU_ASSERT (mu_stream_copy (out, in, 0)); + MU_ASSERT (mu_stream_copy (out, in, 0, NULL)); if (reread_option) { mu_stream_printf (out, "rereading from %lu:\n", (unsigned long) reread_off); MU_ASSERT (mu_stream_seek (in, reread_off, MU_SEEK_SET, NULL)); - MU_ASSERT (mu_stream_copy (out, in, 0)); + MU_ASSERT (mu_stream_copy (out, in, 0, NULL)); } mu_stream_close (in); |