- 26 Jun, 2017 1 commit
-
-
* 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.
Sergey Poznyakoff authored
-
- 21 Jun, 2017 1 commit
-
-
* 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
Sergey Poznyakoff authored
-
- 20 Jun, 2017 6 commits
-
-
-
-
-
* 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.
Sergey Poznyakoff authored -
* libmu_sieve/sieve-gram.y: Add missing assignment to $$ in testlist production. This fixes improper handling of anyof and allof
Sergey Poznyakoff authored
- 19 Jun, 2017 2 commits
-
-
-
* 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.
Sergey Poznyakoff authored
-
- 18 Jun, 2017 3 commits
-
-
* 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
Sergey Poznyakoff authored -
* 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.
Sergey Poznyakoff authored -
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
Sergey Poznyakoff authored
-
- 17 Jun, 2017 1 commit
- 16 Jun, 2017 2 commits
-
-
- 15 Jun, 2017 2 commits
-
-
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.
Sergey Poznyakoff authored -
* 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.
Sergey Poznyakoff authored
-
- 14 Jun, 2017 4 commits
-
-
These are needed only during development cycle, as the created sources are included in the tarball. * am/bison.m4: New file. * am/flex.m4: New file. * configure.ac: Use MU_PROG_BISON and MU_PROG_FLEX * mu-aux/gylwrap: Drop support for alternative command line syntax and the --stdout option.
Sergey Poznyakoff authored -
* include/mailutils/sieve.h (mu_sieve_compile_text): New proto. (mu_sieve_compile_buffer): Backward-compatible proto. * include/mailutils/stream.h ((MU_IOCTL_LOGSTREAM_GET_LOCUS_DEPRECATED) (MU_IOCTL_LOGSTREAM_SET_LOCUS_DEPRECATED): New defines. (MU_IOCTL_LOGSTREAM_GET_LOCUS) (MU_IOCTL_LOGSTREAM_SET_LOCUS): Use external functions to make sure any references to these are marked as deprecated. * include/mailutils/types.hin (mu_locus_DEPRECATED): New struct. (mu_locus): Define to mu_locus_DEPRECATED * libmailutils/stream/logstream.c (_log_ctl): Handle the deprecated ctls. * libmu_sieve/extensions/moderator.c (moderator_filter_message): Use mu_sieve_compile_text. * libmu_sieve/sieve-gram.y (mu_sieve_compile_buffer): Rename to mu_sieve_compile_text. Re-introduce it as a backward-compatibility API. * sieve/sieve.c: Call mu_sieve_compile_text instead of mu_sieve_compile_buffer.
Sergey Poznyakoff authored -
* mu-aux/gylwrap (@yysym): Add more symbols from lex. * mh/mh_alias_lex.l (mh_alias_read): Return meaningful value.
Sergey Poznyakoff authored -
* libmu_sieve/sieve-lex.l: Allocate new ctx structure (restore accidentally deleted file. * libmailutils/locus/debug.c: Add missing copyleft. * libmailutils/locus/genprloc.c: Likewise. * libmailutils/locus/ident.c: Likewise. * libmailutils/locus/linetrack.c: Likewise. * libmailutils/locus/locus.c: Likewise. * mu-aux/gencl: Likewise. * mu-aux/gitinfo: Likewise. * mu-aux/gylwrap: Likewise.
Sergey Poznyakoff authored
-
- 13 Jun, 2017 4 commits
-
-
* mh/mh.h (ali_parse_error): Remove. * mh/mh_alias_gram.y: Simplify parser. Use location tracking. * mh/mh_alias_lex.l: Switch to mu_linetrack facility * mh/tests/ali.at: Update expected location.
Sergey Poznyakoff authored -
* include/mailutils/sieve.h (mu_sieve_value_t)<locus>: New field. * libmu_sieve/util.c (mu_sieve_value_create): Take a pointer to mu_locus_range. Use it to initialize the locus field. * libmu_sieve/sieve-gram.y: Pass loci in calls to mu_sieve_value_create. * libmu_sieve/actions.c: Use the most specific locus when displaying the message. * libmu_sieve/comparator.c: Likewise. * libmu_sieve/prog.c: Likewise. * libmu_sieve/variables.c: Likewise. * sieve/tests/i-numeric.at: Update the expected error location.
Sergey Poznyakoff authored -
The aim is to get rid of the explicit rules and use the Autmake framework as much as possible, without hurting the flexibility. To this effect, the gylwrap tool is rewritten from scratch (in Perl). In compatibility mode it takes the same arguments as the standard ylwrap. Additional configuration is supplied in the configuration file gylwrap.conf, located in the directory where the input file resides. * mu-aux/gylwrap: Rewrite from scratch. * configure.ac (MU_YLWRAP): New subst variable. * libmailutils/base/.gitignore: Update. * libmailutils/base/Makefile.am: Update. * libmailutils/base/gylwrap.conf: New file. * libmailutils/cfg/.gitignore: Update. * libmailutils/cfg/Makefile.am: Use new YLWRAP * libmailutils/cfg/cfg.h: Remove. * libmailutils/cfg/gylwrap.conf: New file. * libmailutils/cfg/lexer.l: Include mailutils/yyloc.h directly. * libmailutils/cfg/parser.y: Likewise. * libmu_sieve/Makefile.am: Use new YLWRAP * libmu_sieve/gylwrap.conf: New file. * libmu_sieve/sieve.y: Rename to libmu_sieve/sieve-gram.y * libmu_sieve/sieve.l: Rename to libmu_sieve/sieve-lex.l * mail/Makefile.am: Use new YLWRAP * mh/.gitignore: Update. * mh/Makefile.am: Use new YLWRAP * mh/gylwrap.conf: New file. * mh/mh_alias.y: Rename to mh/mh_alias_gram.y * mh/mh_alias.l: Rename to mh/mh_alias_lex.l * mh/pick.y: Rename to mh/pick-gram.y * mimeview/.gitignore: Update. * mimeview/Makefile.am: Use new YLWRAP * mimeview/mimetypes.y: Rename to mimeview/grammar.y * mimeview/gylwrap.conf: New file. * mimeview/mimetypes.l: Rename to mimeview/lexer.l * po/POTFILES.in: Update
Sergey Poznyakoff authored -
* include/mailutils/types.hin (mu_locus): Remove. * include/mailutils/diag.h (mu_diag_at_locus): Remove. (mu_diag_at_locus_point,mu_diag_at_locus_range): New protos. * include/mailutils/mailutils.h: Include locus.h * include/mailutils/stream.h (MU_IOCTL_LOGSTREAM_GET_LOCUS) (MU_IOCTL_LOGSTREAM_SET_LOCUS): Remove. * libmailutils/stream/logstream.c (_log_ctl): Reflect this. * libmailutils/tests/logstr.at: Remove the related test. * libmailutils/tests/logstr.c: Ditto. * libmailutils/cfg/Makefile.am: Add new header. * libmailutils/cfg/cfg.h: New file. * libmailutils/cfg/format.c: Use mu_locus_range * libmailutils/cfg/lexer.l: Use the mu_linetrack facility * libmailutils/cfg/parser.y: LIkewise. * libmailutils/diag/diag.c (mu_diag_at_locus): Remove. (mu_diag_at_locus_point,mu_diag_at_locus_range): New protos. * comsat/action.c: Use mu_locus_point and mu_locus_range instead of the removed mu_locus. * include/mailutils/auth.h: Likewise. * include/mailutils/cfg.h: Likewise. * include/mailutils/sieve.h: Likewise. * libmailutils/base/wicket.c: Likewise. * libmailutils/tests/wicket.c: Likewise. * libmu_auth/radius.c: Likewise. * libmu_sieve/actions.c: Likewise. * libmu_sieve/comparator.c: Likewise. * libmu_sieve/extensions/moderator.c: Likewise. * libmu_sieve/mem.c: Likewise. * libmu_sieve/prog.c: Likewise. * libmu_sieve/require.c: Likewise. * libmu_sieve/runtime.c: Likewise. * libmu_sieve/sieve-priv.h: Likewise. * libmu_sieve/sieve.l: Use the mu_linetrack facility. * libmu_sieve/sieve.y: Likewise. * libmu_sieve/util.c: Use mu_locus_point and mu_locus_range instead of the removed mu_locus * libmu_sieve/variables.c: Likewise. * mail/source.c: Likewise. * mu/libexec/dbm.c: Likewise. * mu/libexec/logger.c: Likewise. * mu/libexec/wicket.c: Likewise. * sieve/sieve.c: Likewise. * sieve/tests/i-numeric.at: Update expected locations
Sergey Poznyakoff authored
-
- 12 Jun, 2017 3 commits
-
-
* include/mailutils/locus.h (mu_linetrack_rebase): New proto. * libmailutils/locus/linetrack.c (mu_linetrack_rebase): New function. * libmailutils/diag/diag.c (mu_diag_at_locus_range): New function.
Sergey Poznyakoff authored -
* include/mailutils/locus.h (mu_stream_print_locus_point): New proto. (mu_locus_range_copy): New proto. * include/mailutils/yyloc.h (mu_file_print_locus_point) (mu_file_print_locus_range): New protos. (YY_LOCATION_PRINT): Redo using mu_file_print_locus_range. * libmailutils/locus/filprloc.c: New file. * libmailutils/locus/genprloc.c: New file. * libmailutils/locus/strprloc.c: New file. * libmailutils/locus/Makefile.am: Add new files. * libmailutils/locus/debug.c (mu_stream_print_locus_range): Remove. Declared elsewhere. * libmailutils/locus/linetrack.c: use mu_locus_point_set_file, instead of mu_locus_point_init. * libmailutils/locus/locus.c: Likewise. (mu_locus_range_copy)P: New function. * mimeview/mimetypes.l: Provide rule for \n in ARGSTRING Always print diagnostics before returning BOGUS (lex_next_rule): Rewrite. Print verbose diagnostics if app.trace6 is set. (mimetypes_close): Deinitialize yylloc. * mimeview/mimetypes.y: Catch the BOGUS token. Adjust conflict expectation. Properly reference assigned loci. (mimetypes_parse): Return 1 if any errors detected. * mimeview/mimeview.c: Use debug category app instead of mime. * mimeview/tests/testsuite.at: Add new tests. * libmailutils/stream/logstream.c (_log_done): Deinitialize locus range.
Sergey Poznyakoff authored -
* include/mailutils/locus.h (MU_LOCUS_POINT_INITIALIZER): New define (MU_LOCUS_RANGE_INITIALIZER): New define (mu_locus_point_set_file, mu_locus_point_init) (mu_locus_point_deinit, mu_locus_point_copy) (mu_locus_range_deinit): New protos * libmailutils/locus/locus.c: New file. * libmailutils/locus/Makefile.am: Add new file. * libmailutils/locus/linetrack.c (mu_linetrack_at_bol): New function. (mu_linetrack_locus): New function. (mu_linetrack_advance): Use mu_locus_point_set_file to set the mu_file field. * libmailutils/tests/linetrack.c: Initialize and deinitialize locus range. * mimeview/mimetypes.l: switch to line tracker * mimeview/mimeview.h: Use defines from yyloc.h
Sergey Poznyakoff authored
-
- 10 Jun, 2017 1 commit
-
-
The commit 744c4a9c didn't take into account the -nodraftfolder and -nowhatnowproc options, which can be used to cancel the effect of the corresponding facilities. This commit fixes it. * mh/mh_getopt.c (mh_getopt_ext): New function. * mh/mh_getopt.h (mh_getopt_ext): New prototype. (mh_optinit): New struct. * mh/tests/comp.at: Test the use of Draft-Folder * mh/tests/forw.at: Likewise. * mh/tests/repl.at: Likewise. * mh/comp.c (main): use mh_getopt_ext to properly process draftfolder and whatnowproc. * mh/forw.c: Likewise. * mh/repl.c: Likewise. * mh/mh.h (mh_whom): Remove. (mh_whom_header, mh_whom_file, mh_whom_message): New protos. * mh/mh_alias.y (mh_read_aliases): Don't read aliases twice. * mh/mh_whatnow.c (whom): Use mh_whom_file. * mh/mh_whom.c (mh_whom): Rewrite and rename to mh_whom_file. (mh_whom_header, mh_whom_message): New functions. * mh/whom.c: Use mh_getopt_ext. Interpret command line arguments, depending on whether the draftfile facility is in use.
Sergey Poznyakoff authored
-
- 09 Jun, 2017 2 commits
-
-
-
It was noted that "mhn -nohead" did not suppress the output of headers as "mhn -noheaders" did. It turned out that the negation marker was overwritten while scanning options for possible matching alternatives. This patch fixes it. * libmailutils/opt/opt.c (find_long_option): Don't overwrite the negation attribute of the last found option. * libmailutils/tests/parseopt.c: New option --headers, to test the fix. * libmailutils/tests/parseopt28.at: New testcase. * libmailutils/tests/Makefile.am: Add new testcase. * libmailutils/tests/testsuite.at: Include new testcase. * libmailutils/tests/parseopt*.at: Trivial changes
Sergey Poznyakoff authored
-
- 08 Jun, 2017 7 commits
-
-
This fixes a bug introduced in d30e5a07 * mh/mh.h (mh_whatnow_env) <last_ed>: New member * mh/mh_whatnow.c (_whatnow): Initialize reedit and last_ed members Free last_ed before returning (edit): Prefer wh->last_ed over wh->editor
Sergey Poznyakoff authored -
* mh/mh_whatnow.c (edit): Disable command expansion in wordsplit. See also 491bec23.
Sergey Poznyakoff authored -
-
-
-
-
* include/mailutils/locus.h (mu_locus_track_stat): New struct. (mu_locus_tracker_stat): New proto. (mu_locus_tracker_retreat): Change return type. * libmailutils/locus/debug.c (mu_stream_vlprintf): Don't print spurious \n. (mu_lrange_debug): Fix incorrect call. * libmailutils/locus/tracker.c (mu_locus_track_create): Allocate storage for at least two lines of text. (mu_locus_tracker_stat): New function. (mu_locus_tracker_advance): Handle empty lines (mu_locus_tracker_retreat): Add error handling. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add locktrack. * libmailutils/tests/tracker.c: Rename to loctrack.c * libmailutils/tests/testsuite.at: Add new testcase. * libmailutils/tests/loctrack.at: New test case.
Sergey Poznyakoff authored
-
- 07 Jun, 2017 1 commit
-
-