void * __glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, int opcode, int swapped_version) { const int func_index = get_decode_index(dispatch_info, opcode); return (func_index < 0) ? NULL : (void *) dispatch_info->dispatch_functions[func_index][swapped_version]; }
int __glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, int opcode, __GLXrenderSizeData * data) { if (dispatch_info->size_table != NULL) { const int func_index = get_decode_index(dispatch_info, opcode); if ((func_index >= 0) && (dispatch_info->size_table[func_index][0] != 0)) { const int var_offset = dispatch_info->size_table[func_index][1]; data->bytes = dispatch_info->size_table[func_index][0]; data->varsize = (var_offset != ~0) ? dispatch_info->size_func_table[var_offset] : NULL; return 0; } } return -1; }