X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3b6170b27ba8fedbb4d67d2842bfaa38d4417962..64a40afc7d83e7b1280905fce7bdfd3a2ec7f01a:/uip/whatnowsbr.c diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 72b315f4..51836508 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -722,7 +722,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, execvp (prog, vec); fprintf (stderr, "unable to exec "); perror (*ed); - _exit (-1); + _exit(1); default: if ((status = pidwait (pid, NOTOK))) { @@ -821,8 +821,8 @@ sendfile (char **arg, char *file, int pushsw) child_id = fork(); switch (child_id) { case NOTOK: - inform("unable to fork, so sending directly..."); - /* FALLTHRU */ + adios("fork", "failed:"); + case OK: vec = argsplit(sendproc, &program, &vecp); if (pushsw) @@ -836,7 +836,7 @@ sendfile (char **arg, char *file, int pushsw) execvp (program, vec); fprintf (stderr, "unable to exec "); perror (sendproc); - _exit (-1); + _exit(1); default: if (pidwait(child_id, OK) == 0) @@ -882,7 +882,7 @@ buildfile (char **argp, char *file) i = editfile (&ed, args, file, NOUSE, NULL, NULL, NULL, 0, 0); free (args); - return (i ? NOTOK : OK); + return i ? NOTOK : OK; } @@ -979,10 +979,6 @@ sendit (char *sp, char **arg, char *file, int pushed) int snoop = 0; struct stat st; -#ifndef lint - int distsw = 0; -#endif - /* * Make sure these are defined. In particular, we need * savearg[1] to be NULL, in case "arg" is NULL below. It @@ -1205,9 +1201,7 @@ sendit (char *sp, char **arg, char *file, int pushed) if ((cp = getenv ("mhdist")) && *cp -#ifndef lint - && (distsw = atoi (cp)) -#endif /* not lint */ + && atoi(cp) && altmsg) { vec[vecp++] = "-dist"; if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) { @@ -1280,10 +1274,10 @@ whomfile (char **arg, char *file) execvp (program, vec); fprintf (stderr, "unable to exec "); perror (whomproc); - _exit (-1); /* NOTREACHED */ + _exit(1); /* NOTREACHED */ default: - return (pidwait (pid, NOTOK) & 0377 ? 1 : 0); + return pidwait(pid, NOTOK) & 0377 ? 1 : 0; } } @@ -1316,7 +1310,7 @@ checkmimeheader (char *drft) if ((f = fopen(drft, "r")) == NULL) { admonish(drft, "unable to read draft"); - return (0); + return 0; } gstate = m_getfld_state_init(f);