src/glinject/glinject.c
/*
 * Returns NULL if this function isn't overriden, or the function pointer to
 * the proxy function.
 */
Returns NULL if this function isn't overriden, or the function pointer to
the proxy function.
Returns NULL if this function isn ' t overriden or the function pointer to the proxy function .
void* glinject_get_function_override(const char* name) {
#define GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(sym) \
	if (strcmp(#sym, name) == 0) {\
		return &sym;\
	}
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XPending);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XNextEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XPeekEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XWindowEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XCheckWindowEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XMaskEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XCheckMaskEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XCheckTypedEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XCheckTypedWindowEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XIfEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XCheckIfEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(XPeekIfEvent);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXGetProcAddressARB);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXGetProcAddress);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXSwapBuffers);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXDestroyContext);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXDestroyGLXPixmap);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXDestroyPixmap);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXDestroyPbuffer);
	GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL(glXDestroyWindow);
#undef GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL
	return NULL;
}
void * glinject_get_function_override ( const char * name ) { #define GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( sym )  \
	if (strcmp(#sym, name) == 0) {\
		return &sym;\
	} GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XPending ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XNextEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XPeekEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XWindowEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XCheckWindowEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XMaskEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XCheckMaskEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XCheckTypedEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XCheckTypedWindowEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XIfEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XCheckIfEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( XPeekIfEvent ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXGetProcAddressARB ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXGetProcAddress ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXSwapBuffers ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXDestroyContext ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXDestroyGLXPixmap ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXDestroyPixmap ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXDestroyPbuffer ) ; GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL ( glXDestroyWindow ) ; #undef  GLINJECT_FUNCTION_OVERRIDE_CONDITIONAL return NULL ; }
Returns NULL if this function isn't overriden, or the function pointer to
 the proxy function.
Returns NULL if this function isn ' t overriden or the function pointer to the proxy function .