1. 24 Nov, 2016 1 commit
    • * bootstrap.conf (mu_sieve_debug, mu_sieve_trace): Remove.
      * include/mailutils/sieve.h (mu_sieve_debug): Remove.
      
      * examples/numaddr.c: Remove calls to mu_sieve_trace.
      * libmu_sieve/extensions/list.c: Likewise.
      * libmu_sieve/extensions/moderator.c: Likewise.
      * libmu_sieve/extensions/pipe.c: Likewise.
      * libmu_sieve/extensions/spamd.c: Likewise.
      * libmu_sieve/extensions/timestamp.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libmu_sieve/tests.c: Likewise.
      
      * libmu_sieve/runtime.c: Use new debugging/tracing functions.
      * libmu_sieve/sieve-priv.h (mu_i_sv_debug, mu_i_sv_trace)
      (mu_i_sv_debug_command)
      (mu_i_sv_argf, mu_i_sv_valf): New prototypes.
      * libmu_sieve/sieve.y (mu_i_sv_valf, mu_i_sv_argf): New functions.
      * libmu_sieve/util.c (mu_sieve_debug): Remove.
      (mu_i_sv_print_value_list): Remove.
      (mu_i_sv_print_tag_list): Remove.
      (mu_sieve_trace): Remove.
      (mu_i_sv_tagf): New function.
      (mu_i_sv_debug): New function.
      (mu_i_sv_trace): New function.
      (mu_i_sv_debug_command): New function.
      Sergey Poznyakoff authored
  2. 23 Nov, 2016 1 commit
    • Instead of keeping individual debug flags for each Sieve machine,
      use global debugging mechanism, category "sieve".  The following
      levels are defined:
      
        trace1  -  print parse tree before optimization
        trace2  -  print parse tree after optimization
        trace3  -  print parser traces
        trace4  -  print tests and actions being executed
        trace8  -  print disassembled code, don't run
        trace9  -  print each Sieve instruction being executed
      
      * include/mailutils/sieve.h (mu_sieve_get_debug_level)
      (mu_sieve_set_debug_level): Remove.
      (mu_sieve_is_dry_run,mu_sieve_set_dry_run
      * lib/script.c (mu_script_debug_flags): Redo.
      * lib/sieve.c (sieve_init): Remove call to obsoleted
      mu_sieve_set_debug_level.
      
      * examples/numaddr.c: Use mu_sieve_trace
      * libmu_sieve/extensions/list.c: Likewise.
      * libmu_sieve/extensions/moderator.c: Likewise.
      * libmu_sieve/extensions/pipe.c: Likewise.
      * libmu_sieve/extensions/spamd.c: Likewise.
      * libmu_sieve/extensions/timestamp.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libmu_sieve/tests.c: Likewise.
      
      * libmu_sieve/runtime.c (INSTR_DEBUG,INSTR_DISASS): Rewrite.
      (mu_sieve_get_debug_level): Remove.
      (mu_sieve_is_dry_run_: Rewrite.
      (mu_sieve_set_dry_run): New function.
      (mu_sieve_disass): Rewrite.
      * libmu_sieve/sieve-priv.h (mu_sieve_machine) <debug_level>: Remove.
      <dry_run>: New field.
      * libmu_sieve/sieve.y (mu_sieve_set_debug_level): Remove.
      * libmu_sieve/util.c (mu_sieve_trace): New function.
      * sieve/sieve.c: Rewrite support for --dry-run and --debug.
      
      * sieve/tests/ext.at: Use --libdir-prefix instead of -L
      Sergey Poznyakoff authored
  3. 22 Jan, 2016 1 commit
  4. 02 Mar, 2015 1 commit
  5. 05 Feb, 2014 1 commit
  6. 05 Jan, 2012 1 commit
  7. 09 Nov, 2011 1 commit
  8. 25 Oct, 2011 1 commit
  9. 02 Jan, 2011 1 commit
  10. 22 Dec, 2010 1 commit
    • * include/mailutils/types.hin (mu_debug_handle_t)
      (mu_debug_level_t): New data types.
      * include/mailutils/debug.h (mu_debug_level_p)
      (mu_debug_category_level)
      (mu_debug_set_category_level): Change argument types to
      mu_debug_handle_t/mu_debug_level_t.
      * libmailutils/diag/debug.c: Likewise.
      
      * libmailutils/server/acl.c (_run_entry): Call mu_debug_log_nl
      instead of mu_debug_log_end with an empty format string.
      
      * include/mailutils/sieve.h
      * libmailutils/filter/base64.c
      * libmailutils/stream/stream.c
      * libmu_sieve/conf.c
      * libmu_sieve/extensions/spamd.c
      * libmu_sieve/sieve.y
      * sieve/sieve.c: Commit the changes c522de11 failed to commit.
      Sergey Poznyakoff authored
  11. 17 Dec, 2010 1 commit
    • * libmu_sieve/extensions/moderator.c: Implement the :program tag.
      Use _sget_ functions to reduce memory requirements.
      * sieve/tests/moderator.mbox: New file.
      * sieve/tests/moderator.at: New file.
      * sieve/tests/Makefile.am (EXTRA_DIST): Add moderator.mbox.
      (TESTSUITE_AT): Add moderator.at
      * sieve/tests/testsuite.at (MUT_SIEVE_EXT_NAME): New define.
      (MUT_SIEVE_EXT_TEST): New macro.
      Include moderator.at.
      Sergey Poznyakoff authored
  12. 05 Dec, 2010 1 commit
    • The mu_debug_t object and associated functions have been removed.
      New debugging functions are based on the logstream interface.
      
      * include/mailutils/debug.hm4: Remove.
      * include/mailutils/debug.h: New file.
      * include/mailutils/Makefile.am (BUILT_SOURCES,EXTRA_DIST): Remove debug.h,
      debug.hm4.
      
      * mu-aux/debugdef.m4: Remove.
      * mu-aux/debcat.awk: New file.
      * mu-aux/Makefile.am (EXTRA_DIST): Replace debugdef.m4 with debcat.awk.
      
      * include/mailutils/sys/dbgstream.h: Remove.
      * include/mailutils/sys/debug.h: Remove.
      * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Remove debug.h
      and dbgstream.h, add debcat.h
      * include/mailutils/sys/.gitignore: Add debcat.h.
      
      * libmailutils/diag/dbgstderr.c: Remove.
      * libmailutils/diag/dbgsyslog.c: Remove.
      * libmailutils/diag/gdebug.c: Remove.
      * libmailutils/diag/debcat: New file.
      * libmailutils/diag/Makefile.am (libdiag_la_SOURCES): Remove these
      sources.
      * libmailutils/diag/debug.c: Rewrite from scratch.
      * libmailutils/diag/diag.c: Rewrite from scratch.
      
      * libmailutils/diag/syslog.c (mu_diag_syslog_printer): Remove function.
      (mu_log_syslog, mu_log_print_severity): New variables.
      
      * libmailutils/stream/dbgstream.c: Remove.
      * libmailutils/stream/Makefile.am (libstream_la_SOURCES): Remove dbgstream.c..
      * libmailutils/stdstream/Makefile.am (libstdstream_la_SOURCES): Add
      dbgstream.c.
      * libmailutils/stream/logstream.c (_mu_severity_str): Change strings
      to lower case.
      (_log_write): Improve handling of unrecognized escapes.
      (_log_ctl): Handle MU_LOGSTREAM_ADVANCE_LOCUS_LINE and
      MU_LOGSTREAM_ADVANCE_LOCUS_COL.
      
      * libmailutils/mailbox/folder.c (mu_folder_has_debug)
      (mu_folder_get_debug, mu_folder_set_debug): Remove functions.
      
      * mu-aux/debcat.awk: New file.
      * libmailutils/stdstream/dbgstream.c: New file.
      
      * comsat/action.c: Use new debug/log functions.
      * comsat/comsat.c: Likewise.
      * examples/aclck.c: Likewise.
      * examples/echosrv.c: Likewise.
      * examples/msg-send.c: Likewise.
      * examples/nntpclient.c: Likewise.
      * examples/numaddr.c: Likewise.
      * frm/common.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/util.c: Likewise.
      * libmailutils/auth/mu_auth.c: Likewise.
      * libmailutils/base/amd.c: Likewise.
      * libmailutils/cfg/driver.c: Likewise.
      * libmailutils/cfg/format.c: Likewise.
      * libmailutils/cfg/lexer.l: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/mailbox/mailbox.c: Likewise.
      * libmailutils/mailbox/mbx_default.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/mailer/progmailer.c: Likewise.
      * libmailutils/server/acl.c: Likewise.
      * libmailutils/server/ipsrv.c: Likewise.
      * libmailutils/server/msrv.c: Likewise.
      * libmailutils/tests/wicket.c: Likewise.
      * libmu_argp/auth.c: Likewise.
      * libmu_argp/cmdline.c: Likewise.
      * libmu_argp/common.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_cfg/acl.c: Likewise.
      * libmu_cfg/auth.c: Likewise.
      * libmu_cfg/common.c: Likewise.
      * libmu_cfg/ldap.c: Likewise.
      * libmu_cfg/sieve.c: Likewise.
      * libmu_cfg/sql.c: Likewise.
      * libmu_scm/mu_message.c: Likewise.
      * libmu_sieve/prog.c: Likewise.
      * libmu_sieve/runtime.c: Likewise.
      * libproto/imap/trace.c: Likewise.
      * libproto/mailer/mbox.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/sendmail.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mailer/smtp_trace.c: Likewise.
      * libproto/mbox/folder.c: Likewise.
      * libproto/mbox/mbox.c: Likewise.
      * libproto/nntp/folder.c: Likewise.
      * libproto/nntp/nntp_debug.c: Likewise.
      * libproto/pop/mbox.c: Likewise.
      * libproto/pop/pop3_trace.c: Likewise.
      * maidag/guile.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * maidag/maidag.c: Likewise.
      * maidag/util.c: Likewise.
      * mail/mail.c: Likewise.
      * mail/mailvar.c: Likewise.
      * mail/send.c: Likewise.
      * mail/source.c: Likewise.
      * mh/mh_argp.c: Likewise.
      * mh/send.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * movemail/movemail.c: Likewise.
      * mu/wicket.c: Likewise.
      * pop3d/extra.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      * testsuite/mimetest.c: Likewise.
      
      * libmu_sieve/sieve-priv.h (mu_sieve_machine) <parse_error_printer>
      <error_printer, debug_printer, debug>: Remove.
      <errstream>: New member.
      (mu_sv_compile_error, mu_sv_print_value_list)
      (mu_sv_print_tag_list): Change prototypes.
      
      * libmu_sieve/actions.c: Use new sieve debug functions.
      * libmu_sieve/extensions/list.c: Likewise.
      * libmu_sieve/extensions/moderator.c: Likewise.
      * libmu_sieve/extensions/pipe.c: Likewise.
      * libmu_sieve/extensions/spamd.c: Likewise.
      * libmu_sieve/extensions/timestamp.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libmu_sieve/sieve.y : Likewise.
      * libmu_sieve/sieve.l: Likewise.
      * libmu_sieve/tests.c: Likewise.
      * libmu_sieve/util.c: Rewrite diagnostic support.
      * /maidag/sieve.c: Use new debug/log and sieve diagnostic functions.
      
      * mu/mu.c (main): Remove call to mu_stdstream_setup. It is called
      by mu_app_init now.
      
      * libmailutils/base/wicket.c (mu_wicket_stream_match_url): Change signature.
      * libmailutils/cfg/gocs.c (mu_gocs_logging_init): Rewrite.
      * libmailutils/mailbox/message.c (mu_message_save_to_mailbox): Remove
      mu_debug_t argument.
      * libmailutils/stdstream/basestr.c (mu_stdstream_setup): Minor fixes.
      * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Do
      not install filter stream if tag is NULL.
      (mu_stdstream_strerr_setup): New function.
      * libmu_argp/muinit.c (mu_app_init): Set mu_log_tag.
      Call mu_stdstream_setup.
      * libmu_scm/mu_dbgport.c: Rewrite port support.
      
      * include/mailutils/acl.h (mu_acl_get_debug)
      (mu_acl_set_debug): Remove prototypes.
      * include/mailutils/auth.h (mu_wicket_stream_match_url): Change signature.
      * include/mailutils/cfg.h (mu_cfg_locus_t): Remove typedef, use
      struct mu_locus instead.
      (mu_cfg_locus): Remove declaration.
      (mu_cfg_node)<locus>: Change type.
      (mu_cfg_node)<debug>: Remove.
      (mu_cfg_vperror,mu_cfg_perror)
      (mu_cfg_parse_error,mu_cfg_format_error): Remove prototypes.
      (mu_cfg_callback_t): Change signature.  All uses updated.
      (mu_cfg_get_debug): Remove prototype.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): Change signature.
      (mu_cfg_tree_set_debug): Remove prototype.
      (mu_cfg_tree_create_node): Change signature.
      * include/mailutils/diag.h (MU_DIAG_): Redefine via MU_LOG_ constants.
      (mu_diag_get_debug,mu_diag_set_debug): Remove.
      (mu_diag_cont_vprintf, mu_diag_cont_printf)
      (mu_diag_at_locus): New functions.
      * include/mailutils/folder.h (mu_folder_has_debug)
      (mu_folder_get_debug, mu_folder_set_debug): Remove prototypes.
      * include/mailutils/gocs.h (mu_gocs_logging): Remove structure.
      (mu_gocs_debug)<errpfx>: Remove.
      * include/mailutils/guile.h (mu_scm_make_debug_port): Change prototype.
      * include/mailutils/mailbox.h (mu_mailbox_has_debug)
      (mu_mailbox_get_debug,mu_mailbox_set_debug): Remove.
      * include/mailutils/mailer.h (mu_mailer_get_debug)
      (mu_mailer_set_debug): Remove.
      * include/mailutils/message.h (mu_message_save_to_mailbox): Change
      signature.
      * include/mailutils/mu_auth.h (mu_auth_set_debug): Remove proto.
      * include/mailutils/nntp.h (mu_nntp_set_debug): Remove.
      * include/mailutils/progmailer.h (mu_progmailer_set_debug): Remove proto.
      * include/mailutils/server.h (mu_ip_server_set_debug)
      (mu_ip_server_get_debug): Remove proto.
      
      * include/mailutils/sieve.h (mu_sieve_locus_t): Remove.
      Use struct mu_locus instead.
      (mu_sieve_printf_t, mu_sieve_parse_error_t): Remove.
      (mu_sieve_action_log_t): Change signature.
      (mu_sieve_machine_init): Change signature.
      (mu_sieve_machine_init_ex): New function.
      (mu_sieve_get_diag_stream)
      (mu_sieve_set_diag_stream): New functions.
      (mu_sieve_set_data): New function.
      (mu_sieve_get_locus): Change signature.
      (mu_sieve_set_error,mu_sieve_set_parse_error)
      (mu_sieve_set_debug,mu_sieve_set_debug_object): Remove protos.
      * include/mailutils/stdstream.h (mu_stdstream_strerr_setup): New proto.
      * include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE)
      (MU_LOGSTREAM_ADVANCE_LOCUS_COL): New ioctls.
      (mu_dbgstream_create): Change signature.
      * include/mailutils/sys/folder.h (_mu_folder) <debug>: Remove.
      * include/mailutils/sys/mailbox.h (_mu_mailbox) <debug>: Remove.
      * include/mailutils/sys/mailer.h (_mu_mailer) <debug>: Remove.
      * include/mailutils/sys/nntp.h (_mu_nntp) <debug>: Remove.
      * include/mailutils/syslog.h (mu_log_syslog)
      (mu_log_print_severity): New externs.
      * include/mailutils/types.hin (_mu_debug, mu_debug_t): Remove.
      * lib/tcpwrap.h: Remove unused prototypes.
      
      * imap4d/imap4d.h: Include mailutils/stdstream.h
      * mail/mail.h: Likewise.
      * pop3d/pop3d.h: Likewise.
      
      * mh/comp.c (main): Bugfix.
      
      * po/POTFILES.in: Update.
      * TODO: Update.
      Sergey Poznyakoff authored
  13. 09 Oct, 2010 1 commit
  14. 03 Oct, 2010 1 commit
    • One of stream flags bits indicates whether the stream is
      open or not.  The mu_stream_open function refuses to act if it
      already is.  The rest of functions (including mu_stream_close)
      refuses to act if the stream was not open.  A special function
      (mu_stream_is_open) is provided to check if the stream is in
      open state.
      
      Any stream creation function returns an already open stream.  The
      function mu_stream_open should be called only if the stream was
      previously closed by a call to mu_stream_close.
      
      * include/mailutils/stream.h (mu_stream_is_open): New proto.
      * include/mailutils/sys/stream.h (_MU_STR_OPEN): New flag.
      * libmailutils/stream.c (_mu_stream_create): Permit setting the
      _MU_STR_OPEN flag.
      (_stream_init): New static.
      (mu_stream_open): Return MU_ERR_OPEN if the stream is already open.
      (mu_stream_is_open): New function.
      (mu_stream_seek, mu_stream_read, mu_stream_readdelim)
      (mu_stream_getdelim, mu_stream_write, mu_stream_flush)
      (mu_stream_close, mu_stream_size, mu_stream_wait)
      (mu_stream_truncate): Check if the stream is open. Return MU_ERR_NOT_OPEN
      otherwise.
      
      * libmailutils/errors (MU_ERR_OPEN): Reword the diagnostics.
      
      * libmailutils/dbgstream.c (mu_dbgstream_create): Open the stream.
      * libmailutils/file_stream.c (mu_file_stream_create)
      (mu_fd_stream_create): Open the stream.
      * libmailutils/filter_iconv.c (mu_filter_iconv_create): Open the stream.
      * libmailutils/mapfile_stream.c (mu_mapfile_stream_create): Open the stream.
      * libmailutils/fltstream.c (mu_filter_stream_create): Mark the stream
      as open.
      * libmailutils/iostream.c (mu_iostream_create): Likewise.
      * libmailutils/memory_stream.c: Likewise.
      * libmailutils/message.c (_message_stream_create): Likewise.
      * libmailutils/message_stream.c (mu_message_stream_create): Likewise.
      * libmailutils/prog_stream.c (mu_prog_stream_create): Likewise.
      * libmailutils/socket_stream.c (mu_socket_stream_create): Likewise.
      * libmailutils/temp_file_stream.c (mu_temp_file_stream_create): Likewise.
      
      * libmailutils/amd.c (_amd_attach_message): Mark stream as open.
      * libmailutils/body.c (_body_get_stream): Likewise.
      * libmailutils/memory_stream.c: Likewise.
      * libmailutils/rdcache_stream.c (mu_rdcache_stream_create: Likewise.
      * libmailutils/stdio_stream.c (mu_stdio_stream_create): Likewise.
      * libmailutils/streamref.c (mu_streamref_create_abridged): Likewise.
      * libmailutils/tcp.c (mu_tcp_stream_create_with_source_ip): Likewise.
      * libmailutils/xscript-stream.c (mu_xscript_stream_create): Likewise.
      * libmu_auth/tls.c (_mu_tls_io_stream_create): Likewise.
      (_mu_tls_stream_create): Likewise.
      * libproto/pop/pop3_stream.c (mu_pop3_stream_create): Likewise.
      
      * examples/base64.c: Remove unnecessary mu_stream_open.
      * examples/http.c: Likewise.
      * examples/iconv.c: Likewise.
      * examples/msg-send.c: Likewise.
      * examples/murun.c: Likewise.
      * examples/musocio.c: Likewise.
      * examples/pop3client.c: Likewise.
      * imap4d/append.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/preauth.c: Likewise.
      * lib/mailcap.c: Likewise.
      * libmailutils/attachment.c: Likewise.
      * libmailutils/cfg_driver.c: Likewise.
      * libmailutils/header.c: Likewise.
      * libmailutils/mailcap.c: Likewise.
      * libmailutils/mimehdr.c: Likewise.
      * libmailutils/mutil.c: Likewise.
      * libmailutils/tests/fltst.c: Likewise.
      * libmailutils/tests/mailcap.c: Likewise.
      * libmailutils/vartab.c: Likewise.
      * libmailutils/wicket.c: Likewise.
      * libmu_argp/muinit.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_sieve/extensions/pipe.c: Likewise.
      * libmu_sieve/extensions/spamd.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libproto/imap/folder.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mailer/smtp_starttls.c: Likewise.
      * libproto/mbox/mbox.c: Likewise.
      * libproto/nntp/nntp_connect.c: Likewise.
      * libproto/pop/mbox.c: Likewise.
      * libproto/pop/pop3_connect.c: Likewise.
      * libproto/pop/pop3_stls.c: Likewise.
      * maidag/mailtmp.c: Likewise.
      * mail/decode.c: Likewise.
      * mail/pipe.c: Likewise.
      * mail/send.c: Likewise.
      * mail/send.c: Likewise.
      * mail/write.c: Likewise.
      * mh/burst.c: Likewise.
      * mh/comp.c: Likewise.
      * mh/compcommon.c: Likewise.
      * mh/forw.c: Likewise.
      * mh/mh_init.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mhl.c: Likewise.
      * mh/mhn.c: Likewise.
      * mh/repl.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * pop3d/extra.c: Likewise.
      * sieve/sieve.c: Likewise.
      * testsuite/smtpsend.c: Likewise.
      Sergey Poznyakoff authored
  15. 08 Sep, 2010 4 commits
    • * 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.
      Sergey Poznyakoff authored
    • If a stream takes another stream(s) as a transport, it
      always increases its reference count.  This means that
      when that stream is destroyed the underlying stream is
      not destroyed by default (its refcount is decreased, that's
      all). To force destruction of the underlying stream,
      the caller must explicitly unreference it after creating
      the stream that uses it (or give its creation function
      the MU_STREAM_AUTOCLOSE flag, if it supports flags).
      
      Similarly, if a stream uses a non-stream object (e.g. a file
      descriptor) as the transport, it will not destroy it, unless
      it has been created with the MU_STREAM_AUTOCLOSE flag. This
      differs from the previous behavior.
      
      The MU_STREAM_NO_CHECK and MU_STREAM_NO_CLOSE flags are removed.
      
      * examples/base64.c (main): Call mu_filter_create with the
      MU_STREAM_AUTOCLOSE flag.
      * examples/mimetest.c (message_display_parts): Likewise.
      * examples/murun.c (main): Unref the input stream after
      passing it to mu_filter_prog_stream_create.
      * imap4d/fetch.c (fetch_io): Update arguments to mu_filter_create
      and mu_memory_stream_create.
      * imap4d/preauth.c (decode64_buf)
      (do_preauth_ident): Update arguments to mu_memory_stream_create and
      mu_tcp_stream_create.
      * imap4d/util.c (util_setio): Update arguments to mu_filter_create and
      mu_stdio_stream_create.
      * include/mailutils/stream.h (MU_STREAM_NO_CLOSE)
      (MU_STREAM_NO_CHECK): Remove.
      (MU_STREAM_AUTOCLOSE): New flag.
      (mu_iostream_create): Remove the `flags' argument.
      * libmu_argp/muinit.c (mu_app_init): Update arguments to
      mu_stdio_stream_create.
      * libmu_auth/ldap.c: Update arguments to
      mu_memory_stream_create and mu_filter_create.
      * libmu_auth/tls.c (_tls_io_close, _tls_close): Always try to close the
      transport stream. Rely on refcount to protect it.
      (_tls_io_done, _tls_done): Likewise, always unreference it.
      (_mu_tls_io_stream_create): Increase reference counter on the
      transport stream, unless MU_STREAM_AUTOCLOSE is requested.
      (_mu_tls_stream_create): Rewrite using the new MU_STREAM_AUTOCLOSE
      logic.
      * libmu_sieve/extensions/spamd.c (spamd_connect_tcp): Update arguments to
      mu_tcp_stream_create.
      (spamd_connect_tcp): Update arguments to mu_socket_stream_create and
      mu_filter_create.
      * libmu_sieve/extensions/vacation.c (build_mime): Update arguments to
      mu_filter_create.
      * mail/decode.c (display_submessage): Update arguments to
      mu_filter_create.
      * mailbox/attachment.c (mu_message_save_attachment): Update arguments to
      mu_filter_create.
      * mailbox/cfg_driver.c (mu_cfg_tree_reduce): Update arguments to
      mu_stdio_stream_create.
      * mailbox/dbgstream.c (_dbg_done): Use MU_STREAM_AUTOCLOSE bit to
      decide whether to destroy the debug object.
      (mu_dbgstream_create): Use MU_STREAM_AUTOCLOSE instead of
      MU_STREAM_NO_CLOSE.
      * mailbox/file_stream.c (fd_close): Use MU_STREAM_AUTOCLOSE bit to
      decide whether to close the descriptor.
      (mu_file_stream_create): Force MU_STREAM_AUTOCLOSE bit.
      * mailbox/filter.c (filter_create_rd, filter_create_wr): Change
      substream creation logic.
      * mailbox/filter_iconv.c (_icvt_close): Always try to close the
      transport stream. Rely on refcount to protect it.
      (_icvt_done): Ditto for destroying it.
      (mu_filter_iconv_create): Increase refcount on the transport stream,
      unless MU_STREAM_AUTOCLOSE is requested.
      * mailbox/fltstream.c (filter_done): Always dereference the
      transport stream. Rely on refcount to protect it.
      (filter_close): Ditto for closing it.
      (mu_filter_stream_create): Increase refcount on the transport stream,
      unless MU_STREAM_AUTOCLOSE is requested.
      * mailbox/iostream.c (_iostream_close) : Always try to close the
      transport stream. Rely on refcount to protect it.
      (_iostream_done): Ditto for closing it.
      (mu_iostream_create): Remove the use of MU_STREAM_NO_CLOSE.
      * mailbox/mimehdr.c (mu_mimehdr_decode_param): Remove the use of
      MU_STREAM_NO_CLOSE.
      * mailbox/mutil.c (mu_decode_filter) Change substream creation logic.
      * mailbox/prog_stream.c (_prog_open): Use MU_STREAM_AUTOCLOSE bit
      in arguments to mu_stdio_stream_create.
      (mu_filter_prog_stream_create): Increase refcount on the transport
      (input) stream.
      * mailbox/rfc2047.c (mu_rfc2047_decode): Dereference in_stream after
      passing it to mu_decode_filter.
      Pass MU_STREAM_AUTOCLOSE in flags to mu_filter_create.
      * mailbox/socket_stream.c (mu_socket_stream_create): Force
      MU_STREAM_AUTOCLOSE bit.
      * mailbox/streamref.c (_streamref_close): Always close the
      transport stream (refcount will protect it, if necessary).
      (mu_streamref_create_abridged): Mask out the MU_STREAM_AUTOCLOSE bit.
      * mailbox/temp_file_stream.c (mu_temp_file_stream_create: Force
      MU_STREAM_AUTOCLOSE bit.
      * mailbox/xscript-stream.c (_xscript_close): Always close the
      transport stream (refcount will protect it, if necessary).
      (mu_xscript_stream_create): Increase refcounts on both underlying streams,
      unless MU_STREAM_AUTOCLOSE is set.
      * pop3d/extra.c (pop3d_setio): Remove uses of MU_STREAM_NO_CLOSE.
      
      * examples/nntpclient.c: Remove uses of MU_STREAM_NO_CHECK/MU_STREAM_NO_CLOSE.
      * examples/pop3client.c: Likewise.
      * libmu_auth/gsasl.c: Likewise.
      * libproto/nntp/nntp_stream.c: Likewise.
      * libproto/pop/pop3_stream.c: Likewise.
      * mailbox/tcp.c: Likewise.
      * mailbox/vartab.c: Likewise.
      * mh/mh_list.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * mh/mhn.c: Likewise.
      (edit_mime): Use MU_STREAM_AUTOCLOSE.
      
      Bugfixes:
      
      * mailbox/fltstream.c (init_iobuf): Fix input initialization.
      (filter_write_internal): Bugfix.
      * mailbox/stream.c (_stream_buffer_freespace): New macro.
      (_stream_buffer_is_full): New macro.
      (BUFFER_FULL_P): Remove, use _stream_buffer_is_full instead. All callers
      updated.
      (_stream_flush_buffer): Operation for full buffered streams does not
      depend on the `all' flag.
      (mu_stream_write): Fix calculation of the bytes available in the
      buffer.
      Sergey Poznyakoff authored
    • Bugfix. · c1d1ab07
      * imap4d/append.c: Add a comment.
      * imap4d/imap4d.h (imap4d_child_signal_setup): New proto.
      * libmu_sieve/extensions/pipe.c (sieve_action_pipe): Use
      mu_stream_copy, rewrite error handling.
      * libmu_sieve/extensions/spamd.c (spamd_send_message): se
      mu_stream_copy.
      (spamd_test): Honor dry-run mode.
      * libmu_sieve/extensions/vacation.c (build_mime): Remove
      misleading FIXME. Use mu_stream_copy.
      * libmu_sieve/extensions/moderator.c (moderator_message_get_part): Use
      mu_body_get_streamref.
      * examples/header.c (hstream): New global.
      (cmd_load, cmd_free, cmd_remove, cmd_insert): Discard hstream.
      (cmd_readline): Use hstream. Obtain it using mu_stream_readline.
      * libproto/mbox/mbox.c (mbox_envelope_date): Remove trailing
      newline from the obtained envelope line.
      * mailbox/amd.c (amd_body_stream_seek): Allow for off == size
      (imprtant for empty bodies).
      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
  16. 05 Jan, 2010 1 commit
  17. 07 Jul, 2009 1 commit
    • * include/mailutils/cctype.h: New file.
      * include/mailutils/cstr.h: New file.
      * include/mailutils/Makefile.am: Add new files.
      * mailbox/cstrcasecmp.c: New file.
      * mailbox/cstrlower.c: New file.
      * mailbox/cstrupper.c: New file.
      * mailbox/muctype.c: New file.
      * mailbox/strltrim.c: New file.
      * mailbox/strrtrim.c: New file.
      * mailbox/strskip.c: New file.
      * mailbox/Makefile.am: Add new files.
      * .gitignore: Update
      
      * gnulib.modules: Remove strcase.
      
      * comsat/comsat.h, imap4d/imap4d.h, include/mailutils/mailutils.h,
      include/mailutils/mutil.h, include/mailutils/sys/pop3.h,
      libmu_scm/mu_scm.h, mail/mail.h: Include cstr.h and cctype.h.
      
      * comsat/oldcfg.c, config/mailutils-config.c,
      examples/mimetest.c, examples/mta.c, examples/nntpclient.c,
      examples/pop3client.c, imap4d/append.c, imap4d/create.c,
      imap4d/delete.c, imap4d/fetch.c, imap4d/id.c,
      imap4d/idle.c, imap4d/list.c, imap4d/namespace.c,
      imap4d/rename.c, imap4d/search.c, imap4d/status.c,
      imap4d/store.c, imap4d/uid.c, imap4d/util.c,
      libmu_argp/compat.c, libmu_auth/ldap.c,
      libmu_auth/sql.c, libmu_scm/mu_message.c,
      libmu_sieve/actions.c, libmu_sieve/comparator.c,
      libmu_sieve/extensions/list.c, libmu_sieve/extensions/spamd.c,
      libmu_sieve/extensions/vacation.c, libmu_sieve/load.c,
      libmu_sieve/sieve.l, libmu_sieve/tests.c,
      libproto/imap/folder.c, libproto/mailer/smtp.c,
      libproto/mbox/mbox.c, libproto/mh/folder.c,
      libproto/mh/mbox.c, libproto/pop/folder.c,
      libproto/pop/mbox.c, libproto/pop/pop3_connect.c,
      maidag/forward.c, maidag/lmtp.c, maidag/maidag.c,
      maidag/maidag.h, maidag/mailquota.c, mail/alt.c,
      mail/copy.c, mail/decode.c, mail/escape.c,
      mail/followup.c, mail/mail.c, mail/mailline.c,
      mail/msgset.y, mail/print.c, mail/reply.c,
      mail/send.c, mail/shell.c, mail/util.c,
      mail/write.c, mailbox/address.c,
      mailbox/amd.c, mailbox/assoc.c,
      mailbox/attachment.c, mailbox/attribute.c,
      mailbox/cfg_lexer.l, mailbox/date.c,
      mailbox/filter.c, mailbox/gdebug.c,
      mailbox/header.c, mailbox/kwd.c,
      mailbox/locale.c, mailbox/mailcap.c,
      mailbox/mailer.c, mailbox/message.c,
      mailbox/message_stream.c, mailbox/mime.c,
      mailbox/msrv.c, mailbox/mutil.c,
      mailbox/parse822.c, mailbox/progmailer.c,
      mailbox/rfc2047.c, mailbox/syslog.c, mailbox/url.c,
      mailbox/version.c, mh/mh.h, mh/mh_alias.l,
      mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_init.c,
      mh/mh_list.c, mh/mh_msgset.c, mh/mh_sequence.c,
      mh/mh_whatnow.c, mh/mh_whom.c, mh/mhn.c,
      mh/mhparam.c, mh/pick.y, mh/sortm.c,
      mimeview/mimetypes.y, pop3d/bulletin.c,
      pop3d/expire.c, pop3d/pop3d.c, pop3d/pop3d.h,
      pop3d/popauth.c, pop3d/user.c, readmsg/msglist.c,
      readmsg/readmsg.c, readmsg/readmsg.h, sql/mysql.c,
      sql/postgres.c: Use locale-independent cclass and str functions.
      Sergey Poznyakoff authored
  18. 13 Feb, 2009 1 commit
    • Rename libmuauth to libmu_auth, libargp to libmu_argp,
      libcfg to libmu_cfg, and libsieve to libmu_sieve.
      
      * auth/*: Move to libmu_auth/*
      * libargp/*: Move to libmu_argp/*
      * libcfg/*: Move to libmu_cfg/*
      * libsieve/*: Move to libmu_sieve/*
      * libmu_sieve/sieve.h: Rename to sieve-priv.h
      * include/mailutils/libsieve.h: Rename to sieve.h
      * configure.ac: Update, bump to 2.0.90.
      Wojciech Polak authored