From b6fed858708168bdfebe6f37496d7abaff9b7e2b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Jun 2003 20:02:17 +0000 Subject: gcc 3.x preprocessor concatenation fix .. -> MACRO --- CNativeCode/OpenGL_misc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CNativeCode/OpenGL_misc.c b/CNativeCode/OpenGL_misc.c index 1ed0ef2..383a999 100644 --- a/CNativeCode/OpenGL_misc.c +++ b/CNativeCode/OpenGL_misc.c @@ -76,12 +76,12 @@ char libGLUName[800] = #ifdef J_GET_BOOL_FIELD_VAL #undef J_GET_BOOL_FIELD_VAL #endif -#define J_GET_BOOL_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "Z"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ## ATTRIBUTE_NAME = (int) ((*env)->GetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME)); } +#define J_GET_BOOL_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "Z"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ATTRIBUTE_NAME = (int) ((*env)->GetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME)); } #ifdef J_SET_BOOL_FIELD_VAL #undef J_SET_BOOL_FIELD_VAL #endif -#define J_SET_BOOL_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME, (jboolean) glCaps-> ## ATTRIBUTE_NAME); } +#define J_SET_BOOL_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME, (jboolean) glCaps-> ATTRIBUTE_NAME); } #ifdef J_GET_INT_FIELD #undef J_GET_INT_FIELD @@ -91,12 +91,12 @@ char libGLUName[800] = #ifdef J_GET_INT_FIELD_VAL #undef J_GET_INT_FIELD_VAL #endif -#define J_GET_INT_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "I"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ## ATTRIBUTE_NAME = (int) ((*env)->GetIntField(env, capsObj, f ## ATTRIBUTE_NAME)); } +#define J_GET_INT_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "I"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps -> ATTRIBUTE_NAME = (int) ((*env)->GetIntField(env, capsObj, f ## ATTRIBUTE_NAME)); } #ifdef J_SET_INT_FIELD_VAL #undef J_SET_INT_FIELD_VAL #endif -#define J_SET_INT_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetIntField(env, capsObj, f ## ATTRIBUTE_NAME, (jint) glCaps-> ## ATTRIBUTE_NAME); } +#define J_SET_INT_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetIntField(env, capsObj, f ## ATTRIBUTE_NAME, (jint) glCaps-> ATTRIBUTE_NAME); } #ifdef J_GET_LONG_FIELD #undef J_GET_LONG_FIELD @@ -107,12 +107,12 @@ char libGLUName[800] = #ifdef J_GET_LONG_FIELD_VAL #undef J_GET_LONG_FIELD_VAL #endif -#define J_GET_LONG_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "J"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ## ATTRIBUTE_NAME = (long) ((*env)->GetLongField(env, capsObj, f ## ATTRIBUTE_NAME)); } +#define J_GET_LONG_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "J"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ATTRIBUTE_NAME = (long) ((*env)->GetLongField(env, capsObj, f ## ATTRIBUTE_NAME)); } #ifdef J_SET_LONG_FIELD_VAL #undef J_SET_LONG_FIELD_VAL #endif -#define J_SET_LONG_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetLongField(env, capsObj, f ## ATTRIBUTE_NAME, (jlong) glCaps-> ## ATTRIBUTE_NAME); } +#define J_SET_LONG_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetLongField(env, capsObj, f ## ATTRIBUTE_NAME, (jlong) glCaps-> ATTRIBUTE_NAME); } jboolean LIBAPIENTRY javaGLCapabilities2NativeGLCapabilities ( JNIEnv *env, -- cgit v1.2.3