summaryrefslogtreecommitdiff
path: root/mh/repl.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-11-24 20:36:56 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-11-24 20:36:56 +0200
commitbd228fc3d1f40f0f230db1d066fb5a330a0c35a9 (patch)
treee4b2412df75c6d54407c3fc3dc2a619d68471edc /mh/repl.c
parent3f323ca9cee9fdb3a04f2f7269998fdc1f941f5e (diff)
downloadmailutils-bd228fc3d1f40f0f230db1d066fb5a330a0c35a9.tar.gz
mailutils-bd228fc3d1f40f0f230db1d066fb5a330a0c35a9.tar.bz2
mh: set a compatible search path for format files; other minor fixes.
* 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.
Diffstat (limited to 'mh/repl.c')
-rw-r--r--mh/repl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mh/repl.c b/mh/repl.c
index 8629d61f1..c7ca5b35d 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -55,6 +55,7 @@ static struct argp_option options[] = {
{"form", ARG_FORM, N_("FILE"), 0, N_("read format from given file")},
{"format", ARG_FORMAT, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("include a copy of the message being replied; the message will be processed using either the default filter \"mhl.reply\", or the filter specified by --filter option") },
+ {"noformat", ARG_NOFORMAT, 0, OPTION_HIDDEN, "" },
{"inplace", ARG_INPLACE, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("* annotate the message in place")},
{"query", ARG_QUERY, N_("BOOL"), OPTION_ARG_OPTIONAL,
@@ -178,17 +179,15 @@ opt_handler (int key, char *arg, struct argp_state *state)
case ARG_FORM:
free (format_str);
format_str = NULL;
- s = mh_expand_name (MHLIBDIR, arg, 0);
- mh_read_formfile (s, &format_str);
- free (s);
+ if (mh_read_formfile (arg, &format_str))
+ exit (1);
break;
case ARG_GROUP:
if (is_true (arg))
{
- s = mh_expand_name (MHLIBDIR, "replgroupcomps", 0);
- mh_read_formfile (s, &format_str);
- free (s);
+ if (mh_read_formfile ("replgroupcomps", &format_str))
+ exit (1);
rcpt_mask |= RCPT_ALL;
}
else
@@ -229,18 +228,19 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_FILTER:
- mhl_filter = arg;
+ mh_find_file (arg, &mhl_filter);
break;
case ARG_FORMAT:
if (is_true (arg))
- {
- if (!mhl_filter)
- mhl_filter = mh_expand_name (MHLIBDIR, "mhl.repl", 0);
- }
+ mh_find_file ("mhl.repl", &mhl_filter);
else
mhl_filter = NULL;
break;
+
+ case ARG_NOFORMAT:
+ mhl_filter = NULL;
+ break;
case ARG_FCC:
if (!has_fcc)

Return to:

Send suggestions and report system problems to the System administrator.