Move the event loop to evtloop.c, and wake up sleeping jobs every 10 seconds.
[apps/madmutt.git] / sendlib.c
index 1f15e17..5df5166 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -324,7 +324,7 @@ int mutt_write_mime_header (BODY * a, FILE * f)
     fprintf (f, "Content-Transfer-Encoding: %s\n", ENCODING (a->encoding));
 
   /* Do NOT add the terminator here!!! */
-  return (ferror (f) ? -1 : 0);
+  return ferror (f) ? -1 : 0;
 }
 
 int mutt_write_mime_body (BODY * a, FILE * f)
@@ -341,7 +341,7 @@ int mutt_write_mime_body (BODY * a, FILE * f)
     if (!(p = parameter_getval(a->parameter, "boundary"))) {
       mutt_error _("No boundary parameter found! [report this error]");
 
-      return (-1);
+      return -1;
     }
     m_strcpy(boundary, sizeof(boundary), p);
 
@@ -354,7 +354,7 @@ int mutt_write_mime_body (BODY * a, FILE * f)
         return -1;
     }
     fprintf (f, "\n--%s--\n", boundary);
-    return (ferror (f) ? -1 : 0);
+    return ferror (f) ? -1 : 0;
   }
 
   /* This is pretty gross, but it's the best solution for now... */
@@ -389,7 +389,7 @@ int mutt_write_mime_body (BODY * a, FILE * f)
   fgetconv_close (&fc);
   m_fclose(&fpin);
 
-  return (ferror (f) ? -1 : 0);
+  return ferror (f) ? -1 : 0;
 }
 
 typedef struct {
@@ -745,7 +745,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b)
   }
 
   if ((fp = fopen (fname, "r")) == NULL) {
-    return (NULL);
+    return NULL;
   }
 
   info = p_new(CONTENT, 1);
@@ -886,7 +886,7 @@ bye:
     m_strreplace(&att->xtype, xtype);
   }
 
-  return (type);
+  return type;
 }
 
 void mutt_message_to_7bit (BODY * a, FILE * fp)
@@ -1156,7 +1156,7 @@ BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
 
   m_fclose(&fp);
 
-  return (body);
+  return body;
 }
 
 BODY *mutt_make_file_attach (const char *path)
@@ -1445,7 +1445,7 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach,
     }
   }
 
-  return (ferror (fp) == 0 ? 0 : -1);
+  return ferror (fp) == 0 ? 0 : -1;
 }
 
 static void encode_headers (string_list_t * h)
@@ -1736,7 +1736,7 @@ send_msg(const char *path, const char **args, const char *msg, char **tempfile)
 
   mutt_unblock_signals_system (1);
 
-  return (st);
+  return st;
 }
 
 static const char **
@@ -1750,7 +1750,7 @@ add_args(const char **args, ssize_t *argslen, ssize_t *argsmax, address_t * addr
       args[(*argslen)++] = addr->mailbox;
     }
   }
-  return (args);
+  return args;
 }
 
 static const char **
@@ -1760,7 +1760,7 @@ add_option(const char **args, ssize_t *argslen, ssize_t *argsmax, const char *s)
         p_realloc(&args, *argsmax += 5);
     }
     args[(*argslen)++] = s;
-    return (args);
+    return args;
 }
 
 int mutt_invoke_mta(address_t *from, address_t *to, address_t *cc,
@@ -1850,7 +1850,7 @@ int mutt_invoke_mta(address_t *from, address_t *to, address_t *cc,
     i = 1;
   else
     i = -1;
-  return (i);
+  return i;
 }
 
 /* For postponing (!final) do the necessary encodings only */
@@ -2006,7 +2006,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
     set_noconv_flags (hdr->content, 1);
 
   if (mx_open_mailbox (path, M_APPEND | M_QUIET, &f) == NULL) {
-    return (-1);
+    return -1;
   }
 
   /* We need to add a Content-Length field to avoid problems where a line in
@@ -2024,7 +2024,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
   hdr->read = !post;            /* make sure to put it in the `cur' directory (maildir) */
   if ((msg = mx_open_new_message (&f, hdr, M_ADD_FROM)) == NULL) {
     mx_close_mailbox (&f, NULL);
-    return (-1);
+    return -1;
   }
 
   /* post == 1 => postpone message. Set mode = -1 in mutt_write_rfc822_header()