Move #include from h/mh.h to source files
[mmh] / uip / send.c
index 492f027..41ef92a 100644 (file)
 #include <h/utils.h>
 #include <sysexits.h>
 #include <sys/wait.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <locale.h>
 
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
 #include <time.h>
 
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
 int debugsw = 0;  /* global */
 char *altmsg = NULL;
 char *annotext = NULL;
@@ -283,8 +291,7 @@ sendsbr(char **vec, int vecp, char *drft, struct stat *st)
                break;
        }
 
-       switch (status = sendaux(vec, vecp, drft, st)) {
-       case OK:
+       if ((status = sendaux(vec, vecp, drft, st)) == OK) {
                /* move original draft to +trash folder */
                /* temporary close stdin, for refile not to ask */
                dupfd = dup(0);
@@ -296,11 +303,8 @@ sendsbr(char **vec, int vecp, char *drft, struct stat *st)
                }
                dup2(dupfd, 0);
                close(dupfd);
-               break;
-
-       default:
+       } else {
                status = DONE;
-               break;
        }
 
        if (distfile) {