summaryrefslogtreecommitdiff
path: root/src/xcb_out.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-03-12 13:20:29 -0800
committerJamey Sharp <jamey@minilop.net>2006-03-12 13:20:29 -0800
commitb83f18a4cc2303dfda59807d56e16bbc5c18b09d (patch)
tree2dcd63657899a2f18433a458fa0493047be7e30b /src/xcb_out.c
parentfb61c94d685a254ef0702a2e2093b8cdda02d514 (diff)
Only _xcb_conn_wait calls _xcb_out_write now, so move it to xcb_conn.c and make it static.
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r--src/xcb_out.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c
index b0130e7..2b1a434 100644
--- a/src/xcb_out.c
+++ b/src/xcb_out.c
@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <errno.h>
#include "xcb.h"
#include "xcbext.h"
@@ -224,34 +223,6 @@ void _xcb_out_destroy(_xcb_out *out)
pthread_mutex_destroy(&out->reqlenlock);
}
-/* precondition: there must be something for us to write. */
-int _xcb_out_write(XCBConnection *c, struct iovec **vector, int *count)
-{
- int n;
- assert(!c->out.queue_len);
- n = writev(c->fd, *vector, *count);
- if(n < 0 && errno == EAGAIN)
- return 1;
- if(n <= 0)
- return 0;
-
- for(; *count; --*count, ++*vector)
- {
- int cur = (*vector)->iov_len;
- if(cur > n)
- cur = n;
- (*vector)->iov_len -= cur;
- (*vector)->iov_base = (char *) (*vector)->iov_base + cur;
- n -= cur;
- if((*vector)->iov_len)
- break;
- }
- if(!*count)
- *vector = 0;
- assert(n == 0);
- return 1;
-}
-
int _xcb_out_send(XCBConnection *c, struct iovec **vector, int *count)
{
int ret = 1;