diff --git a/Xext/xevie.c b/Xext/xevie.c index 277b93bfb..a5b183790 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -55,6 +55,7 @@ of the copyright holder. #include #include "../os/osdep.h" +#include "modinit.h" #define NoSuchEvent 0x80000000 diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 99957fe0c..07bd729db 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -80,7 +80,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) xAnyHierarchyChangeInfo *any; int required_len = sizeof(xChangeDeviceHierarchyReq); char n; - int rc; + int rc = Success; int nchanges = 0; deviceHierarchyChangedEvent ev; diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index ce1312e90..8fa0cca29 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -95,7 +95,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) INT32 *coords = NULL, *bufptr; xGetDeviceMotionEventsReply rep; unsigned long i; - int rc, num_events, axes, size = 0, tsize; + int rc, num_events, axes, size = 0; unsigned long nEvents; DeviceIntPtr dev; TimeStamp start, stop; diff --git a/dix/devices.c b/dix/devices.c index c83f2fc9f..b88d856e6 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -76,6 +76,7 @@ SOFTWARE. #include "dispatch.h" #include "swaprep.h" #include "dixevents.h" +#include "mipointer.h" #include #include diff --git a/dix/getevents.c b/dix/getevents.c index fc07496f4..5227c54ec 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -277,7 +277,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, int size; int dflt; AxisInfo from, *to; /* for scaling */ - CARD32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ + INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ INT16 *corebuf; AxisInfo core_axis = {0}; @@ -295,7 +295,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, *buff = xalloc(size * pDev->valuator->numMotionEvents); if (!(*buff)) return 0; - obuff = *buff; + obuff = (char *)*buff; for (i = pDev->valuator->first_motion; i != pDev->valuator->last_motion; diff --git a/dix/privates.c b/dix/privates.c index 47a0e1a29..efb320463 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -39,6 +39,12 @@ from The Open Group. #include "colormapst.h" #include "inputstr.h" +struct _Private { + DevPrivateKey key; + pointer value; + struct _Private *next; +}; + typedef struct _PrivateDesc { DevPrivateKey key; unsigned size; @@ -116,6 +122,65 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) return &ptr->value; } +/* + * Look up a private pointer. + */ +_X_EXPORT pointer +dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) +{ + PrivateRec *rec = *privates; + pointer *ptr; + + while (rec) { + if (rec->key == key) + return rec->value; + rec = rec->next; + } + + ptr = dixAllocatePrivate(privates, key); + return ptr ? *ptr : NULL; +} + +/* + * Look up the address of a private pointer. + */ +_X_EXPORT pointer * +dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) +{ + PrivateRec *rec = *privates; + + while (rec) { + if (rec->key == key) + return &rec->value; + rec = rec->next; + } + + return dixAllocatePrivate(privates, key); +} + +/* + * Set a private pointer. + */ +_X_EXPORT int +dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) +{ + PrivateRec *rec; + + top: + rec = *privates; + while (rec) { + if (rec->key == key) { + rec->value = val; + return TRUE; + } + rec = rec->next; + } + + if (!dixAllocatePrivate(privates, key)) + return FALSE; + goto top; +} + /* * Called to free privates at object deletion time. */ diff --git a/fb/fbwindow.c b/fb/fbwindow.c index f6fe8aa83..9bde92769 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -227,7 +227,7 @@ fbFillRegionSolid (DrawablePtr pDrawable, while (n--) { #ifndef FB_ACCESS_WRAPPER - if (!try_mmx || !pixman_fill (dst, dstStride, dstBpp, + if (!try_mmx || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp, pbox->x1 + dstXoff, pbox->y1 + dstYoff, (pbox->x2 - pbox->x1), (pbox->y2 - pbox->y1), diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 7282e6e06..32f7ed48f 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -112,6 +112,10 @@ extern void SELinuxExtensionInit(INITARGS); #include "xselinux.h" #endif +#ifdef XEVIE +extern void XevieExtensionInit(INITARGS); +#endif + #if 1 extern void SecurityExtensionInit(INITARGS); #endif diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index a2a239099..5713ca17c 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -265,6 +265,9 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(dixRegisterPrivateInitFunc) SYMFUNC(dixRegisterPrivateDeleteFunc) SYMFUNC(dixAllocatePrivate) + SYMFUNC(dixLookupPrivate) + SYMFUNC(dixLookupPrivateAddr) + SYMFUNC(dixSetPrivate) SYMFUNC(dixFreePrivates) SYMFUNC(dixRegisterPrivateOffset) SYMFUNC(dixLookupPrivateOffset) diff --git a/include/privates.h b/include/privates.h index 8d59b728f..98d893c77 100644 --- a/include/privates.h +++ b/include/privates.h @@ -20,12 +20,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *****************************************************************/ typedef void *DevPrivateKey; - -typedef struct _Private { - DevPrivateKey key; - pointer value; - struct _Private *next; -} PrivateRec; +struct _Private; +typedef struct _Private PrivateRec; /* * Request pre-allocated private space for your driver/module. @@ -43,61 +39,20 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key); /* * Look up a private pointer. */ -static _X_INLINE pointer -dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) -{ - PrivateRec *rec = *privates; - pointer *ptr; - - while (rec) { - if (rec->key == key) - return rec->value; - rec = rec->next; - } - - ptr = dixAllocatePrivate(privates, key); - return ptr ? *ptr : NULL; -} +pointer +dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key); /* * Look up the address of a private pointer. */ -static _X_INLINE pointer * -dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) -{ - PrivateRec *rec = *privates; - - while (rec) { - if (rec->key == key) - return &rec->value; - rec = rec->next; - } - - return dixAllocatePrivate(privates, key); -} +pointer * +dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key); /* * Set a private pointer. */ -static _X_INLINE int -dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) -{ - PrivateRec *rec; - - top: - rec = *privates; - while (rec) { - if (rec->key == key) { - rec->value = val; - return TRUE; - } - rec = rec->next; - } - - if (!dixAllocatePrivate(privates, key)) - return FALSE; - goto top; -} +int +dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val); /* * Register callbacks to be called on private allocation/freeing. diff --git a/mi/mipointer.c b/mi/mipointer.c index 8b673f4fe..4763e1269 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -126,8 +126,10 @@ miPointerInitialize (ScreenPtr pScreen, static Bool miPointerCloseScreen (int index, ScreenPtr pScreen) { +#if 0 miPointerPtr pPointer; DeviceIntPtr pDev; +#endif SetupScreen(pScreen); diff --git a/os/connection.c b/os/connection.c index 38521e686..ba1604490 100644 --- a/os/connection.c +++ b/os/connection.c @@ -757,7 +757,9 @@ ClientAuthorized(ClientPtr client, } } priv->auth_id = auth_id; +#ifdef HAVE_LAUNCHD done: +#endif priv->conn_time = 0; #ifdef XDMCP diff --git a/os/rpcauth.c b/os/rpcauth.c index 3451ac18b..1e134ad14 100644 --- a/os/rpcauth.c +++ b/os/rpcauth.c @@ -42,6 +42,7 @@ from The Open Group. #include #include "misc.h" #include "os.h" +#include "osdep.h" #include "dixstruct.h" #include diff --git a/os/xdmauth.c b/os/xdmauth.c index d143ddefc..8cbcd581f 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -69,7 +69,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData, { XdmAuthKeyPtr incoming; - XdmcpUnwrap (incomingData->data, &privateKey, + XdmcpUnwrap (incomingData->data, (unsigned char *)&privateKey, incomingData->data,incomingData->length); if (packet_type == ACCEPT) { if (incomingData->length != 8) @@ -89,7 +89,8 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData, outgoingData->data = 0; if (packet_type == REQUEST) { if (XdmcpAllocARRAY8 (outgoingData, 8)) - XdmcpWrap (&rho, &privateKey, outgoingData->data, 8); + XdmcpWrap ((unsigned char *)&rho, (unsigned char *)&privateKey, + outgoingData->data, 8); } return TRUE; } @@ -99,7 +100,8 @@ XdmAuthenticationAddAuth (int name_len, char *name, int data_len, char *data) { Bool ret; - XdmcpUnwrap (data, (unsigned char *)&privateKey, data, data_len); + XdmcpUnwrap ((unsigned char *)data, (unsigned char *)&privateKey, + (unsigned char *)data, data_len); authFromXDMCP = TRUE; ret = AddAuthorization (name_len, name, data_len, data); authFromXDMCP = FALSE; @@ -152,7 +154,7 @@ XdmAuthenticationInit (char *cookie, int cookie_len) } XdmcpGenerateKey (&rho); XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen, - (unsigned char *)&rho, + (char *)&rho, sizeof (rho), (ValidatorFunc)XdmAuthenticationValidator, (GeneratorFunc)XdmAuthenticationGenerator, @@ -387,7 +389,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie, if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { - XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length); + XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason)) != NULL) { client->next = xdmClients; @@ -432,7 +434,7 @@ XdmToID (unsigned short cookie_length, char *cookie) if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { - XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length); + XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL) { xfree (client); diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c index 85415a4c9..eb5c38133 100644 --- a/xkb/XKBMisc.c +++ b/xkb/XKBMisc.c @@ -473,7 +473,7 @@ register int i; int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) || - (!xkb->map->types)||(!newTypes)||((groups&XkbAllGroupsMask)==0)|| + (!xkb->map->types)||((groups&XkbAllGroupsMask)==0)|| (nGroups>XkbNumKbdGroups)) { return BadMatch; } diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 6389b906f..047efcdfb 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -882,14 +882,13 @@ XkbSrvInfoPtr xkbi; ((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)|| (xE[i].u.u.type==DeviceKeyPress)|| (xE[i].u.u.type == DeviceKeyRelease))) { - XkbStatePtr s= &xkbi->state; DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); DebugF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state); - DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, - s->grab_mods); + DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",xkbi->state.lookup_mods, + xkbi->state.grab_mods); DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", - s->compat_lookup_mods, - s->compat_grab_mods); + xkbi->state.compat_lookup_mods, + xkbi->state.compat_grab_mods); } if ( (type>=KeyPress)&&(type<=MotionNotify) ) { CARD16 old,new;