1. 22 Dec, 2011 1 commit
    • * libmailutils/string/wordsplit.c (alloc_space): Fix reallocation
      calculations.
      
      * imap4d/fetch.c (bodystructure): Output number of lines for any
      TEXT part, not only TEXT/PLAIN.
      
      * include/mailutils/header.h (MU_HEADER_CONTENT_LOCATION): New define.
      * include/mailutils/imap.h (mu_imap_fetch_bodystructure): Implement.
      (mu_imap_fetch_envelope): Replace data fields with a single pointer
      to struct mu_imapenvelope.
      * include/mailutils/message.h: Include datetime.h
      (mu_imapenvelope, mu_bodystructure): New structs.
      (mu_message_type): New type.
      (mu_message_get_imapenvelope,mu_message_imapenvelope_free)
      (mu_message_set_imapenvelope)
      (mu_bodystructure_free,mu_list_free_bodystructure)
      (mu_message_get_bodystructure)
      (mu_message_set_bodystructure): New protos.
      * include/mailutils/mime.h (mu_mime_param_assoc_create)
      (mu_mime_param_assoc_add): New protos.
      * include/mailutils/sys/message.h (_mu_message)<_imapenvelope>
      <_bodystructure>: New methods.
      * libmailutils/mailbox/bodystruct.c: New file.
      * libmailutils/mailbox/imapenv.c: New file.
      * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add new
      sources.
      
      * libproto/imap/fetch.c: Implement bodystructure.
      * mu/imap.c: Likewise.
      
      * testsuite/bs.c: New file.
      * testsuite/Makefile.am (noinst_PROGRAMS): Add bs.
      Sergey Poznyakoff authored
  2. 21 Dec, 2011 2 commits
    • Old API relied on passing a pointer to the buffer string and its size,
      which is defective.  The new API, in addtion to that, provides functions
      for obtaining a pointer to the statically allocated original value, a
      pointer to dynamically allocated copy, and a function for formatting the
      address directly to a MU stream.
      
      Two functions are marked as deprecated: mu_address_to_string and
      mu_address_format_string.  Both assume a pointer to an allocated string
      of a fixed size, which is far from being convenient nor reliable enough.
      
      * include/mailutils/address.h (MU_ADDR_HINT_ADDR): Rename to
      MU_ADDR_HINT_PRINTABLE
      (mu_address)<addr>: Rename to printable.
      (mu_address_sget_printable,mu_address_aget_printable)
      (mu_address_get_printable): New protos.
      (mu_stream_format_address): New proto.
      (mu_address_to_string)
      (mu_address_format_string): Mark as deprecated.
      (mu_validate_email): New proto.
      * examples/mta.c: Use mu_address_sget_printable instead
      of (mu_address_to_string)
      * libmailutils/address/addrstream.c: New file.
      * libmailutils/address/Makefile.am (libaddress_la_SOURCES): Add
      addrstream.c
      * libmailutils/address/address.c (mu_address_format_string): Rewrite using
      streams.
      (mu_address_to_string): Rewrite as a wrapper over
      mu_address_get_printable.
      (mu_address_sget_printable,mu_address_aget_printable)
      (mu_address_get_printable): New functions.
      * libmailutils/mime/mimehdr.c (_mime_header_parse): Initialize rc.
      * mail/util.c (util_merge_addresses): Use mu_address_aget_printable.
      * mh/mh.h (mh_annotate): Both string args are const.
      * mh/mh_init.c (mh_annotate): Likewise.
      * mh/mh_format.c (builtin_formataddr): Use mu_address_sget_printable.
      * mh/mh_whatnow.c (anno_data)<field,value>: Both are consts.
      (annotate): Use mu_address_sget_printable.
      * mh/send.c (set_address_header): Use mu_address_sget_printable.
      * mu/imap.c (format_email): Use mu_stream_format_address.
      * python/libmu_py/address.c (api_address_to_string): Likewise.
      Sergey Poznyakoff authored
    • This case requires full recursion.
      
      * imap4d/fetch.c (bodystructure): Call fetch_bodystructure0.
      Sergey Poznyakoff authored
  3. 20 Dec, 2011 2 commits
    • Sergey Poznyakoff authored
    • The new implementation is able to return all parameters at once,
      in an associative array. A subset of parameters can be requested.
      The data are automatically converted to the output charset.
      
      In addition, RFC-2047 parser is extended to support language
      specifications (RFC-2231, chapter 5).
      
      * include/mailutils/message.h (MU_MIMEHDR_CSINFO)
      (MU_MIMEHDR_MULTILINE): Remove, not public anymore.
      (mu_mimehdr_get_param,mu_mimehdr_aget_param)
      (mu_message_aget_attachment_name)
      (mu_message_get_attachment_name): Remove pflags agrument.
      * include/mailutils/mime.h (mu_mime_param): New struct.
      (mu_rfc2047_decode_param)
      (mu_mime_header_parse,mu_mime_header_parse_subset): New proto.
      * libmailutils/base/rfc2047.c (_rfc2047_decode_param): New
      auxiliary function.  Use memory stream to collect data.
      (mu_rfc2047_decode): Rewrite as a wrapper around the above.
      (mu_rfc2047_decode_param): New function.
      * libmailutils/filter/decode.c (mu_decode_filter_args): Pass actual
      (instead of maximal) number of arguments to mu_filter_chain_create.
      * libmailutils/mime/mimehdr.c: Rewrite from scratch.
      * libmailutils/tests/.gitignore: Add mimehdr.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add mimehdr.
      (TESTSUITE_AT): Add mimehdr.at.
      * libmailutils/tests/mimehdr.at: New test.
      * libmailutils/tests/mimehdr.c: New test program.
      * libmailutils/tests/testsuite.at: Include.
      Sergey Poznyakoff authored
  4. 16 Dec, 2011 7 commits
    • * include/mailutils/util.h (MU_HIERARCHY_DELIMITER): New define.
      (mu_tilde_expansion): Change signature.  Delimiter is an int.
      * libmailutils/base/tilde.c: Likewise. All uses update.
      
      * imap4d/namespace.c (namespace_checkfullpath)
      (namespace_getfullpath): Remove delim argument. All uses updated.
      * imap4d/util.c (util_getfullpath): Remove delim argument. All uses updated.
      Sergey Poznyakoff authored
    • * imap4d/imap4d.h: Include mailutils/imaputil.h
      * imap4d/list.c: Use mu_folder_imap_match/mu_imap_wildmatch.
      * imap4d/lsub.c: Likewise.
      * imap4d/util.c (util_wcard_match): Move as to libmailutils
      as mu_imap_wildmatch.
      * include/mailutils/imaputil.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add imaputil.h
      * include/mailutils/folder.h (mu_folder_imap_match)
      (mu_folder_glob_match): New protos.
      * include/mailutils/imapio.h (mu_imap_flag_to_attribute)
      (mu_imap_format_flags): Move to imaputil.h
      * libmailutils/imapio/wildmatch.c: New file.
      * libmailutils/imapio/sendflg.c: New file.
      * libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add
      sendflg.c and wildmatch.c.
      * libmailutils/imapio/flags.c (mu_imapio_send_flags): Move to
      sendflg.c
      * libmailutils/mailbox/folder.c (mu_folder_match): Rename to
      mu_folder_glob_match.
      (mu_folder_imap_match): New function.
      (mu_folder_create_from_record): Use mu_folder_imap_match as the default
      matcher.
      * libmailutils/tests/fsfolder.c: Start command line options with a dash.
      New option "-glob".  All uses changed.
      * libproto/imap/select.c: Include imaputil.h
      * mu/imap.c: Likewise.
      Sergey Poznyakoff authored
    • * python/Makefile.am (EXTRA_DIST): Add usercustomize.py
      * python/usercustomize.py: New file.
      * python/libmu_py/Makefile.am (pythonexec_LTLIBRARIES): Remove.
      * python/mailutils/Makefile.am (pythonexec_LTLIBRARIES): New
      variable (moved from ../libmu_py/Makefile.am)
      * python/libmu_py/c_api.c: Move ...
      * python/mailutils/c_api.c: ... there
      Sergey Poznyakoff authored
    • * testsuite/Makefile.am: Add new test cases.
      * testsuite/testsuite.at: Inclide fldel.at, add banners.
      * testsuite/atlocal.in: Define MH_SUPPORT and MAILDIR_SUPPORT
      variables depending on whether the corresponding mailbox format
      is enabled.
      * testsuite/fldel.at: New test case.
      * testsuite/mbdel.at: Skip tests which rely on disabled mailbox
      formats.
      Sergey Poznyakoff authored
    • * include/mailutils/folder.h (_mu_fsfolder_init): New proto.
      * include/mailutils/mailbox.h (mu_mailbox_create_at): New proto.
      * libmailutils/mailbox/mailbox.c (mu_mailbox_create_at): New function.
      * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add fsfolder.c
      * libmailutils/mailbox/folder.c (mu_folder_delete): If folder does
      not provide its own method for deletion, use mu_mailbox_remove.
      (mu_folder_open, mu_folder_close, mu_folder_enumerate)
      (mu_folder_lsub, mu_folder_subscribe, mu_folder_unsubscribe)
      (mu_folder_rename): Return EINVAL if folder is NULL.
      (mu_folder_match): Bugfix: don't pass folder flags to fnmatch.
      * libmailutils/mailbox/fsfolder.c: New file. Implementation of
      file-system based folders.
      * libmailutils/mailbox/mailbox (_create_mailbox0): Propagate error
      return from mu_registrar_lookup_url.
      * libmailutils/tests/fsfolder00.at: New test case.
      * libmailutils/tests/fsfolder01.at: New test case.
      * libmailutils/tests/fsfolder02.at: New test case.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add fsfolder.
      (TESTSUITE_AT): Add fsfolder tests.
      * libmailutils/tests/testsuite.at: Include fsfolder tests.
      
      * libproto/mbox/folder.c: Use fsfolder.
      (_mh_is_scheme): Check file even if scheme matches.
      * libproto/maildir/folder.c: Likewise.
      (_maildir_is_scheme): Check file even if scheme matches.
      * libproto/mh/folder.c: Likewise.
      
      * testsuite/fldel.c: New file.
      * testsuite/Makefile.am (noinst_PROGRAMS): Buld fldel.
      Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_session_state): Remove.
      (mu_imap_state): Rename to mu_imap_session_state.
      (mu_imap_state_str): Rename to mu_imap_session_state_str.
      * libproto/imap/create.c (mu_imap_session_state)
      (mu_imap_iserror,mu_imap_clearerr): Move to state.c
      * mu/imap.c: Update accordingly.
      Sergey Poznyakoff authored
  5. 15 Dec, 2011 1 commit
    • * libmailutils/list/listlist.c (mu_list_append_list): Do nothing if the
      source list is empty.
      
      * include/mailutils/sys/imap.h (_mu_imap_url_init)
      (_mu_imaps_url_init): New protos.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Restore url.c
      * libproto/imap/mbox.c: Deleted
      * libproto/imap/url.c: Rewrite.
      * libproto/imap/folder.c: Rewrite from scratch.
      * configure.ac: Build libproto/imap/tests/Makefile
      * include/mailutils/imap.h (mu_imap_session_state)
      (mu_imap_iserror, mu_imap_clearerr)
      (mu_imap_login_secret): New protos.
      * include/mailutils/sys/imap.h (_mu_imap_list_element_is_nil): New proto.
      
      * libmailutils/mailbox/folder.c (mu_folder_list): Pass
      MU_FOLDER_ATTRIBUTE_ALL.
      * libproto/imap/fake-folder.c: Remove.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Remove fake-folder.c
      Add url.c and folder.c
      * libproto/imap/create.c (mu_imap_session_state)
      (mu_imap_iserror, mu_imap_clearerr): New functions.
      * libproto/imap/delete.c: Check input parameters.
      
      * libproto/imap/fetch.c: Use _mu_imap_list_element_is_nil to check for
      empty lists.
      * libproto/imap/genlist.c: Likewise.
      * libproto/imap/rename.c: Likewise.
      * libproto/imap/subscribe.c: Likewise.
      * libproto/imap/unsubscribe.c: Likewise.
      
      * libproto/imap/resplist.c: Treat NIL and () equally.
      * libproto/imap/login.c (mu_imap_login_secret): New function.
      
      * mu/imap.c: Fix a typo.
      Sergey Poznyakoff authored
  6. 14 Dec, 2011 5 commits
    • Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_starttls): New proto.
      * include/mailutils/imapio.h: Use mu_imapio_t instead of struct _mu_imapio *.
      * include/mailutils/sys/imap.h (MU_IMAP_CLIENT_STARTTLS_RX): New state.
      * libmailutils/imapio/transport.c: New file.
      * libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add transport.c
      * libproto/imap/starttls.c: New file.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add starttls.c.
      * libproto/imap/capability.c (mu_imap_capability): Bugfix: set up
      comparator and reclaim function after successful return from mu_list_map.
      * libproto/imap/capatst.c (mu_imap_capability_test): Clear MU_IMAP_RESP
      bit.
      * libproto/imap/err.c (mu_imap_strerror): Return errstr only if
      MU_IMAP_RESP is set.
      * mu/imap.c: Implement starttls.
      Sergey Poznyakoff authored
    • LSUB is pretty similar to LIST, therefore it is implemented as a
      wrapper over the latter.
      
      * include/mailutils/imap.h (mu_imap_genlist,mu_imap_genlist_new)
      (mu_imap_lsub,mu_imap_lsub_new): New protos.
      * include/mailutils/sys/imap.h (MU_IMAP_CLIENT_LSUB_RX): New state.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add new files.
      * libproto/imap/genlist.c: New file.
      * libproto/imap/list.c: Rewrite using generalized list functions.
      * libproto/imap/lsub.c: New file.
      * mu/imap.c: Implement lsub.
      Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_subscribe)
      (mu_imap_unsubscribe): New protos.
      * include/mailutils/sys/imap.h (MU_IMAP_CLIENT_SUBSCRIBE_RX)
      (MU_IMAP_CLIENT_UNSUBSCRIBE_RX): New states.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
      subscribe.c and unsubscribe.c
      * libproto/imap/subscribe.c: New file.
      * libproto/imap/unsubscribe.c: New file.
      * mu/imap.c: Implement subscribe/unsubscribe.
      Sergey Poznyakoff authored
    • * include/mailutils/imapio.h (mu_imapio_send_command)
      (mu_imapio_send_command_e,mu_imapio_send_command_v)
      (mu_imapio_last_error,mu_imapio_clearerr): New protos.
      * include/mailutils/sys/imap.h (imap_command)<uid>: Remove.
      <extra>: New member.
      * libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add new files.
      * libmailutils/imapio/qstring.c (mu_imapio_send_qstring_unfold): Improve
      functionality.
      * libmailutils/imapio/sendcmd.c: New file.
      * libmailutils/imapio/sendcmde.c: New file.
      * libmailutils/imapio/sendcmdv.c: New file.
      * libmailutils/imapio/errstate.c: New file.
      
      * libproto/imap/gencom.c (mu_imap_gencom): Use mu_imapio_send_command_v
      * libproto/imap/appstrsiz.c: Quote command arguments as necessary.
      * libproto/imap/capability.c: Likewise.
      * libproto/imap/check.c: Likewise.
      * libproto/imap/close.c: Likewise.
      * libproto/imap/copy.c: Likewise.
      * libproto/imap/delete.c: Likewise.
      * libproto/imap/expunge.c: Likewise.
      * libproto/imap/fetch.c: Likewise.
      * libproto/imap/list.c: Likewise.
      * libproto/imap/login.c: Likewise.
      * libproto/imap/mbcreate.c: Likewise.
      * libproto/imap/noop.c: Likewise.
      * libproto/imap/rename.c: Likewise.
      * libproto/imap/select.c: Likewise.
      * libproto/imap/store.c: Likewise.
      * libproto/imap/unselect.c: Likewise.
      Sergey Poznyakoff authored
  7. 13 Dec, 2011 4 commits
    • * libmailutils/stdstream/basestr.c (mu_strout): Bugfix: initialize
      destroy function.
      * include/mailutils/imap.h (imap_command)
      (mu_imap_gencom): Move to sys/imap.h
      (mu_imap_list,mu_imap_list_new): New protos.
      * include/mailutils/sys/imap.h (imap_command): New struct (from ../imap.h).
      <handler>: Rename to tagged_handler.
      (untagged_handler,untagged_handler_data): New members. All uses changed.
      (mu_imap_gencom): New proto.
      
      * libproto/imap/list.c: New file.
      * libproto/imap/Makefile.am: Add list.c
      * libproto/imap/gencom.c: Use supplied untagged_handler to
      analize untagged response.
      
      * mu/imap.c: Implement list command.
      Sergey Poznyakoff authored
    • * libmu_sieve/sieve.y (mu_sieve_compile): Initialize rc.
      * python/libmu_py/sieve.c (api_sieve_machine_error_text): Fix
      type of length.
      Sergey Poznyakoff authored
    • * python/libmu_py/sieve.c (api_sieve_machine_init): Improve.
      (api_sieve_machine_error_text): Add new function.
      * python/libmu_py/stream.c (api_memory_stream_create): Likewise.
      (api_stream_to_message): Likewise.
      * python/mailutils/error.py (Error): Add optional str_error argument.
      * python/mailutils/sieve.py: Update.
      * python/mailutils/stream.py (to_message): Add new method.
      (MemoryStream): Add new class.
      Wojciech Polak authored
    • * libmailutils/datetime/streamftime.c (mu_c_streamftime): Handle
      %Z separately.
      * libmu_sieve/sieve.y (mu_sieve_compile): Return MU_ERR_PARSE on
      errors.
      Sergey Poznyakoff authored
  8. 12 Dec, 2011 4 commits
    • * libmailutils/filter/base64.c (_base64_encoder): Continue after
      incrementing nbytes.
      * mh/mhn.c: Additional error checking.
      Sergey Poznyakoff authored
    • This allows programmers to use them right away, much like their stdio
      counterparts.  The mu_stdstream_setup and friends can be used to
      re-initialize them, should the need be.
      
      * include/mailutils/sys/file_stream.h
      (_MU_FILE_STREAM_STATIC_FILENAME): New flag.
      (_mu_file_stream_setup): New proto.
      * include/mailutils/sys/logstream.h (_mu_log_stream_setup): New proto.
      * include/mailutils/sys/stream.h (_MU_STR_EVENT_BOOTSTRAP): New event
      code.
      (_mu_stream) <destroy>: New method.
      * libmailutils/stdstream/basestr.c: Define the three standard streams
      statically, use bootstrap event to initialize them.
      * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Accept
      tag==NULL.
      * libmailutils/stream/file_stream.c (fd_done): Do not free filename if
      _MU_FILE_STREAM_STATIC_FILENAME is set.
      (_mu_file_stream_setup): New function.
      * libmailutils/stream/logstream.c (NEXT): Check size before advancing
      buffer pointer.
      (_mu_log_stream_setup): New function.
      * libmailutils/stream/stream.c (_bootstrap_event): New macro.
      (mu_stream_destroy): If .destroy is defined, use it instead of free(2).
      (mu_stream_open,mu_stream_seek,mu_stream_set_buffer)
      (mu_stream_read,mu_stream_readdelim,mu_stream_getdelim)
      (mu_stream_write,mu_stream_size,mu_stream_wait)
      (mu_stream_truncate,mu_stream_shutdown): Call _bootstrap_event at the
      beginning.
      * libmailutils/tests/.gitignore: Add strin, strout.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add strin, strout.
      (TESTSUITE_AT): Add stdstream tests.
      * libmailutils/tests/testsuite.at: Include stdstream tests.
      * libmailutils/tests/strerr.at: New test case.
      * libmailutils/tests/strin.at: Likewise.
      * libmailutils/tests/strout.at: Likewise.
      * libmailutils/tests/strin.c: New test program.
      * libmailutils/tests/strout.c: Likewise.
      Sergey Poznyakoff authored
    • * imap4d/util.c (util_getfullpath): Use mu_stpcpy.
      Sergey Poznyakoff authored
  9. 11 Dec, 2011 2 commits
  10. 10 Dec, 2011 2 commits
    • * imap4d/imap4d.h (util_format_attribute_flags)
      (util_attribute_to_type): Remove. All uses changed to
      mu_imap_format_flags and mu_imap_flag_to_attribute, respectively.
      (util_type_to_attribute): Remove.
      Sergey Poznyakoff authored
    • The new parser complies to RFC3501. Its output message sets are
      formatted as MU lists of non-overlapping contiguous message ranges,
      which reduces memory consumption and imposes less strain on CPU.
      The parser automatically translates message UIDs to sequence numbers
      and provides better error handling.
      
      * imap4d/imap4d.h (util_msgset): Remove.
      (util_parse_msgset): New proto.
      (imap4d_message_action_t): New typedef.
      (util_foreach_message): New proto.
      * imap4d/util.c  (util_msgset): Remove.
      (util_parse_msgset): New function.
      
      * imap4d/copy.c: Use util_parse_msgset to parse message set specs and
      util_foreach_message to iterate over the returned list.
      * imap4d/fetch.c: Likewise.
      * imap4d/search.c: Likewise.
      * imap4d/store.c: Likewise.
      * imap4d/tests/IDEF0955.at: Update the test.
      * include/mailutils/list.h (mu_list_action_t): Fix typedef.
      * libmailutils/list/foreach.c (mu_list_foreach)
      (mu_list_do): Update signatures.
      Sergey Poznyakoff authored
  11. 09 Dec, 2011 2 commits
  12. 08 Dec, 2011 7 commits
    • * examples/mta.c (make_tmp): Use gmtime + mu_c_streamftime to
      create From_ line.
      * libmailutils/mailbox/msgenv.c (message_envelope_date): Use gmtime.
      * maidag/deliver.c (make_tmp): Likewise.
      * maidag/lmtp.c (cfun_data): Likewise.
      * readmsg/readmsg.c (print_unix_header): Use gmtime.
      Sergey Poznyakoff authored
    • The function initializes mu_timezone structure to the local timezone.
      
      * include/mailutils/datetime.h (mu_utc_offset): Change return type.
      (mu_datetime_tz_local): New proto.
      * libmailutils/datetime/tzlocal.c: New file.
      * libmailutils/datetime/Makefile.am: Add new file.
      * libmailutils/datetime/scantime.c (mu_scan_datetime): Use
      mu_datetime_tz_local to initialize local TZ.
      * mh/mh_format.c (_parse_date): Likewise.
      * libmailutils/datetime/utcoff.c (mu_utc_offset): Returns int.
      * libmu_sieve/actions.c (mime_create_ds): Use mu_c_streamftime
      to format time directly to stream.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * imap4d/append.c: Don't reuse msg variable.
      * po/POTFILES.in: Remove unneeded file.
      Sergey Poznyakoff authored
    • * configure.ac: Build libmailutils/datetime/Makefile.am
      * include/mailutils/datetime.h (mu_datetime_julianday)
      (mu_datetime_dayofweek,mu_datetime_dayofyear)
      (mu_datetime_year_days): New protos.
      * libmailutils/Makefile.am (SUBDIRS): Add datetime
      (libmailutils_la_LIBADD): Add libdatetime.la
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove date.c
      and strftime.c.
      * libmailutils/base/date.c: Remove.
      * libmailutils/base/strftime.c: Move to libmailutils/datetime
      * libmailutils/datetime/Makefile.am: New file.
      * libmailutils/datetime/dow.c: New file.
      * libmailutils/datetime/doy.c: New file.
      * libmailutils/datetime/jd.c: New file.
      * libmailutils/datetime/scantime.c: New file.
      * libmailutils/datetime/streamftime.c: New file.
      * libmailutils/datetime/tab.c: New file.
      * libmailutils/datetime/unixtime.c: New file.
      * libmailutils/datetime/utcoff.c: New file.
      * libmailutils/datetime/yd.c: New file.
      * libmailutils/tests/scantime.at: Fix yday numbers.
      Sergey Poznyakoff authored
    • Additionally, do not typedef mu_timezone, leave it in struct namespace.
      Sergey Poznyakoff authored
    • * imap4d/append.c (imap4d_append0): Use
      mu_message_from_stream_with_envelope with crafted envelope.  The effect is
      that the envelope of the message always reflects the actual sender, as
      deduced from the header (X-Envelope-Sender, Sender, From, in that order)
      and the date given with the APPEND command (or current date/time, if not
      given).
      * imap4d/tests/append00.at: Reflect changes in the envelope.
      * imap4d/tests/append01.at: Likewise.
      * imap4d/io.c (io_format_completion_response): Call imap4d_sync to
      emit eventual non-tagged responses before the tagged one.
      
      * include/mailutils/envelope.h (mu_envelope_set_destroy): New proto.
      * include/mailutils/header.h (MU_HEADER_SENDER): Remove duplicate define.
      * include/mailutils/imap.h (mu_imap_mailbox_create)
      (mu_imap_append_stream_size,mu_imap_append_stream)
      (mu_imap_append_message,mu_imapio_send_flags)
      (mu_imapio_send_time): New protos.
      * include/mailutils/imapio.h (mu_imapio_send_literal): Remove proto.
      (mu_imapio_send_literal_string)
      (mu_imapio_send_literal_stream): New protos.
      * include/mailutils/message.h
      (mu_message_from_stream_with_envelope): New proto.
      * include/mailutils/sys/imap.h (MU_IMAP_CLIENT_APPEND_RX): New state.
      * include/mailutils/sys/message_stream.h (_mu_message_stream)
      <envelope>: Rename to envelope_string.
      <construct_envelope>: New member.
      
      * libmailutils/imapio/literal.c: Remove.
      * libmailutils/imapio/litstream.c: New file.
      * libmailutils/imapio/litstring.c: New file.
      * libmailutils/imapio/time.c: New file.
      * libmailutils/imapio/Makefile.am: Add new files.
      * libmailutils/imapio/flags.c (mu_imapio_send_flags): New function.
      * libmailutils/imapio/qstring.c (mu_imapio_send_qstring_unfold): Use
      mu_imapio_send_literal_string.
      
      * libmailutils/mailbox/envelope.c (mu_envelope_set_destroy): New
      function.
      * libmailutils/stream/message_stream.c
      (mu_message_from_stream_with_envelope): New function.
      (mu_stream_to_message): Rewrite as an alternative entry point to the
      above.
      
      * libproto/imap/Makefile.am: Add new files.
      * libproto/imap/appmsg.c: New file.
      * libproto/imap/appstr.c: New file.
      * libproto/imap/appstrsiz.c: New file.
      * libproto/imap/mbcreate.c: New file.
      
      * mu/imap.c: Implement create and append.
      Sergey Poznyakoff authored
  13. 07 Dec, 2011 1 commit