From: markus schnalke Date: Wed, 27 Jun 2012 12:23:35 +0000 (+0200) Subject: spost: Read profile and context now. Removed -library switch. X-Git-Tag: mmh-thesis-end~22 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=3e017a7abbdf69bf0dff7a4073275961eda1ded8;hp=32d4f9daaa70519be3072479232ff7be0500d009 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. --- 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)