Age | Commit message (Collapse) | Author | Files |
|
|
|
* 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.
|
|
* mh/fmtcheck.c (main): Assume -dump if no input message and
no -disass is given.
* mh/mh_fmtgram.y: Enable error-verbose mode
(funcall production): Use MHA_OPTARG_NIL flag to provide
0 (or "") default argument.
(yyerror): Improve location printer
(yylex_initial): Correctly handle %%
* mh/mh_format.c (mh_string_move): Rename to mh_string_copy
(builtin_msg, builtin_cur): Try to obtain message number only
if msgno is 0.
(builtin_tab): Fix definitions of comp, lit, and num
(mh_format_dump_disass): Print width.
* mh/mh_format.h (MHA_OPTARG_NIL): New flag.
* mh/tests/fmtcomp.at: New file.
* mh/tests/fmtfunc.at: New file.
* mh/tests/Makefile.am: Add new files.
* mh/tests/testsuite.at: Likewise.
* mh/tests/atlocal.in (MHETCDIR): New variable.
* mh/tests/scan.at: Test external formats.
|
|
* mh/mh.h (mh_fvm_t): New typedef.
(mh_format): Remove.
(mh_fvm_create,mh_fvm_destroy)
(mh_fvm_set_output,mh_fvm_set_width)
(mh_fvm_set_format,mh_fvm_run): New protos.
* mh/mh_format.c: Likewise.
* mh/mh_format.h (mh_machine): Rename to mh_fvm
* mh/fmtcheck.c: Rewrite using mh_fvm_ functions.
* mh/inc.c: Likewise.
* mh/mh_list.c (print_header_value): Likewise.
* mh/repl.c: Likewise.
* mh/scan.c: Likewise.
* mh/sortm.c: Likewise.
|
|
* mh/mh_getopt.c (mh_version_hook): Print version in format expected
by mh-e
(process_std_options): Produce usual version output when responding
to --version
|
|
* mh/mh.h (MH_FMT_PARSE_DEBUG): New flag.
* mh/fmtcheck.c: Pass the MH_FMT_PARSE_DEBUG flag, if
required.
* mh/mh_fmtgram.y (mh_format_debug): Remove.
(format_parse): Enable debugging if MH_FMT_PARSE_DEBUG flag is set
|
|
* mh/mh_fmtgram.y (yylex): Don't return empty strings
|
|
* mh/mh_list.c: Keep track of input locations
|
|
* libmailutils/string/wordsplit.c (mu_wordsplit_process_list): Update
wsp->ws_endp in nosplit mode
* libmailutils/tests/wordsplit.at: Test incremental nosplit
|
|
* libmailutils/datetime/utcoff.c (mu_utc_offset): Correct the difference if
computed at the break of a day.
|
|
* mh/scanfmt.c: New file.
* mh/Makefile.am: Add scanfmt.c
* mh/mh.h (mh_list_format): Remove extern
(mh_format_parse): Remove proto.
(mh_format_string_parse,mh_format_file_parse)
(mh_scan_format): New functions.
(mh_audit_open, mh_audit_close): Operate on mu_stream_t, instead of
FILE*.
* mh/mh_fmtgram.y (mh_format_string_parse)
(mh_format_file_parse): New functions.
* mh/mh_format.c (print_fmt_string): Make sure trailing newline
is output, even if it is the Nth character on the line (N=width).
* mh/mh_getopt.c (mh_opt_parse_formfile)
(mh_opt_parse_format): New functons.
* mh/mh_getopt.h (mh_opt_parse_formfile)
(mh_opt_parse_format): New protos.
* mh/mh_init.c (mh_list_format): Remove.
(mh_audit_open, mh_audit_close): Operate on mu_stream_t, instead of
FILE*.
* mh/fmtcheck.c: Use new format parsing API.
* mh/inc.c: Likewise.
* mh/mh_list.c: Likewise.
* mh/repl.c: Likewise.
* mh/scan.c: Likewise.
* mh/sortm.c: Likewise.
|
|
* mh/etc/replcomps: Replace calls to %(concat)
* mh/etc/replgroupcomps: Likewise.
* mh/repl.c: Fix embedded format.
|
|
* mh/mh_fmtgram.y: Use mu_linetrack_t to keep track of input
location.
Handle %; comments.
* mh/mh_format.c (mh_format): Change semantics of
mhop_atoi and mhop_itoa.
(builtin_tab): Fix returns types of trim, date2local, and date2gmt.
* mh/mh_format.h: Document changes.
* mh/mh_init.c (mh_read_formfile): Read entire file.
|
|
* libmailutils/diag/diag.c (mu_vdiag_at_locus_range): Reset stream
mode.
|
|
* mh/mh.h (mh_format): Change signature.
(MH_FMT_FORCENL): New define.
* mh/mh_format.h (MHA_OPT_CLEAR): Remove.
(MHA_LITERAL,MHA_VOID): New flags.
(mh_machine) <flags>: New member.
* mh/mh_fmtgram.y (funcall production): Fix argument interpretation
(else_part production): Allow for empty expression.
(token_function): Use MU_CTYPE_IDENT instead of the more restrictive
MU_CTYPE_ALPHA.
* mh/mh_format.c (node_free): Accept NULL as argument
(emit_funcall): Assign literal arguments to R_ARG registers
(codegen_node): Fix coding the mhop_setn instruction.
Clear both str and reg if the ELSE part of a conditional is
empty.
(mh_string_load): Fix size computation.
(mh_string_move): Don't clear the source register.
(mh_format): Reorder parameters, pass flags as 6th parameter.
Emit final newline if MH_FMT_FORCENL is set, unless the last character
output is newline.
(mh_format_str): Rewrite function.
(builtin_lit): Implement
(builtin_friendly): Fix register assignment
(builtin_addr): Pass R_ARG to R_REG verbatim, if it cannot be
parsed as a RFC822 address.
(builtin_decode): Don't clear str reg.
(builtin_concat): Remove. The implementation contradcicts the
principles of the format VM; besides, the same functionality
could be easily achieved by using ctls
(builtin_tab): Put additional flags
* mh/fmtcheck.c (run): Update call to mh_format
* mh/inc.c (list_message): Likewise. Emit warning about
not-implemented audit feature.
* mh/mh_list.c (_destroy_value): Remove spurious call to free().
* mh/repl.c: Fix calls to mh_format and mh_format_parse.
* mh/scan.c: Likewise.
* mh/sortm.c: Likewise.
|
|
* include/mailutils/cctype.h (MU_CTYPE_IDENT)
(MU_CTYPE_HEADR): New character classes.
(mu_isident,mu_isheadr): New macros.
* libmailutils/string/muctype.c: Mark valid identifier and
header constituents as such.
|
|
* mh/fmtcheck.c: New option -disassemble
* mh/mh.h: Move format-related declarations to mh_format.h
(mh_format_parse): Change signature.
(mh_format): Change signature.
(mh_format_dump_code)
(mh_format_dump_disass): New protos.
(mh_decode_2047): Change signature.
* mh/mh_fmtgram.y: Rewrite from scratch. First, build a parse tree,
then use it to generate code.
* mh/mh_format.c: Rewrite from scratch.
* mh/mh_format.h: Move format-related declarations from mh.h
* mh/mh_init.c (mh_decode_2047): Text is const.
* mh/mh_list.c: Fix calls to mh_format_parse and related objects.
|
|
* mh/fmtcheck.c: Take file name as optional argument. Run format
on it, if supplied
* mh/mh.h (mh_width): New proto.
* mh/inc.c: Don't initialize width.
* mh/mh_format.c (mh_format): Use mh_width, if width is 0.
* mh/mh_list.c (mhl_format_run): Use mh_width, if width is 0.
* mh/mh_init.c (mh_width): New function.
* mh/repl.c: Likewise.
* mh/scan.c: Likewise.
* mh/sortm.c: Likewise.
New option -width
|
|
|
|
|
|
|
|
|
|
* include/mailutils/locus.h (mu_locus_point_eq): New function.
* libmu_sieve/prog.c (mu_i_sv_code): Emit the _mu_i_sv_instr_locus
if locus changed.
(mu_i_sv_locus): Raise the changeloc flag and set the locus, instead
of immediately emitting location change code.
* libmu_sieve/runtime.c (_mu_i_sv_instr_locus): New function.
(_mu_i_sv_instr_source,_mu_i_sv_instr_line)
(_mu_i_sv_instr_col): Remove.
* libmu_sieve/sieve-priv.h (mu_sieve_machine) <changeloc>: New member.
|
|
* libmu_sieve/sieve-gram.y: Add missing assignment to $$ in testlist
production. This fixes improper handling of anyof and allof
|
|
|
|
* libmailutils/msgset/print.c (mu_msgset_formats): New global.
(mu_stream_msgset_format): New function.
* include/mailutils/msgset.h (mu_msgset_format): New struct.
(mu_msgset_fmt_imap, mu_msgset_fmt_mh): New defines.
(MU_MSGSET_IGNORE_TRANSERR): New flag
(mu_msgset_copy, mu_msgset_translate): New protos.
(mu_stream_msgset_format, mu_msgset_imap_print): New protos.
(mu_msgset_print): Deprecate.
* libmailutils/imapio/sendmsgset.c: Use mu_msgset_imap_print
instead of mu_msgset_print.
* mu/libexec/imap.c: Likewise.
* libmailutils/msgset/Makefile.am: Add copy.c
* libmailutils/msgset/add.c (mu_msgset_add_range): Translate if
message set mode doesn't match the requested one.
* libmailutils/msgset/sub.c (mu_msgset_sub_range): Likewise.
* libmailutils/msgset/trans.c (_mu_msgset_translate_pair): Act
according to the mode argument.
(mu_msgset_translate): New function.
* libmailutils/tests/msgset.c: New option -mh
* mh/mh_sequence.c (write_sequence): Rewrite.
* testsuite/msgset.c: Optionally translate uids to msgnums and
vice-versa.
|
|
* mh/Makefile.am: Add seqelim.c
* mh/mh.h (mh_sequences_elim): New proto.
* mh/seqelim.c: New file.
* mh/refile.c (main): Fixup sequences after refiling.
* mh/rmm.c: Fixup sequences using mh_sequences_elim
|
|
* include/mailutils/diag.h (mu_vdiag_at_locus_range): New proto.
* libmailutils/locus/linetrack.c (mu_linetrack_origin): accept
locus point with mu_file==NULL. Reuse current file name in this
case. This is to simplify handling of #line directives without
file name.
* libmailutils/tests/linetrack.c: Implement #line directive.
* libmailutils/tests/linetrack.at: Add new test.
|
|
The new version is able to hold input history from several source lines,
which makes it easier to implement #line directives in lexers.
* include/mailutils/locus.h (mu_linetrack_stat): Remove start_line
(mu_linetrack_origin): New proto.
* libmailutils/locus/linetrack.c: Improve indexing. Keep track of several
input files.
* libmailutils/tests/linetrack.at: Add new tests.
* libmailutils/tests/linetrack.c: Improve command set.
* mimeview/grammar.y (make_node): Initialize locus
|
|
* mh/tests/send.at: Make expected text version-independent
|
|
|
|
|
|
Clean up semantics of initializers. Each locus type can be initialized
either statically (by assigning the MU_LOCUS_*_INITIALIZER macro), or
dynamically (by calling mu_locus_*_init function). Whatever method is
used, it is important that it be initialized prior to using any other
mu_locus_* function.
* include/mailutils/locus.h (mu_locus_point_init): Takes single argument.
Returns nothing.
(mu_locus_range_init): New proto.
* libmailutils/locus/locus.c (mu_locus_point_init): Rewrite.
(mu_locus_range_init): New function.
* libmailutils/cfg/parser.y (mu_cfg_alloc_node): Initialize locus.
* libmailutils/tests/logstr.c: Fix printf argyment types.
* libmu_sieve/extensions/moderator.c
(moderator_filter_message): Initialize locus.
* libmu_sieve/sieve-gram.y (node_alloc): Likewise.
* mu/libexec/logger.c (parse_locus_point, set_locus): Likewise.
|
|
* include/mailutils/locus.h: Add copyleft.
(mu_ident_stat): New proto.
* include/mailutils/types.hin (mu_locus_DEPRECATED): Update commit.
Include link to the wiki article.
* include/mailutils/yyloc.h: Add copyleft.
* libmailutils/locus/ident.c (mu_ident_stat): New function.
* libmailutils/locus/locus.c (mu_locus_point_init)
(mu_locus_point_copy): Don't touch destination unless setting
mu_file member succeeds.
(mu_locus_range_copy): deinitialize dest before assignment.
* libmailutils/stream/logstream.c (_log_write): Use mu_locus_range_copy
to save locus.
(mu_ioctl_logstream_get_locus_deprecated)
(mu_ioctl_logstream_set_locus_deprecated): Include link to the
wiki article.
* libmailutils/tests/linetrack.c (main): Destroy tracker before exiting.
* libmailutils/tests/logstr.c: Make it possible to run selected tests.
|