summaryrefslogtreecommitdiff
path: root/os/lbxio.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/lbxio.c')
-rw-r--r--os/lbxio.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/os/lbxio.c b/os/lbxio.c
index c72ac2c05..2991681de 100644
--- a/os/lbxio.c
+++ b/os/lbxio.c
@@ -1,3 +1,4 @@
+/* $XFree86: xc/programs/Xserver/os/lbxio.c,v 3.17 2002/05/31 18:46:06 dawes Exp $ */
/*
Copyright 1996, 1998 The Open Group
@@ -50,13 +51,16 @@ SOFTWARE.
#include <stdio.h>
#include <X11/Xtrans.h>
-#ifdef X_NOT_STDC_ENV
-extern int errno;
-#endif
#include "Xmd.h"
#include <errno.h>
+#ifndef Lynx
#include <sys/param.h>
+#ifndef __UNIXOS2__
#include <sys/uio.h>
+#endif
+#else
+#include <uio.h>
+#endif
#include "X.h"
#include "Xproto.h"
#include "os.h"
@@ -65,6 +69,8 @@ extern int errno;
#include "opaque.h"
#include "dixstruct.h"
#include "misc.h"
+#include "colormapst.h"
+#include "propertyst.h"
#include "lbxserve.h"
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
@@ -80,19 +86,6 @@ extern int errno;
#endif
#endif
-extern fd_set ClientsWithInput, IgnoredClientsWithInput;
-extern fd_set AllClients, AllSockets;
-extern fd_set ClientsWriteBlocked;
-extern fd_set OutputPending;
-extern int ConnectionTranslation[];
-extern Bool NewOutputPending;
-extern Bool AnyClientsWriteBlocked;
-extern Bool CriticalOutputPending;
-extern int timesThisConnection;
-extern ConnectionInputPtr FreeInputs;
-extern ConnectionOutputPtr FreeOutputs;
-extern OsCommPtr AvailableInput;
-
#define get_req_len(req,cli) ((cli)->swapped ? \
lswaps((req)->length) : (req)->length)
@@ -166,7 +159,7 @@ AppendFakeRequest (client, data, count)
if (!oci)
{
- if (oci = FreeInputs)
+ if ((oci = FreeInputs))
FreeInputs = oci->next;
else if (!(oci = AllocateInputBuffer()))
return FALSE;
@@ -288,7 +281,7 @@ LbxAppendOutput(proxy, client, oco)
int n;
if (!noco || (noco->size - noco->count) < sz_xLbxSwitchEvent) {
- if (noco = FreeOutputs)
+ if ((noco = FreeOutputs))
FreeOutputs = noco->next;
else
noco = AllocateOutputBuffer();
@@ -334,7 +327,7 @@ LbxClientOutput(client, oc, extraBuf, extraCount, nocompress)
ConnectionOutputPtr oco;
int len;
- if (oco = oc->output) {
+ if ((oco = oc->output)) {
oc->output = NULL;
if (!LbxAppendOutput(oc->proxy, client, oco))
return -1;
@@ -387,7 +380,7 @@ LbxForceOutput(proxy)
if (!lbxClient)
continue;
coc = (OsCommPtr)lbxClient->client->osPrivate;
- if (oco = coc->output) {
+ if ((oco = coc->output)) {
coc->output = NULL;
LbxAppendOutput(proxy, lbxClient->client, oco);
}
@@ -404,7 +397,7 @@ LbxFlushClient(who, oc, extraBuf, extraCount)
LbxProxyPtr proxy;
ConnectionOutputPtr oco;
int n;
- XtransConnInfo trans_conn;
+ XtransConnInfo trans_conn = NULL;
if (extraBuf)
return LbxClientOutput(who, oc, extraBuf, extraCount, FALSE);
@@ -414,7 +407,7 @@ LbxFlushClient(who, oc, extraBuf, extraCount)
LbxForceOutput(proxy);
if (!proxy->compHandle)
trans_conn = ((OsCommPtr)LbxProxyClient(proxy)->osPrivate)->trans_conn;
- while (oco = proxy->ofirst) {
+ while ((oco = proxy->ofirst)) {
/* XXX bundle up into writev someday */
if (proxy->compHandle) {
if (oco->nocompress)
@@ -474,12 +467,13 @@ UncompressedWriteToClient (who, count, buf)
return LbxClientOutput(who, (OsCommPtr)who->osPrivate, buf, count, TRUE);
}
+void
LbxFreeOsBuffers(proxy)
LbxProxyPtr proxy;
{
ConnectionOutputPtr oco;
- while (oco = proxy->ofirst) {
+ while ((oco = proxy->ofirst)) {
proxy->ofirst = oco->next;
xfree(oco->buf);
xfree(oco);
@@ -495,7 +489,7 @@ AllocateLargeReqBuffer(client, size)
register ConnectionInputPtr oci;
if (!(oci = oc->largereq)) {
- if (oci = FreeInputs)
+ if ((oci = FreeInputs))
FreeInputs = oci->next;
else {
oci = (ConnectionInputPtr)xalloc(sizeof(ConnectionInput));