diff options
Diffstat (limited to 'xorg-server/render/render.c')
-rw-r--r-- | xorg-server/render/render.c | 442 |
1 files changed, 204 insertions, 238 deletions
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index ebb1d630a..cc13dbc2a 100644 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -276,7 +276,6 @@ ProcRenderQueryVersion (ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient (client); xRenderQueryVersionReply rep; - register int n; REQUEST(xRenderQueryVersionReq); pRenderClient->major_version = stuff->majorVersion; @@ -300,10 +299,10 @@ ProcRenderQueryVersion (ClientPtr client) } if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.majorVersion, n); - swapl(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep); return Success; @@ -345,7 +344,6 @@ ProcRenderQueryPictFormats (ClientPtr client) int nvisual; int rlength; int s; - int n; int numScreens; int numSubpixel; /* REQUEST(xRenderQueryPictFormatsReq); */ @@ -432,16 +430,16 @@ ProcRenderQueryPictFormats (ClientPtr client) pictForm->colormap = None; if (client->swapped) { - swapl (&pictForm->id, n); - swaps (&pictForm->direct.red, n); - swaps (&pictForm->direct.redMask, n); - swaps (&pictForm->direct.green, n); - swaps (&pictForm->direct.greenMask, n); - swaps (&pictForm->direct.blue, n); - swaps (&pictForm->direct.blueMask, n); - swaps (&pictForm->direct.alpha, n); - swaps (&pictForm->direct.alphaMask, n); - swapl (&pictForm->colormap, n); + swapl(&pictForm->id); + swaps(&pictForm->direct.red); + swaps(&pictForm->direct.redMask); + swaps(&pictForm->direct.green); + swaps(&pictForm->direct.greenMask); + swaps(&pictForm->direct.blue); + swaps(&pictForm->direct.blueMask); + swaps(&pictForm->direct.alpha); + swaps(&pictForm->direct.alphaMask); + swapl(&pictForm->colormap); } pictForm++; } @@ -471,8 +469,8 @@ ProcRenderQueryPictFormats (ClientPtr client) pictVisual->format = pFormat->id; if (client->swapped) { - swapl (&pictVisual->visual, n); - swapl (&pictVisual->format, n); + swapl(&pictVisual->visual); + swapl(&pictVisual->format); } pictVisual++; nvisual++; @@ -482,7 +480,7 @@ ProcRenderQueryPictFormats (ClientPtr client) pictDepth->nPictVisuals = nvisual; if (client->swapped) { - swaps (&pictDepth->nPictVisuals, n); + swaps(&pictDepth->nPictVisuals); } ndepth++; pictDepth = (xPictDepth *) pictVisual; @@ -495,8 +493,8 @@ ProcRenderQueryPictFormats (ClientPtr client) pictScreen->fallback = 0; if (client->swapped) { - swapl (&pictScreen->nDepth, n); - swapl (&pictScreen->fallback, n); + swapl(&pictScreen->nDepth); + swapl(&pictScreen->fallback); } pictScreen = (xPictScreen *) pictDepth; } @@ -512,20 +510,20 @@ ProcRenderQueryPictFormats (ClientPtr client) *pictSubpixel = SubPixelUnknown; if (client->swapped) { - swapl (pictSubpixel, n); + swapl(pictSubpixel); } ++pictSubpixel; } if (client->swapped) { - swaps (&reply->sequenceNumber, n); - swapl (&reply->length, n); - swapl (&reply->numFormats, n); - swapl (&reply->numScreens, n); - swapl (&reply->numDepths, n); - swapl (&reply->numVisuals, n); - swapl (&reply->numSubpixel, n); + swaps(&reply->sequenceNumber); + swapl(&reply->length); + swapl(&reply->numFormats); + swapl(&reply->numScreens); + swapl(&reply->numDepths); + swapl(&reply->numVisuals); + swapl(&reply->numSubpixel); } WriteToClient(client, rlength, (char *) reply); free(reply); @@ -538,7 +536,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) PictFormatPtr pFormat; int rc, num; int rlength; - int i, n; + int i; REQUEST(xRenderQueryPictIndexValuesReq); xRenderQueryPictIndexValuesReply *reply; xIndexValue *values; @@ -575,15 +573,15 @@ ProcRenderQueryPictIndexValues (ClientPtr client) { for (i = 0; i < num; i++) { - swapl (&values[i].pixel, n); - swaps (&values[i].red, n); - swaps (&values[i].green, n); - swaps (&values[i].blue, n); - swaps (&values[i].alpha, n); + swapl(&values[i].pixel); + swaps(&values[i].red); + swaps(&values[i].green); + swaps(&values[i].blue); + swaps(&values[i].alpha); } - swaps (&reply->sequenceNumber, n); - swapl (&reply->length, n); - swapl (&reply->numIndexValues, n); + swaps(&reply->sequenceNumber); + swapl(&reply->length); + swapl(&reply->numIndexValues); } WriteToClient(client, rlength, (char *) reply); @@ -1822,16 +1820,14 @@ ProcRenderQueryFilters (ClientPtr client) if (client->swapped) { - register int n; - for (i = 0; i < reply->numAliases; i++) { - swaps (&aliases[i], n); + swaps(&aliases[i]); } - swaps(&reply->sequenceNumber, n); - swapl(&reply->length, n); - swapl(&reply->numAliases, n); - swapl(&reply->numFilters, n); + swaps(&reply->sequenceNumber); + swapl(&reply->length); + swapl(&reply->numAliases); + swapl(&reply->numFilters); } WriteToClient(client, total_bytes, (char *) reply); free(reply); @@ -2068,31 +2064,28 @@ ProcRenderDispatch (ClientPtr client) static int SProcRenderQueryVersion (ClientPtr client) { - register int n; REQUEST(xRenderQueryVersionReq); - swaps(&stuff->length, n); - swapl(&stuff->majorVersion, n); - swapl(&stuff->minorVersion, n); + swaps(&stuff->length); + swapl(&stuff->majorVersion); + swapl(&stuff->minorVersion); return (*ProcRenderVector[stuff->renderReqType])(client); } static int SProcRenderQueryPictFormats (ClientPtr client) { - register int n; REQUEST(xRenderQueryPictFormatsReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderQueryPictIndexValues (ClientPtr client) { - register int n; REQUEST(xRenderQueryPictIndexValuesReq); - swaps(&stuff->length, n); - swapl(&stuff->format, n); + swaps(&stuff->length); + swapl(&stuff->format); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2105,13 +2098,12 @@ SProcRenderQueryDithers (ClientPtr client) static int SProcRenderCreatePicture (ClientPtr client) { - register int n; REQUEST(xRenderCreatePictureReq); - swaps(&stuff->length, n); - swapl(&stuff->pid, n); - swapl(&stuff->drawable, n); - swapl(&stuff->format, n); - swapl(&stuff->mask, n); + swaps(&stuff->length); + swapl(&stuff->pid); + swapl(&stuff->drawable); + swapl(&stuff->format); + swapl(&stuff->mask); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2119,11 +2111,10 @@ SProcRenderCreatePicture (ClientPtr client) static int SProcRenderChangePicture (ClientPtr client) { - register int n; REQUEST(xRenderChangePictureReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); - swapl(&stuff->mask, n); + swaps(&stuff->length); + swapl(&stuff->picture); + swapl(&stuff->mask); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2131,12 +2122,11 @@ SProcRenderChangePicture (ClientPtr client) static int SProcRenderSetPictureClipRectangles (ClientPtr client) { - register int n; REQUEST(xRenderSetPictureClipRectanglesReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); - swaps(&stuff->xOrigin, n); - swaps(&stuff->yOrigin, n); + swaps(&stuff->length); + swapl(&stuff->picture); + swaps(&stuff->xOrigin); + swaps(&stuff->yOrigin); SwapRestS(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2144,65 +2134,61 @@ SProcRenderSetPictureClipRectangles (ClientPtr client) static int SProcRenderFreePicture (ClientPtr client) { - register int n; REQUEST(xRenderFreePictureReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); + swaps(&stuff->length); + swapl(&stuff->picture); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderComposite (ClientPtr client) { - register int n; REQUEST(xRenderCompositeReq); - swaps(&stuff->length, n); - swapl(&stuff->src, n); - swapl(&stuff->mask, n); - swapl(&stuff->dst, n); - swaps(&stuff->xSrc, n); - swaps(&stuff->ySrc, n); - swaps(&stuff->xMask, n); - swaps(&stuff->yMask, n); - swaps(&stuff->xDst, n); - swaps(&stuff->yDst, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->mask); + swapl(&stuff->dst); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); + swaps(&stuff->xMask); + swaps(&stuff->yMask); + swaps(&stuff->xDst); + swaps(&stuff->yDst); + swaps(&stuff->width); + swaps(&stuff->height); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderScale (ClientPtr client) { - register int n; REQUEST(xRenderScaleReq); - swaps(&stuff->length, n); - swapl(&stuff->src, n); - swapl(&stuff->dst, n); - swapl(&stuff->colorScale, n); - swapl(&stuff->alphaScale, n); - swaps(&stuff->xSrc, n); - swaps(&stuff->ySrc, n); - swaps(&stuff->xDst, n); - swaps(&stuff->yDst, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->colorScale); + swapl(&stuff->alphaScale); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); + swaps(&stuff->xDst); + swaps(&stuff->yDst); + swaps(&stuff->width); + swaps(&stuff->height); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderTrapezoids (ClientPtr client) { - register int n; REQUEST(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); - swaps (&stuff->length, n); - swapl (&stuff->src, n); - swapl (&stuff->dst, n); - swapl (&stuff->maskFormat, n); - swaps (&stuff->xSrc, n); - swaps (&stuff->ySrc, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->maskFormat); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2210,16 +2196,15 @@ SProcRenderTrapezoids (ClientPtr client) static int SProcRenderTriangles (ClientPtr client) { - register int n; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); - swaps (&stuff->length, n); - swapl (&stuff->src, n); - swapl (&stuff->dst, n); - swapl (&stuff->maskFormat, n); - swaps (&stuff->xSrc, n); - swaps (&stuff->ySrc, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->maskFormat); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2227,16 +2212,15 @@ SProcRenderTriangles (ClientPtr client) static int SProcRenderTriStrip (ClientPtr client) { - register int n; REQUEST(xRenderTriStripReq); REQUEST_AT_LEAST_SIZE(xRenderTriStripReq); - swaps (&stuff->length, n); - swapl (&stuff->src, n); - swapl (&stuff->dst, n); - swapl (&stuff->maskFormat, n); - swaps (&stuff->xSrc, n); - swaps (&stuff->ySrc, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->maskFormat); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2244,16 +2228,15 @@ SProcRenderTriStrip (ClientPtr client) static int SProcRenderTriFan (ClientPtr client) { - register int n; REQUEST(xRenderTriFanReq); REQUEST_AT_LEAST_SIZE(xRenderTriFanReq); - swaps (&stuff->length, n); - swapl (&stuff->src, n); - swapl (&stuff->dst, n); - swapl (&stuff->maskFormat, n); - swaps (&stuff->xSrc, n); - swaps (&stuff->ySrc, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->maskFormat); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2279,47 +2262,43 @@ SProcRenderTransform (ClientPtr client) static int SProcRenderCreateGlyphSet (ClientPtr client) { - register int n; REQUEST(xRenderCreateGlyphSetReq); - swaps(&stuff->length, n); - swapl(&stuff->gsid, n); - swapl(&stuff->format, n); + swaps(&stuff->length); + swapl(&stuff->gsid); + swapl(&stuff->format); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderReferenceGlyphSet (ClientPtr client) { - register int n; REQUEST(xRenderReferenceGlyphSetReq); - swaps(&stuff->length, n); - swapl(&stuff->gsid, n); - swapl(&stuff->existing, n); + swaps(&stuff->length); + swapl(&stuff->gsid); + swapl(&stuff->existing); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderFreeGlyphSet (ClientPtr client) { - register int n; REQUEST(xRenderFreeGlyphSetReq); - swaps(&stuff->length, n); - swapl(&stuff->glyphset, n); + swaps(&stuff->length); + swapl(&stuff->glyphset); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderAddGlyphs (ClientPtr client) { - register int n; register int i; CARD32 *gids; void *end; xGlyphInfo *gi; REQUEST(xRenderAddGlyphsReq); - swaps(&stuff->length, n); - swapl(&stuff->glyphset, n); - swapl(&stuff->nglyphs, n); + swaps(&stuff->length); + swapl(&stuff->glyphset); + swapl(&stuff->nglyphs); if (stuff->nglyphs & 0xe0000000) return BadLength; end = (CARD8 *) stuff + (client->req_len << 2); @@ -2331,13 +2310,13 @@ SProcRenderAddGlyphs (ClientPtr client) return BadLength; for (i = 0; i < stuff->nglyphs; i++) { - swapl (&gids[i], n); - swaps (&gi[i].width, n); - swaps (&gi[i].height, n); - swaps (&gi[i].x, n); - swaps (&gi[i].y, n); - swaps (&gi[i].xOff, n); - swaps (&gi[i].yOff, n); + swapl(&gids[i]); + swaps(&gi[i].width); + swaps(&gi[i].height); + swaps(&gi[i].x); + swaps(&gi[i].y); + swaps(&gi[i].xOff); + swaps(&gi[i].yOff); } return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2351,10 +2330,9 @@ SProcRenderAddGlyphsFromPicture (ClientPtr client) static int SProcRenderFreeGlyphs (ClientPtr client) { - register int n; REQUEST(xRenderFreeGlyphsReq); - swaps(&stuff->length, n); - swapl(&stuff->glyphset, n); + swaps(&stuff->length); + swapl(&stuff->glyphset); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2362,7 +2340,6 @@ SProcRenderFreeGlyphs (ClientPtr client) static int SProcRenderCompositeGlyphs (ClientPtr client) { - register int n; xGlyphElt *elt; CARD8 *buffer; CARD8 *end; @@ -2378,13 +2355,13 @@ SProcRenderCompositeGlyphs (ClientPtr client) case X_RenderCompositeGlyphs32: size = 4; break; } - swaps(&stuff->length, n); - swapl(&stuff->src, n); - swapl(&stuff->dst, n); - swapl(&stuff->maskFormat, n); - swapl(&stuff->glyphset, n); - swaps(&stuff->xSrc, n); - swaps(&stuff->ySrc, n); + swaps(&stuff->length); + swapl(&stuff->src); + swapl(&stuff->dst); + swapl(&stuff->maskFormat); + swapl(&stuff->glyphset); + swaps(&stuff->xSrc); + swaps(&stuff->ySrc); buffer = (CARD8 *) (stuff + 1); end = (CARD8 *) stuff + (client->req_len << 2); while (buffer + sizeof (xGlyphElt) < end) @@ -2392,13 +2369,13 @@ SProcRenderCompositeGlyphs (ClientPtr client) elt = (xGlyphElt *) buffer; buffer += sizeof (xGlyphElt); - swaps (&elt->deltax, n); - swaps (&elt->deltay, n); + swaps(&elt->deltax); + swaps(&elt->deltay); i = elt->len; if (i == 0xff) { - swapl (buffer, n); + swapl((int *)buffer); buffer += 4; } else @@ -2411,14 +2388,14 @@ SProcRenderCompositeGlyphs (ClientPtr client) case 2: while (i--) { - swaps (buffer, n); + swaps((short *)buffer); buffer += 2; } break; case 4: while (i--) { - swapl (buffer, n); + swapl((int *)buffer); buffer += 4; } break; @@ -2433,16 +2410,15 @@ SProcRenderCompositeGlyphs (ClientPtr client) static int SProcRenderFillRectangles (ClientPtr client) { - register int n; REQUEST(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); - swaps(&stuff->length, n); - swapl(&stuff->dst, n); - swaps(&stuff->color.red, n); - swaps(&stuff->color.green, n); - swaps(&stuff->color.blue, n); - swaps(&stuff->color.alpha, n); + swaps(&stuff->length); + swapl(&stuff->dst); + swaps(&stuff->color.red); + swaps(&stuff->color.green); + swaps(&stuff->color.blue); + swaps(&stuff->color.alpha); SwapRestS(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2450,73 +2426,68 @@ SProcRenderFillRectangles (ClientPtr client) static int SProcRenderCreateCursor (ClientPtr client) { - register int n; REQUEST(xRenderCreateCursorReq); REQUEST_SIZE_MATCH (xRenderCreateCursorReq); - swaps(&stuff->length, n); - swapl(&stuff->cid, n); - swapl(&stuff->src, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); + swaps(&stuff->length); + swapl(&stuff->cid); + swapl(&stuff->src); + swaps(&stuff->x); + swaps(&stuff->y); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderSetPictureTransform (ClientPtr client) { - register int n; REQUEST(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); - swapl(&stuff->transform.matrix11, n); - swapl(&stuff->transform.matrix12, n); - swapl(&stuff->transform.matrix13, n); - swapl(&stuff->transform.matrix21, n); - swapl(&stuff->transform.matrix22, n); - swapl(&stuff->transform.matrix23, n); - swapl(&stuff->transform.matrix31, n); - swapl(&stuff->transform.matrix32, n); - swapl(&stuff->transform.matrix33, n); + swaps(&stuff->length); + swapl(&stuff->picture); + swapl(&stuff->transform.matrix11); + swapl(&stuff->transform.matrix12); + swapl(&stuff->transform.matrix13); + swapl(&stuff->transform.matrix21); + swapl(&stuff->transform.matrix22); + swapl(&stuff->transform.matrix23); + swapl(&stuff->transform.matrix31); + swapl(&stuff->transform.matrix32); + swapl(&stuff->transform.matrix33); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderQueryFilters (ClientPtr client) { - register int n; REQUEST (xRenderQueryFiltersReq); REQUEST_SIZE_MATCH (xRenderQueryFiltersReq); - swaps(&stuff->length, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->drawable); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderSetPictureFilter (ClientPtr client) { - register int n; REQUEST (xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); - swaps(&stuff->nbytes, n); + swaps(&stuff->length); + swapl(&stuff->picture); + swaps(&stuff->nbytes); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int SProcRenderCreateAnimCursor (ClientPtr client) { - register int n; REQUEST (xRenderCreateAnimCursorReq); REQUEST_AT_LEAST_SIZE (xRenderCreateAnimCursorReq); - swaps(&stuff->length, n); - swapl(&stuff->cid, n); + swaps(&stuff->length); + swapl(&stuff->cid); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2524,14 +2495,13 @@ SProcRenderCreateAnimCursor (ClientPtr client) static int SProcRenderAddTraps (ClientPtr client) { - register int n; REQUEST (xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq); - swaps(&stuff->length, n); - swapl(&stuff->picture, n); - swaps(&stuff->xOff, n); - swaps(&stuff->yOff, n); + swaps(&stuff->length); + swapl(&stuff->picture); + swaps(&stuff->xOff); + swaps(&stuff->yOff); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } @@ -2539,32 +2509,31 @@ SProcRenderAddTraps (ClientPtr client) static int SProcRenderCreateSolidFill(ClientPtr client) { - register int n; REQUEST (xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE (xRenderCreateSolidFillReq); - swaps(&stuff->length, n); - swapl(&stuff->pid, n); - swaps(&stuff->color.alpha, n); - swaps(&stuff->color.red, n); - swaps(&stuff->color.green, n); - swaps(&stuff->color.blue, n); + swaps(&stuff->length); + swapl(&stuff->pid); + swaps(&stuff->color.alpha); + swaps(&stuff->color.red); + swaps(&stuff->color.green); + swaps(&stuff->color.blue); return (*ProcRenderVector[stuff->renderReqType]) (client); } static void swapStops(void *stuff, int num) { - int i, n; + int i; CARD32 *stops; CARD16 *colors; stops = (CARD32 *)(stuff); for (i = 0; i < num; ++i) { - swapl(stops, n); + swapl(stops); ++stops; } colors = (CARD16 *)(stops); for (i = 0; i < 4*num; ++i) { - swaps(colors, n); + swaps(colors); ++colors; } } @@ -2572,18 +2541,17 @@ static void swapStops(void *stuff, int num) static int SProcRenderCreateLinearGradient (ClientPtr client) { - register int n; int len; REQUEST (xRenderCreateLinearGradientReq); REQUEST_AT_LEAST_SIZE (xRenderCreateLinearGradientReq); - swaps(&stuff->length, n); - swapl(&stuff->pid, n); - swapl(&stuff->p1.x, n); - swapl(&stuff->p1.y, n); - swapl(&stuff->p2.x, n); - swapl(&stuff->p2.y, n); - swapl(&stuff->nStops, n); + swaps(&stuff->length); + swapl(&stuff->pid); + swapl(&stuff->p1.x); + swapl(&stuff->p1.y); + swapl(&stuff->p2.x); + swapl(&stuff->p2.y); + swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq); if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor))) @@ -2599,20 +2567,19 @@ SProcRenderCreateLinearGradient (ClientPtr client) static int SProcRenderCreateRadialGradient (ClientPtr client) { - register int n; int len; REQUEST (xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq); - swaps(&stuff->length, n); - swapl(&stuff->pid, n); - swapl(&stuff->inner.x, n); - swapl(&stuff->inner.y, n); - swapl(&stuff->outer.x, n); - swapl(&stuff->outer.y, n); - swapl(&stuff->inner_radius, n); - swapl(&stuff->outer_radius, n); - swapl(&stuff->nStops, n); + swaps(&stuff->length); + swapl(&stuff->pid); + swapl(&stuff->inner.x); + swapl(&stuff->inner.y); + swapl(&stuff->outer.x); + swapl(&stuff->outer.y); + swapl(&stuff->inner_radius); + swapl(&stuff->outer_radius); + swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq); if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor))) @@ -2628,17 +2595,16 @@ SProcRenderCreateRadialGradient (ClientPtr client) static int SProcRenderCreateConicalGradient (ClientPtr client) { - register int n; int len; REQUEST (xRenderCreateConicalGradientReq); REQUEST_AT_LEAST_SIZE (xRenderCreateConicalGradientReq); - swaps(&stuff->length, n); - swapl(&stuff->pid, n); - swapl(&stuff->center.x, n); - swapl(&stuff->center.y, n); - swapl(&stuff->angle, n); - swapl(&stuff->nStops, n); + swaps(&stuff->length); + swapl(&stuff->pid); + swapl(&stuff->center.x); + swapl(&stuff->center.y); + swapl(&stuff->angle); + swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq); if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor))) |