1. 20 Dec, 2010 1 commit
    • * include/mailutils/debug.h (mu_debug_format_spec): New function.
      
      * include/mailutils/stream.h (MU_IOCTL_SYSLOGSTREAM)
      (MU_IOCTL_FILTER): New ioctls.
      (MU_IOCTL_LOGSTREAM_GET_SEVERITY_MASK)
      (MU_IOCTL_LOGSTREAM_SET_SEVERITY_MASK)
      (MU_IOCTL_LOGSTREAM_CLONE)
      (MU_IOCTL_SYSLOGSTREAM_SET_LOGGER)
      (MU_IOCTL_SYSLOGSTREAM_GET_LOGGER)
      (MU_IOCTL_FILTER_GET_DISABLED)
      (MU_IOCTL_FILTER_SET_DISABLED): And their opcodes.
      * include/mailutils/sys/filter.h (_MU_FILTER_DISABLED)
      (_MU_FILTER_EOF): New defines.
      (_mu_filter_stream) <eof>: Replace with fltflag (a bitmask).
      * include/mailutils/sys/logstream.h (_mu_log_stream) <sevmask>: New
      member.
      * include/mailutils/sys/syslogstream.h (_mu_syslog_stream) <logger>: New
      member.
      * include/mailutils/util.h (mu_onexit_run): New proto.
      * libmailutils/base/onexit.c (_mu_onexit_run): Extra safety check.
      (mu_onexit_run): New function.
      (mu_debug_level_str): New static.
      (mu_debug_format_spec): New function.
      * libmailutils/stream/fltstream.c (filter_read, filter_write): Bypass the
      xcoder if _MU_FILTER_DISABLED is set.
      Use fltflag instead of the removed eof.
      (filter_ctl): Handle MU_IOCTL_FILTER.
      * libmailutils/stream/logstream.c (_log_write): The sevmask member
      masks out severity prefix output for certain severities.
      (_log_ctl): Handle new opcodes (see above).
      * libmailutils/stream/syslogstream.c (_syslog_stream_write): Use
      <logger>, if supplied, instead of the system syslog(3).
      (_syslog_ctl): Handle MU_IOCTL_SYSLOGSTREAM.
      (mu_syslog_stream_create): Initialize logger to NULL.
      * mu/ldflags.c (lib_descr): Protect entries with the
      corresponding #ifdef ENABLE_whatever.
      Sergey Poznyakoff authored
  2. 09 Dec, 2010 1 commit
    • * include/mailutils/filter.h (mu_filter_chain_create_pred)
      (mu_filter_chain_create): New prototypes.
      (_mu_filter_record)<max_line_length>: Remove.
      * libmailutils/filter/fltchain.c: New file.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add fltchain.c.
      * libmailutils/filter/base64.c: Implement line length limit for encoder.
      (base64_state): New enum.
      (base64_line): New struct.
      (_base64_encoder): xd brings a pointer to struct base64_line. Use it
      to limit the output line length.
      (alloc_state): New function.
      (_base64_filter): Register alloc_state.
      (_base64_filter, _B_filter): Remove max_line_length initialization.
      
      * libmailutils/filter/binflt.c: Remove max_line_length initialization.
      * libmailutils/filter/crlfflt.c: Likewise.
      * libmailutils/filter/dot.c: Likewise.
      * libmailutils/filter/fromflt.c: Likewise.
      * libmailutils/filter/header.c: Likewise.
      * libmailutils/filter/inline-comment.c: Likewise.
      * libmailutils/filter/linecon.c: Likewise.
      * libmailutils/filter/qpflt.c: Likewise.
      
      * libmailutils/filter/linelenflt.c: Redo line filter as a regular filter.
      (mu_linelen_filter): New global.
      
      * libmailutils/filter/filter.c (mu_filter_get_list): Register mu_linelen_filter.
      (filter_create_rd, filter_create_wr): Remove.
      (mu_filter_create_args): Use mu_filter_stream_create directly.
      
      * examples/base64.c: Re-implement the -l option via filter chains.
      
      * libmailutils/tests/fltst.c: Remove the linelen option.
      * libmailutils/tests/base64d.at: Remove the linelen option from fltst
      invocations.
      * mu/filter.c: Remove the --line-length option.  Not needed now, its
      effect is achieved by "FLT + [~]linelen" chain.
      Sergey Poznyakoff authored
  3. 07 Dec, 2010 2 commits
    • * comsat/comsat.c (options): New option --file.
      (biffrc): New variable.
      (comsatd_parse_opt): Handle the --file option.
      (open_tty): New function.
      (notify_user): Open the tty using open_tty function and a default
      set of filters.
      (main): Hanlde --file option.
      * comsat/action.c (run_user_action): Implement the `tty' statement.
      * comsat/comsat.h (biffrc): New extern.
      (open_tty): New function.
      
      mu: accept a chain of filters.
      
      * mu/filter.c (filter_doc, filter_docstring): Update.
      (mutool_filter): Accept a filter chain.
      Sergey Poznyakoff authored
    • Two interfaces are provided: mu_prog_stream_create offers full control
      over the program execution environment (i.e. running privileges, cwd,
      resource limits) via a set of hints.
      A simpler interface, mu_command_stream_create, runs the command in the
      current environment.
      
      mu_filter_prog_stream_create is removed, because its functionality can
      be achieved by a correspondingly crafted set of hints to
      mu_prog_stream_create.
      
      * include/mailutils/prog.h: New file.
      * include/mailutils/mailutils.h: Include mailutils/prog.h
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add prog.h
      * include/mailutils/stream.h (mu_prog_stream_create)
      (mu_filter_prog_stream_create): Remove prototypes.
      * include/mailutils/sys/prog_stream.h (_mu_prog_stream): Change structure.
      (_mu_prog_limit_codes, _mu_prog_limit_flags): New externs.
      * include/mailutils/util.h (mu_set_user_privileges)
      (mu_switch_to_privs): New prototypes.
      
      * lib/userprivs.c: Move to libmailutils/base.
      * lib/Makefile.am (libmuaux_a_SOURCES): Remove userprivs.c
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add userprivs.c
      * libmailutils/base/userprivs.c (mu_set_user_privileges): New function.
      (mu_switch_to_privs): Rewrite as another entry point to mu_set_user_privileges.
      
      * libmailutils/stream/prog_stream.c (_mu_prog_limit_flags)
      (_mu_prog_limit_codes): New global variables.
      (start_program_filter): Use hints to control execution environment.
      (_prog_stream_create): Save hints.
      (mu_prog_stream_create): Change signature.
      (mu_command_stream_create): New function (corresponds to the prior
      mu_prog_stream_create).
      (mu_filter_prog_stream_create): Remove function.
      * comsat/action.c (action_exec): Use new mu_prog_stream_create calling
      convention.
      * examples/murun.c: Rewrite.
      
      * mh/mhn.c (show_internal): Use new mu_prog_stream_create calling
      convention.
      * mh/tests/mhn.at: Reflect changes to mhn.
      
      * imap4d/preauth.c: Use mu_command_stream_create.
      * libmu_sieve/extensions/pipe.c
      * mail/decode.c
      * mail/pipe.c
      * mail/send.c
      * mh/mhl.c
      * mu/shell.c
      
      * mail/mail.h: Include mailutils/prog.h
      * mh/mh.h
      
      * po/POTFILES.in: Add libmailutils/base/userprivs.c.
      Sergey Poznyakoff authored
  4. 06 Dec, 2010 1 commit
    • The mu_stream_ioctl function gets two argument that identify the ioctl
      in question: "family", which identifies a family of ioctls in question,
      and "opcode", which indicates the requested operation within that family.
      
      * include/mailutils/stream.h: Define ioctl families and opcodes.
      (mu_stream_ioctl): Change signature.
      * include/mailutils/sys/stream.h (_mu_stream)<ctl>: Change signature.
      
      * include/mailutils/log.h (mu_severity_from_string)
      (mu_severity_to_string): New protos.
      
      * libmailutils/stream/stream.c (mu_stream_ioctl): Change signature.
      
      * libmailutils/filter/filter_iconv.c: Rewrite ioctl support.
      * libmailutils/stream/file_stream.c: Likewise.
      * libmailutils/stream/fltstream.c: Likewise.
      * libmailutils/stream/iostream.c: Likewise.
      * libmailutils/stream/logstream.c: Likewise.
      * libmailutils/stream/mapfile_stream.c: Likewise.
      * libmailutils/stream/memory_stream.c: Likewise.
      * libmailutils/stream/nullstream.c: Likewise.
      * libmailutils/stream/prog_stream.c: Likewise.
      * libmailutils/stream/rdcache_stream.c: Likewise.
      * libmailutils/stream/streamref.c: Likewise.
      * libmailutils/stream/syslogstream.c: Likewise.
      * libmailutils/stream/tcp.c: Likewise.
      * libmailutils/stream/xscript-stream.c: Likewise.
      * libmu_auth/tls.c: Likewise.
      
      * comsat/action.c: Change calls to mu_stream_ioctl.
      * imap4d/auth_gsasl.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/util.c: Likewise.
      * libmailutils/base/getpass.c: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/mailbox/body.c: Likewise.
      * libmailutils/mime/mime.c: Likewise.
      * libmailutils/stdstream/dbgstream.c: Likewise.
      * libmailutils/stdstream/strerr.c: Likewise.
      * libmu_sieve/runtime.c: Likewise.
      * libmu_sieve/sieve.y: Likewise.
      * libmu_sieve/util.c: Likewise.
      * libproto/imap/trace.c: Likewise.
      * libproto/mailer/smtp_data.c: Likewise.
      * libproto/mailer/smtp_starttls.c: Likewise.
      * libproto/mailer/smtp_trace.c: Likewise.
      * libproto/pop/pop3_stls.c: Likewise.
      * libproto/pop/pop3_stream.c: Likewise.
      * libproto/pop/pop3_trace.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * mail/source.c: Likewise.
      * mu/logger.c: Likewise.
      * pop3d/extra.c: Likewise.
      * pop3d/retr.c: Likewise.
      
      * TODO: Update.
      * doc/texinfo/nullstream.texi: Update.
      Sergey Poznyakoff authored
  5. 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
  6. 04 Dec, 2010 3 commits
    • * include/mailutils/error.h (mu_error_pfn_t, mu_default_error_printer)
      (mu_syslog_error_printer): Remove deprecated interfaces.
      * libmailutils/diag/muerror.c: Likewise.
      * libmailutils/stream/logstream.c (_log_write): Send
      MU_IOCTL_LOGSTREAM_SET_SEVERITY to the transport stream.
      * libmailutils/stream/syslogstream.c (_syslog_ctl): Translate
      MU severity to syslog priority level and vice versa.
      * mu/logger.c (mutool_logger): Bugfix.
      Sergey Poznyakoff authored
    • * include/mailutils/stdstream.h (mu_printf): New prototype.
      * include/mailutils/version.h: Include mailutils/types.h instead of
      stdio.h
      (mu_fprint_options, mu_fprint_conf_option): Remove protos.
      (mu_format_options, mu_format_conf_option): New protos.
      * libmailutils/base/version.c (mu_fprint_options): Replace
      with mu_format_options, which outputs formatted data to a mu_stream_t.
      (mu_fprint_conf_option): Ditto.  Replaced by mu_format_conf_option.
      (mu_print_options): Update accordingly.
      * libmailutils/stdstream/basestr.c (mu_printf): New function.
      
      * mu/acl.c: Replace stdio calls with stdstream ones.
      * mu/cflags.c: Likewise.
      * mu/filter.c: Likewise.
      * mu/flt2047.c: Likewise.
      * mu/imap.c: Likewise.
      * mu/info.c: Likewise.
      * mu/ldflags.c: Likewise.
      * mu/logger.c: Likewise.
      * mu/mu.c: Likewise.
      * mu/mu.h: Likewise.
      * mu/pop.c: Likewise.
      * mu/query.c: Likewise.
      * mu/shell.c: Likewise.
      * mu/verbose.c: Likewise.
      * mu/wicket.c: Likewise.
      Sergey Poznyakoff authored
    • * include/mailutils/log.h: New file.
      * include/mailutils/stdstream.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add stdstream.h
      and log.h.
      * include/mailutils/argcv.h: Include mailutils/types.h
      * include/mailutils/mailutils.h: Include stdstream.h
      Remove vartab.h
      * include/mailutils/types.hin (MU_DEPRECATED): New define.
      * include/mailutils/vartab.h: Mark this header and all prototypes
      it defines as deprecated.
      
      * libmailutils/stdstream/Makefile.am: New file.
      * libmailutils/stdstream/basestr.c: New file.
      * libmailutils/stdstream/strerr.c: New file.
      * libmu_compat/Makefile.am: New file.
      * libmu_compat/tests/.gitignore: New file.
      * libmu_compat/tests/Makefile.am: New file.
      * libmu_compat/tests/atlocal.in: New file.
      * libmu_compat/tests/testsuite.at: New file.
      * libmailutils/base/Makefile.am (noinst_LTLIBRARIES): Remove
      argcv.c and vartab.c.
      * libmailutils/Makefile.am (SUBDIRS): Add stdstream.
      (libmailutils_la_LIBADD): Add stdstream/libstdstream.la.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Remove argcv
      (TESTSUITE_AT): Remove argcv.at
      * libmailutils/tests/testsuite.at: Do not include argcv.at.
      
      * libmailutils/base/argcv.c: Move to libmu_compat/argcv.c
      * libmailutils/tests/argcv.at: Move to libmu_compat/tests/argcv.at
      * libmailutils/tests/argcv.c: Move to libmu_compat/tests/argcv.c
      * libmailutils/base/vartab.c: Move to libmu_compat/vartab.c
      
      * Makefile.am (SUBDIRS): Add libmu_compat.
      * configure.ac: Add libmu_compat/tests, libmu_compat/tests/Makefile,
      libmu_compat/tests/atlocal, libmu_compat/Makefile and
      libmailutils/stdstream/Makefile to config file list.
      
      * mu/ldflags.c (lib_descr): Add mu_compat.
      * mu/logger.c (logger_parse_opt): -t does not imply --syslog.
      (mutool_logger): Use inline-comment filter to insert "tag: "
      prefix.
      Flush and destroy both streams before returning.
      
      * po/POTFILES.in: Add libmailutils/stream/logstream.c,
      libmailutils/stdstream/baseio.c, libmailutils/stdstream/strerr.c
      and mu/logger.c.
      Sergey Poznyakoff authored
  7. 03 Dec, 2010 1 commit
    • * include/mailutils/mailutils.h: Include mailutils/log.h.
      * include/mailutils/stream.h (MU_IOCTL_LOGSTREAM_GET_SEVERITY)
      (MU_IOCTL_LOGSTREAM_SET_SEVERITY)
      (MU_IOCTL_LOGSTREAM_GET_LOCUS,MU_IOCTL_LOGSTREAM_SET_LOCUS)
      (MU_IOCTL_LOGSTREAM_GET_MODE,MU_IOCTL_LOGSTREAM_SET_MODE): New ioctls.
      * include/mailutils/sys/logstream.h: New file.
      * include/mailutils/sys/syslogstream.h: New file.
      * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add logstream.h
      and syslogstream.h
      * include/mailutils/types.hin (mu_locus): New struct.
      
      * libmailutils/stream/Makefile.am (libstream_la_SOURCES): Add logstream.c
      and syslogstream.c.
      
      * mu/logger.c: New file.
      * mu/template.c: New file.
      * mu/Makefile.am (MODULES): Add logger.c
      (EXTRA_DIST): Add template.c.
      Sergey Poznyakoff authored
  8. 18 Nov, 2010 1 commit
  9. 17 Nov, 2010 1 commit
    • * include/mailutils/filter.h (mu_filter_xcode_t): Change signature.
      (mu_filter_create_args): New proto.
      (mu_inline_comment_filter): New extern.
      
      * libmailutils/filter/inline-comment.c: New file.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add inline-comment.c.
      * libmailutils/filter/crlfdot.c (alloc_state): Update declaration.
      * libmailutils/filter/crlfflt.c: Likewise.
      * libmailutils/filter/dot.c: Likewise.
      * libmailutils/filter/fromflt.c (_from_alloc_state): Likewise.
      * libmailutils/filter/filter.c (mu_filter_create_args): New function.
      (mu_filter_create): Rewrite via mu_filter_create_args.
      
      mh: inline comments are allowed for use in components and forwcomp files.
      
      * mh/compcommon.c (mh_comp_draft): Fix erroneous conditional.
      * mh/components: Add comments.
      * mh/mh_init.c (mh_file_copy): Rewrite using new API.
      
      mu filter: new option to list supported filters.
      
      * mu/filter.c (filter_options): New option --list (-L).
      (filter_parse_opt): Handle the -L option.
      (filter_printer, list_filters): New functions.
      (main): Print a list of filters if --list was given.
      Sergey Poznyakoff authored
  10. 10 Nov, 2010 1 commit
    • * configure.ac (mh/tests): New testdir
      * mh/Makefile.am (SUBDIRS): Add tests
      
      * tests/Makefile.am: New file.
      * mh/tests/Makefile.am: New file.
      * mh/tests/atlocal.in: New file.
      * mh/tests/folder.at: New file.
      * mh/tests/inc.at: New file.
      * mh/tests/mark.at: New file.
      * mh/tests/mhparam.at: New file.
      * mh/tests/mhpath.at: New file.
      * mh/tests/refile.at: New file.
      * mh/tests/rmf.at: New file.
      * mh/tests/rmm.at: New file.
      * mh/tests/scan.at: New file.
      * mh/tests/testsuite.at: New file.
      * mh/tests/.gitignore: New file.
      
      * testsuite/testsuite.inc (MUT_MBCOPY): Work correctly if
      DST is a directory name (for MH and maildir formats).
      
      * mh/folder.c (action_list): Treat empty value as
      equal to no value.
      * mh/install-mh.c (main): Honor MH environment variable.
      * mh/mh_ctx.c (mh_context_read, mh_context_write): Use MU streams
      instead of stdio FILE.
      (mh_context_iterate): Add error checking.
      Do not coredump on NULL header.
      * mh/mh_global.c (_mh_init_global_sequences): Destroy sequences.
      * mh/TODO: Update.
      
      * libmailutils/stream/message_stream.c (copy_trimmed_value): New
      static function.
      (scan_stream): Strip final newline from the saved envelope values.
      
      * mu/Makefile.am (BUILD_SOURCES, EXTRA_DIST): Add
      mu-setup.c and mu-setup.h.
      Sergey Poznyakoff authored
  11. 09 Nov, 2010 1 commit
    • * libproto/imap/id.c: New file.
      * libproto/imap/login.c: New file.
      * libproto/imap/Makefile.am: Add new files.
      * libproto/imap/capability.c (mu_imap_capability): Clear
      MU_IMAP_RESP before reading response.
      Add MU_WRDSF_QUOTE to mu_wordsplit flags.
      * libproto/imap/err.c (_mu_imap_seterrstr): Bugfix: initialize
      imap->errstr.
      * libproto/imap/logout.c (mu_imap_logout): Clear
      MU_IMAP_RESP before reading response.
      * libproto/imap/response.c (_mu_imap_response): Set error string.
      * mu/imap.c (com_login, com_id): New functions.
      (imap_comtab) <login, id>: New keywords.
      Sergey Poznyakoff authored
  12. 08 Nov, 2010 1 commit
    • * include/mailutils/imap.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add imap.h
      
      * libproto/imap/capability.c: New file.
      * libproto/imap/capatst.c: New file.
      * libproto/imap/carrier.c: New file.
      * libproto/imap/connect.c: New file.
      * libproto/imap/create.c: New file.
      * libproto/imap/destroy.c: New file.
      * libproto/imap/disconnect.c: New file.
      * libproto/imap/err.c: New file.
      * libproto/imap/fake-folder.c: New file.
      * libproto/imap/logout.c: New file.
      * libproto/imap/response.c: New file.
      * libproto/imap/state.c: New file.
      * libproto/imap/tag.c: New file.
      * libproto/imap/trace.c: New file.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Temporarly
      remove folder.c, mbox.c and url.c. Add new files.
      
      * mu/getarg.c: New file.
      * mu/imap.c: New file.
      * mu/verbose.c: New file.
      * mu/Makefile.am (IDLE_MODULES): New variable.
      (IMAP_C): New variable.
      (MODULES): Add $(IMAP_C).
      (mu_SOURCES): Add getarg.c and verbose.c
      (mu-setup.h, mu-setup.c): Add IDLE_MODULES both to the dependencies
      and to the mu-setup.awk command line.
      * mu/mu-setup.awk: New keyword mu-cond.
      * mu/pop.c: Add mu-cond keyword.
      
      * include/mailutils/sys/imap.h: Rewrite.
      * include/mailutils/sys/pop3.h (MU_POP3_CHECK_EAGAIN): Take into
      account MU_ERR_REPLY and MU_ERR_BADREPLY, which are recoverable errors.
      
      * libmailutils/base/list.c (mu_list_clear): Return immediately if
      list is NULL.
      * libmu_auth/sql.c (sql_escape_string): Remove unused variable.
      
      * libproto/pop/pop3_carrier.c (mu_pop3_get_carrier): Increase refcount
      on the returned stream.
      * libproto/pop/pop3_response.c (mu_pop3_response): Check POP3 reply code.
      Sergey Poznyakoff authored
  13. 03 Nov, 2010 1 commit
    • * mu/Makefile.am (MODULES): New variable.  Put all commands there.
      (mu_SOURCES): Include $(MODULES).
      (EXTRA_DIST): Add mu-setup.h mu-setup.c mu-setup.awk
      (BUILT_SOURCES): New variable.
      (mu-setup.h, mu-setup.c): New goals.
      
      * mu/mu.c (doc): Remove command description: it is generated automatically.
      (mu_help_filter): New function.
      (argp): Use mu_help_filter.
      (mutool_action_tab): Remove.
      (mutool_nosys,find_action): Remove.
      (mu_help): New function.
      (main): Use dispatch_find_action.
      * mu/mu.h: Include mailutils/types.h
      (mutool_pop, mutool_filter, mutool_flt2047)
      (mutool_info, mutool_query, mutool_acl)
      (mutool_wicket, mutool_ldflags, mutool_cflags): Remove protos.
      (mu_help, dispatch_find_action, dispatch_docstring): New protos.
      
      * mu/acl.c: Add MU Setup comment.
      * mu/cflags.c: Likewise.
      * mu/filter.c: Likewise.
      * mu/flt2047.c: Likewise.
      * mu/info.c: Likewise.
      * mu/ldflags.c: Likewise.
      * mu/pop.c: Likewise.
      * mu/query.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * mu/mu-setup.awk: New file.
      * mu/help.c: New file.
      * mu/dispatch.c: New file.
      
      * mu/.gitignore: Add mu-status.[ch]
      
      * po/POTFILES.in: Add mu/dispatch.c and mu/help.c.
      Sergey Poznyakoff authored
  14. 02 Nov, 2010 1 commit
  15. 29 Oct, 2010 1 commit
    • * mu/mu.h (mutool_prompt_vartab): Remove.
      (mutool_prompt_env): New extern.
      * mu/pop.c (pop_prompt_vartab): Rewrite as pop_prompt_env.
      All callers changed.
      * mu/shell.c (mutool_prompt_vartab): Remove variable.
      (mutool_prompt_env): New variable.
      (expand_prompt): Remove function.
      (input_line_interactive): Use mu_wordsplit to expand command prompt.
      Sergey Poznyakoff authored
  16. 28 Oct, 2010 1 commit
    • The wordsplit module (borrowed from another project of mine, called 'grecs')
      provides a flexible and powerful mechanism for parsing input in a way
      similar to posix-shell.  In particular, the POSIX function wordexp is
      a subset of the wordsplit functionality.
      
      The argcv module is now deprecated.
      
      * include/mailutils/wordsplit.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add wordsplit.h
      * libmailutils/string/wordsplit.c: New file.
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add wordsplit.c.
      * include/mailutils/argcv.h (mu_argcv_join): New proto.
      (mu_argcv_get, mu_argcv_get_n, mu_argcv_get_np)
      (mu_argcv_unquote_char, mu_argcv_quote_char)
      (mu_argcv_quoted_length, mu_argcv_unquote_copy)
      (mu_argcv_quote_copy): Mark as deprecated.
      * include/mailutils/mailutils.h: Include wordsplit.h.
      
      * libmailutils/tests/wsp.c: New file.
      * libmailutils/tests/.gitignore: List wsp.
      * libmailutils/tests/wordsplit.at: New file.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wsp
      (TESTSUITE_AT): Add wordsplit.at.
      * libmailutils/tests/argcv.c: Define MU_ARCGV_DEPRECATED to
      avoid deprecation warnings.
      * libmailutils/tests/testsuite.at: Include wordsplit.at.
      
      * libmailutils/base/argcvfree.c: New file.
      * libmailutils/base/argcvjoin.c: New file.
      * libmailutils/base/argcvrem.c: New file.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add new files.
      
      * libmailutils/base/argcv.c: Define MU_ARCGV_DEPRECATED to
      avoid deprecation warnings.
      (argcv_string, argcv_free, argv_free)
      (mu_argcv_remove): Rewrite in separate modules.
      
      * comsat/comsat.h: Include wordsplit.h.
      * imap4d/imap4d.h: Likewise.
      * mail/mail.h: Likewise.
      * mh/mh.h: Likewise.
      * readmsg/readmsg.h: Likewise.
      
      * comsat/action.c: Use wordsplit.
      * imap4d/fetch.c: Likewise.
      * lib/mailcap.c: Likewise.
      * libmailutils/auth/mu_auth.c: Likewise.
      * libmailutils/base/mutil.c: Likewise.
      * libmailutils/cfg/format.c: Likewise.
      * libmailutils/cfg/lexer.l: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/diag/gdebug.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/server/acl.c: Likewise.
      * libmailutils/stream/prog_stream.c: Likewise.
      * libmailutils/tests/listop.c: Likewise.
      * libmailutils/url/create.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/radius.c: Likewise.
      * libmu_sieve/sieve.l: Likewise.
      * libproto/mailer/mbox.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mailer/smtp_gsasl.c: Likewise.
      * mail/mailline.c: Likewise.
      * mail/mailvar.c: Likewise.
      * mail/send.c: Likewise.
      * mail/util.c: Likewise.
      * mh/folder.c: Likewise.
      * mh/mh_alias.y: Likewise.
      * mh/mh_argp.c: Likewise.
      * mh/mh_init.c: Likewise.
      * mh/mh_list.c: Likewise.
      * mh/mh_msgset.c: Likewise.
      * mh/mh_sequence.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mh_sequence.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mhn.c: Likewise.
      * mh/send.c: Likewise.
      * movemail/movemail.c: Likewise.
      * mu/shell.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * testsuite/smtpsend.c: Likewise.
      
      * pop3d/popauth.c: Use wordsplit.
      Use simplified input format (username and password delimited
      by any amount of whitespace).
      Read/produce old format if invoked with the --compatibility option.
      
      * examples/aclck.c: Use wordsplit instead of argcv.
      * examples/header.c: Likewise.
      * examples/mta.c: Likewise.
      * examples/.gitignore: Remove pop3client.
      * examples/Makefile.am: Remove pop3client.
      
      * po/POTFILES.in: Add new files.
      Sergey Poznyakoff authored
  17. 27 Oct, 2010 1 commit
    • *gnulib.modules (snprintf, vasprintf): Remove.
      *sieve/tests/reject.at: Use AT_PACKAGE_VERSION instead of
      the hardcoded version number.
      *lib/mu_asprintf.h: Remove.
      
      * imap4d/auth_gss.c: Replace asprintf with mu_asprintf and vasprintf by
      mu_vasnprintf.
      * guimb/guimb.h: Likewise.
      * imap4d/imap4d.h: Likewise.
      * imap4d/unsubscribe.c: Likewise.
      * lib/Makefile.am
      * lib/mailcap.c: Likewise.
      * libmu_argp/muinit.c: Likewise.
      * maidag/deliver.c: Likewise.
      * maidag/maidag.h: Likewise.
      * mail/escape.c: Likewise.
      * mail/mail.c: Likewise.
      * mail/mail.h: Likewise.
      * mail/util.c: Likewise.
      * mail/write.c: Likewise.
      * mh/burst.c: Likewise.
      * mh/forw.c: Likewise.
      * mh/mh.h: Likewise.
      * mh/mh_alias.l: Likewise.
      * mh/mh_format.c: Likewise.
      * mh/mh_getopt.c: Likewise.
      * mh/mh_init.c: Likewise.
      * mh/mh_msgset.c: Likewise.
      * mh/mh_sequence.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mhn.c: Likewise.
      * mh/send.c: Likewise.
      * mimeview/mimetypes.l: Likewise.
      * mimeview/mimetypes.y: Likewise.
      * mimeview/mimeview.c: Likewise.
      * movemail/movemail.c: Likewise.
      * mu/ldflags.c: Likewise.
      * pop3d/expire.c: Likewise.
      * pop3d/pop3d.h: Likewise.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
  18. 26 Oct, 2010 1 commit
    • The purpose is to make it modular and flexible.  URLs are
      parsed out as they are created.  Missing URL parts can be
      supplied via a "URL hint" at creation time (similar to
      the approach used in creating mu_address_t).  Ports
      can be specified either as numbers or as service names.
      Original port string representation can be retrieved from
      the URL, as well as its numeric value.
      
      * libmailutils/url/accessor.h: New file.
      * libmailutils/url/copy.c: New file.
      * libmailutils/url/create.c: New file.
      * libmailutils/url/decode.c: New file.
      * libmailutils/url/destroy.c: New file.
      * libmailutils/url/dup.c: New file.
      * libmailutils/url/expand.c: New file.
      * libmailutils/url/flag.c: New file.
      * libmailutils/url/get-auth.c: New file.
      * libmailutils/url/get-host.c: New file.
      * libmailutils/url/get-param.c: New file.
      * libmailutils/url/get-path.c: New file.
      * libmailutils/url/get-portstr.c: New file.
      * libmailutils/url/get-query.c: New file.
      * libmailutils/url/get-scheme.c: New file.
      * libmailutils/url/get-secret.c: New file.
      * libmailutils/url/get-user.c: New file.
      * libmailutils/url/match.c: New file.
      * libmailutils/url/port.c: New file.
      * libmailutils/url/scheme.c: New file.
      * libmailutils/url/uplevel.c: New file.
      * libmailutils/url/urlstr.c: New file.
      
      * configure.ac (AC_CONFIG_FILES): Add libmailutils/url/Makefile
      * libmailutils/Makefile.am (SUBDIRS): Add url.
      (libmailutils_la_LIBADD): Link with liburl.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove url.c
      * libmailutils/base/url.c: Remove.
      
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add xdecode.c
      * libmailutils/string/xdecode.c: New file.
      
      * include/mailutils/sys/url.h (_mu_url): Change type to short.
      <_get_port>: Change second argument to unsigned.
      <_get_portstr>: New method.
      * include/mailutils/url.h (MU_URL_SCHEME): New flag.
      (MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS)
      (MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC)
      (MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags.
      (mu_url_create_hint, mu_url_copy_hints): New prototypes.
      (mu_url_parse): Remove.
      (mu_url_get_port): Change second argument to unsigned.
      (mu_url_decode_len,mu_url_decode): Remove.
      (mu_url_decode): New proto.
      (mu_url_sget_portstr, mu_url_aget_portstr)
      (mu_url_get_portstr): New protos.
      
      * include/mailutils/util.h (mu_str_url_decode)
      (mu_str_url_decode_inline): New protos.
      * libproto/pop/mbox.c (pop_open): Port is unsigned.
      
      * libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have.
      * libproto/maildir/folder.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/remote.c: Likewise.
      * libproto/mailer/sendmail.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mbox/folder.c: Likewise.
      * libproto/mh/folder.c: Likewise.
      * libproto/nntp/folder.c: Likewise.
      * libproto/pop/folder.c: Likewise.
      
      * imap4d/imap4d.c: Remove calls to mu_url_parse.
      * libmailutils/base/registrar.c: Likewise.
      * libmailutils/base/wicket.c: Likewise.
      * libmailutils/mailbox/folder.c: Likewise.
      * libmailutils/mailbox/mailbox.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/tests/url-parse.c: Likewise.
      * libmailutils/tests/wicket.c: Likewise.
      * libproto/mailer/smtp_auth.c: Likewise.
      * maidag/deliver.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use
      mu_str_url_decode, instead of mu_url_decode.
      * libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type
      to unsigned short. All uses updated.
      (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/stream.h (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/cpp/url.h (get_port): Return unsigned.
      * libmu_cpp/url.cc (get_port): Return unsigned.
      (parse): Empty function. Schedule for removal.
      * python/libmu_py/url.c (api_url_parse): Empty function.
      Schedule for removal.
      (api_url_get_port): Port is unsigned.
      
      * libmailutils/base/wicket.c (mu_wicket_file_match_url)
      (mu_wicket_file_match_url): New parameter: parse_flags.
      * mu/wicket.c (wicket_match): Use parse_flags to control
      whether or not to show the plaintext password.
      
      * doc/texinfo/url.texi: Update.
      Sergey Poznyakoff authored
  19. 24 Oct, 2010 2 commits
    • …ckward compatibility.
      
      * config/.gitignore: Remove.
      * config/Makefile.am: Remove.
      * config/mailutils-config.c: Remove.
      * config/maint.mk: Remove.
      * config/mailutils.m4: Move to mu-aux/mailutils.m4
      * mu-aux/Makefile.am (m4datadir, dist_m4data_DATA): New variables.
      
      * Makefile.am (SUBDIRS) <config>: Remove.
      * configure.ac (AC_CONFIG_FILES): Remove config.
      
      * mu/mailutils-config: New file.
      * mu/cflags.c: New file.
      * mu/ldflags.c: New file.
      * mu/Makefile.am (dist_bin_SCRIPTS, EXTRA_DIST): Add mailutils-config.
      (mu_SOURCES): Add cflags.c and ldflags.c.
      (AM_CPPFLAGS): New variable.
      * mu/mu.c: Add new modes: cflags and ldflags.
      * mu/mu.h (mutool_ldflags, mutool_cflags): New protos.
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
    • * mu/wicket.c: New file.
      * mu/mu.h (mutool_wicket): New proto.
      * mu/mu.c (mutool_action_tab): Add an entry for wicket mode.
      * mu/Makefile.am (mu_SOURCES): Add wicket.c
      * .gitignore: Update.
      Sergey Poznyakoff authored
  20. 09 Oct, 2010 1 commit
  21. 08 Oct, 2010 1 commit
  22. 06 Oct, 2010 1 commit
  23. 05 Oct, 2010 4 commits
    • * mu/shell.c (input_line_script): Use mu_getline.
      * libmu_argp/compat.c: Remove.
      * libmu_argp/Makefile.am: Remove compat.c
      * po/POTFILES.in: Likewise.
      Sergey Poznyakoff authored
    • * mu/mu.h (mutool_command) <doc>: Rename to docstring.
      <argdoc>: New member.
      * mu/pop.c (com_apop): 2nd arg (password) is optional.  If not
      supplied, ask for it using the mu_getpass function.
      (pop_comtab): Add argdocs.  Use N_ wrappers around translatable
      strings.
      * mu/shell.c (default_comtab: Add argdocs.  Use N_ wrappers around
      translatable strings.
      (print_comtab): Rewrite.
      (shell_history): Use pager.
      Sergey Poznyakoff authored
    • * configure.ac: Test for tcgetattr and tcsetattr.
      * gnulib.modules (getpass-gnu): Remove.
      * include/mailutils/mutil.h (mu_getpass): New proto.
      * include/mailutils/stream.h (MU_IOCTL_GET_ECHO)
      (MU_IOCTL_SET_ECHO): New ioctls.
      * include/mailutils/sys/file_stream.h (_MU_FILE_STREAM_ECHO_OFF): New flag.
      (_mu_file_stream) <echo_state>: New member.
      * libmailutils/getpass.c: New file.
      * libmailutils/Makefile.am (libmailutils_la_SOURCES): Add getpass.c.
      * libmailutils/file_stream.c (fd_done): Free echo_state.
      (fd_ioctl): Implement MU_IOCTL_GET_ECHO and MU_IOCTL_SET_ECHO.
      * mu/mu.h (mustrin): New extern.
      * mu/pop.c (com_pass): Use mu_getpass.
      * mu/shell.c (mustrin): New variable.
      (readline): Use mu_stream_getline instead of getline.
      (mutool_shell): Create mustrin.
      * pop3d/popauth.c (options): Fix typo.
      (fill_pass): Use mu_getpass.
      Sergey Poznyakoff authored
    • * mu/mu.h (mutool_shell_interactive): New extern.
      (mutool_open_pager): New proto.
      * mu/pop.c (com_list, com_top, com_retr): Use pager.
      * mu/shell.c (mutool_shell_interactive, mustrout): New
      variables.
      (print_comtab, print_help): Print to stream.
      (shell_help): Use pager if necessary.
      (mutool_open_pager): New function.
      (mutool_shell): Create mutool_stream_out and destroy it before
      returning.
      (all functions): Use mu_stream_printf instead of printf.
      Sergey Poznyakoff authored
  24. 04 Oct, 2010 1 commit
  25. 03 Oct, 2010 4 commits
    • * libmailutils/cfg_parser.y (split_cfg_path): New static.
      (mu_cfg_find_node): Use the same parsing algorithm as
      mu_cfg_create_subtree.  This complements 68b7dc9d.
      (mu_cfg_create_subtree): Use split_cfg_path.  Handle
      escaped '=' as a regular character.
      * mu/mu.c (args_doc): Remove spurious word.
      (main): Disable --version option in action handlers.
      * mu/query.c (query_args_doc): Use `path' instead of `keyword'.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * mu/filter.c (filter_options): Add missing arguments.
      * mu/flt2047.c (flt2047_options): Likewise.
      Sergey Poznyakoff authored
    • The `mu' program is a multi-purpose tool for doing various mail-
      and mailutils-related operations.  It includes a pop3 shell,
      a coder/decoder for all filter formats supported by Mailutils,
      a utility to extract arbitrary values from the MU configuration
      files, a configuration information utility and many more, in the
      short run.  It supercedes examples/pop3client and (partially)
      mailutils-config, both of which will be removed in the future.
      
      * Makefile.am (SUBDIRS): Add mu.
      * configure.ac: Likewise.
      * po/POTFILES.in: Add new files.
      * mu/.gitignore: New file.
      * mu/Makefile.am: New file.
      * mu/filter.c: New file.
      * mu/flt2047.c: New file.
      * mu/info.c: New file.
      * mu/mu.c: New file.
      * mu/mu.h: New file.
      * mu/pop.c: New file.
      * mu/query.c: New file.
      * mu/shell.c: New file.
      Sergey Poznyakoff authored