static int ProcXvQueryPortAttributes(ClientPtr client) { int status, size, i; XvPortPtr pPort; XvAttributePtr pAtt; xvQueryPortAttributesReply rep; xvAttributeInfo Info; REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; return status; } rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_attributes = pPort->pAdaptor->nAttributes; rep.text_size = 0; for(i = 0, pAtt = pPort->pAdaptor->pAttributes; i < pPort->pAdaptor->nAttributes; i++, pAtt++) { rep.text_size += pad_to_int32(strlen(pAtt->name) + 1); } rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) + rep.text_size; rep.length >>= 2; _WriteQueryPortAttributesReply(client, &rep); for(i = 0, pAtt = pPort->pAdaptor->pAttributes; i < pPort->pAdaptor->nAttributes; i++, pAtt++) { size = strlen(pAtt->name) + 1; /* pass the NULL */ Info.flags = pAtt->flags; Info.min = pAtt->min_value; Info.max = pAtt->max_value; Info.size = pad_to_int32(size); _WriteAttributeInfo(client, &Info); WriteToClient(client, size, pAtt->name); } return Success; }
int ProcRRSetCrtcTransform (ClientPtr client) { REQUEST(xRRSetCrtcTransformReq); RRCrtcPtr crtc; PictTransform transform; struct pixman_f_transform f_transform, f_inverse; char *filter; int nbytes; xFixed *params; int nparams; REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); PictTransform_from_xRenderTransform (&transform, &stuff->transform); pixman_f_transform_from_pixman_transform (&f_transform, &transform); if (!pixman_f_transform_invert (&f_inverse, &f_transform)) return BadMatch; filter = (char *) (stuff + 1); nbytes = stuff->nbytesFilter; params = (xFixed *) (filter + pad_to_int32(nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; return RRCrtcTransformSet (crtc, &transform, &f_transform, &f_inverse, filter, nbytes, params, nparams); }
/* * @return The number of bytes needed to store this device's classes. */ int SizeDeviceClasses(DeviceIntPtr dev) { int len = 0; if (dev->button) { len += sizeof(xXIButtonInfo); len += dev->button->numButtons * sizeof(Atom); len += pad_to_int32(bits_to_bytes(dev->button->numButtons)); } if (dev->key) { XkbDescPtr xkb = dev->key->xkbInfo->desc; len += sizeof(xXIKeyInfo); len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t); } if (dev->valuator) { int i; len += (sizeof(xXIValuatorInfo)) * dev->valuator->numAxes; for (i = 0; i < dev->valuator->numAxes; i++) { if (dev->valuator->axes[i].scroll.type != SCROLL_TYPE_NONE) len += sizeof(xXIScrollInfo); } } if (dev->touch) len += sizeof(xXITouchInfo); return len; }
static int ProcXvQueryEncodings(ClientPtr client) { xvEncodingInfo einfo; xvQueryEncodingsReply rep; int totalSize; int nameSize; XvPortPtr pPort; int ne; XvEncodingPtr pe; int status; REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; return status; } rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_encodings = pPort->pAdaptor->nEncodings; /* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */ ne = pPort->pAdaptor->nEncodings; pe = pPort->pAdaptor->pEncodings; totalSize = ne * sz_xvEncodingInfo; while (ne--) { totalSize += pad_to_int32(strlen(pe->name)); pe++; } rep.length = bytes_to_int32(totalSize); _WriteQueryEncodingsReply(client, &rep); ne = pPort->pAdaptor->nEncodings; pe = pPort->pAdaptor->pEncodings; while (ne--) { einfo.encoding = pe->id; einfo.name_size = nameSize = strlen(pe->name); einfo.width = pe->width; einfo.height = pe->height; einfo.rate.numerator = pe->rate.numerator; einfo.rate.denominator = pe->rate.denominator; _WriteEncodingInfo(client, &einfo); WriteToClient(client, nameSize, pe->name); pe++; } return Success; }
/** * @return The number of bytes needed to store this device's xXIDeviceInfo * (and its classes). */ static int SizeDeviceInfo(DeviceIntPtr dev) { int len = sizeof(xXIDeviceInfo); /* 4-padded name */ len += pad_to_int32(strlen(dev->name)); return len + SizeDeviceClasses(dev); }
static int transform_filter_length (RRTransformPtr transform) { int nbytes, nparams; if (transform->filter == NULL) return 0; nbytes = strlen (transform->filter->name); nparams = transform->nparams; return pad_to_int32(nbytes) + (nparams * sizeof (xFixed)); }
static int ProcXF86DRIGetDeviceInfo( register ClientPtr client ) { xXF86DRIGetDeviceInfoReply rep; drm_handle_t hFrameBuffer; void *pDevPrivate; REQUEST(xXF86DRIGetDeviceInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDeviceInfoReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (!DRIGetDeviceInfo( screenInfo.screens[stuff->screen], &hFrameBuffer, (int*)&rep.framebufferOrigin, (int*)&rep.framebufferSize, (int*)&rep.framebufferStride, (int*)&rep.devPrivateSize, &pDevPrivate)) { return BadValue; } rep.hFrameBufferLow = (CARD32)(hFrameBuffer & 0xffffffff); #if defined(LONG64) && !defined(__linux__) rep.hFrameBufferHigh = (CARD32)(hFrameBuffer >> 32); #else rep.hFrameBufferHigh = 0; #endif rep.length = 0; if (rep.devPrivateSize) { rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) - SIZEOF(xGenericReply) + pad_to_int32(rep.devPrivateSize)); } WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep); if (rep.length) { WriteToClient(client, rep.devPrivateSize, (char *)pDevPrivate); } return Success; }
static int ProcXF86DRIOpenConnection( register ClientPtr client ) { xXF86DRIOpenConnectionReply rep; drm_handle_t hSAREA; char* busIdString; REQUEST(xXF86DRIOpenConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIOpenConnection( screenInfo.screens[stuff->screen], &hSAREA, &busIdString)) { return BadValue; } rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.busIdStringLength = 0; if (busIdString) rep.busIdStringLength = strlen(busIdString); rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + pad_to_int32(rep.busIdStringLength)); rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff); #if defined(LONG64) && !defined(__linux__) rep.hSAREAHigh = (CARD32)(hSAREA >> 32); #else rep.hSAREAHigh = 0; #endif WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep); if (rep.busIdStringLength) WriteToClient(client, rep.busIdStringLength, busIdString); return Success; }
static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info) { char *any = (char *) &info[1]; int i; /* Skip over name */ any += pad_to_int32(info->name_len); for (i = 0; i < info->num_classes; i++) { int len = ((xXIAnyInfo *) any)->length; switch (((xXIAnyInfo *) any)->type) { case XIButtonClass: SwapButtonInfo(dev, (xXIButtonInfo *) any); break; case XIKeyClass: SwapKeyInfo(dev, (xXIKeyInfo *) any); break; case XIValuatorClass: SwapValuatorInfo(dev, (xXIValuatorInfo *) any); break; case XIScrollClass: SwapScrollInfo(dev, (xXIScrollInfo *) any); break; case XITouchClass: SwapTouchInfo(dev, (xXITouchInfo *) any); break; } any += len * 4; } swaps(&info->deviceid); swaps(&info->use); swaps(&info->attachment); swaps(&info->num_classes); swaps(&info->name_len); }
/** * Write the info for device dev into the buffer pointed to by info. * * @return The number of bytes used. */ static int ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info) { char *any = (char *) &info[1]; int len = 0, total_len = 0; info->deviceid = dev->id; info->use = GetDeviceUse(dev, &info->attachment); info->num_classes = 0; info->name_len = strlen(dev->name); info->enabled = dev->enabled; total_len = sizeof(xXIDeviceInfo); len = pad_to_int32(info->name_len); memset(any, 0, len); strncpy(any, dev->name, info->name_len); any += len; total_len += len; total_len += ListDeviceClasses(client, dev, any, &info->num_classes); return total_len; }
static int ProcXF86DRIGetClientDriverName( register ClientPtr client ) { xXF86DRIGetClientDriverNameReply rep; char* clientDriverName; REQUEST(xXF86DRIGetClientDriverNameReq); REQUEST_SIZE_MATCH(xXF86DRIGetClientDriverNameReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } DRIGetClientDriverName( screenInfo.screens[stuff->screen], (int *)&rep.ddxDriverMajorVersion, (int *)&rep.ddxDriverMinorVersion, (int *)&rep.ddxDriverPatchVersion, &clientDriverName); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.clientDriverNameLength = 0; if (clientDriverName) rep.clientDriverNameLength = strlen(clientDriverName); rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) - SIZEOF(xGenericReply) + pad_to_int32(rep.clientDriverNameLength)); WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep); if (rep.clientDriverNameLength) WriteToClient(client, rep.clientDriverNameLength, clientDriverName); return Success; }
static int _X_COLD SProcRRSetCrtcTransform(ClientPtr client) { int nparams; char *filter; CARD32 *params; REQUEST(xRRSetCrtcTransformReq); REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); swaps(&stuff->length); swapl(&stuff->crtc); SwapLongs((CARD32 *) &stuff->transform, bytes_to_int32(sizeof(xRenderTransform))); swaps(&stuff->nbytesFilter); filter = (char *) (stuff + 1); params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter)); nparams = ((CARD32 *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; SwapLongs(params, nparams); return (*ProcRandrVector[stuff->randrReqType]) (client); }
/* * @return The number of bytes needed to store this device's classes. */ int SizeDeviceClasses(DeviceIntPtr dev) { int len = 0; if (dev->button) { len += sizeof(xXIButtonInfo); len += dev->button->numButtons * sizeof(Atom); len += pad_to_int32(bits_to_bytes(dev->button->numButtons)); } if (dev->key) { XkbDescPtr xkb = dev->key->xkbInfo->desc; len += sizeof(xXIKeyInfo); len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t); } if (dev->valuator) len += sizeof(xXIValuatorInfo) * dev->valuator->numAxes; return len; }
static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in, xXIDeviceChangedEvent *out, BOOL swap) { int i, j; unsigned char *ptr; if (swap) { swaps(&out->sequenceNumber); swapl(&out->length); swaps(&out->evtype); swaps(&out->deviceid); swaps(&out->sourceid); swapl(&out->time); swaps(&out->num_classes); } assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type((InternalEvent*)in)); assert(out->time == in->time); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); ptr = (unsigned char*)&out[1]; for (i = 0; i < out->num_classes; i++) { xXIAnyInfo* any = (xXIAnyInfo*)ptr; if (swap) { swaps(&any->length); swaps(&any->type); swaps(&any->sourceid); } switch(any->type) { case XIButtonClass: { xXIButtonInfo *b = (xXIButtonInfo*)any; Atom *names; if (swap) { swaps(&b->num_buttons); } assert(b->length == bytes_to_int32(sizeof(xXIButtonInfo)) + bytes_to_int32(bits_to_bytes(b->num_buttons)) + b->num_buttons); assert(b->num_buttons == in->buttons.num_buttons); names = (Atom*)((char*)&b[1] + pad_to_int32(bits_to_bytes(b->num_buttons))); for (j = 0; j < b->num_buttons; j++) { if (swap) { swapl(&names[j]); } assert(names[j] == in->buttons.names[j]); } } break; case XIKeyClass: { xXIKeyInfo *k = (xXIKeyInfo*)any; uint32_t *kc; if (swap) { swaps(&k->num_keycodes); } assert(k->length == bytes_to_int32(sizeof(xXIKeyInfo)) + k->num_keycodes); assert(k->num_keycodes == in->keys.max_keycode - in->keys.min_keycode + 1); kc = (uint32_t*)&k[1]; for (j = 0; j < k->num_keycodes; j++) { if (swap) { swapl(&kc[j]); } assert(kc[j] >= in->keys.min_keycode); assert(kc[j] <= in->keys.max_keycode); } } break; case XIValuatorClass: { xXIValuatorInfo *v = (xXIValuatorInfo*)any; assert(v->length == bytes_to_int32(sizeof(xXIValuatorInfo))); } break; case XIScrollClass: { xXIScrollInfo *s = (xXIScrollInfo*)any; assert(s->length == bytes_to_int32(sizeof(xXIScrollInfo))); assert(s->sourceid == in->sourceid); assert(s->number < in->num_valuators); switch(s->type) { case XIScrollTypeVertical: assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_VERTICAL); break; case XIScrollTypeHorizontal: assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_HORIZONTAL); break; } if (s->flags & XIScrollFlagPreferred) assert(in->valuators[s->number].scroll.flags & SCROLL_FLAG_PREFERRED); } default: printf("Invalid class type.\n\n"); assert(1); break; } ptr += any->length * 4; } }
static int ProcXvQueryAdaptors(ClientPtr client) { xvFormat format; xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; int totalSize, na, nf, rc; int nameSize; XvAdaptorPtr pa; XvFormatPtr pf; WindowPtr pWin; ScreenPtr pScreen; XvScreenPtr pxvs; REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); if (!pxvs) { rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_adaptors = 0; rep.length = 0; _WriteQueryAdaptorsReply(client, &rep); return Success; } (* pxvs->ddQueryAdaptors)(pScreen, &pxvs->pAdaptors, &pxvs->nAdaptors); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_adaptors = pxvs->nAdaptors; /* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */ totalSize = pxvs->nAdaptors * sz_xvAdaptorInfo; /* FOR EACH ADPATOR ADD UP THE BYTES FOR ENCODINGS AND FORMATS */ na = pxvs->nAdaptors; pa = pxvs->pAdaptors; while (na--) { totalSize += pad_to_int32(strlen(pa->name)); totalSize += pa->nFormats * sz_xvFormat; pa++; } rep.length = bytes_to_int32(totalSize); _WriteQueryAdaptorsReply(client, &rep); na = pxvs->nAdaptors; pa = pxvs->pAdaptors; while (na--) { ainfo.base_id = pa->base_id; ainfo.num_ports = pa->nPorts; ainfo.type = pa->type; ainfo.name_size = nameSize = strlen(pa->name); ainfo.num_formats = pa->nFormats; _WriteAdaptorInfo(client, &ainfo); WriteToClient(client, nameSize, pa->name); nf = pa->nFormats; pf = pa->pFormats; while (nf--) { format.depth = pf->depth; format.visual = pf->visual; _WriteFormat(client, &format); pf++; } pa++; } return Success; }
static int eventToDeviceChanged(DeviceChangedEvent *dce, xEvent **xi) { xXIDeviceChangedEvent *dcce; int len = sizeof(xXIDeviceChangedEvent); int nkeys; char *ptr; if (dce->buttons.num_buttons) { len += sizeof(xXIButtonInfo); len += dce->buttons.num_buttons * sizeof(Atom); /* button names */ len += pad_to_int32(bits_to_bytes(dce->buttons.num_buttons)); } if (dce->num_valuators) { int i; len += sizeof(xXIValuatorInfo) * dce->num_valuators; for (i = 0; i < dce->num_valuators; i++) if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) len += sizeof(xXIScrollInfo); } nkeys = (dce->keys.max_keycode > 0) ? dce->keys.max_keycode - dce->keys.min_keycode + 1 : 0; if (nkeys > 0) { len += sizeof(xXIKeyInfo); len += sizeof(CARD32) * nkeys; /* keycodes */ } dcce = calloc(1, len); if (!dcce) { ErrorF("[Xi] BadAlloc in SendDeviceChangedEvent.\n"); return BadAlloc; } dcce->type = GenericEvent; dcce->extension = IReqCode; dcce->evtype = XI_DeviceChanged; dcce->time = dce->time; dcce->deviceid = dce->deviceid; dcce->sourceid = dce->sourceid; dcce->reason = (dce->flags & DEVCHANGE_DEVICE_CHANGE) ? XIDeviceChange : XISlaveSwitch; dcce->num_classes = 0; dcce->length = bytes_to_int32(len - sizeof(xEvent)); ptr = (char*)&dcce[1]; if (dce->buttons.num_buttons) { dcce->num_classes++; ptr += appendButtonInfo(dce, (xXIButtonInfo*)ptr); } if (nkeys) { dcce->num_classes++; ptr += appendKeyInfo(dce, (xXIKeyInfo*)ptr); } if (dce->num_valuators) { int i; dcce->num_classes += dce->num_valuators; for (i = 0; i < dce->num_valuators; i++) ptr += appendValuatorInfo(dce, (xXIValuatorInfo*)ptr, i); for (i = 0; i < dce->num_valuators; i++) { if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) { dcce->num_classes++; ptr += appendScrollInfo(dce, (xXIScrollInfo*)ptr, i); } } } *xi = (xEvent*)dcce; return Success; }
static void SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to) { char n; int i, j; xXIAnyInfo *any; *to = *from; memcpy(&to[1], &from[1], from->length * 4); any = (xXIAnyInfo*)&to[1]; for (i = 0; i < to->num_classes; i++) { int length = any->length; switch(any->type) { case KeyClass: { xXIKeyInfo *ki = (xXIKeyInfo*)any; uint32_t *key = (uint32_t*)&ki[1]; for (j = 0; j < ki->num_keycodes; j++, key++) swapl(key, n); swaps(&ki->num_keycodes, n); } break; case ButtonClass: { xXIButtonInfo *bi = (xXIButtonInfo*)any; Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) + pad_to_int32(bits_to_bytes(bi->num_buttons))); for (j = 0; j < bi->num_buttons; j++) swapl(&labels[j], n); swaps(&bi->num_buttons, n); } break; case ValuatorClass: { xXIValuatorInfo* ai = (xXIValuatorInfo*)any; swapl(&ai->label, n); swapl(&ai->min.integral, n); swapl(&ai->min.frac, n); swapl(&ai->max.integral, n); swapl(&ai->max.frac, n); swapl(&ai->resolution, n); swaps(&ai->number, n); } break; } swaps(&any->type, n); swaps(&any->length, n); swaps(&any->sourceid, n); any = (xXIAnyInfo*)((char*)any + length * 4); } swaps(&to->sequenceNumber, n); swapl(&to->length, n); swaps(&to->evtype, n); swaps(&to->deviceid, n); swapl(&to->time, n); swaps(&to->num_classes, n); swaps(&to->sourceid, n); }
static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in, xXIDeviceChangedEvent *out, BOOL swap) { int i, j; unsigned char *ptr; if (swap) { char n; swaps(&out->sequenceNumber, n); swapl(&out->length, n); swaps(&out->evtype, n); swaps(&out->deviceid, n); swaps(&out->sourceid, n); swapl(&out->time, n); swaps(&out->num_classes, n); } assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type((InternalEvent*)in)); assert(out->time == in->time); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); ptr = (unsigned char*)&out[1]; for (i = 0; i < out->num_classes; i++) { xXIAnyInfo* any = (xXIAnyInfo*)ptr; if (swap) { char n; swaps(&any->length, n); swaps(&any->type, n); swaps(&any->sourceid, n); } switch(any->type) { case XIButtonClass: { xXIButtonInfo *b = (xXIButtonInfo*)any; Atom *names; if (swap) { char n; swaps(&b->num_buttons, n); } assert(b->length == bytes_to_int32(sizeof(xXIButtonInfo)) + bytes_to_int32(bits_to_bytes(b->num_buttons)) + b->num_buttons); assert(b->num_buttons == in->buttons.num_buttons); names = (Atom*)((char*)&b[1] + pad_to_int32(bits_to_bytes(b->num_buttons))); for (j = 0; j < b->num_buttons; j++) { if (swap) { char n; swapl(&names[j], n); } assert(names[j] == in->buttons.names[j]); } } break; case XIKeyClass: { xXIKeyInfo *k = (xXIKeyInfo*)any; uint32_t *kc; if (swap) { char n; swaps(&k->num_keycodes, n); } assert(k->length == bytes_to_int32(sizeof(xXIKeyInfo)) + k->num_keycodes); assert(k->num_keycodes == in->keys.max_keycode - in->keys.min_keycode + 1); kc = (uint32_t*)&k[1]; for (j = 0; j < k->num_keycodes; j++) { if (swap) { char n; swapl(&kc[j], n); } assert(kc[j] >= in->keys.min_keycode); assert(kc[j] <= in->keys.max_keycode); } } break; case XIValuatorClass: { xXIValuatorInfo *v = (xXIValuatorInfo*)any; assert(v->length == bytes_to_int32(sizeof(xXIValuatorInfo))); } break; default: printf("Invalid class type.\n\n"); assert(1); break; } ptr += any->length * 4; } }