From 3e017a7abbdf69bf0dff7a4073275961eda1ded8 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 27 Jun 2012 14:23:35 +0200 Subject: [PATCH] spost: Read profile and context now. Removed -library switch. spost is a full part of the mmh toolchest, hence, it shall read the profile/context. This will remove the need to pass profile information from send to spost via command line switches. In January 2012, there had been a discussion on the nmh-workers ML whether post should read the profile/context. There wasn't a clear answer. It behavior was mainly motivated by the historic situation, it seems. My opinion on the topic goes into the direction that every tool that is part of the mmh toolchest should read the profile. That is a clear and simple concept. Using MH tools without wanting to interact with MH (like mhmail had been) is no more a practical problem. --- uip/send.c | 3 --- uip/spost.c | 15 +-------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/uip/send.c b/uip/send.c index c454f76..245bf3c 100644 --- a/uip/send.c +++ b/uip/send.c @@ -92,9 +92,6 @@ main(int argc, char **argv) arguments = getarguments(invo_name, argc, argv, 1); argp = arguments; - vec[vecp++] = "-library"; - vec[vecp++] = getcpy(toabsdir("+")); - while ((cp = *argp++)) { if (*cp == '-') { switch (smatch(++cp, switches)) { diff --git a/uip/spost.c b/uip/spost.c index ff1e80a..fe2e34b 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -36,8 +36,6 @@ static struct swit switches[] = { { "debug", -5 }, #define DISTSW 7 { "dist", -4 }, /* interface from dist */ -#define LIBSW 8 - { "library directory", -7 }, { NULL, 0 } }; @@ -145,9 +143,7 @@ main(int argc, char **argv) setlocale(LC_ALL, ""); invo_name = mhbasename(argv[0]); - /* foil search of user profile/context */ - if (context_foil(NULL) == -1) - done(1); + context_read(); arguments = getarguments(invo_name, argc, argv, 0); argp = arguments; @@ -197,15 +193,6 @@ main(int argc, char **argv) case NALIASW: aliasflg = 0; continue; - - case LIBSW: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", - argp[-2]); - /* create a minimal context */ - if (context_foil(cp) == -1) - done(1); - continue; } } if (msg) -- 1.7.10.4