- 03 Dec, 2010 2 commits
-
-
* 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 -
* include/mailutils/sys/stream.h (_mu_stream) <setbuf_hook>: New member. * libmailutils/stream/stream.c (mu_stream_set_buffer): Use setbuf_hook to decide whether the operation is allowed.
Sergey Poznyakoff authored
-
- 02 Dec, 2010 4 commits
-
-
* libmailutils/filter/inline-comment.c: Recognize multi-char comment sequences. Implement encode mode. * libmailutils/tests/inline-comment.at: Test the new modes. * mail/escape.c (quote0): Re-implement using inline-comment encode mode. * mail/mailvar.c (mailvar_tab): Fix a typo.
Sergey Poznyakoff authored -
* configure.ac: Remove checks for strtok_r, strchrnul, strndup, asprintf, vasprintf: none of these is used any more. * maidag/lmtp.c (lmtp_reply): Use mu_vasnprintf. * mh/mh.h (strchrnul): Remove proto. * mh/mh_list.c (want_header): Rewrite. (print): Use strcspn.
Sergey Poznyakoff authored -
* TODO: Update. * gnulib.modules: Remove strtok_r * imap4d/auth_gsasl.c (auth_gsasl_capa_init): Use mu_wordsplit instead of strtok. * imap4d/imap4d.h (strtok_r): Remove declaration. * lib/mailcap.c (mime_context) <no_ask_str>: Remove. All uses updated. (mime_context_fill): Use mu_wordsplit instead of strtok. (mime_context_write_input): Tolerate ENOSYS return from mu_stream_seek. (display_stream_mailcap): Use mu_wordsplit instead of strtok. * libmailutils/diag/gdebug.c (mu_debug_level_from_string) (mu_global_debug_from_string): Use mu_wordsplit instead of strtok. * libmu_cfg/sieve.c (_add_path): Likewise. * libmu_sieve/extensions/list.c: Likewise. * mail/escape.c (quote0): Likewise. * mail/util.c (util_header_expand): Likewise. (util_rfc2047_decode): Use mu_parse_lc_all. * mh/mh_init.c (mh_charset): Use mu_parse_lc_all. * frm/common.c (get_charset): Use mu_parse_lc_all. * libmailutils/base/lcall.c: New file. * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add lcall.c * libmailutils/string/strlst.c: New file. * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add strlst.c. * include/mailutils/cstr.h: Include mailutils/types.h (mu_string_split): New proto. * include/mailutils/nls.h (MU_LC_LANG, MU_LC_TERR) (MU_LC_CSET,MU_LC_MOD): New flags. (mu_lc_all): New struct. (mu_parse_lc_all, mu_lc_all_free): New protos. (mu_charset_lookup): New proto (from util.h). * include/mailutils/util.h (mu_charset_lookup): Move to nls.h * libmailutils/base/tempfile.c (mu_tempname): Shut up compiler warning.
Sergey Poznyakoff authored
- 01 Dec, 2010 4 commits
-
-
* libmailutils/mailbox/message.c (_message_stream_seek): Fix ESPIPE conditional. (_message_stream_read): Keep running until buffer is full or _mss_eof state is reached. (_message_stream_readdelim): Keep running until buffer is full, _mss_eof state is reached or delimiter is found.
Sergey Poznyakoff authored -
* libmu_sieve/sieve.l (input_string_ptr, input_string_level): Remove. (input_stream): New static variable. (fillbuf): Use mu_stream_read (buffer_ctx)<yyin>: Replace with mu_stream_t input; (push_source, pop_source): Use stream API. (mu_sv_lex_begin_string): Likewise. * sieve/sieve.c (options): New option --expression. (expression_option): New variable. (parser): Handle the --expression option. (main): Treat SCRIPT as program text if given the --expression option.
Sergey Poznyakoff authored -
-
* imap4d/lsub.c (imap4d_lsub): Fix untagged responses. * imap4d/imap4d.h (make_interdir): New proto. * imap4d/create.c (mkdir_p): Remove function. (MKDIR_PERMISSIONS): Move macro definition to imap4d.h (imap4d_create): Use make_interdir instead of mkdir_p. * imap4d/rename.c (make_interdir): New function. (imap4d_rename): Create intermediate directories as required by RFC 3501. Issue additional diagnostics if rename fails. Fix OK response text. * imap4d/imap4d.c (imap4d_mainloop): Implement idle timeout. * imap4d/bye.c (imap4d_bye0): Reset the SIGPIPE before sending the OK response in order to avoid recursion. Unrelated changes: * maidag/tests/forward.at: Fix the expected reply (see f5374bc2).
Sergey Poznyakoff authored
-
- 30 Nov, 2010 6 commits
-
-
-
This still needs some more work because imap4d does not check whether the objects being subscribed to are valid folders or mailboxes. * imap4d/imap4d.h (open_subscription): New prototype. * imap4d/lsub.c (imap4d_lsub): Rewrite using MU properties. * imap4d/subscribe.c (open_subscription): New function. (imap4d_subscribe): Rewrite using MU properties. * imap4d/unsubscribe.c (imap4d_unsubscribe): Rewrite using MU properties. * examples/mblconv.c: New file. * examples/Makefile.am: Add mblconv.c
Sergey Poznyakoff authored -
* mh/sortm.c (current_num): New variable. (sort): Keep track of the current message UID. Store it back to mailbox if in reorder mode. (main): Save initial current message UID. Save global and mailbox status before exiting. * mh/mh.h (mh_open_folder): Change last argument name. * mh_open_folder (mh_open_folder): Change meaning of the 2nd argument: it contains usual stream flags now. All uses changed. * mh/tests/sortm.at: New file. * mh/tests/testsuite.at: Include sortm.at * mh/tests/Makefile.am (TESTSUITE_AT): Add sortm.at.
Sergey Poznyakoff authored -
* examples/mta.c (mta_send): Don't print trailing spaces instead of empty lines. * mh/send.c: Redo draftfolder support. (read_mts_profile): If MTSTAILOR environment variable is set, it names the mtstailor file to use instead of the standard ones. * mh/tests/send.at: New file. * mh/tests/Makefile.am (TESTSUITE_AT): Add send.at * mh/tests/testsuite.at (MH_SETUP): Set MTSTAILOR. (MH_MTSTAILOR): New macro Include send.at
Sergey Poznyakoff authored -
* libmailutils/stream/message_stream.c (_message_open): Don't clobber len.
Sergey Poznyakoff authored -
* libmailutils/string/mkfilename.c (mu_make_file_name_suf): Don't add leading / if dir=="".
Sergey Poznyakoff authored
-
- 29 Nov, 2010 7 commits
-
-
* mh/mhn.c (edit_forw): Accept directives without explicit folder spec. Fix creation of individual mime parts; set Content-Type: message/rfc822 for each of them. (mhn_edit): Fix some coredumps. (main): Use -file argument, if it is given. * mh/tests/atlocal.in (mimeflt): New function. * mh/tests/mhn.at: Add tests for compose mode.
Sergey Poznyakoff authored -
* libmailutils/mime/mime.c (_mime_append_part): All numeric args are of type size_t. (_mime_part_size): Fix calculations. (mu_mime_get_part): Avoid coredump if stream is NULL.
Sergey Poznyakoff authored -
* mh/mhn.c (mhn_edit): Increase line_count after outputting a line with a stripped-off initial #.
Sergey Poznyakoff authored -
* mh/mhn.c (mhn_pause): Fix type of the local buffer variable. * mh/tests/mhn.at: Add more -show tests. * testsuite/mh/mime/1: New file. * testsuite/mh/mime/2: New file. * testsuite/Makefile.am (EXTRA_DIST): Add mime.
Sergey Poznyakoff authored -
* libmailutils/stream/stream.c (mu_stream_wait): Fix condition to determine if the buffer contains some data. Avoid passing empty flags to the wait method.
Sergey Poznyakoff authored -
-
* mh/mhn.c (OPT_PAUSE): Remove define. (pause_option): New variable. (opt_handler): -pause/-nopause sets pause_option. If stdin is not a tty, set pause_option to 0. (check_type): New function. (mhn_show_command): If mhn-show-<type>[/<subtype>] is not set, use %pmoreproc '%F' for text/plain and message/rfc822 parts. If content type is application/octet-stream and type=tar, use tar to list the archive. Otherwise, complain and return NULL. (MHN_CONFIRM): Rename to MHN_PAUSE. (mhn_pause): New function. (show_handler): The value of pause_option controls the %p escape. Rewrite the MHN_PAUSE handling to avoid the use of the fixed-size buffer. Implement C-c handling, as in other mhns. If mhn_show_command returns NULL, do not attempt to show the content. Remove dubious usage of mu_transport_t. (mhn_store_command): handle application/octet-stream with type=tar. * mh/tests/mhn.at: Add a test for show mode.
Sergey Poznyakoff authored
-
- 26 Nov, 2010 2 commits
-
-
* mh/mhn.c (_mhn_profile_get): Try mhn-<prefix>-<type> if mhn-<prefix>-<type>/<subtype> does not exist. (normalize_path): Use mu_normalize_path. (store_handler) <store_to_file>: Honor mhn-<prefix>, if set. * tests/atlocal.in (remove_curdir): New function. * mh/tests/mhn.at: Implement more -store tests. * mh/tests/testsuite.at (MH_SETUP): Set curdir for use by other testcases. * mh/tests/comp.at: Use remove_curdir to sort out the cwd. * mh/tests/forw.at: Likewise. * mh/tests/mark.at: Likewise. * mh/tests/mhpath.at: Likewise. * mh/tests/repl.at: Likewise.
Sergey Poznyakoff authored -
* mh/mhn.c (options): Add --build as an alias to --compose. (options): Likewise. (store_destination): New enum. (mhn_store_command): Support all variants of mhn-store-* components. Return store_destination type. (store_handler): Rewrite accordingly. (main): Consistently use mh_expand_name to expand the value of input_file. * mh/tests/mhn.at: New file. * mh/tests/Makefile.am (TESTSUITE_AT): Add mhn.at. * mh/tests/testsuite.at: Include mhn.at.
Sergey Poznyakoff authored
-
- 25 Nov, 2010 5 commits
-
-
* mh/mhn.c: Use _sget_ calls where appropriate. Eliminate unnecessary memory allocations.
Sergey Poznyakoff authored -
* mh/mhn.c (_mhn_profile_get): All arguments are const. (mhn_tempfile_name): New function. (mhn_show_command): Use mhn_tempfile_name.
Sergey Poznyakoff authored -
* include/mailutils/body.h (mu_body_get_filename): Remove proto. * include/mailutils/sys/body.h (_mu_body) <filename>: Remove. * libmailutils/mailbox/body.c (mu_body_get_filename): Remove obsolete function. (_body_get_stream): Use mu_temp_file_stream_create. * libmailutils/stream/temp_file_stream.c (mu_temp_file_stream_create): Return EINVAL if flags is set, but hints is NULL. * libmu_scm/mu_body.c (mu_scm_body_print): Don't use mu_body_get_filename.
Sergey Poznyakoff authored -
* include/mailutils/stream.h (mu_temp_file_stream_create): Change signature. * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add temp_file_stream.h * include/mailutils/util.h (mu_tempfile_hints): Remove const qualifiers. * libmailutils/stream/temp_file_stream.c: Include sys/temp_file_stream.h. (fd_temp_open): Use data from struct _mu_temp_file_stream. (fd_temp_done): New function. (mu_temp_file_stream_create): Take hints and flags as arguments. * examples/mta.c: Update calls to mu_temp_file_stream_create. * libproto/mbox/mbox.c: Likewise. * libproto/pop/mbox.c: Likewise. * maidag/deliver.c: Likewise. * maidag/lmtp.c: Likewise. * mh/burst.c: Likewise. * mh/prompter.c: Likewise.
Sergey Poznyakoff authored -
* include/mailutils/util.h (mu_make_file_name_suf): New proto. (mu_make_file_name): Replace with a macro. (MU_TEMPFILE_TMPDIR,MU_TEMPFILE_SUFFIX) (MU_TEMPFILE_MKDIR): New flags. (mu_tempfile_hints): New struct. (mu_tempfile): Change signature. * libmailutils/base/tempfile.c (mu_create_temp_file): New function. (mu_tempfile): Rewrite from scratch. Change signature. All callers changed. * libmailutils/string/mkfilename.c (mu_make_file_name): Remove. (mu_make_file_name_suf): New function. * libmailutils/stream/streamcpy.c (mu_stream_copy): Don't return EIO on EOF. * libmailutils/stream/file_stream.c (mu_fd_stream_create): If MU_STREAM_SEEK is set, position fd to 0. * guimb/collect.c: Update calls to mu_tempfile. * lib/mailcap.c: Likewise. * libmailutils/base/amd.c (_amd_tempfile): Rewrite using mu_tempfile. * libmailutils/tests/tempfile.c: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add tempfile.
Sergey Poznyakoff authored
-
- 24 Nov, 2010 8 commits
-
-
* mh/etc/mhl.headers: New file. * mh/etc/Makefile.am (MH_FILES): Add mhl.headers. * mh/mhn.c (opt_handler): Use mh_find_file to resolve format file name. (mhn_show): Always open the formfile. (copy_header_to_stream): Rewrite using mu_stream_copy + HEADER filter.
Sergey Poznyakoff authored -
* mh/.gitignore: Update. * mh/compcommon.c (mh_comp_draft): Rewrite using mh_find_file and simplify. All callers changed. * mh/mh.h (mh_comp_draft): Change signature. * mh/comp.c (opt_handler) <ARGP_KEY_FINI>: Make sure formfile is initialized. * mh/forw.c: Likewise. * mh/repl.c (opt_handler): Remove unused variable. * mh/tests/comp.at (compcmd): Remove -form. * mh/tests/forw.at (forwcmd): Likewise. * mh/etc/.gitignore: New file. * mh/etc/Makefile.am: New file. * mh/etc/forwcomps: New file. * mh/etc/scan.default: New file. * mh/etc/scan.mailx: New file. * mh/etc/scan.size: New file. * mh/etc/scan.time: New file. * mh/etc/scan.timely: New file.
Sergey Poznyakoff authored -
* mh/etc: New directory. * mh/Makefile.am: New file. * mh/components: Move to mh/etc. * mh/mailutils-mh.eli: Move to mh/etc. * mh/mhl.format: Move to mh/etc. * mh/mhl.forward: Move to mh/etc. * mh/mhl.repl: Move to mh/etc. * mh/mhl.usenet: Move to mh/etc. * mh/replcomps: Move to mh/etc. * mh/replgroupcomps: Move to mh/etc. * configure.ac (AC_CONFIG_FILES): Add mh/etc/Makefile. * mh/Makefile.am (SUBDIRS): Add etc. Move mhlib_DATA and related statements to mh/etc/Makefile.am * mh/comp.c (formfile): Remove const qualifier. (opt_handler): Use mh_find_file to set formfile. * mh/forw.c: Likewise. * mh/mh_init.c (mh_find_file): Make sure *resolved_name is always set to the last tried name. * mh/tests/comp.at: Remove directory components from the -from argument. * mh/tests/forw.at: Likewise. * mh/tests/mhl.at: Likewise. * mh/tests/testsuite.at (MH_SETUP): Change mhetcdir value.
Sergey Poznyakoff authored -
* mh/mh_format.c (builtin_friendly): If personal part is present, return it. Otherwise, leave the address untouched. (builtin_pers): Do not quote the return. * mh/tests/inc.at: Reflect the above changes. * mh/tests/scan.at: Likewise. * mh/mh_list.c (eval_body): Offset each line. * mh/tests/mhl.at: Test this change. * mh/mhl.c: Use mh_find_file to resolve the argument to -form. * mh/repl.c: Likewise. Same for replgroupcomps, mhl.repl and -filter. * mh/mhl.repl: New file. * mh/mhl.usenet: New file. * mh/Makefile.am (mhlib_DATA, EXTRA_DIST): Add new files.
Sergey Poznyakoff authored -
* libmailutils/string/wordsplit.c (mu_wordsplit_trimws): Do not touch quoted nodes. * libmailutils/tests/wordsplit.at: Test the above change.
Sergey Poznyakoff authored -
* mh/mhl.forward: New file. * mh/forw.c (mh_option): the -format option is boolean. (mhl_filter): Rename to mhl_filter_file. (opt_handler) <ARG_FORMAT>: Use default mhl.filter. <ARG_NOFORMAT>: Set encap_clear. <ARG_FILTER>: Use mh_find_file to determine filter file name. (finish_draft): Use MHL filter file if encap == encap_mhl. * mh/mh.h (mh_find_file): New prototype. * mh/mh_init.c (mh_find_file): New file. (mh_read_formfile): Use mh_find_file to locate the file. * mh/tests/forw.at: Test forw -format. * mh/tests/mhparam.at: Update the -all test. * tests/testsuite.at (MH_SETUP): Set the "mhetcdir" component. * mh/scan.c (opt_handler): Exit if mh_read_formfile failed.
Sergey Poznyakoff authored -
Static memory stream is a read-only stream whose transport is an arbitrary area of memory. Such streams allow the programmer to access C strings using streams interface. * include/mailutils/stream.h (mu_static_memory_stream_create): New proto. * libmailutils/stream/memory_stream.c (mu_static_memory_stream_create): New function. * imap4d/append.c (imap4d_append0): Use static memory stream to create a temporary message. * imap4d/preauth.c (decode64_buf): Use static memory stream. * libmailutils/base/rfc2047.c (mu_rfc2047_decode): Likewise. * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Likewise. * libmu_auth/ldap.c (chk_md5, chk_sha, chk_ssha): Likewise. * libmu_sieve/extensions/vacation.c (build_mime): Likewise.
Sergey Poznyakoff authored
-
- 23 Nov, 2010 2 commits
-
-
* libmailutils/stream/message_stream.c (scan_stream): Merge with _message_open. * mh/mhn.c (edit_forw): Do not set ws_delim. Fix message addressing. (mhn_edit): Remove the trailing newline.
Sergey Poznyakoff authored -
* include/mailutils/sys/amd.h (_amd_data) <delete_msg>: New method. * libmailutils/base/amd.c (amd_expunge): If delete_msg is defined, use it. * libproto/mh/mbox.c (_mh_msg_delete): New method. (_mailbox_mh_init): Set delete_msg if "rmmproc" component is defined. * mh/tests/movemsg: New file. * mh/tests/Makefile.am (EXTRA_DIST): Add movemsg. * mh/tests/rmm.at: Test rmmproc effects. * mh/tests/rmf.at (MH_KEYWORDS): Fix copy-n-paste error. * doc/texinfo/mu-mh.texi: Document rmmproc. * mh/TODO: Update.
Sergey Poznyakoff authored
-