Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
Split formatting functions into two distinct families. Functions prefixed
with mu_sys_sockadrr deal with struct sockaddr, wherease those starting with
mu_sockaddr deal with struct mu_sockaddr. Introduce special format for SMTP
EHLO.
When sending EHLO to the remote party, use IP address in square brackets
if hostname is empty.
* libmailutils/sockaddr/Makefile.am (libsockaddr_la_SOURCES): Add fromsock.c
* libmailutils/sockaddr/fromsock.c: New function.
* libmailutils/sockaddr/str.c (mu_sockaddr_format): Rewrite.
(mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New functions.
* include/mailutils/debug.h (mu_sockaddr_to_astr): Remove prototype.
* include/mailutils/sockaddr.h (mu_sockaddr_format): New enum.
(mu_sockaddr_format): change signature.
(mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New prototypes.
(mu_sockaddr_from_socket): New prototype.
* include/mailutils/stream.h (MU_IOCTL_TCPSTREAM): New ioctl family;
(MU_IOCTL_TCP_GETSOCKNAME): New ioctl opcode.
* comsat/comsat.c: Use mu_sys_sockaddr_ interface to handle
struct sockaddr.
* lib/tcpwrap.c: Likewise.
* libmailutils/server/ipsrv.c: Likewise.
* libmailutils/server/msrv.c: Likewise.
* libmailutils/stream/tcp.c (_tcp_ioctl): Handle MU_IOCTL_TCPSTREAM.
* libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): If hostname is empty,
use IP address in square brackets.
|
|
* libmailutils/sockaddr/fromnode.c
[!MAILUTILS_IPV6] (mu_sockaddr_from_node): Convert port to network order.
|
|
* mu-aux/mailutils.m4 (am_mu_vercmp): Ignore missing version parts.
|
|
* NEWS: Update.
* configure.ac: Update.
* Makefile.am (dist-hook): Fix conditional.
|
|
* libmailutils/mailbox/msgsave.c (mu_message_save_to_mailbox): Open
destination in append mode.
|
|
This patch makes sure that (1) the value of the "num" register is not
altered by evaluating the condition expressions and remains visible in
the conditional branches, and (2) the value of the control escape is
1 or 0 depending on whether the last control condition succeeded or not.
* mh/mh_format.h: Implement numeric stack in the vm.
(mhop_pushn,mhop_popn,mhop_xchgn): New opcodes.
(mh_fvm) <numstack,maxstack,tos>: New members.
* mh/mh_fmtgram.y (ctx_stack): Reallocate as necessary.
(yylex_cond): Handle backslash continuations.
(format_parse): Initialize and free ctx_stack
(codegen_node): Reimplement control escapes. See the comment for
explanation
* mh/mh_format.c (mh_fvm_run): Use mh_string_init to initialize registers.
Initialize stack.
Implement push, popn, and xchgn
(extract_labels,mh_format_dump_disass): Handle new opcodes.
* mh/tests/fmtcnd00.at: New testcase.
* mh/tests/Makefile.am: Add new testcase
* mh/tests/testsuite.at: Likewise.
* mh/tests/fmtcomp.at: Fix expected code dumps
|
|
|
|
|
|
|
|
functions
It is possible that these functions return success and place NULL in
the result variable. Make sure this possibility is checked throughout
the code.
* libmailutils/base/usremail.c (mu_set_user_email): Check for NULL
return value from mu_address_[as]get.
* libmailutils/mailbox/msgenv.c (message_envelope_sender)
* libmailutils/tests/addr.c (parse)
* libmu_scm/mu_message.c (mu_scm_message_print):
* libproto/mailer/prog.c (_expand_rcpt)
* libproto/mailer/smtp.c (_rcpt_to_addr)
(mu_address_sget_email)
* maidag/lmtp.c (check_address):
* mail/from.c (hdr_from):
* mail/util.c (util_get_sender):
* mh/mh_format.c (addr_cmp, builtin_proper)
(builtin_addr, builtin_pers, builtin_note)
(builtin_mbox, builtin_path, builtin_formataddr)
* mh/mh_whom.c (scan_addrs):
* libmu_sieve/util.c (mu_sieve_vlist_compare): Skip NULL returns
from retr.
* libmu_sieve/actions.c (check_redirect_loop): Error checking.
* include/mailutils/types.hin (mu_prstr): New function.
* libmu_cpp/address.cc: Use mu_prstr to ensure the printable representation
of string.
* python/libmu_py/address.c: Likewise.
* libmu_scm/mu_address.c (_get_address_part): Likewise.
* libmailutils/string/wordsplit.c (expvar): Treat NULL
value as "".
|
|
* mh/mh_fmtgram.y (yylex_func): Accept negative numbers.
|
|
* libmailutils/mime/mimehdr.c (_mime_header_parse): Preserve charset no
matter what lang setting is.
|
|
|
|
* include/mailutils/datetime.h (mu_datetime_tz_utc): New proto.
* libmailutils/datetime/tzutc.c: New file.
* libmailutils/datetime/Makefile.am: Add tzutc.c
* imap4d/fetch.c (_frt_internaldate): Assume UTC for internaldate.
* libproto/imap/fetch.c (_date_mapper): Likewise.
* mh/send.c: Improve diagnostics.
|
|
* libmu_sieve/load.c [!HAVE_LIBLTDL] (mu_sieve_unload_ext): Dummy function.
[!HAVE_LIBLTDL] (mu_sieve_load_ext, mu_i_sv_load_add_dir): Set errno. Fix
return value.
* mu-aux/gylwrap (yysym): Add more symbols
(dumpme): Skip old contents of the BOOTSTRAP section up to
the next POD keyword.
* mu/libexec/Makefile.am (MUTOOL_LIBRARIES_TAIL): Fix ordering
of libraries.
|
|
|
|
|
|
* mh/etc/replcomps: Use localmbox instead of me.
* mh/etc/replgroupcomps: Likewise.
* mh/mh.h (mh_get_my_real_name)
(mh_get_my_user_name,mh_my_host): New protos.
(mh_my_email): Change prototype.
* mh/mh_format.c (builtin_me): Use mh_get_my_user_name.
(builtin_myhost,builtin_myname,builtin_localmbox): New functions.
(builtin_formataddr): Preserve collected data if the address is
not parseable.
(builtin_tab): New functions: myhost, myname, localmbox.
* mh/mh_init.c (mh_local_mailbox): New function.
(mh_get_my_real_name)
(mh_get_my_user_name,mh_my_host): New functions.
* mh/repl.c (set_group): Don't overwrite any prior -form or -format
options.
|
|
* mail/send.c (add_body): Increase reference counter of the
copied stream.
|
|
* mh/mh_fmtgram.y (mh_read_formfile): Remove only the last trailing
newline.
(codegen_node): Don't emit spurious clear register statements at the
end of the "else" branch.
Optimize if no "else" branch is present.
* mh/mh_format.c (mh_fvm_run) <mhop_brzn, mhop_brzs>: Leave the result
of condition evaluation in num.
(builtin_tab): rcpt takes literal argument.
* mh/scan.c (action): Remove unused argument.
* mh/tests/fmtcomp.at: Update the "if-else" test.
|
|
The commit 6b16ba19 (in its changes to mh/mh_format.c) inadvertently
broke the operaton of inc on folders with gaps in sequence (UID)
numbering. It turns out that the msgno argument to mh_fvm_run (and
msgno member in struct mh_fvm) can be disposed of. If the caller wants
to supply an explicit UID number of the messagem, it should use
mu_message_set_uid.
* mh/mh.h (mh_fvm_run): Take only two arguments: fvm and message.
* mh/mh_format.h (mh_fvm) <msgno>: Remove.
* mh/fmtcheck.c (run): Set the uid accessor on the created message.
* mh/mh_format.c (mh_format_str): Likewise.
(builtin_msg, builtin_cur): Always call mh_message_number.
* mh/inc.c: Update calls to mh_fvm_run
* mh/repl.c: Likewise.
* mh/scan.c: Likewise.
* mh/sortm.c: Likewise.
* mh/tests/inc.at: Check whether inc on folders with gaps in message UIDs
produces the correct output.
|
|
* mu-aux/gylwrap (filter): $yyrx is always defined after ce4b84ab.
Use $yyrepl instead.
|
|
* include/mailutils/opool.h (mu_opool_less): New function.
* libmailutils/base/opool.c: Likewise.
|
|
* include/mailutils/parse822.h (mu_parse822_day)
(mu_parse822_date,mu_parse822_time): Remove protos.
* libmailutils/address/parse822.c (mu_parse822_date_time): Rewrite
via mu_scan_datetime.
|
|
* include/mailutils/cctype.h (MU_CTYPE_IMSPC)
(MU_CTYPE_NWCTL,MU_CTYPE_IMATM): New classes.
(mu_isimspc,mu_isnwctl,mu_isimatm): New macros
* libmailutils/string/muctype.c: Mark characters from the
above classes.
* include/mailutils/parse822.h (mu_parse822_is_char)
(mu_parse822_is_digit,mu_parse822_is_ctl)
(mu_parse822_is_space,mu_parse822_is_htab)
(mu_parse822_is_lwsp_char,mu_parse822_is_special)
(mu_parse822_is_atom_char,mu_parse822_is_q_text)
(mu_parse822_is_d_text,mu_parse822_is_smtp_q): Rewrite as
inline static functions, using macros from cctype.h
* libmailutils/address/parse822.c: See above.
(parse822_is_atom_char_ex): Remove.
|
|
This removes the need for List::Regexp during development
|
|
This change allows the user to pre-compile the yyrx expression in gylwrap
so that it no longer requires the List::Regexp module. Only supplying the
--yysym module will require the module.
* mu-aux/gylwrap: New options --reset and --dump
|
|
* am/flex.m4: Add missing 'fi'
|
|
|
|
|
|
|
|
* mh/mh_init.c (emailcmp): Rewrite.
(email_match): New function.
(mh_is_my_name): Cache Alternate-Mailboxes and mh_my_email in a
static mu_address_t; use email_match to compare.
* mh/tests/fmtfunc.at: Test mymbox function.
|
|
|
|
* mh/mh_fmtgram.y (yyerror): Cast * arguments to int
* mh/mh_format.h (mh_instr_t)<size>: New member.
* mh/tests/fmtfunc.at (FMTFUNC): Enforce Charset:auto.
|
|
* libmailutils/datetime/parsedate.y (mu_parse_date_dtl): Set
tm.tm_gmtoff and tm.tm_zone upon return (if present).
|
|
* libmailutils/datetime/parsedate.y (spec production): If a non-signed
number is given, treat it as a (positive) timezone, unless tz is already
set, or as a year number, unless a year is already set, or throw an
error otherwise.
(mu_parse_date_dtl): Revert sign of the returned utc_offset
* mh/mh_format.c (builtin_tzone): Compatibility fix
* mh/tests/fmtfunc.at: Test more functions.
|
|
* mh/mh_format.c (_parse_date): Use mu_parse_date_dtl instead of
much stricter mu_parse822_date_time. Return more info.
All callers changed
(builtin_sday,builtin_szone): Implemented
* mh/tests/fmtfunc.at: Comment out (temporarly) the tzone test
|
|
|
|
* include/mailutils/datetime.h (MU_PD_MASK_*): New defines, taken
from parsedate.y
(mu_parse_date_dtl): New proto.
* libmailutils/base/parsedate.y: Remove obsolete defines. Move PD_MASK_
defines to datetime.h; use functions from cctype.h and cstr.h
(pd_date) <tzname>: New member
(%union): New member tz
(T_ZONE,T_DAYZONE): Change type to <tz>
(zone productions): Set tzname.
(mu_parse_date_dtl): New function. Returns detailed time information.
(mu_parse_date): Rewrite as an entry point to mu_parse_date_dtl
|
|
* mh/mh_format.c (builtin_sday, builtin_szone): Mark as not implemented
(builtin_zone): Fix output
(builtin_tzone): Fix output
* mh/tests/fmtfunc.at: Test most date functions.
|
|
* libmailutils/address/parse822.c (mu_parse822_date_time): Set tm_yday
|
|
Actual program counters may differ between different architecture, so avoid
using them in the testsuite.
* mh/fmtcheck.c: New option -pc requires printing program counters. Unless
this option is used, -disass prints only labels where needed.
* mh/mh.h (mh_format_dump_disass): Change signature.
* mh/mh_format.c (mh_format_dump_disass): Take additional flag indicating
whether to print program counters. Compute and print program labels, unless
this flag is non-zero.
* mh/tests/fmtcomp.at: Don't expect program counters in disassembled code.
|
|
* mh/mh_fmtgram.y (emit_funcall): Emit mhop_movs acc, reg
if MHA_ACC flag is set.
* mh/mh_format.c (mh_fvm_run): Clear all registers.
(builtin_formataddr): Get previously accumulated addresses from R_ACC
(builtin_tab): Mark formataddr with MHA_ACC, remove MHA_OPTARG
(mh_format_dump_disass): Account for the new register.
(mh_fvm_destroy): Free all registers.
* mh/mh_format.h: New register R_ACC. It is needed to implement proper
formataddr and concataddr functionality.
* mh/tests/fmtcomp.at: Update.
* mh/tests/fmtfunc.at: Update.
|
|
* mh/mh_format.c (builtin_nodate): Call mu_parse822_date_time directly.
(mh_format_dump_disass): Escape literal strings on output.
* mh/tests/fmtfunc.at: Test nodate.
|
|
|
|
* mh/mh_fmtgram.y (node): Replace noprint with printflag.
(escape production): Consult printflag to decide whether to
amd how to print
(funcall production): Rewrite logic
(yylex_func): Make a clear distinction between literals and
inlined ctls, which require leading whitespace, and funcalls
and components, that don't tolerate it.
(emit_funcall): Process special functions separately
* mh/mh_format.c (builtin_tab): Mark lit, num, putstrf, and putnumf
as specials.
* mh/mh_format.h: Revamp MHA_ flags
* mh/tests/fmtcomp.at: Update.
* mh/tests/fmtfunc.at: Add tests for putstrf and putnumf
|
|
|
|
* mh/mh_fmtgram.y (codegen_node): Generate mhop_printlit instruction
for fmtnode_print node with a literal or number argument.
* mh/mh_format.c (mh_fvm_run): Handle mhop_printlit
* mh/mh_format.h (mhop_printlit): New opcode.
* mh/tests/fmtcomp.at: Update.
* mh/tests/fmtfunc.at: Add more tests.
|