sort out some prototypes, put them where they belong.
[apps/madmutt.git] / lib-sys / mutt_tunnel.c
index d82ec63..4d58591 100644 (file)
 # include "config.h"
 #endif
 
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-
-#include "mutt.h"
-#include "mutt_socket.h"
-#include "mutt_tunnel.h"
-
-
 #include <netinet/in.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <errno.h>
 
+#include <lib-lib/lib-lib.h>
+#include <lib-ui/curses.h>
+
+#include "mutt.h"
+
+#include "exit.h"
+#include "mutt_socket.h"
+#include "mutt_tunnel.h"
+#include "mutt_signal.h"
+
 /* -- data types -- */
 typedef struct {
   pid_t pid;
@@ -38,9 +39,9 @@ typedef struct {
 /* forward declarations */
 static int tunnel_socket_open (CONNECTION *);
 static int tunnel_socket_close (CONNECTION *);
-static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len);
+static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len);
 static int tunnel_socket_write (CONNECTION * conn, const char *buf,
-                                size_t len);
+                                ssize_t len);
 
 /* -- public functions -- */
 int mutt_tunnel_socket_setup (CONNECTION * conn)
@@ -134,7 +135,7 @@ static int tunnel_socket_close (CONNECTION * conn)
   return 0;
 }
 
-static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len)
+static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len)
 {
   TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata;
   int rc;
@@ -150,7 +151,7 @@ static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len)
 }
 
 static int tunnel_socket_write (CONNECTION * conn, const char *buf,
-                                size_t len)
+                                ssize_t len)
 {
   TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata;
   int rc;