summaryrefslogtreecommitdiff
path: root/mh
AgeCommit message (Collapse)AuthorFiles
2019-07-23Minor fixSergey Poznyakoff2
Check return from mu_message_get_num_parts
2019-05-29mh: fix folder +/absolute/nameSergey Poznyakoff1
* mh/folder.c (name_prefix_len): Remove global. (install_folder_info,_scan): Take additional argument: length of the name prefix to skip. (folder_scan): New function. (action_print): Don't impose name prefix unconditionally. Call folder_scan to set it up as necessary.
2019-02-26New autoconf macro for activating mailbox format supportSergey Poznyakoff1
* am/enable.m4 (MU_ENABLE_SUPPORT) (MU_ENABLE_BUILD): Use m4_-prefixed directives. (MU_ENABLE_MAILBOX_FORMAT) (MU_ENABLE_LOCAL_MAILBOX_FORMAT_ (MU_ENABLE_REMOTE_MAILBOX_FORMAT): New macros. (MU_LIB_MAILBOX) (MU_LIB_LOCAL_MAILBOX) (MU_LIB_REMOTE_MAILBOX): New substitution variables. * configure.ac: Use new macros to enable mailbox formats * libproto/Makefile.am: Augment SUBDIRS instead of using Makefile variables. * comsat/Makefile.am: Use MU_LIB_.*MAILBOX macros to link in the necessary libraries. * examples/Makefile.am: Likewise. * examples/cpp/Makefile.am: Likewise. * frm/Makefile.am: Likewise. * imap4d/Makefile.am: Likewise. * include/mailutils/sys/Makefile.am: Likewise. * libmu_scm/Makefile.am: Likewise. * libproto/Makefile.am: Likewise. * maidag/Makefile.am: Likewise. * mail/Makefile.am: Likewise. * messages/Makefile.am: Likewise. * mh/Makefile.am: Likewise. * movemail/Makefile.am: Likewise. * mu/libexec/Makefile.am: Likewise. * pop3d/Makefile.am: Likewise. * python/2/libmu_py/Makefile.am: Likewise. * python/3/libmu_py/Makefile.am: Likewise. * readmsg/Makefile.am: Likewise. * sieve/Makefile.am: Likewise. * testsuite/Makefile.am: Likewise.
2019-01-03Update copyright yearsSergey Poznyakoff99
2018-08-16Force terminating \0 in mh_format resultIvan A. Melnikov1
Apparently, mu_stream_read is not required to put the terminating zero into the buffer, so we need to do it in its caller. Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
2018-01-19Version 3.4.90; update copyright yearsSergey Poznyakoff99
2017-11-18Fix the use of uninitialized memorySergey Poznyakoff1
* mh/mh_alias_lex.l (push_source): Initialize locus range prior to copying to it. * libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Likewise. * libmu_sieve/util.c: (mu_sieve_value_create): Likewise.
2017-11-10Minor fix in MH testsuiteSergey Poznyakoff3
Running fmtcheck without .mh_profile triggers mh_install, which surprises the testsuite with unexpected output "I'm going to create the standard MH path for you." Defining the MH envar to an existing file name suppresses it. * mh/tests/fmtcnd00.at: Always define MH prior to starting fmtcheck. * mh/tests/fmtcomp.at: Likewise. * mh/tests/fmtfunc.at: Likewise.
2017-10-16Reimplement control escapes in mh_format.Sergey Poznyakoff7
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
2017-10-10Use mu_prtstr to safely print string valuesSergey Poznyakoff2
2017-10-10Check for NULL return from mu_address_aget_ and mu_address_sget_ family ↵Sergey Poznyakoff2
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 "".
2017-10-10Bugfix in mhSergey Poznyakoff1
* mh/mh_fmtgram.y (yylex_func): Accept negative numbers.
2017-09-27Assume UTC for IMAP internaldateSergey Poznyakoff1
* 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.
2017-07-29Implement new MH format primitives (for compatibility with nmh).Sergey Poznyakoff6
* 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.
2017-07-07Bugfixes in MH format code generatorSergey Poznyakoff4
* 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.
2017-07-07Simplify mh_fvm_run calling sequence.Sergey Poznyakoff9
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.
2017-07-05Fix the nohost MH format functionmhfmtSergey Poznyakoff2
2017-07-05MH: Rewrite the mymbox function.Sergey Poznyakoff2
* 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.
2017-07-04Add more fmtfunc testsSergey Poznyakoff2
2017-07-04Minor fixesSergey Poznyakoff3
* 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.
2017-07-04Improve parsedate & related MH formatsSergey Poznyakoff2
* 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.
2017-07-04Revamp MH datetime format functionsSergey Poznyakoff2
* 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
2017-07-03Test mh format date functionsSergey Poznyakoff2
* 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.
2017-07-03fmtcheck: use symbolic label names by defaultSergey Poznyakoff4
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.
2017-07-02MH: fix formataddr.Sergey Poznyakoff5
* 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.
2017-07-02MH: fix the nodate format functionSergey Poznyakoff2
* 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.
2017-07-01Minor fixesSergey Poznyakoff3
2017-07-01MH format: fix processing of special functions: putstrf, putnumf, lit, and numSergey Poznyakoff5
* 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
2017-07-01MH: Fix mh_builtin field misnomerSergey Poznyakoff2
2017-07-01More fixes in MH format parserSergey Poznyakoff5
* 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.
2017-06-30Improve MH format parser.Sergey Poznyakoff10
* 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.
2017-06-30Introduce explicit data type for MH format virtual machineSergey Poznyakoff9
* 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.
2017-06-30Restore version output expected by mh-eSergey Poznyakoff1
* 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
2017-06-29Add special flag for debugging MH format parserSergey Poznyakoff3
* 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
2017-06-29MH: minor fix in format lexer.Sergey Poznyakoff1
* mh/mh_fmtgram.y (yylex): Don't return empty strings
2017-06-29Improve mhl format parserSergey Poznyakoff1
* mh/mh_list.c: Keep track of input locations
2017-06-29Improve format parser APISergey Poznyakoff14
* 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.
2017-06-27MH: Fix repl formatsSergey Poznyakoff3
* mh/etc/replcomps: Replace calls to %(concat) * mh/etc/replgroupcomps: Likewise. * mh/repl.c: Fix embedded format.
2017-06-27MH format: fix location tracking and error diagnosticsSergey Poznyakoff4
* 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.
2017-06-27Further work on format vmSergey Poznyakoff10
* 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.
2017-06-26Start rewriting MH format functions.Sergey Poznyakoff7
* 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.
2017-06-21mh: determine output width automaticallySergey Poznyakoff9
* 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
2017-06-20API for formatting message sets on outputSergey Poznyakoff3
* 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.
2017-06-18refile: eliminate refiled messages from all sequencesSergey Poznyakoff5
* 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
2017-06-17Minor change in the testsuiteSergey Poznyakoff1
* mh/tests/send.at: Make expected text version-independent
2017-06-16Merge branch 'master' into locusSergey Poznyakoff13
2017-06-14Lex-related fixes.Sergey Poznyakoff1
* mu-aux/gylwrap (@yysym): Add more symbols from lex. * mh/mh_alias_lex.l (mh_alias_read): Return meaningful value.
2017-06-13Switch mh_aliases to line trackerSergey Poznyakoff4
* 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.
2017-06-13Rewrite Makefile rules for lex and bisonSergey Poznyakoff6
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
2017-06-11Fix the -nodraftfolder and -nowhatnowproc options.Sergey Poznyakoff14
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.

Return to:

Send suggestions and report system problems to the System administrator.