- 08 Sep, 2010 7 commits
-
-
* examples/header.c: Use streamrefs. * examples/mimetest.c: Likewise. * examples/mta.c: Likewise. * examples/nntpclient.c: Remove an unused variable.
Sergey Poznyakoff authored -
The `mail' and `frm' utilities pass tests. * include/mailutils/stream.h (mu_stream_err): New proto. * libproto/mbox/mbox.c (_msg_stream_setup) (_msg_body_setup): Fix stream abridgement. (mbox_envelope_date, mbox_envelope_sender): Fix seek position. (uid_to_stream): Fix invocation of mu_stream_printf. (append_message_to_stream): Likewise. (mbox_expunge_unlocked): Rewind tempstr before copying its contents back to the mailbox. (mbox_expunge0): Open tempstr. * libproto/mbox/mbox0.h (_mbox_message)<header_from>: Rename to envel_from. <header_from_end>: Rename to envel_from_end. All uses changed. * libproto/mbox/mboxscan.c: Minor changes. * mail/decode.c: Use streamrefs. * mail/escape.c: Likewise. * mail/msgset.y: Likewise. * mail/pipe.c: Likewise. * mail/print.c: Likewise. * mail/top.c: Likewise. * mail/write.c: Likewise. * mail/send.c: Use streamrefs. (mail_send0): Reset env->header after assigning it to the message. * mailbox/body.c (_body_seek): Fix a typo which produced a recursive call. * mailbox/file_stream.c (fd_truncate): New function. (_mu_file_stream_create): Initialize str->stream.truncate. * mailbox/header.c (header_parse): Fix parsing of blurbs lacking terminating empty line. (header_seek): Fix boundary checks. Return new position in presult. * mailbox/message.c (string_find_eoh): Rewrite to handle \n\n split between two successive invocations. (_header_fill): Update the invocation of string_find_eoh. * mailbox/stream.c (mu_stream_destroy): Call mu_stream_close. (mu_stream_get_flags, mu_stream_set_flags) (mu_stream_clr_flags): Ignore internal bits. (mu_stream_err): New function. (mu_stream_close): Close the stream only if it is not used by anyone else. * mailbox/streamref.c (_streamref_read): Clear transport error if ESPIPE is returned. (_streamref_size): Take into account sp->end and sp->start. (mu_streamref_create_abridged): Set pointer to 0.
Sergey Poznyakoff authored -
* mailbox/amd.c (amd_body_stream_seek): Fix boundary checking. Return ESPIPE on boundary error. * mailbox/header.c (header_seek): Likewise. * mailbox/memory_stream.c (_memory_seek): Likewise. * mailbox/message.c (_message_stream_seek): Likewise. * mailbox/message_stream.c (_message_seek): Likewise. * mailbox/stdio_stream.c (stdio_seek): Likewise. * mailbox/file_stream.c (fd_open): Invert error condition. Fix computation of open flags. Return immediately if open returns -1. (fd_seek): Fix boundary checking. Return ESPIPE on boundary error. * mailbox/mapfile_stream.c (_mapfile_open): Fix flags calculation. (_mapfile_seek): Fix boundary checking. Return ESPIPE on boundary error. * mailbox/streamref.c (_streamref_read): Fix calculation of the top size boundary. Return 0 bytes if seek returns ESPIPE. (_streamref_seek): Return ESPIPE on boundary error. * mailbox/base64.c (_base64_decoder, _base64_encoder): Do not dereference iobuf if cmd is mu_filter_init or mu_filter_done. * mailbox/binflt.c (_copy_codec, _bit7_coder): Likewise. * mailbox/crlfflt.c (_crlf_encoder, _crlf_decoder): Likewise. * mailbox/linelenflt.c (_ll_encoder): Likewise. * mailbox/qpflt.c (_qp_decoder, _qp_encoder): Likewise. * mailbox/mailcap.c (mu_mailcap_parse): Fix loop condition.
Sergey Poznyakoff authored -
* examples/sfrom.c (main): Check return from mu_mailbox_messages_count. * include/mailutils/sys/stream.h (_MU_STR_WRT): New constant. * libproto/mbox/mbox.c (_msg_stream_setup): Fix 3rd argument to mu_streamref_create_abridged. * libproto/mbox/mboxscan.c (mbox_scan_internal): Don't use mailbox->stream directly, because its offsets may get shifted by observers. Use streamref instead. * mailbox/argcv.c (argcv_get): Do nothing if argc <= 0. * mailbox/mapfile_stream.c (_mapfile_seek): Fill the *presult. * mailbox/memory_stream.c (_memory_done): Remove leftover free. * mailbox/stream.c: Reorder functions. (_mu_stream_create): Increase reference count (i.e. set it to 1) before returning. (mu_stream_seek): Call _stream_flush_buffer instead of mu_stream_flush. (mu_stream_read_unbuffered): Return 0 on EOF. (mu_stream_write_unbuffered): Set _MU_STR_WRT bit. (mu_stream_readline, mu_stream_getdelim): Check the actual number of bytes read. (mu_stream_flush): Call flush method only if _MU_STR_WRT is set. Clear it. * mailbox/streamref.c (_streamref_seek): Optimization for off==0 and whence == MU_SEEK_CUR. (_streamref_seek): Return new offset in ppos. (mu_streamref_create_abridged): Set MU_STREAM_NO_CLOSE. * mailbox/memory_stream.c (_memory_seek) : Return new offset in presult. * mailbox/message_stream.c (_message_seek): Likewise. * mailbox/stdio_stream.c (stdio_seek): Fix prototype.
Sergey Poznyakoff authored -
Does not compile yet. New files: * mailbox/streamref.c * include/mailutils/sys/streamref.h * include/mailutils/sys/file_stream.h * include/mailutils/sys/header_stream.h * include/mailutils/sys/mapfile_stream.h * include/mailutils/sys/memory_stream.h * include/mailutils/sys/message_stream.h * include/mailutils/sys/prog_stream.h * include/mailutils/sys/socket_stream.h * include/mailutils/sys/stdio_stream.h * include/mailutils/sys/stream.h * include/mailutils/sys/streamtrans.h * mailbox/prog_stream.c * mailbox/stdio_stream.c * mailbox/stream_printf.c * mailbox/stream_vprintf.c * mailbox/temp_file_stream.c * mailbox/streamcpy.c * mailbox/binflt.c * mailbox/crlfflt.c * mailbox/fltstream.c * mailbox/qpflt.c * mailbox/linelenflt.c Removed files: * mailbox/filter_rfc822.c * mailbox/filter_trans.c Moved files (with edits): * libproto/include/filter0.h -> include/mailutils/sys/filter.h * libproto/include/header0.h -> include/mailutils/sys/header.h * libproto/include/message0.h -> include/mailutils/sys/message.h * libproto/include/mime0.h -> include/mailutils/sys/mime.h Modified files: * comsat/action.c * config/mailutils-config.c * examples/base64.c * examples/cpp/msg-send.cc * examples/header.c * examples/http.c * examples/iconv.c * examples/mimetest.c * examples/msg-send.c * examples/mta.c * examples/murun.c * examples/nntpclient.c * examples/pop3client.c * imap4d/append.c * imap4d/auth_gsasl.c * imap4d/fetch.c * imap4d/preauth.c * imap4d/search.c * imap4d/util.c * include/mailutils/body.h * include/mailutils/folder.h * include/mailutils/header.h * include/mailutils/mailbox.h * include/mailutils/mailer.h * include/mailutils/mailutils.h * include/mailutils/message.h * include/mailutils/stream.h * include/mailutils/sys/Makefile.am * include/mailutils/sys/filter.h * include/mailutils/sys/header.h * include/mailutils/sys/message.h * include/mailutils/sys/mime.h * include/mailutils/sys/nntp.h * include/mailutils/sys/pop3.h * include/mailutils/sys/stream.h * include/mailutils/types.hin * lib/mailcap.c * lib/mu_dbm.h * libmu_argp/muinit.c * libmu_auth/ldap.c * libmu_auth/tls.c * libmu_scm/Makefile.am * libmu_scm/mu_body.c * libmu_scm/mu_message.c * libmu_scm/mu_port.c * libmu_sieve/actions.c * libmu_sieve/extensions/pipe.c * libmu_sieve/extensions/spamd.c * libmu_sieve/extensions/vacation.c * libproto/mailer/smtp.c * libproto/mbox/mboxscan.c * libproto/mbox/mbox.c * libproto/mbox/mbox0.h * libproto/nntp/nntp_article.c * libproto/nntp/nntp_carrier.c * libproto/nntp/nntp_destroy.c * libproto/nntp/nntp_ihave.c * libproto/nntp/nntp_post.c * libproto/nntp/nntp_readline.c * libproto/nntp/nntp_sendline.c * libproto/pop/pop3_carrier.c * libproto/pop/pop3_destroy.c * libproto/pop/pop3_readline.c * libproto/pop/pop3_sendline.c * libproto/pop/pop3_stat.c * maidag/mailtmp.c * mail/decode.c * mail/escape.c * mail/msgset.y * mail/pipe.c * mail/print.c * mail/send.c * mail/top.c * mail/util.c * mail/write.c * mailbox/Makefile.am * mailbox/amd.c * mailbox/attachment.c * mailbox/body.c * mailbox/cfg_driver.c * mailbox/cfg_format.c * mailbox/debug.c * mailbox/file_stream.c * mailbox/folder.c * mailbox/hdritr.c * mailbox/header.c * mailbox/mailbox.c * mailbox/mailcap.c * mailbox/mailer.c * mailbox/mapfile_stream.c * mailbox/memory_stream.c * mailbox/message.c * mailbox/message_stream.c * mailbox/mime.c * mailbox/mimehdr.c * mailbox/mutil.c * mailbox/prog_stream.c * mailbox/progmailer.c * mailbox/rfc2047.c * mailbox/socket_stream.c * mailbox/stream.c * mailbox/stream_vprintf.c * mailbox/tcp.c * mailbox/vartab.c * mailbox/wicket.c * mh/burst.c * mh/comp.c * mh/compcommon.c * mh/forw.c * mh/mh_ctx.c * mh/mh_format.c * mh/mh_init.c * mh/mh_list.c * mh/mh_whatnow.c * mh/mhl.c * mh/mhn.c * mh/pick.y * mh/repl.c * mimeview/mimeview.c * mu-aux/generr.awk * pop3d/extra.c * pop3d/pop3d.h * pop3d/retr.c * pop3d/top.c * readmsg/msglist.c * readmsg/readmsg.c * sieve/sieve.c
Sergey Poznyakoff authored
-
- 07 Sep, 2010 1 commit
-
-
* imap4d/fetch.c (fetch_function_closure) <section_tag>: New member. (_frt_body_text): Output ffc->section_tag after the secion part by default. (_frt_header, _frt_mime): Remove. (_frt_header0): Rewrite as a general-purpose _frt_header function. (parse_section_text): Set _frt_header as a driver function and set section_tag accordingly, instead of selecting _frt_header/_frt_mime. Set section_tag when selecting _frt_body_text. (parse_section): Default to _frt_body_text and fall back to _frt_body only when an empty section specifier is given. * imap4d/testsuite/imap4d/fetch.exp: Update accordingly.
Sergey Poznyakoff authored
-
- 26 Aug, 2010 1 commit
- 12 Aug, 2010 2 commits
-
-
* mailbox/mime.c (mu_mime_get_num_parts): Assume MIME message is not scanned if nmtp_parts are 0 and boundary is NULL. * mailbox/rfc2047.c (mu_rfc2047_decode): Free the buffer prior to returning a non-zero status. * mailbox/message.c (mu_message_destroy): Install a kludge to work over the slopy ref semantics. * mailbox/auth.c (mu_authority_destroy): Free auth_methods list. * mailbox/locker.c (destroy_dotlock): Free data.dot.nfslock.
Sergey Poznyakoff authored
- 02 Jun, 2010 2 commits
- 26 May, 2010 1 commit
-
-
Delivery of a signal when a previous signal was being handled caused mailbox corruption. * imap4d/imap4d.c (imap4d_child_signal_setup): New function. (imap4d_mainloop): Call imap4d_child_signal_setup. * imap4d/signal.c (imap4d_child_signal): Reset all signal handlers before doing actual job. * lib/signal.c (mu_set_signals): Use sigaction.
Sergey Poznyakoff authored
-
- 20 May, 2010 2 commits
-
-
* movemail/movemail.c: New options: --ignore-errors and --program-id. (_compare_msgno): Remove now unneded static. (main): Handle --ignore-errors and --program-id settings. Optimize the main loop for the case when --uidls is given. Return 1 on errors. * doc/texinfo/programs.texi: Document new features.
Sergey Poznyakoff authored
-
- 18 May, 2010 1 commit
-
-
* mailbox/url.c (_url_path_default): Fix improper use of sizeof (a typo, probably).
Sergey Poznyakoff authored
-
- 13 May, 2010 2 commits
-
-
* mh/mh_getopt.c (mh_opt_notimpl, mh_opt_notimpl_warning): New functions. * mh/mh_getopt.h (mh_opt_notimpl, mh_opt_notimpl_warning): New protos. * mh/ali.c (doc): Remove 'not implemented' stanza. * mh/pick.c: Likewise. * mh/anno.c: Use mh_opt_notimpl and mh_opt_notimpl_warning for not implemented options. * mh/comp.c: Likewise. * mh/forw.c: Likewise. * mh/mhn.c: Likewise. * mh/refile.c: Likewise. * mh/repl.c: Likewise. * mh/scan.c: Likewise. * mh/send.c: Likewise.
Sergey Poznyakoff authored -
* mh/mh_global.c (mh_read_profile): Set MU folder directory to mh_get_dir. This fixes the bug reported by Peter S Galbraith (Id. <15312.1273667793@mixed>, ref. http://sourceforge.net/mailarchive/forum.php?thread_name=15904.1273699954%40mixed&forum_name=mh-e-devel)
Sergey Poznyakoff authored
-
- 11 May, 2010 2 commits
-
-
-
* gint: Update to 4e48677eee5a * configure.ac (--without-guile): Remove option. Handled by GINT_INIT. (GINT_INIT): Don't call it within a conditional.
Sergey Poznyakoff authored
-
- 06 May, 2010 1 commit
-
-
* mailbox/rfc2047.c (getword): Initialize *pret to NULL after freeing it.
Sergey Poznyakoff authored
-
- 29 Apr, 2010 4 commits
-
-
* libproto/include/mime0.h (struct _mu_mime): Use size_t for offsets, ssize_t for line_ndx.
Sergey Poznyakoff authored -
* libproto/include/mime0.h (struct _mu_mime): New member line_size. * mailbox/mime.c (_mime_setup_buffers): Use line_size instead of MIME_MAX_HDR_LEN. (_mime_parse_mpart_message): Reallocate cur_line as necessary. (mu_mime_create): Initialize line_size.
Sergey Poznyakoff authored -
* mailbox/mimehdr.c (_header_get_param): Tolerate unquoted value parts which contain tspecials, except ';'.
Sergey Poznyakoff authored
-
- 26 Apr, 2010 1 commit
-
-
* mailbox/mimehdr.c (disp_segment_len): New function. (mu_mimehdr_get_disp, mu_mimehdr_aget_disp): Use disp_segment_len. Unquote the returned string. (_header_get_param): Allow for whitespace before '"'. Unquote the string before comparison.
Sergey Poznyakoff authored
-
- 18 Apr, 2010 1 commit
- 14 Apr, 2010 5 commits
-
-
* include/mailutils/stream.h (mu_stream_clr_flags): New function. * mailbox/stream.c (mu_stream_clr_flags): New function. * mailbox/mapfile_stream.c (_mapfile_open): Avoid unnecessary boolean operation. * mailbox/mutil.c (mu_decode_filter): Use mu_stream_clr_flags to clear bits.
Sergey Poznyakoff authored -
* mailbox/mimehdr.c (mu_mimehdr_get_disp) (mu_mimehdr_aget_disp): Return disposition even if no parameters have been given.
Sergey Poznyakoff authored -
* mailbox/filter.c (filter_destroy): Destroy the underlying stream, unless flag is given. (mu_filter_create): Treat last argument as stream flags. * mailbox/filter_iconv.c (_icvt_destroy): Free the icvt_stream structure. * examples/mimetest.c (message_display_parts): Pass MU_STREAM_NO_CLOSE to the invocation of mu_filter_create. * mail/decode.c (display_submessage): Likewise. * mailbox/attachment.c (mu_message_save_attachment): Likewise. * mh/mh_list.c (eval_body): Likewise. * mh/mhn.c (mhn_message_size, show_internal): Likewise. (finish_text_msg): Likewise; call mu_stream_destroy * imap4d/preauth.c (decode64_buf): remove unnecessary call to mu_stream_destroy. * libmu_auth/ldap.c (chk_md5, chk_smd5) (chk_sha, chk_ssha): Likewise. * mailbox/mutil.c: Fix indentation.
Sergey Poznyakoff authored -
* mailbox/rfc2047.c (getword): Change signature; return error code. (mu_rfc2047_decode): Reflect the above change.
Sergey Poznyakoff authored -
* gint: Upgrade. * libmu_scm/Makefile.am: Initialize BUILT_SOURCES. * libmu_scm/mu_address.c (address_get_fp): Change signature to match those of mu_address_aget family. (all functions): Use functions from mu_address_aget family. Downcase argument names. Refer to them in the docstring using @var notation. * libmu_scm/mu_body.c: Downcase argument names. Refer to them in the docstring using @var notation. * libmu_scm/mu_logger.c: Likewise. * libmu_scm/mu_mailbox.c: Likewise. * libmu_scm/mu_message.c: Likewise. * libmu_scm/mu_mime.c: Likewise. * libmu_scm/mu_scm.c: Likewise. * libmu_scm/mu_util.c: Likewise.
Sergey Poznyakoff authored
-
- 12 Apr, 2010 1 commit
-
-
* gint: New module. * am/guile.m4: Remove. * mu-aux/guile-doc-snarf: Remove. * mu-aux/guile-doc-snarf.awk: Remove. * mu-aux/Makefile.am (EXTRA_DIST): Remove guile-doc-snarf, guile-doc-snarf.awk * Makefile.am: Add gint. * bootstrap.conf: Init gint submodule. * configure.ac: Rewrite Guile support using GINT_INIT. (AC_CONFIG_FILES): Add gint/Makefile. * guimb/scm/Makefile.am (sitedir): Change. * guimb/scm/Makefile.am: Likewise. * libmu_scm/Makefile.am: Include ../gint/gint.mk Adjust all variables. Remove unnecessary rules. * libmu_scm/mailutils.scm.in: Remove exports and includes. Remove obsolete code. * libmu_scm/mu_address.c: Use SCM_DEFINE_PUBLIC to declare public interfaces. * libmu_scm/mu_body.c: Likewise. * libmu_scm/mu_mailbox.c: Likewise. * libmu_scm/mu_message.c: Likewise. * libmu_scm/mu_mime.c: Likewise. * libmu_scm/mu_util.c: Likewise. * libmu_scm/mu_logger.c: Likewise. (mu_scm_logger_init): Make all constants public. * libmu_scm/mu_scm.c: Likewise. * libmu_scm/mu_guile.c: Use scm_c_catch instead of the obsolete scm_internal_lazy_catch.
Sergey Poznyakoff authored
-
- 08 Apr, 2010 6 commits
-
-
* include/mailutils/message.h (mu_message_save_attachment) (mu_message_encapsulate, mu_message_unencapsulate): Change type of the last argument. (mu_mime_io_buffer_create,mu_mime_io_buffer_destroy) (mu_mime_io_buffer_set_size,mu_mime_io_buffer_get_size) (mu_mime_io_buffer_set_charset,mu_mime_io_buffer_sget_charset) (mu_mime_io_buffer_aget_charset): New prototypes. (mu_mimehdr_get_disp,mu_mimehdr_aget_disp): Remove unneeded parameter. * include/mailutils/types.hin (mu_mime_io_buffer_t): New type. * mailbox/attachment.c (_msg_info): Rename structure to _mu_mime_io_buffer. <header_buf,header_len,mu_header_size>: Remove unreferenced members. <refcnt,bufsize,charset>: New members. <ioffset,ooffset>: Change type to size_t. (mu_mime_io_buffer_create,mu_mime_io_buffer_destroy) (mu_mime_io_buffer_set_size,mu_mime_io_buffer_get_size) (mu_mime_io_buffer_set_charset,mu_mime_io_buffer_sget_charset) (mu_mime_io_buffer_aget_charset): New functions. (mu_message_save_attachment) (mu_message_encapsulate, mu_message_unencapsulate): Take mu_mime_io_buffer_t as the last argument. * mailbox/mimehdr.c (mu_mimehdr_get_disp): Remove unneeded parameter. (mu_mimehdr_aget_disp): Remove unneeded parameter. Store return value into pvalue. * examples/mimetest.c (message_display_parts): Use mu_mimehdr_aget_disp and mu_mime_io_buffer_* functions. * mailbox/testsuite/Mime: Update. * mh/mhn.c (options, opt_handler): New option --charset. (store_handler): Use mu_message_aget_decoded_attachment_name.
Sergey Poznyakoff authored -
* examples/python/mimetest.py: Update. * include/mailutils/cpp/message.h (get_attachment_name): Overload. * libmu_cpp/message.cc (Message::get_attachment_name): Overload. * python/libmu_py/message.c (api_message_get_attachment_name): Update. * python/mailutils/message.py (Message.get_attachment_name): Add optional charset parameter. Return (name, lang) tuple.
Wojciech Polak authored -
* mailbox/rfc2047.c (mu_rfc2047_decode): Use temporary buffer for reading from the filter stream, to avoid preliminary breaking from the read loop when end of the buffer is reached. Realloc the buffer as neccessary.
Sergey Poznyakoff authored -
* mailbox/mimehdr.c (_header_get_param): If buf is NULL on entry, make sure it alwaus points to allocated memory afterwards. * examples/mimetest.c (charset): New variable. (main): New command line option -c. (message_display_parts): Use mu_message_aget_decoded_attachment_name. Pass fname to mu_message_save_attachment.
Sergey Poznyakoff authored -
* mailbox/mimehdr.c (_header_get_param): Improve error checking. Allow for optional whitespace around the '='. * mailbox/rfc2047.c (mu_rfc2047_decode): tocode=NULL is OK.
Sergey Poznyakoff authored
-