- /* Check to see if the user is running a different version of nmh
- than they had last run, and notify them if so. But only if
- they seem to be running an interactive program. */
- if (isatty (fileno (stdin)) && isatty (fileno (stdout)) &&
- strcmp (invo_name, "ap") &&
- strcmp (invo_name, "dp") &&
- strcmp (invo_name, "fmtdump") &&
- strcmp (invo_name, "install-mh") &&
- strcmp (invo_name, "mhbuild") &&
- strcmp (invo_name, "mhfixmsg") &&
- strcmp (invo_name, "mhl") &&
- strcmp (invo_name, "mhparam") &&
- strcmp (invo_name, "mhpath") &&
- strcmp (invo_name, "mkstemp") &&
- strcmp (invo_name, "post") &&
- strcmp (invo_name, "prompter") &&
- strncmp (invo_name, "rcv", 3) &&
- strcmp (invo_name, "slocal") &&
- strcmp (invo_name, "viamail") &&
- strcmp (invo_name, "whatnow") &&
- strcmp (invo_name, "whom")) {
-
- if (nmh_version_changed ()) {
- fprintf (stderr, "==========================================="
- "============================\n");
- fprintf (stderr, "Welcome to nmh version %s\n\n", VERSION);
- fprintf (stderr, "See the release notes in %s/NEWS .\n\n",
+ if (read_context != 1 ||
+ ((cp = context_find ("Welcome")) && strcasecmp (cp, "disable") == 0)) {
+ allow_version_check = 0;
+ } else if ((cp = getenv ("MHCONTEXT")) != NULL && *cp != '\0') {
+ /* Context file comes from $MHCONTEXT, so only print the message
+ if the context file has an older version. If it does, or if it
+ doesn't have a version at all, update the version. */
+ check_older_version = 1;
+ }
+
+ /* Check to see if the user is running a different (or older, if
+ specified) version of nmh than they had run bfore, and notify them
+ if so. But only if read_context was set to a value to enable. */
+ if (allow_version_check && isatty (fileno (stdin)) &&
+ isatty (fileno (stdout)) && isatty (fileno (stderr))) {
+ if (nmh_version_changed (check_older_version)) {
+ printf ("==================================================="
+ "=====================\n");
+ printf ("Welcome to nmh version %s\n\n", VERSION);
+ printf ("See the release notes in %s/NEWS\n\n",