aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/io.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/os/io.c
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/os/io.c')
-rw-r--r--xorg-server/os/io.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index afe6d99d4..beccdf5b1 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -73,7 +73,6 @@ SOFTWARE.
#include <sys/uio.h>
#endif
#include <X11/X.h>
-#define NEED_REPLIES
#include <X11/Xproto.h>
#include "os.h"
#include "osdep.h"
@@ -82,8 +81,8 @@ SOFTWARE.
#include "dixstruct.h"
#include "misc.h"
-_X_EXPORT CallbackListPtr ReplyCallback;
-_X_EXPORT CallbackListPtr FlushCallback;
+CallbackListPtr ReplyCallback;
+CallbackListPtr FlushCallback;
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
@@ -106,7 +105,7 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
#define get_req_len(req,cli) ((cli)->swapped ? \
lswaps((req)->length) : (req)->length)
-#include <X11/extensions/bigreqstr.h>
+#include <X11/extensions/bigreqsproto.h>
#define get_big_req_len(req,cli) ((cli)->swapped ? \
lswapl(((xBigReq *)(req))->length) : \
@@ -274,7 +273,7 @@ ReadRequestFromClient(ClientPtr client)
if (gotnow < sizeof(xBigReq))
{
/* Still need more data to tell just how big. */
- needed = sizeof(xBigReq) >> 2; /* needed is in CARD32s now */
+ needed = bytes_to_int32(sizeof(xBigReq)); /* needed is in CARD32s now */
need_header = TRUE;
}
else
@@ -378,7 +377,7 @@ ReadRequestFromClient(ClientPtr client)
{
move_header = TRUE;
if (gotnow < sizeof(xBigReq))
- needed = sizeof(xBigReq) >> 2;
+ needed = bytes_to_int32(sizeof(xBigReq));
else
needed = get_big_req_len(request, client);
}
@@ -446,7 +445,7 @@ ReadRequestFromClient(ClientPtr client)
oci->bufptr += (sizeof(xBigReq) - sizeof(xReq));
*(xReq *)oci->bufptr = *request;
oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
- client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
+ client->req_len -= bytes_to_int32(sizeof(xBigReq) - sizeof(xReq));
}
client->requestBuffer = (pointer)oci->bufptr;
#ifdef DEBUG_COMMUNICATION
@@ -539,7 +538,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
*
**********************/
-_X_EXPORT void
+void
ResetCurrentRequest(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -679,7 +678,7 @@ FlushIfCriticalOutputPending(void)
FlushAllOutput();
}
-_X_EXPORT void
+void
SetCriticalOutputPending(void)
{
CriticalOutputPending = TRUE;
@@ -696,7 +695,7 @@ SetCriticalOutputPending(void)
* this routine as int.
*****************/
-_X_EXPORT int
+int
WriteToClient (ClientPtr who, int count, const void *__buf)
{
OsCommPtr oc = (OsCommPtr)who->osPrivate;
@@ -1013,14 +1012,14 @@ AllocateInputBuffer(void)
{
ConnectionInputPtr oci;
- oci = (ConnectionInputPtr)xalloc(sizeof(ConnectionInput));
+ oci = xalloc(sizeof(ConnectionInput));
if (!oci)
- return (ConnectionInputPtr)NULL;
- oci->buffer = (char *)xalloc(BUFSIZE);
+ return NULL;
+ oci->buffer = xalloc(BUFSIZE);
if (!oci->buffer)
{
xfree(oci);
- return (ConnectionInputPtr)NULL;
+ return NULL;
}
oci->size = BUFSIZE;
oci->bufptr = oci->buffer;
@@ -1034,14 +1033,14 @@ AllocateOutputBuffer(void)
{
ConnectionOutputPtr oco;
- oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput));
+ oco = xalloc(sizeof(ConnectionOutput));
if (!oco)
- return (ConnectionOutputPtr)NULL;
- oco->buf = (unsigned char *) xcalloc(1, BUFSIZE);
+ return NULL;
+ oco->buf = xcalloc(1, BUFSIZE);
if (!oco->buf)
{
xfree(oco);
- return (ConnectionOutputPtr)NULL;
+ return NULL;
}
oco->size = BUFSIZE;
oco->count = 0;