]> diplodocus.org Git - nmh/blobdiff - uip/whatnowsbr.c
picksbr.c: fprintf(3) function pointer using `%p' and union.
[nmh] / uip / whatnowsbr.c
index c03ceb8..1029161 100644 (file)
@@ -44,6 +44,7 @@
 #ifdef OAUTH_SUPPORT
 # include <h/oauth.h>
 #endif
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
 #include "sbr/mime_type.h"
@@ -722,7 +723,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 +822,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 +837,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)
@@ -864,7 +865,7 @@ buildfile (char **argp, char *file)
        while (argp[i])
            i++;
     }
-    args = (char **) mh_xmalloc((i + 2) * sizeof(char *));
+    args = mh_xmalloc((i + 2) * sizeof(char *));
 
     /*
      * For backward compatibility, we need to add -build
@@ -1201,14 +1202,11 @@ sendit (char *sp, char **arg, char *file, int pushed)
 
     if ((cp = getenv ("mhdist"))
            && *cp
-#ifndef lint
            && atoi(cp)
-#endif /* not lint */
            && altmsg) {
        vec[vecp++] = "-dist";
        if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
-                 get_temp_dir());
+           adios(NULL, "unable to create temporary file");
        }
        distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
@@ -1276,7 +1274,7 @@ 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;