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.
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)) {
{ "debug", -5 },
#define DISTSW 7
{ "dist", -4 }, /* interface from dist */
-#define LIBSW 8
- { "library directory", -7 },
{ NULL, 0 }
};
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;
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)