diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:02 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:02 +0000 |
commit | 57be7aaec2388601d722d9aa51cab73c525c6e3b (patch) | |
tree | 1cc20a4bd763bac53ce22ddfa56d14e767b753a1 | |
parent | 44c57155607fba22f35981377381b49969368318 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_901xf86-4_3_99_16
-rw-r--r-- | di/cache.c | 6 | ||||
-rw-r--r-- | di/cmap.c | 8 | ||||
-rw-r--r-- | di/cmaputil.c | 7 | ||||
-rw-r--r-- | di/dispatch.c | 6 | ||||
-rw-r--r-- | di/lbxfuncs.c | 16 | ||||
-rw-r--r-- | di/options.c | 7 | ||||
-rw-r--r-- | di/pm.c | 142 | ||||
-rw-r--r-- | di/props.c | 19 | ||||
-rw-r--r-- | di/utils.c | 10 | ||||
-rw-r--r-- | di/wire.c | 10 | ||||
-rw-r--r-- | include/atomcache.h | 10 | ||||
-rw-r--r-- | include/cache.h | 15 | ||||
-rw-r--r-- | include/colormap.h | 50 | ||||
-rw-r--r-- | include/init.h | 7 | ||||
-rw-r--r-- | include/lbx.h | 90 | ||||
-rw-r--r-- | include/lbxext.h | 35 | ||||
-rw-r--r-- | include/os.h | 74 | ||||
-rw-r--r-- | include/pm.h | 9 | ||||
-rw-r--r-- | include/proxyopts.h | 21 | ||||
-rw-r--r-- | include/reqtype.h | 5 | ||||
-rw-r--r-- | include/resource.h | 21 | ||||
-rw-r--r-- | include/swap.h | 78 | ||||
-rw-r--r-- | include/tags.h | 17 | ||||
-rw-r--r-- | include/util.h | 52 | ||||
-rw-r--r-- | include/wire.h | 52 | ||||
-rw-r--r-- | lbxproxy.man | 4 | ||||
-rw-r--r-- | os/connection.c | 4 | ||||
-rw-r--r-- | os/io.c | 8 |
28 files changed, 175 insertions, 608 deletions
@@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/cache.c,v 1.6 2001/12/14 20:00:50 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/cache.c,v 1.7 2003/10/24 20:38:12 tsi Exp $ */ #include "misc.h" #include "util.h" #include "cache.h" @@ -222,9 +222,7 @@ rebuild_cache(server, cache) } static void -flush_cache(cache, needed) - CachePtr cache; - unsigned long needed; +flush_cache(CachePtr cache, unsigned long needed) { CacheEntryPtr cp, *prev, oldest, *oldprev = NULL; int i; @@ -48,7 +48,7 @@ from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/cmap.c,v 1.6 2001/12/14 20:00:50 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/cmap.c,v 1.7 2003/11/17 22:20:48 dawes Exp $ */ #include <stdio.h> #include "assert.h" @@ -124,12 +124,10 @@ ResolveColor (pVisual, red, green, blue) } void (* LbxResolveColor)( -#if NeedNestedPrototypes LbxVisualPtr /* pVisual */, CARD16* /* red */, CARD16* /* green */, CARD16* /* blue */ -#endif ) = ResolveColor; static Pixel @@ -203,12 +201,10 @@ FindFreePixel (pmap, red, green, blue) } Pixel (* LbxFindFreePixel)( -#if NeedNestedPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */ -#endif ) = FindFreePixel; typedef unsigned short BigNumUpper; @@ -326,13 +322,11 @@ FindBestPixel(pmap, red, green, blue, channels) } Entry * (* LbxFindBestPixel)( -#if NeedNestedPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */, int /* channels */ -#endif ) = FindBestPixel; diff --git a/di/cmaputil.c b/di/cmaputil.c index 4f988ac..efccc2f 100644 --- a/di/cmaputil.c +++ b/di/cmaputil.c @@ -48,7 +48,7 @@ from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/cmaputil.c,v 1.11 2002/05/31 18:46:07 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/cmaputil.c,v 1.12 2003/10/24 20:38:12 tsi Exp $ */ #include <stdio.h> #include "misc.h" @@ -186,10 +186,7 @@ typedef struct _dbEntry { static dbEntryPtr hashTab[HASHSIZE]; static dbEntryPtr -lookup(name, len, create) - char *name; - int len; - Bool create; +lookup(char *name, int len, Bool create) { unsigned int h = 0, g; dbEntryPtr entry, *prev = NULL; diff --git a/di/dispatch.c b/di/dispatch.c index 39be1b7..04de628 100644 --- a/di/dispatch.c +++ b/di/dispatch.c @@ -21,7 +21,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/dispatch.c,v 1.6 2001/10/28 03:34:22 tsi Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/dispatch.c,v 1.7 2003/11/17 22:20:48 dawes Exp $ */ #include <stdio.h> #include "assert.h" @@ -36,16 +36,12 @@ extern int (* InitialVector[3]) (); static void KillAllClients( -#if NeedFunctionPrototypes void -#endif ); static void HandleLargeRequest( -#if NeedFunctionPrototypes void -#endif ); int nextFreeClientID; /* always MIN free client ID */ diff --git a/di/lbxfuncs.c b/di/lbxfuncs.c index 918ec6e..d756e24 100644 --- a/di/lbxfuncs.c +++ b/di/lbxfuncs.c @@ -22,7 +22,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/lbxfuncs.c,v 1.6 2002/09/18 17:11:50 tsi Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/lbxfuncs.c,v 1.7 2003/05/27 22:26:56 tsi Exp $ */ /* * top level LBX request & reply handling @@ -137,12 +137,8 @@ get_connection_info(client, cs, cs_len, change_type, changes, changes_len) } static void -send_setup_reply(client, success, majorVer, minorVer, cs, cs_len) - ClientPtr client; - Bool success; - int majorVer, minorVer; - void *cs; - int cs_len; +send_setup_reply(ClientPtr client, Bool success, int majorVer, int minorVer, + void *cs, int cs_len) { xConnSetupPrefix reply; @@ -772,11 +768,7 @@ unpack_val(val, mask, sft, bts) /*ARGSUSED*/ static int -UnsquishFontInfo(compression, fdata, dlen, qfr) - int compression; - xLbxFontInfo *fdata; - int dlen; - pointer *qfr; +UnsquishFontInfo(int compression, xLbxFontInfo *fdata, int dlen, pointer *qfr) { int len, hlen, diff --git a/di/options.c b/di/options.c index 1fafa94..01c037c 100644 --- a/di/options.c +++ b/di/options.c @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/options.c,v 1.7 2001/12/14 20:00:51 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/options.c,v 1.8 2003/09/13 21:33:10 dawes Exp $ */ #include <stdio.h> #include "X.h" @@ -472,11 +472,6 @@ OptZlibReq(server, buf) return (2); } -extern LbxStreamCompHandle ZlibInit(); -extern int ZlibStuffInput(), ZlibInputAvail(), ZlibFlush(), - ZlibRead(), ZlibWriteV(); -extern void ZlibCompressOn(), ZlibCompressOff(), ZlibFree(); - /*ARGSUSED*/ static int OptZlibReply(server, preply, replylen) @@ -1,5 +1,4 @@ /* $Xorg: pm.c,v 1.5 2001/02/09 02:05:31 xorgcvs Exp $ */ - /* Copyright 1996, 1998 The Open Group @@ -25,7 +24,7 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/lbxproxy/di/pm.c,v 1.9 2002/09/16 18:06:20 eich Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/pm.c,v 1.14 2003/09/13 21:33:10 dawes Exp $ */ #include <ctype.h> #include <stdio.h> @@ -33,6 +32,7 @@ from The Open Group. #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <netdb.h> #include <X11/Xmd.h> #include <X11/Xlib.h> @@ -52,8 +52,6 @@ from The Open Group. #include "pmP.h" #include "pm.h" -extern char *display_name; - /* * Local constants */ @@ -190,7 +188,7 @@ _ConnectToProxyManager (pmAddr, errorString) if ((PM_iceConn = IceOpenConnection ( pmAddr, NULL, 0, 0, sizeof(iceError), iceError)) == NULL) { - snprintf (errorString, sizeof(errorString), + snprintf (errorString, ERROR_STRING_SIZE, "Could not open ICE connection to proxy manager: %s", iceError); return 0; } @@ -203,7 +201,7 @@ _ConnectToProxyManager (pmAddr, errorString) if (setupstat != IceProtocolSetupSuccess) { IceCloseConnection (PM_iceConn); - snprintf (errorString,sizeof(errorString), + snprintf (errorString, ERROR_STRING_SIZE, "Could not initialize proxy management protocol: %s", iceError); return 0; @@ -322,8 +320,10 @@ PMprocessMessages (iceConn, clientData, opcode, length, char * colon; char * tmpAddress = NULL; +#if 0 /* No-op */ CHECK_AT_LEAST_SIZE (iceConn, PMopcode, opcode, length, SIZEOF (pmGetProxyAddrMsg), IceFatalToProtocol); +#endif IceReadCompleteMessage (iceConn, SIZEOF (pmGetProxyAddrMsg), pmGetProxyAddrMsg, pMsg, pStart); @@ -374,22 +374,142 @@ PMprocessMessages (iceConn, clientData, opcode, length, * If gethostbyname fails, try to connect anyhow because * the display name could be something like :0, local:0 * or unix:0. + * */ - colon = strchr (serverAddress, ':'); + + /* Search for last colon to allow IPv6 numeric addresses. */ + colon = strrchr (serverAddress, ':'); + if (colon) { +#if defined(IPv6) && defined(AF_INET6) + struct addrinfo *ai, hints; + Bool bracketed = False; + char canonaddr[INET6_ADDRSTRLEN]; + int addrtype = AF_UNSPEC; +#else struct hostent *hostent; +#endif + const char *canonhost = NULL; + char *protocol = NULL; + char *hoststart = strchr(serverAddress, '/'); + + if (hoststart == NULL) { + hoststart = serverAddress; + } else { + protocol = serverAddress; + *(hoststart++) = '\0'; + } + + /* Clear extra colon from DECnet :: addresses, but not IPv6 + numeric addresses ending in ::, followed by :display */ + if (((colon > hoststart) && (*(colon - 1) == ':')) +#if defined(IPv6) && defined(AF_INET6) + /* Make sure there are only two colons unless the protocol is + specified as DECnet */ + && ( ((colon - 1) == hoststart) || (*(colon - 2) != ':') || + ( (protocol != NULL) && (strcmp(protocol, "dnet") == 0) ) ) +#endif + ) { + colon--; + } +#if defined(IPv6) && defined(AF_INET6) + /* hostname in IPv6 [numeric_addr]:0 form? */ + else if ( (hoststart[0] == '[') && + (hoststart < colon) && (*(colon-1) == ']') && + ( (protocol == NULL) || (strcmp(protocol, "tcp") == 0) + || (strcmp(protocol, "inet6") == 0) ) ) { + struct sockaddr_in6 sin6; + + *(colon - 1) = '\0'; + /* Verify address is valid IPv6 numeric form */ + if (inet_pton(AF_INET6, hoststart + 1, &sin6) == 1) { + /* It is. Use it as such. */ + hoststart++; + bracketed = True; + } else { + /* It's not, restore it just in case some other code + can use it. */ + *(colon - 1) = ']'; + } + } +#endif *colon = '\0'; - hostent = gethostbyname (serverAddress); + +#if defined(IPv6) && defined(AF_INET6) + (void)memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_CANONNAME; + if (bracketed == True) { + hints.ai_flags |= AI_NUMERICHOST; + addrtype = AF_INET6; + } else if (protocol != NULL) { + if (strcmp(protocol, "inet") == 0) { + addrtype = AF_INET; + } else if (strcmp(protocol, "inet6") == 0) { + addrtype = AF_INET6; + } + } + hints.ai_family = addrtype; + if (getaddrinfo(hoststart, NULL, &hints, &ai) == 0) { + canonhost = ai->ai_canonname; + } else { + /* Couldn't get name - check if in numeric form, and if so, + translate to canonical presentation form */ + struct sockaddr_storage sa; + + if ( ((addrtype = AF_UNSPEC) || (addrtype = AF_INET6)) && + (inet_pton(AF_INET6, hoststart, &sa) == 1) ) { + canonhost = inet_ntop(AF_INET6, &sa, + canonaddr, sizeof(canonaddr)); + } + else if ( ((addrtype = AF_UNSPEC) || (addrtype = AF_INET)) && + (inet_pton(AF_INET, hoststart, &sa) == 1) ) { + canonhost = inet_ntop(AF_INET, &sa, + canonaddr, sizeof(canonaddr)); + } + + ai = NULL; + } +#else + hostent = gethostbyname (hoststart); + if (hostent && hostent->h_name) + canonhost = hostent->h_name; +#endif *colon = ':'; - if (hostent && hostent->h_name) { - tmpAddress = (char *) malloc (strlen (hostent->h_name) + +#if defined(IPv6) && defined(AF_INET6) + if (bracketed) { + *(colon - 1) = ']'; + } +#endif + + if (canonhost) { + const char *canonproto = ""; +#if defined(IPv6) && defined(AF_INET6) + if (ai && (ai->ai_family == AF_INET)) { + canonproto = "inet/"; + } else if (ai && (ai->ai_family == AF_INET6)) { + canonproto = "inet6/"; + } else +#endif + if (protocol != NULL) { + canonproto = protocol; + } + tmpAddress = malloc (strlen(canonproto) + strlen (canonhost) + strlen (colon) + 1); - (void) sprintf (tmpAddress, "%s%s", hostent->h_name, colon); + (void) sprintf (tmpAddress, "%s%s%s", canonproto, + canonhost, colon); serverAddress = tmpAddress; } + + if (protocol != NULL) { + *(protocol + strlen(protocol)) = '/'; + } +#if defined(IPv6) && defined(AF_INET6) + if (ai != NULL) + freeaddrinfo(ai); +#endif } display_name = serverAddress; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/props.c,v 1.6 2001/12/14 20:00:52 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/props.c,v 1.7 2003/10/24 20:38:12 tsi Exp $ */ /* * property handling @@ -124,14 +124,15 @@ propTagStoreData(server, tid, dlen, swapit, ptdp) */ /*ARGSUSED*/ static Bool -rewrite_change_prop(client, win, property, type, format, mode, nUnits) - ClientPtr client; - Window win; - Atom property; - Atom type; - int format; - int mode; - unsigned long nUnits; +rewrite_change_prop( + ClientPtr client, + Window win, + Atom property, + Atom type, + int format, + int mode, + unsigned long nUnits +) { unsigned flags; @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/lbxproxy/di/utils.c,v 1.15 2002/12/09 04:10:58 tsi Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/utils.c,v 1.18 2003/11/17 22:20:48 dawes Exp $ */ #include "lbx.h" #include <stdio.h> @@ -87,8 +87,6 @@ static void VErrorF(const char*, va_list); /* * External declarations not in header files */ -extern char *display_name; -extern char *display; extern Bool PartialNetwork; extern int lbxDebug; @@ -110,7 +108,6 @@ extern Bool compStats; */ static Bool CoreDump; static Bool Must_have_memory = FALSE; -static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */ /* * Debug stuff @@ -519,8 +516,7 @@ char *argv[]; } else if (strncmp (argv[i], "tty", 3) == 0) { - /* just in case any body is interested */ - dev_tty_from_init = argv[i]; + /* Ignored */ } else ShowHelpAndExit (1); @@ -712,10 +708,8 @@ strnalloc(str, len) typedef struct _WorkQueue { struct _WorkQueue *next; Bool (*function) ( -#if NeedNestedPrototypes ClientPtr /* pClient */, pointer /* closure */ -#endif ); ClientPtr client; pointer closure; @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/di/wire.c,v 1.14 2002/09/19 13:22:03 tsi Exp $ */ +/* $XFree86: xc/programs/lbxproxy/di/wire.c,v 1.15 2003/11/17 22:20:48 dawes Exp $ */ #include "lbx.h" #include <stdio.h> @@ -415,7 +415,6 @@ SendIncrementPixel(client, cmap, pixel) } void -#ifdef NeedFunctionPrototypes SendAllocColor( ClientPtr client, XID cmap, @@ -423,13 +422,6 @@ SendAllocColor( CARD16 red, CARD16 green, CARD16 blue) -#else -SendAllocColor(client, cmap, pixel, red, green, blue) - ClientPtr client; - XID cmap; - CARD32 pixel; - CARD16 red, green, blue; -#endif { xLbxAllocColorReq req; diff --git a/include/atomcache.h b/include/atomcache.h index d94228d..cf65008 100644 --- a/include/atomcache.h +++ b/include/atomcache.h @@ -46,6 +46,8 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/atomcache.h,v 1.6 2003/11/17 22:20:48 dawes Exp $ */ + #ifndef _ATOMCACHE_H_ #define _ATOMCACHE_H_ @@ -72,33 +74,25 @@ typedef struct _AtomList { extern int min_keep_prop_size; extern Atom LbxMakeAtom( -#if NeedFunctionPrototypes XServerPtr /*server*/, char * /*string*/, unsigned /*len*/, Atom /*atom*/, int /*makeit*/ -#endif ); extern char *NameForAtom( -#if NeedFunctionPrototypes XServerPtr /*server*/, Atom /*atom*/ -#endif ); extern unsigned FlagsForAtom( -#if NeedFunctionPrototypes XServerPtr /*server*/, Atom /*atom*/ -#endif ); extern void FreeAtoms( -#if NeedFunctionPrototypes void -#endif ); #endif /* _ATOMCACHE_H_ */ diff --git a/include/cache.h b/include/cache.h index b1abd4f..66fd0e5 100644 --- a/include/cache.h +++ b/include/cache.h @@ -50,6 +50,7 @@ from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/cache.h,v 1.7 2003/11/17 22:20:48 dawes Exp $ */ #ifndef _CACHE_H_ #define _CACHE_H_ @@ -67,35 +68,26 @@ typedef void (*CacheFree) (); typedef struct _cache *CachePtr; extern Cache CacheInit( -#if NeedFunctionPrototypes XServerPtr /*server*/, unsigned long /*maxsize*/ -#endif ); extern void CacheFreeCache( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cid*/ -#endif ); extern Bool CacheTrimNeeded( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cid*/ -#endif ); extern void CacheTrim( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cid*/ -#endif ); extern Bool CacheStoreMemory( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cid*/, CacheID /*id*/, @@ -103,25 +95,20 @@ extern Bool CacheStoreMemory( unsigned long /*size*/, CacheFree /*free_func*/, Bool /*can_flush*/ -#endif ); extern pointer CacheFetchMemory( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cid*/, CacheID /*id*/, Bool /*update*/ -#endif ); extern void CacheFreeMemory( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cacheid*/, CacheID /*cid*/, Bool /*notify*/ -#endif ); #endif /* _CACHE_H_ */ diff --git a/include/colormap.h b/include/colormap.h index b4a7d87..561e5fa 100644 --- a/include/colormap.h +++ b/include/colormap.h @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/include/colormap.h,v 1.6 2001/12/14 20:00:55 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/colormap.h,v 1.7 2003/11/17 22:20:48 dawes Exp $ */ #ifndef COLORMAP_H_ #define COLORMAP_H_ @@ -127,164 +127,125 @@ typedef struct _cmap { extern void (* LbxResolveColor)( -#if NeedNestedPrototypes LbxVisualPtr /* pVisual */, CARD16* /* red */, CARD16* /* green */, CARD16* /* blue */ -#endif ); extern void ResolveColor( -#if NeedFunctionPrototypes LbxVisualPtr /* pVisual */, CARD16* /* red */, CARD16* /* green */, CARD16* /* blue */ -#endif ); extern Pixel (* LbxFindFreePixel)( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */ -#endif ); extern Pixel FindFreePixel( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */ -#endif ); extern Entry * (* LbxFindBestPixel)( -#if NeedNestedPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */, int /* channels */ -#endif ); extern Entry * FindBestPixel( -#if NeedNestedPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */, int /* channels */ -#endif ); extern void ReleaseCmap( -#if NeedFunctionPrototypes ClientPtr /* client */, ColormapPtr /* pmap */ -#endif ); extern int CreateColormap( -#if NeedFunctionPrototypes ClientPtr /*client*/, Colormap /*cmap*/, VisualID /*visual*/ -#endif ); extern int FreeColormap( -#if NeedFunctionPrototypes ClientPtr /*client*/, Colormap /*cmap*/ -#endif ); extern int CreateVisual( -#if NeedFunctionPrototypes int /*depth*/, xVisualType * /*vis*/ -#endif ); extern LbxVisualPtr GetVisual( -#if NeedFunctionPrototypes VisualID /*vid*/ -#endif ); extern Bool InitColors( -#if NeedFunctionPrototypes void -#endif ); extern RGBEntryPtr FindColorName( -#if NeedFunctionPrototypes XServerPtr /*server*/, char * /*name*/, int /*len*/, LbxVisualPtr /*pVisual*/ -#endif ); extern Bool AddColorName( -#if NeedFunctionPrototypes XServerPtr /*server*/, char * /*name*/, int /*len*/, RGBEntryRec * /*rgbe*/ -#endif ); extern void FreeColors( -#if NeedFunctionPrototypes void -#endif ); extern int DestroyColormap( -#if NeedFunctionPrototypes ClientPtr /*client*/, pointer /*pmap*/, XID /*id*/ -#endif ); extern int FindPixel( -#if NeedFunctionPrototypes ClientPtr /*client*/, ColormapPtr /*pmap*/, CARD32 /*red*/, CARD32 /*green*/, CARD32 /*blue*/, Entry ** /*pent*/ -#endif ); extern int IncrementPixel( -#if NeedFunctionPrototypes ClientPtr /*pclient*/, ColormapPtr /*pmap*/, Entry * /*pent*/, Bool /*from_server*/ -#endif ); extern int AllocCell( -#if NeedFunctionPrototypes ClientPtr /*pclient*/, ColormapPtr /*pmap*/, Pixel /*pixel*/ -#endif ); extern int StorePixel( -#if NeedFunctionPrototypes ClientPtr /*client*/, ColormapPtr /*pmap*/, CARD32 /*red*/, @@ -292,40 +253,31 @@ extern int StorePixel( CARD32 /*blue*/, Pixel /*pixel*/, Bool /*from_server*/ -#endif ); extern void GotServerFreeCellsEvent( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, Pixel /* pixel_start */, Pixel /* pixel_end */ -#endif ); extern void FreeAllClientPixels( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, int /* client */ -#endif ); extern int FreeClientPixels( -#if NeedFunctionPrototypes ClientPtr /*client*/, pointer /*pcr*/, XID /*id*/ -#endif ); extern int FreePixels( -#if NeedFunctionPrototypes ClientPtr /*client*/, ColormapPtr /*pmap*/, int /*num*/, Pixel * /*pixels*/, Pixel /*mask*/ -#endif ); #endif /* COLORMAP_H_ */ diff --git a/include/init.h b/include/init.h index 3de79fc..dc73d40 100644 --- a/include/init.h +++ b/include/init.h @@ -45,35 +45,30 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/init.h,v 1.3 2003/11/17 22:20:48 dawes Exp $ */ #ifndef _INIT_H_ #define _INIT_H_ extern struct _XDisplay* DisplayOpen( -#if NeedFunctionPrototypes char * /*dpy_name*/, int * /*request*/, int * /*event*/, int * /*error*/, int * /*sequencep*/ -#endif ); extern int DisplayConnectionNumber( -#if NeedFunctionPrototypes struct _XDisplay* /* dpy */ -#endif ); extern void DisplayGetConnSetup ( -#if NeedFunctionPrototypes struct _XDisplay* /* dpy */, xConnSetup** /* tag_data */, int* /* len */, int /* change_type */, CARD32* /* changes */, int /* change_len */ -#endif ); #endif diff --git a/include/lbx.h b/include/lbx.h index da6ce39..8993166 100644 --- a/include/lbx.h +++ b/include/lbx.h @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/include/lbx.h,v 1.6 2001/12/14 20:00:55 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/lbx.h,v 1.7 2003/11/17 22:20:48 dawes Exp $ */ #ifndef _LBX_H_ #define _LBX_H_ @@ -75,11 +75,9 @@ typedef struct proptagdata { typedef struct _replystuff *ReplyStuffPtr; typedef Bool (*ReplyFunc)( -#if NeedNestedPrototypes ClientPtr /*client*/, ReplyStuffPtr /*nr*/, char * /*data*/ -#endif ); typedef struct _replystuff { @@ -198,11 +196,9 @@ typedef struct _Client { pointer osPrivate; /* for OS layer, including scheduler */ Bool swapped; void (*pSwapReplyFunc) ( -#if NeedNestedPrototypes ClientPtr /* pClient */, int /* size */, void * /* pbuf */ -#endif ); XID errorValue; int sequence; @@ -216,9 +212,7 @@ typedef struct _Client { pointer *saveSet; int awaitingSetup; int (**requestVector) ( -#if NeedNestedPrototypes ClientPtr /* pClient */ -#endif ); CARD32 req_len; /* length of current request */ Bool big_requests; /* supports large requests */ @@ -452,285 +446,203 @@ extern void ZeroCompressionStats(); /* tables.c */ extern int ProcLBXInternAtom( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXGetAtomName( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXCreateColormap( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXAllocColor( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXAllocNamedColor( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXFreeColormap( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXCopyColormapAndFree( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXFreeColors( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXLookupColor( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXGetModifierMapping( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXGetKeyboardMapping( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXQueryFont( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void FinishLBXRequest( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*yank*/ -#endif ); extern void DoLBXReply( -#if NeedFunctionPrototypes ClientPtr /*client*/, char * /*data*/, int /*len*/ -#endif ); extern void WriteError( -#if NeedFunctionPrototypes ClientPtr /*client*/, unsigned /*int majorCode*/, unsigned /*int minorCode*/, XID /*resId*/, int /*errorCode*/ -#endif ); extern void SendLbxSync( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); /* dispatch.c */ extern int Dispatch( -#if NeedFunctionPrototypes void -#endif ); extern void SendErrorToClient( -#if NeedFunctionPrototypes ClientPtr /*client*/, unsigned int /*majorCode*/, unsigned int /*minorCode*/, XID /*resId*/, int /*errorCode*/ -#endif ); extern ClientPtr NextAvailableClient( -#if NeedFunctionPrototypes pointer /*ospriv*/, int /* connect_fd */ /* the fd the client connected on */ -#endif ); extern int ProcInitialConnection( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcEstablishConnection( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void CloseDownClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcStandardRequest( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcBadRequest( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void AdjustProcVector( -#if NeedFunctionPrototypes void -#endif ); /* lbxutil.c */ extern ReplyStuffPtr NewReply( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*major*/, int /*minor*/, ReplyFunc /*reply_func*/ -#endif ); extern void RemoveReply( -#if NeedFunctionPrototypes ClientPtr /*client*/, ReplyStuffPtr /*rp*/ -#endif ); extern ReplyStuffPtr GetMatchingReply( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*seqno*/, Bool /*flush_older*/ -#endif ); extern Bool AnyReplies( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern Bool SaveReplyData( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReply * /*rep*/, int /*len*/, pointer /*data*/ -#endif ); extern Bool FlushDelayedReplies( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void BumpSequence( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void ForceSequenceUpdate( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void LbxFreeTag( -#if NeedFunctionPrototypes XServerPtr /*server*/, XID /*tag*/, int /*tagtype*/ -#endif ); extern void LbxSendTagData( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*tag*/, int /*tagtype*/ -#endif ); extern void SendInitLBXPackets( -#if NeedFunctionPrototypes XServerPtr /*server*/ -#endif ); extern void LbxCleanupSession( -#if NeedFunctionPrototypes void -#endif ); /* unsquish.c */ extern int EventLength( -#if NeedFunctionPrototypes xEvent * /*ev*/, Bool /* squish */ -#endif ); extern Bool UnsquishEvent( -#if NeedFunctionPrototypes xReply * /*rep*/, xEvent * /*ev*/, int * /*lenp*/ -#endif ); /* props.c */ extern int ProcLBXChangeProperty( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int ProcLBXGetProperty( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); #endif diff --git a/include/lbxext.h b/include/lbxext.h index daefe78..2ce3485 100644 --- a/include/lbxext.h +++ b/include/lbxext.h @@ -46,49 +46,34 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/lbxext.h,v 1.3 2003/11/17 22:20:48 dawes Exp $ */ #ifndef _LBXEXT_H_ #define _LBXEXT_H_ typedef int (*ExtensionRequests) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*ExtensionReplies) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*ExtensionEvents) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*ExtensionErrors) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*SExtensionRequests) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*SExtensionReplies) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*SExtensionEvents) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef int (*SExtensionErrors) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef struct _vectors { @@ -101,67 +86,49 @@ typedef struct _vectors { } ExtensionVectors; extern int (*ProcVector[256]) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int (*SwappedProcVector[256]) ( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); typedef struct _LbxQueryExtensionReply *xLbxQueryExtensionReplyPtr; extern void DeleteExtensions( -#if NeedFunctionPrototypes XServerPtr /*server*/ -#endif ); typedef struct _replystuff *_ReplyStuffPtr; extern void HandleExtensionError( -#if NeedFunctionPrototypes ClientPtr /*client*/, xError * /*err*/, _ReplyStuffPtr /*nr*/ -#endif ); extern void HandleExtensionEvent( -#if NeedFunctionPrototypes ClientPtr /*client*/, xEvent * /*ev*/ -#endif ); extern Bool HandleExtensionReply( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReply * /*reply*/, _ReplyStuffPtr * /*nr*/ -#endif ); extern Bool CheckExtensionForEvents( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReq * /*req*/ -#endif ); extern Bool CheckExtensionForReplies( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReq * /*req*/ -#endif ); extern int ProcLBXQueryExtension( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); #endif /* _LBXEXT_H_ */ diff --git a/include/os.h b/include/os.h index 20bca9e..2dca444 100644 --- a/include/os.h +++ b/include/os.h @@ -27,7 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/lbxproxy/include/os.h,v 1.7 2001/12/14 20:00:55 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/os.h,v 1.8 2003/11/17 22:20:48 dawes Exp $ */ #ifndef OS_H #define OS_H @@ -45,10 +45,8 @@ extern fd_set OutputPending; /* WaitFor.c */ extern int WaitForSomething( -#if NeedFunctionPrototypes int * /*pClientsReady*/, Bool /* poll */ -#endif ); /* connection.c */ @@ -58,235 +56,165 @@ extern Bool AnyClientsWriteBlocked; extern int GrabInProgress; extern void InitConnectionLimits( -#if NeedFunctionPrototypes void -#endif ); extern void CreateServerSockets( -#if NeedFunctionPrototypes int * /*listen_fds[]*/ -#endif ); extern void CloseServerSockets( -#if NeedFunctionPrototypes void -#endif ); extern void CreateWellKnownSockets( -#if NeedFunctionPrototypes void -#endif ); extern void ListenToProxyManager ( -#if NeedFunctionPrototypes void -#endif ); extern void ListenWellKnownSockets ( -#if NeedFunctionPrototypes void -#endif ); extern void ResetWellKnownSockets( -#if NeedFunctionPrototypes void -#endif ); extern void AvailableClientInput( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern ClientPtr AllocNewConnection( -#if NeedFunctionPrototypes int /*fd*/, /* the fd to the display */ int /*connect_fd*/, /* the fd the client connected on */ Bool /*to_server*/, XtransConnInfo /*trans_conn*/ -#endif ); extern void SwitchConnectionFuncs( -#if NeedFunctionPrototypes ClientPtr /*client*/, int (* /*Read*/)(), int (* /*Writev*/)() -#endif ); extern void StartOutputCompression( -#if NeedFunctionPrototypes ClientPtr /*client*/, void (* /*CompressOn*/)(), void (* /*CompressOff*/)() -#endif ); extern Bool EstablishNewConnections( -#if NeedFunctionPrototypes ClientPtr /*clientUnused*/, pointer /*closure*/ -#endif ); extern void CloseDownFileDescriptor( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void CheckConnections( -#if NeedFunctionPrototypes void -#endif ); extern void CloseDownConnection( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void OnlyListenToOneClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void ListenToAllClients( -#if NeedFunctionPrototypes void -#endif ); extern void IgnoreClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void AttendClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void MakeClientGrabImpervious( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void MakeClientGrabPervious( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); /* io.c */ extern unsigned long StandardRequestLength( -#if NeedFunctionPrototypes xReq * /*req*/, ClientPtr /*client*/, int /*got*/, Bool * /*partp*/ -#endif ); extern int StandardReadRequestFromClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int PendingClientOutput( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int CheckPendingClientInput( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void MarkConnectionWriteBlocked( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern int BytesInClientBuffer( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void SkipInClientBuffer( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*nbytes*/, int /*lenLastReq*/ -#endif ); extern Bool InsertFakeRequest( -#if NeedFunctionPrototypes ClientPtr /*client*/, char * /*data*/, int /*count*/ -#endif ); extern void ResetCurrentRequest( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void FlushAllOutput( -#if NeedFunctionPrototypes void -#endif ); extern int StandardWriteToClient( -#if NeedFunctionPrototypes ClientPtr /*who*/, int /*count*/, char * /*buf*/ -#endif ); extern int UncompressWriteToClient( -#if NeedFunctionPrototypes ClientPtr /*who*/, int /*count*/, char * /*buf*/ -#endif ); extern void ResetOsBuffers( -#if NeedFunctionPrototypes void -#endif ); /* osinit.c */ extern void OsInit( -#if NeedFunctionPrototypes void -#endif ); #endif diff --git a/include/pm.h b/include/pm.h index 313c2e2..efd3dd8 100644 --- a/include/pm.h +++ b/include/pm.h @@ -25,6 +25,7 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/lbxproxy/include/pm.h,v 1.5 2003/11/17 22:20:48 dawes Exp $ */ #include <X11/ICE/ICElib.h> @@ -33,28 +34,20 @@ extern int proxy_manager_fd; extern Bool proxyMngr; extern Bool CheckForProxyManager ( -#if NeedFunctionPrototypes void -#endif ); extern void ConnectToProxyManager ( -#if NeedFunctionPrototypes void -#endif ); extern void SendGetProxyAddrReply ( -#if NeedFunctionPrototypes IceConn /*requestor_iceConn*/, int /*status*/, char * /*addr*/, char * /*error*/ -#endif ); extern void HandleProxyManagerConnection ( -#if NeedFunctionPrototypes void -#endif ); diff --git a/include/proxyopts.h b/include/proxyopts.h index fe22a68..6abce40 100644 --- a/include/proxyopts.h +++ b/include/proxyopts.h @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/proxyopts.h,v 1.6 2003/11/17 22:20:48 dawes Exp $ */ #ifndef _LBX_PROXYOPTS_H_ #define _LBX_PROXYOPTS_H_ @@ -74,71 +75,51 @@ extern LbxNegOptsRec lbxNegOpt; /* options.c */ extern void LbxOptInit( -#if NeedFunctionPrototypes XServerPtr /*server*/ -#endif ); extern int LbxOptBuildReq( -#if NeedFunctionPrototypes XServerPtr /*server*/, char * /*buf*/ -#endif ); extern int LbxOptParseReply( -#if NeedFunctionPrototypes XServerPtr /*server*/, int /*nopts*/, unsigned char * /*preply*/, int /*replylen*/ -#endif ); extern void LbxNoDelta( -#if NeedFunctionPrototypes void -#endif ); extern void LbxNoComp( -#if NeedFunctionPrototypes void -#endif ); extern void LbxNoSquish( -#if NeedFunctionPrototypes void -#endif ); extern LbxBitmapCompMethod *LbxLookupBitmapCompMethod ( -#if NeedFunctionPrototypes XServerPtr /*server*/, int /* methodOpCode */ -#endif ); extern LbxPixmapCompMethod *LbxLookupPixmapCompMethod ( -#if NeedFunctionPrototypes XServerPtr /*server*/, int /* methodOpCode */ -#endif ); extern LbxBitmapCompMethod *LbxFindPreferredBitmapCompMethod ( -#if NeedFunctionPrototypes XServerPtr /*server*/ -#endif ); extern LbxPixmapCompMethod *LbxFindPreferredPixmapCompMethod ( -#if NeedFunctionPrototypes XServerPtr /*server*/, int /* format */, int /* depth */ -#endif ); #endif /* _LBX_PROXYOPTS_H_ */ diff --git a/include/reqtype.h b/include/reqtype.h index bfed83a..67e378c 100644 --- a/include/reqtype.h +++ b/include/reqtype.h @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/reqtype.h,v 1.6 2003/11/17 22:20:49 dawes Exp $ */ #ifndef _REQTYPE_H_ #define _REQTYPE_H_ @@ -55,17 +56,13 @@ in this Software without prior written authorization from The Open Group. #define REQ_TYPE_MAYBE 2 extern Bool GeneratesEvents( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReq * /*req*/ -#endif ); extern int GeneratesReplies( -#if NeedFunctionPrototypes ClientPtr /*client*/, xReq * /*req*/ -#endif ); #endif /* _REQTYPE_H_ */ diff --git a/include/resource.h b/include/resource.h index 2fc494e..164f867 100644 --- a/include/resource.h +++ b/include/resource.h @@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/lbxproxy/include/resource.h,v 1.6 2003/11/17 22:20:49 dawes Exp $ */ #ifndef RESOURCE_H #define RESOURCE_H 1 @@ -64,74 +65,54 @@ typedef struct _ClientResource { #define PROXY_BIT 0x40000000 /* use illegal bit */ typedef int (*DeleteType)( -#if NeedNestedPrototypes ClientPtr /*client*/, pointer /*value*/, XID /*id*/ -#endif ); extern Bool InitDeleteFuncs( -#if NeedFunctionPrototypes void -#endif ); extern Bool InitClientResources( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void FinishInitClientResources( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*ridBase*/, XID /*ridMask*/ -#endif ); extern XID FakeClientID( -#if NeedFunctionPrototypes int /*client*/ -#endif ); extern Bool AddResource( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*id*/, RESTYPE /*type*/, pointer /*value*/ -#endif ); extern void FreeResource( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*id*/, RESTYPE /*skipDeleteFuncType*/ -#endif ); extern void FreeClientResources( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void FreeAllResources( -#if NeedFunctionPrototypes void -#endif ); extern pointer LookupIDByType( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*id*/, RESTYPE /*rtype*/ -#endif ); #endif diff --git a/include/swap.h b/include/swap.h index bbfa877..9d50be1 100644 --- a/include/swap.h +++ b/include/swap.h @@ -22,247 +22,171 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/include/swap.h,v 1.2 2001/08/01 00:45:01 tsi Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/swap.h,v 1.3 2003/11/17 22:20:49 dawes Exp $ */ #ifndef _SWAP_H_ #define _SWAP_H_ extern void SwapConnSetup( -#if NeedFunctionPrototypes xConnSetup * /*pConnSetup*/, xConnSetup * /*pConnSetupT*/ -#endif ); extern void SwapWinRoot( -#if NeedFunctionPrototypes xWindowRoot * /*pRoot*/, xWindowRoot * /*pRootT*/ -#endif ); extern void SwapVisual( -#if NeedFunctionPrototypes xVisualType * /*pVis*/, xVisualType * /*pVisT*/ -#endif ); extern void WriteSConnSetupPrefix( -#if NeedFunctionPrototypes ClientPtr /* pClient */, xConnSetupPrefix * /* pcsp */ -#endif ); extern void WriteSConnectionInfo( -#if NeedFunctionPrototypes ClientPtr /*pClient*/, unsigned long /*size*/, char * /*pInfo*/ -#endif ); extern void SwapGetPropertyReply( -#if NeedFunctionPrototypes xGetPropertyReply * /*rep*/ -#endif ); extern void SwapInternAtomReply( -#if NeedFunctionPrototypes xInternAtomReply * /*rep*/ -#endif ); extern void SwapGetAtomNameReply( -#if NeedFunctionPrototypes xGetAtomNameReply * /*rep*/ -#endif ); extern void SwapLookupColorReply( -#if NeedFunctionPrototypes xLookupColorReply * /*rep*/ -#endif ); extern void SwapAllocColorReply( -#if NeedFunctionPrototypes xAllocColorReply * /*rep*/ -#endif ); extern void SwapAllocNamedColorReply( -#if NeedFunctionPrototypes xAllocNamedColorReply * /*rep*/ -#endif ); extern void SwapModmapReply( -#if NeedFunctionPrototypes xGetModifierMappingReply * /*rep*/ -#endif ); extern void SwapKeymapReply( -#if NeedFunctionPrototypes xGetKeyboardMappingReply * /*rep*/ -#endif ); extern void SwapGetImageReply( -#if NeedFunctionPrototypes xGetImageReply * /*rep*/ -#endif ); extern void SwapQueryExtensionReply( -#if NeedFunctionPrototypes xQueryExtensionReply * /*rep*/ -#endif ); extern void SwapFont( -#if NeedFunctionPrototypes xQueryFontReply * /*pr*/, Bool /*native*/ -#endif ); extern void LbxSwapFontInfo( -#if NeedFunctionPrototypes xLbxFontInfo * /*pr*/, Bool /*compressed*/ -#endif ); extern void SwapLongs( -#if NeedFunctionPrototypes CARD32 * /*list*/, unsigned long /*count*/ -#endif ); extern void SwapShorts( -#if NeedFunctionPrototypes short * /*list*/, unsigned long /*count*/ -#endif ); extern void SwapConnClientPrefix( -#if NeedFunctionPrototypes xConnClientPrefix * /*pCCP*/ -#endif ); extern void SwapNewClient( -#if NeedFunctionPrototypes xLbxNewClientReq * /*r*/ -#endif ); extern void SwapCloseClient( -#if NeedFunctionPrototypes xLbxCloseClientReq * /*r*/ -#endif ); extern void SwapModifySequence( -#if NeedFunctionPrototypes xLbxModifySequenceReq * /*r*/ -#endif ); extern void SwapIncrementPixel( -#if NeedFunctionPrototypes xLbxIncrementPixelReq * /*r*/ -#endif ); extern void SwapGetModifierMapping( -#if NeedFunctionPrototypes xLbxGetModifierMappingReq * /*r*/ -#endif ); extern void SwapGetKeyboardMapping( -#if NeedFunctionPrototypes xLbxGetKeyboardMappingReq * /*r*/ -#endif ); extern void SwapQueryFont( -#if NeedFunctionPrototypes xLbxQueryFontReq * /*r*/ -#endif ); extern void SwapChangeProperty( -#if NeedFunctionPrototypes xLbxChangePropertyReq * /*r*/ -#endif ); extern void SwapGetProperty( -#if NeedFunctionPrototypes xLbxGetPropertyReq * /*r*/ -#endif ); extern void SwapGetImage( -#if NeedFunctionPrototypes xLbxGetImageReq * /*r*/ -#endif ); extern void SwapInternAtoms( -#if NeedFunctionPrototypes xLbxInternAtomsReq * /* r */ -#endif ); extern void SwapInvalidateTag( -#if NeedFunctionPrototypes xLbxInvalidateTagReq * /*r*/ -#endif ); extern void SwapTagData( -#if NeedFunctionPrototypes xLbxTagDataReq * /*r*/ -#endif ); extern void SwapQueryExtension( -#if NeedFunctionPrototypes xLbxQueryExtensionReq * /*r*/ -#endif ); extern void SwapLbxConnSetupPrefix( -#if NeedFunctionPrototypes xLbxConnSetupPrefix * /*csp*/ -#endif ); extern void SwapAllocColor( -#if NeedFunctionPrototypes xLbxAllocColorReq * /* r */ -#endif ); extern void SwapGrabCmap( -#if NeedFunctionPrototypes xLbxGrabCmapReq * /* r */ -#endif ); extern void SwapReleaseCmap( -#if NeedFunctionPrototypes xLbxReleaseCmapReq * /* r */ -#endif ); #endif /* _SWAP_H_ */ diff --git a/include/tags.h b/include/tags.h index d48be5f..94b9975 100644 --- a/include/tags.h +++ b/include/tags.h @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/lbxproxy/include/tags.h,v 1.6 2003/11/17 22:20:49 dawes Exp $ */ #ifndef _TAGS_H_ #define _TAGS_H_ @@ -62,70 +63,54 @@ typedef struct _tagdata { typedef struct _tagdata *TagData; extern void TagsInit( -#if NeedFunctionPrototypes XServerPtr /*server*/, Bool /*useTags*/ -#endif ); extern void FreeTags( -#if NeedFunctionPrototypes void -#endif ); extern Bool TagStoreData( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/, CacheID /*id*/, int /*size*/, int /*dtype*/, pointer /*data*/ -#endif ); extern Bool TagStoreDataNC( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/, CacheID /*id*/, int /*size*/, int /*dtype*/, pointer /*data*/ -#endif ); extern TagData TagGetTag( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/, CacheID /*id*/ -#endif ); extern pointer TagGetData( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/, CacheID /*id*/ -#endif ); extern void TagFreeData( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/, CacheID /*id*/, Bool /*notify*/ -#endif ); extern Bool AnyTagBearingReplies( -#if NeedFunctionPrototypes XServerPtr /*server*/, Cache /*cache*/ -#endif ); extern Cache global_cache; diff --git a/include/util.h b/include/util.h index a6e757e..0e1683f 100644 --- a/include/util.h +++ b/include/util.h @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/include/util.h,v 1.7 2001/12/14 20:00:56 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/util.h,v 1.8 2003/11/17 22:20:49 dawes Exp $ */ #ifndef _UTIL_H_ #define _UTIL_H_ @@ -58,60 +58,42 @@ in this Software without prior written authorization from The Open Group. #endif typedef SIGVAL (*OsSigHandlerPtr)( -#if NeedFunctionPrototypes int /* sig */ -#endif ); extern OsSigHandlerPtr OsSignal( -#if NeedFunctionPrototypes int /*sig*/, OsSigHandlerPtr /*handler*/ -#endif ); extern void AutoResetServer( -#if NeedFunctionPrototypes int /*sig*/ -#endif ); extern void GiveUp( -#if NeedFunctionPrototypes int /*sig*/ -#endif ); extern void Error( -#if NeedFunctionPrototypes char * /*str*/ -#endif ); extern CARD32 GetTimeInMillis( -#if NeedFunctionPrototypes void -#endif ); extern int AdjustWaitForDelay( -#if NeedFunctionPrototypes pointer /*waitTime*/, unsigned long /*newdelay*/ -#endif ); extern void UseMsg( -#if NeedFunctionPrototypes void -#endif ); extern void ProcessCommandLine( -#if NeedFunctionPrototypes int /*argc*/, char * /*argv*/[] -#endif ); #define xalloc(size) Xalloc((unsigned long)(size)) @@ -120,110 +102,78 @@ extern void ProcessCommandLine( #define xfree(ptr) Xfree((pointer)(ptr)) extern unsigned long *Xalloc( -#if NeedFunctionPrototypes unsigned long /*amount*/ -#endif ); extern unsigned long *Xcalloc( -#if NeedFunctionPrototypes unsigned long /*amount*/ -#endif ); extern unsigned long *Xrealloc( -#if NeedFunctionPrototypes pointer /*ptr*/, unsigned long /*amount*/ -#endif ); extern void Xfree( -#if NeedFunctionPrototypes pointer /*ptr*/ -#endif ); extern void OsInitAllocator( -#if NeedFunctionPrototypes void -#endif ); extern void AuditF( -#if NeedVarargsPrototypes const char * /*f*/, ... -#endif ); extern void FatalError( -#if NeedVarargsPrototypes const char * /*f*/, ... -#endif ); extern void ErrorF( -#if NeedVarargsPrototypes const char * /*f*/, ... -#endif ); extern char *strnalloc( -#if NeedFunctionPrototypes char * /*str*/, int /*len*/ -#endif ); typedef struct _WorkQueue *WorkQueuePtr; extern void ProcessWorkQueue( -#if NeedFunctionPrototypes void -#endif ); extern Bool QueueWorkProc( -#if NeedFunctionPrototypes Bool (* /*function*/)(), ClientPtr /*client*/, pointer /*closure*/ -#endif ); extern Bool ClientSleep( -#if NeedFunctionPrototypes ClientPtr /*client*/, Bool (* /*function*/)(), pointer /*closure*/ -#endif ); extern Bool ClientSignal( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void ClientWakeup( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern Bool ClientIsAsleep( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void LBXReadAtomsFile( -#if NeedFunctionPrototypes XServerPtr /*server*/ -#endif ); #endif /* _UTIL_H_ */ diff --git a/include/wire.h b/include/wire.h index 077f325..f301f91 100644 --- a/include/wire.h +++ b/include/wire.h @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/lbxproxy/include/wire.h,v 1.7 2001/12/14 20:00:56 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/include/wire.h,v 1.8 2003/11/17 22:20:49 dawes Exp $ */ #ifdef DEBUG /* Need this here because lbx.h undef's DEBUG */ extern int lbxDebug; @@ -119,29 +119,23 @@ typedef struct _LbxStreamComp { typedef struct _LbxCmapAllMethod { char *methodName; void (*resolver)( -#if NeedFunctionPrototypes LbxVisualPtr /* pVisual */, CARD16* /* red */, CARD16* /* green */, CARD16* /* blue */ -#endif ); Pixel (*findfree)( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */ -#endif ); Entry * (* findbest)( -#if NeedFunctionPrototypes ColormapPtr /* pmap */, CARD32 /* red */, CARD32 /* green */, CARD32 /* blue */, int /* channels */ -#endif ); } LbxCmapAllMethod; @@ -188,9 +182,7 @@ typedef struct _XServer { * "real" clients associated with this server. */ int (**requestVector) ( -#if NeedNestedPrototypes ClientPtr /* pClient */ -#endif ); /* @@ -256,111 +248,84 @@ extern char * display; extern int lbxMaxServers; extern void WriteReqToServer( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*len*/, char * /*buf*/, Bool /*checkLargeRequest*/ -#endif ); extern void _write_to_server( -#if NeedFunctionPrototypes ClientPtr /*client*/, Bool /*compressed*/, int /*len*/, char* /*buf*/, Bool /*checkLarge*/, Bool /*startOfRequest*/ -#endif ); extern void WriteToServer( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*len*/, char * /*buf*/, Bool /*startOfRequest*/, Bool /*checkLargeRequest*/ -#endif ); extern void WriteToServerUncompressed( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*len*/, char * /*buf*/, Bool /* startOfRequest */ -#endif ); extern Bool NewClient( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*setuplen*/ -#endif ); extern void CloseClient( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void ModifySequence( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*num*/ -#endif ); extern void AllowMotion( -#if NeedFunctionPrototypes ClientPtr /*client*/, int /*num*/ -#endif ); extern void SendIncrementPixel( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*cmap*/, unsigned long /*pixel*/ -#endif ); extern void SendAllocColor( -#if NeedFunctionPrototypes ClientPtr /* pClient */, XID /* cmap */, CARD32 /* pixel */, CARD16 /* red */, CARD16 /* green */, CARD16 /* blue */ -#endif ); extern void SendGetModifierMapping( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void SendGetKeyboardMapping( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern void SendQueryFont( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*fid*/ -#endif ); extern void SendChangeProperty( -#if NeedFunctionPrototypes ClientPtr /*client*/, Window /*win*/, Atom /*prop*/, @@ -368,11 +333,9 @@ extern void SendChangeProperty( int /*format*/, int /*mode*/, unsigned long /*num*/ -#endif ); extern void SendGetProperty( -#if NeedFunctionPrototypes ClientPtr /*client*/, Window /*win*/, Atom /*prop*/, @@ -380,27 +343,21 @@ extern void SendGetProperty( Bool /*delete*/, unsigned long /*off*/, unsigned long /*len*/ -#endif ); extern void SendInvalidateTag( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*tag*/ -#endif ); extern void SendTagData( -#if NeedFunctionPrototypes ClientPtr /*client*/, XID /*tag*/, unsigned long /*len*/, pointer /*data*/ -#endif ); extern void SendGetImage( -#if NeedFunctionPrototypes ClientPtr /*client*/, Drawable /*drawable*/, int /*x*/, @@ -409,23 +366,16 @@ extern void SendGetImage( unsigned int /*height*/, unsigned long /*planeMask*/, int /*format*/ -#endif ); extern int ServerProcStandardEvent( -#if NeedFunctionPrototypes ClientPtr /*sc*/ -#endif ); extern void CloseServer( -#if NeedFunctionPrototypes ClientPtr /*client*/ -#endif ); extern Bool ConnectToServer( -#if NeedFunctionPrototypes char * /*dpy_name*/ -#endif ); diff --git a/lbxproxy.man b/lbxproxy.man index 7b406b5..6419c57 100644 --- a/lbxproxy.man +++ b/lbxproxy.man @@ -24,7 +24,7 @@ .\" from The Open Group. .\" .\" -.\" $XFree86: xc/programs/lbxproxy/lbxproxy.man,v 1.8 2001/12/14 20:00:49 dawes Exp $ +.\" $XFree86: xc/programs/lbxproxy/lbxproxy.man,v 1.9 2003/05/29 21:48:10 herrb Exp $ .\" .TH LBXPROXY 1 __xorgversion__ .SH NAME @@ -74,7 +74,7 @@ DISPLAY environment variable. .TP 8 .B \-motion \fIcount\fP A limited number of pointer motion events are allowed to be in flight -between the server and the proxy at any given time. The maximimum +between the server and the proxy at any given time. The maximum number of motion events that can be in flight is set with this option; the default is 8. .TP 8 diff --git a/os/connection.c b/os/connection.c index 420af0f..89b9758 100644 --- a/os/connection.c +++ b/os/connection.c @@ -60,7 +60,7 @@ SOFTWARE. * socket ids aren't small nums (0 - 2^8) * *****************************************************************/ -/* $XFree86: xc/programs/lbxproxy/os/connection.c,v 1.18 2002/07/06 09:59:17 alanh Exp $ */ +/* $XFree86: xc/programs/lbxproxy/os/connection.c,v 1.19 2003/11/17 22:20:49 dawes Exp $ */ #include "misc.h" #include <X11/Xtrans.h> @@ -159,9 +159,7 @@ extern unsigned long stream_out_plain; extern unsigned long stream_in_plain; static void ErrorConnMax( -#if NeedFunctionPrototypes XtransConnInfo /* trans_conn */ -#endif ); @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/lbxproxy/os/io.c,v 1.10 2001/12/14 20:00:58 dawes Exp $ */ +/* $XFree86: xc/programs/lbxproxy/os/io.c,v 1.11 2003/11/17 22:20:49 dawes Exp $ */ /***************************************************************** * i/o functions * @@ -90,19 +90,13 @@ static ConnectionOutputPtr FreeOutputs = (ConnectionOutputPtr)NULL; static OsCommPtr AvailableInput = (OsCommPtr)NULL; static ConnectionInputPtr AllocateInputBuffer( -#if NeedFunctionPrototypes void -#endif ); static ConnectionOutputPtr AllocateOutputBuffer( -#if NeedFunctionPrototypes void -#endif ); static ConnectionOutputPtr AllocateUncompBuffer( -#if NeedFunctionPrototypes int count -#endif ); #define get_req_len(req,cli) (((cli)->swapped ? \ |