Improve filter framework. Implement a CRLFDOT filter.
* include/mailutils/filter.h (mu_filter_command) <mu_filter_flush> New command. (mu_filter_result) <mu_filter_again>: New result code. (MU_FILTER_MAX_AGAIN): New constant. (mu_crlfdot_filter): New filter. * include/mailutils/sys/stream.h (_MU_STR_DIRTY, _MU_STR_WRT) (_MU_STR_ERR, _MU_STR_EOF, _MU_STR_INTERN_MASK): Avoid conflicts with MU_STREAM_ constants from mailutils/stream.h * mailbox/crlfdot.c: New source. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add crlfdot.c. * mailbox/filter.c (mu_filter_get_list): Register mu_crlfdot_filter. * mailbox/fltstream.c (init_iobuf): Fix initialization of isize and input. (filter_read): Redo the loop, allowing xcode to request a new iteration by returning mu_filter_again. (filter_write_internal): Likewise. (filter_wr_flush): Call filter_write_internal with mu_filter_flush, reserving mu_filter_lastbuf for really last buffers. (filter_close): Call filter_write_internal with mu_filter_lastbuf. * mailbox/stream.c (mu_stream_skip_input_bytes): Clear MU_STREAM_SEEK bit before actually doing anything. * include/mailutils/sys/pop3.h [DMALLOC]: Remove unneeded cond.
Showing
8 changed files
with
431 additions
and
50 deletions
mailbox/crlfdot.c
0 → 100644
-
Please register or sign in to post a comment