diff options
Diffstat (limited to 'nx-X11/programs/Xserver/Xext/xvdisp.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvdisp.c | 406 |
1 files changed, 180 insertions, 226 deletions
diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index e9250427d..905539c0b 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -1349,164 +1349,154 @@ ProcXvListImageFormats(ClientPtr client) static int SProcXvQueryExtension(ClientPtr client) { - register char n; REQUEST(xvQueryExtensionReq); REQUEST_SIZE_MATCH(xvQueryExtensionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcXvQueryExtension(client); } static int SProcXvQueryAdaptors(ClientPtr client) { - register char n; REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); - swaps(&stuff->length, n); - swapl(&stuff->window, n); + swaps(&stuff->length); + swapl(&stuff->window); return ProcXvQueryAdaptors(client); } static int SProcXvQueryEncodings(ClientPtr client) { - register char n; REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvQueryEncodings(client); } static int SProcXvGrabPort(ClientPtr client) { - register char n; REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return ProcXvGrabPort(client); } static int SProcXvUngrabPort(ClientPtr client) { - register char n; REQUEST(xvUngrabPortReq); REQUEST_SIZE_MATCH(xvUngrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return ProcXvUngrabPort(client); } static int SProcXvPutVideo(ClientPtr client) { - register char n; REQUEST(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvPutVideo(client); } static int SProcXvPutStill(ClientPtr client) { - register char n; REQUEST(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvPutStill(client); } static int SProcXvGetVideo(ClientPtr client) { - register char n; REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvGetVideo(client); } static int SProcXvGetStill(ClientPtr client) { - register char n; REQUEST(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvGetStill(client); } static int SProcXvPutImage(ClientPtr client) { - register char n; REQUEST(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->id, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->id); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvPutImage(client); } @@ -1514,26 +1504,25 @@ SProcXvPutImage(ClientPtr client) static int SProcXvShmPutImage(ClientPtr client) { - register char n; REQUEST(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->id, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->offset, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->shmseg); + swapl(&stuff->id); + swapl(&stuff->offset); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvShmPutImage(client); } #endif @@ -1542,108 +1531,101 @@ SProcXvShmPutImage(ClientPtr client) static int SProcXvSelectVideoNotify(ClientPtr client) { - register char n; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->drawable); return ProcXvSelectVideoNotify(client); } static int SProcXvSelectPortNotify(ClientPtr client) { - register char n; REQUEST(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvSelectPortNotify(client); } static int SProcXvStopVideo(ClientPtr client) { - register char n; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); return ProcXvStopVideo(client); } static int SProcXvSetPortAttribute(ClientPtr client) { - register char n; REQUEST(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); + swapl(&stuff->value); return ProcXvSetPortAttribute(client); } static int SProcXvGetPortAttribute(ClientPtr client) { - register char n; REQUEST(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); return ProcXvGetPortAttribute(client); } static int SProcXvQueryBestSize(ClientPtr client) { - register char n; REQUEST(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvQueryBestSize(client); } static int SProcXvQueryPortAttributes(ClientPtr client) { - register char n; REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvQueryPortAttributes(client); } static int SProcXvQueryImageAttributes(ClientPtr client) { - register char n; REQUEST(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->id, n); - swaps(&stuff->width, n); - swaps(&stuff->width, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->id); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvQueryImageAttributes(client); } static int SProcXvListImageFormats(ClientPtr client) { - register char n; REQUEST(xvListImageFormatsReq); REQUEST_SIZE_MATCH(xvListImageFormatsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvListImageFormats(client); } @@ -1653,12 +1635,10 @@ SWriteQueryExtensionReply( ClientPtr client, xvQueryExtensionReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->version, n); - swaps(&rep->revision, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->version); + swaps(&rep->revision); (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); @@ -1670,11 +1650,9 @@ SWriteQueryAdaptorsReply( ClientPtr client, xvQueryAdaptorsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_adaptors, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_adaptors); (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); @@ -1686,11 +1664,9 @@ SWriteQueryEncodingsReply( ClientPtr client, xvQueryEncodingsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_encodings, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_encodings); (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); @@ -1702,12 +1678,10 @@ SWriteAdaptorInfo( ClientPtr client, xvAdaptorInfo *pAdaptor ){ - register char n; - - swapl(&pAdaptor->base_id, n); - swaps(&pAdaptor->name_size, n); - swaps(&pAdaptor->num_ports, n); - swaps(&pAdaptor->num_formats, n); + swapl(&pAdaptor->base_id); + swaps(&pAdaptor->name_size); + swaps(&pAdaptor->num_ports); + swaps(&pAdaptor->num_formats); (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); @@ -1719,14 +1693,12 @@ SWriteEncodingInfo( ClientPtr client, xvEncodingInfo *pEncoding ){ - register char n; - - swapl(&pEncoding->encoding, n); - swaps(&pEncoding->name_size, n); - swaps(&pEncoding->width, n); - swaps(&pEncoding->height, n); - swapl(&pEncoding->rate.numerator, n); - swapl(&pEncoding->rate.denominator, n); + swapl(&pEncoding->encoding); + swaps(&pEncoding->name_size); + swaps(&pEncoding->width); + swaps(&pEncoding->height); + swapl(&pEncoding->rate.numerator); + swapl(&pEncoding->rate.denominator); (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); return Success; @@ -1737,9 +1709,7 @@ SWriteFormat( ClientPtr client, xvFormat *pFormat ){ - register char n; - - swapl(&pFormat->visual, n); + swapl(&pFormat->visual); (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); return Success; @@ -1750,12 +1720,10 @@ SWriteAttributeInfo( ClientPtr client, xvAttributeInfo *pAtt ){ - register char n; - - swapl(&pAtt->flags, n); - swapl(&pAtt->size, n); - swapl(&pAtt->min, n); - swapl(&pAtt->max, n); + swapl(&pAtt->flags); + swapl(&pAtt->size); + swapl(&pAtt->min); + swapl(&pAtt->max); (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); return Success; @@ -1766,21 +1734,19 @@ SWriteImageFormatInfo( ClientPtr client, xvImageFormatInfo *pImage ){ - register char n; - - swapl(&pImage->id, n); - swapl(&pImage->red_mask, n); - swapl(&pImage->green_mask, n); - swapl(&pImage->blue_mask, n); - swapl(&pImage->y_sample_bits, n); - swapl(&pImage->u_sample_bits, n); - swapl(&pImage->v_sample_bits, n); - swapl(&pImage->horz_y_period, n); - swapl(&pImage->horz_u_period, n); - swapl(&pImage->horz_v_period, n); - swapl(&pImage->vert_y_period, n); - swapl(&pImage->vert_u_period, n); - swapl(&pImage->vert_v_period, n); + swapl(&pImage->id); + swapl(&pImage->red_mask); + swapl(&pImage->green_mask); + swapl(&pImage->blue_mask); + swapl(&pImage->y_sample_bits); + swapl(&pImage->u_sample_bits); + swapl(&pImage->v_sample_bits); + swapl(&pImage->horz_y_period); + swapl(&pImage->horz_u_period); + swapl(&pImage->horz_v_period); + swapl(&pImage->vert_y_period); + swapl(&pImage->vert_u_period); + swapl(&pImage->vert_v_period); (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); @@ -1794,10 +1760,8 @@ SWriteGrabPortReply( ClientPtr client, xvGrabPortReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); @@ -1809,11 +1773,9 @@ SWriteGetPortAttributeReply( ClientPtr client, xvGetPortAttributeReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->value, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->value); (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); @@ -1825,12 +1787,10 @@ SWriteQueryBestSizeReply( ClientPtr client, xvQueryBestSizeReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->actual_width, n); - swaps(&rep->actual_height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->actual_width); + swaps(&rep->actual_height); (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); @@ -1842,12 +1802,10 @@ SWriteQueryPortAttributesReply( ClientPtr client, xvQueryPortAttributesReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_attributes, n); - swapl(&rep->text_size, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_attributes); + swapl(&rep->text_size); (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); @@ -1859,14 +1817,12 @@ SWriteQueryImageAttributesReply( ClientPtr client, xvQueryImageAttributesReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_planes, n); - swapl(&rep->data_size, n); - swaps(&rep->width, n); - swaps(&rep->height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_planes); + swapl(&rep->data_size); + swaps(&rep->width); + swaps(&rep->height); (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); @@ -1879,11 +1835,9 @@ SWriteListImageFormatsReply( ClientPtr client, xvListImageFormatsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_formats, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_formats); (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); |