X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_out.c;h=eb41e592089312110e1e43694de6f8f7551ee326;hb=11c62f7d9d65c10c796c2199c73c8f167e53f234;hp=b0130e7f332c850a255a5c1f1b2ae829ca84e053;hpb=fb61c94d685a254ef0702a2e2093b8cdda02d514;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_out.c b/src/xcb_out.c index b0130e7..eb41e59 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "xcb.h" #include "xcbext.h" @@ -121,7 +120,7 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c longlen += vector[i].iov_len; if(!vector[i].iov_base) { - vector[i].iov_base = (caddr_t) pad; + vector[i].iov_base = (char *) pad; assert(vector[i].iov_len <= sizeof(pad)); } } @@ -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;