diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | mh/Makefile.am | 20 | ||||
-rw-r--r-- | mh/comp.c | 4 | ||||
-rw-r--r-- | mh/etc/components (renamed from mh/components) | 0 | ||||
-rw-r--r-- | mh/etc/mailutils-mh.eli (renamed from mh/mailutils-mh.eli) | 0 | ||||
-rw-r--r-- | mh/etc/mhl.format (renamed from mh/mhl.format) | 0 | ||||
-rw-r--r-- | mh/etc/mhl.forward (renamed from mh/mhl.forward) | 0 | ||||
-rw-r--r-- | mh/etc/mhl.repl (renamed from mh/mhl.repl) | 0 | ||||
-rw-r--r-- | mh/etc/mhl.usenet (renamed from mh/mhl.usenet) | 0 | ||||
-rw-r--r-- | mh/etc/replcomps (renamed from mh/replcomps) | 0 | ||||
-rw-r--r-- | mh/etc/replgroupcomps (renamed from mh/replgroupcomps) | 0 | ||||
-rw-r--r-- | mh/forw.c | 4 | ||||
-rw-r--r-- | mh/mh_init.c | 12 | ||||
-rw-r--r-- | mh/tests/comp.at | 2 | ||||
-rw-r--r-- | mh/tests/forw.at | 2 | ||||
-rw-r--r-- | mh/tests/mhl.at | 6 | ||||
-rw-r--r-- | mh/tests/testsuite.at | 2 |
17 files changed, 18 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index 10d1e6abf..44127297a 100644 --- a/configure.ac +++ b/configure.ac @@ -1397,6 +1397,7 @@ AC_CONFIG_FILES([ libmailutils/Makefile messages/Makefile mh/Makefile + mh/etc/Makefile mimeview/Makefile movemail/Makefile po/Makefile.in diff --git a/mh/Makefile.am b/mh/Makefile.am index 72cc1cb7b..3e951f87e 100644 --- a/mh/Makefile.am +++ b/mh/Makefile.am @@ -15,9 +15,9 @@ ## You should have received a copy of the GNU General Public License ## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. -SUBDIRS = . tests +SUBDIRS = . etc tests bindir = @MH_BIN_DIR@ -mhlibdir = $(pkgdatadir)/mh + bin_PROGRAMS = \ ali\ anno\ @@ -83,10 +83,6 @@ libmh_a_SOURCES= \ whatnowenv.c noinst_HEADERS = mh.h mh_alias.h mh_format.h mh_getopt.h -LISPSRC = mailutils-mh.el -lisp_LISP=@lisp_LISP@ -EXTRA_LISP = mailutils-mh.el - BUILT_SOURCES= \ mh_fmtgram.c \ pick-gram.c \ @@ -97,17 +93,7 @@ BUILT_SOURCES= \ MAINTAINERCLEANFILES=$(BUILT_SOURCES) -mhlib_DATA = components replcomps replgroupcomps mhl.format mhl.forward\ - mhl.repl mhl.usenet $(LISPSRC) -EXTRA_DIST = components replcomps replgroupcomps mhl.format mhl.forward\ - mhl.repl mhl.usenet mailutils-mh.eli mh_fmtgram.y pick.y mh_alias.y mh_alias.l -DISTCLEANFILES = mailutils-mh.el - -SUFFIXES = .eli .el -mailutils-mh.el: mailutils-mh.eli - -.eli.el: - sed "s,BINDIR,$(bindir),g;s,MHLIBDIR,$(mhlibdir),g" $< > $@ +EXTRA_DIST = mailutils-mh.eli mh_fmtgram.y pick.y mh_alias.y mh_alias.l INCLUDES = @MU_APP_COMMON_INCLUDES@ AM_CPPFLAGS = -D_GNU_SOURCE -DMHLIBDIR=\"$(mhlibdir)\" -DMHBINDIR=\"$(bindir)\" @@ -75,7 +75,7 @@ struct mh_option mh_option[] = { struct mh_whatnow_env wh_env = { 0 }; static int initial_edit = 1; static const char *whatnowproc; -const char *formfile; +char *formfile; static int build_only = 0; /* --build flag */ static int use_draft = 0; /* --use flag */ static char *draftmessage = "new"; @@ -110,7 +110,7 @@ opt_handler (int key, char *arg, struct argp_state *state) break; case ARG_FORM: - formfile = mh_expand_name (MHLIBDIR, arg, 0); + mh_find_file (arg, &formfile); break; case ARG_DRAFTMESSAGE: diff --git a/mh/components b/mh/etc/components index 512352e9d..512352e9d 100644 --- a/mh/components +++ b/mh/etc/components diff --git a/mh/mailutils-mh.eli b/mh/etc/mailutils-mh.eli index 93330afd9..93330afd9 100644 --- a/mh/mailutils-mh.eli +++ b/mh/etc/mailutils-mh.eli diff --git a/mh/mhl.format b/mh/etc/mhl.format index 4b6b7cb8b..4b6b7cb8b 100644 --- a/mh/mhl.format +++ b/mh/etc/mhl.format diff --git a/mh/mhl.forward b/mh/etc/mhl.forward index 3baed14d0..3baed14d0 100644 --- a/mh/mhl.forward +++ b/mh/etc/mhl.forward diff --git a/mh/mhl.repl b/mh/etc/mhl.repl index 007617b2e..007617b2e 100644 --- a/mh/mhl.repl +++ b/mh/etc/mhl.repl diff --git a/mh/mhl.usenet b/mh/etc/mhl.usenet index e669d1c29..e669d1c29 100644 --- a/mh/mhl.usenet +++ b/mh/etc/mhl.usenet diff --git a/mh/replcomps b/mh/etc/replcomps index 55c6a2d4e..55c6a2d4e 100644 --- a/mh/replcomps +++ b/mh/etc/replcomps diff --git a/mh/replgroupcomps b/mh/etc/replgroupcomps index e4786b34d..e4786b34d 100644 --- a/mh/replgroupcomps +++ b/mh/etc/replgroupcomps @@ -99,7 +99,7 @@ enum encap_type encap_mime }; -static char *formfile; +char *formfile; struct mh_whatnow_env wh_env = { 0 }; static int initial_edit = 1; static const char *whatnowproc; @@ -179,7 +179,7 @@ opt_handler (int key, char *arg, struct argp_state *state) break; case ARG_FORM: - formfile = arg; + mh_find_file (arg, &formfile); break; case ARG_FORMAT: diff --git a/mh/mh_init.c b/mh/mh_init.c index f6f796a96..45d725ff2 100644 --- a/mh/mh_init.c +++ b/mh/mh_init.c @@ -543,22 +543,18 @@ mh_find_file (const char *name, char **resolved_name) (name[0] == '.' && name[1] == '/') || (name[0] == '.' && name[1] == '.' && name[2] == '/')) { + *resolved_name = xstrdup (name); if (access (name, R_OK) == 0) - { - *resolved_name = xstrdup (name); - return 0; - } + return 0; return errno; } if (name[0] == '~') { s = mu_tilde_expansion (name, "/", NULL); + *resolved_name = s; if (access (s, R_OK) == 0) - { - *resolved_name = s; - return 0; - } + return 0; return errno; } diff --git a/mh/tests/comp.at b/mh/tests/comp.at index ced3de91b..4ffa81b25 100644 --- a/mh/tests/comp.at +++ b/mh/tests/comp.at @@ -16,7 +16,7 @@ m4_pushdef([MH_KEYWORDS],[comp]) m4_pushdef([compcmd],[comp dnl --form $abs_top_srcdir/mh/components dnl +-form components dnl -editor $abs_top_srcdir/mh/tests/mhed]) MH_CHECK([comp -file],[comp00 comp-file],[ diff --git a/mh/tests/forw.at b/mh/tests/forw.at index 0411e8703..16c83da61 100644 --- a/mh/tests/forw.at +++ b/mh/tests/forw.at @@ -16,7 +16,7 @@ m4_pushdef([MH_KEYWORDS],[forw]) m4_pushdef([forwcmd],[forw dnl --form $abs_top_srcdir/mh/components dnl +-form components dnl -editor $abs_top_srcdir/mh/tests/mhed]) MH_CHECK([forw msg],[forw00 forw-msg],[ diff --git a/mh/tests/mhl.at b/mh/tests/mhl.at index f76aa9ba5..a498e2d51 100644 --- a/mh/tests/mhl.at +++ b/mh/tests/mhl.at @@ -18,7 +18,7 @@ m4_pushdef([MH_KEYWORDS],[mhl]) MH_CHECK([mhl],[mhl00],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox]) -mhl -form $abs_top_srcdir/mh/mhl.format Mail/inbox/2 +mhl -form mhl.format Mail/inbox/2 ], [0], [ -- using template mhl.format -- @@ -36,7 +36,7 @@ I don't see any wine MH_CHECK([mhl repl],[mhl01 mhl.repl],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox]) -mhl -form $abs_top_srcdir/mh/mhl.repl Mail/inbox/15 +mhl -form mhl.repl Mail/inbox/15 ], [0], [ @@ -47,7 +47,7 @@ mhl -form $abs_top_srcdir/mh/mhl.repl Mail/inbox/15 MH_CHECK([mhl usenet],[mhl02 mhl.usenet],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox]) -mhl -form $abs_top_srcdir/mh/mhl.usenet Mail/inbox/15 +mhl -form mhl.usenet Mail/inbox/15 ], [0], [ diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at index 300f4af62..0b708f6c5 100644 --- a/mh/tests/testsuite.at +++ b/mh/tests/testsuite.at @@ -23,7 +23,7 @@ MH=$dir/mh_profile export MH cat > $MH <<EOT Path: $dir/Mail -mhetcdir: $abs_top_srcdir/mh +mhetcdir: $abs_top_srcdir/mh/etc EOT exec <&- ]) |