|
From: Dan S. <dds...@us...> - 2007-12-05 16:23:54
|
Update of /cvsroot/javax-usb/javax-usb-ri-linux/jni In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25567/jni Modified Files: JavaxUsbChecks.h JavaxUsbLog.h Log Message: replace __FUNCTION__ with C99 standard __func__ Index: JavaxUsbChecks.h =================================================================== RCS file: /cvsroot/javax-usb/javax-usb-ri-linux/jni/JavaxUsbChecks.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JavaxUsbChecks.h 22 Jan 2003 01:42:04 -0000 1.1 --- JavaxUsbChecks.h 5 Dec 2007 16:23:46 -0000 1.2 *************** *** 19,33 **** /* Non-static checked JNI function wrappers */ ! #define CheckedGetObjectClass(env,object) debugGetObjectClass(__FILE__,__FUNCTION__,__LINE__,env,object,#env","#object) ! #define CheckedGetMethodID(env,class,name,id) debugGetMethodID(__FILE__,__FUNCTION__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedGetFieldID(env,class,name,id) debugGetFieldID(__FILE__,__FUNCTION__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedNewStringUTF(env,string) debugNewStringUTF(__FILE__,__FUNCTION__,__LINE__,env,string,#env","#string) ! #define CheckedNewGlobalRef(env,object) debugNewGlobalRef(__FILE__,__FUNCTION__,__LINE__,env,object,#env","#object) ! #define CheckedDeleteLocalRef(env,object) debugDeleteLocalRef(__FILE__,__FUNCTION__,__LINE__,env,object,#env","#object) ! #define CheckedDeleteGlobalRef(env,object) debugDeleteGlobalRef(__FILE__,__FUNCTION__,__LINE__,env,object,#env","#object) ! #define CheckedGetByteArrayRegion(env,array,offset,length,buffer) debugGetByteArrayRegion(__FILE__,__FUNCTION__,__LINE__,env,array,offset,length,buffer,#env","#array","#offset","#length","#buffer) ! #define CheckedSetByteArrayRegion(env,array,offset,length,buffer) debugSetByteArrayRegion(__FILE__,__FUNCTION__,__LINE__,env,array,offset,length,buffer,#env","#array","#offset","#length","#buffer) ! #define CheckedGetArrayLength(env,array) debugGetArrayLength(__FILE__,__FUNCTION__,__LINE__,env,array,#env","#array) //FIXME - implement --- 19,33 ---- /* Non-static checked JNI function wrappers */ ! #define CheckedGetObjectClass(env,object) debugGetObjectClass(__FILE__,__func__,__LINE__,env,object,#env","#object) ! #define CheckedGetMethodID(env,class,name,id) debugGetMethodID(__FILE__,__func__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedGetFieldID(env,class,name,id) debugGetFieldID(__FILE__,__func__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedNewStringUTF(env,string) debugNewStringUTF(__FILE__,__func__,__LINE__,env,string,#env","#string) ! #define CheckedNewGlobalRef(env,object) debugNewGlobalRef(__FILE__,__func__,__LINE__,env,object,#env","#object) ! #define CheckedDeleteLocalRef(env,object) debugDeleteLocalRef(__FILE__,__func__,__LINE__,env,object,#env","#object) ! #define CheckedDeleteGlobalRef(env,object) debugDeleteGlobalRef(__FILE__,__func__,__LINE__,env,object,#env","#object) ! #define CheckedGetByteArrayRegion(env,array,offset,length,buffer) debugGetByteArrayRegion(__FILE__,__func__,__LINE__,env,array,offset,length,buffer,#env","#array","#offset","#length","#buffer) ! #define CheckedSetByteArrayRegion(env,array,offset,length,buffer) debugSetByteArrayRegion(__FILE__,__func__,__LINE__,env,array,offset,length,buffer,#env","#array","#offset","#length","#buffer) ! #define CheckedGetArrayLength(env,array) debugGetArrayLength(__FILE__,__func__,__LINE__,env,array,#env","#array) //FIXME - implement *************** *** 41,46 **** /* Static checked JNI function wrappers */ ! #define CheckedGetStaticMethodID(env,class,name,id) debugGetStaticMethodID(__FILE__,__FUNCTION__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedGetStaticFieldID(env,class,name,id) debugGetStaticFieldID(__FILE__,__FUNCTION__,__LINE__,env,class,name,id,#env","#class","#name","#id) //FIXME - implement --- 41,46 ---- /* Static checked JNI function wrappers */ ! #define CheckedGetStaticMethodID(env,class,name,id) debugGetStaticMethodID(__FILE__,__func__,__LINE__,env,class,name,id,#env","#class","#name","#id) ! #define CheckedGetStaticFieldID(env,class,name,id) debugGetStaticFieldID(__FILE__,__func__,__LINE__,env,class,name,id,#env","#class","#name","#id) //FIXME - implement *************** *** 70,74 **** } ! static inline void debug_exception( JNIEnv *env, char *file, char *func, int line, char *jnicall, char *args ) { if (JNI_TRUE == (*env)->ExceptionCheck(env)) { --- 70,74 ---- } ! static inline void debug_exception( JNIEnv *env, const char *file, const char *func, int line, char *jnicall, char *args ) { if (JNI_TRUE == (*env)->ExceptionCheck(env)) { *************** *** 79,83 **** } ! static inline jclass debugGetObjectClass( char *file, char *func, int line, JNIEnv *env, jobject object, char *args ) { jclass class = (*env)->GetObjectClass( env, object ); --- 79,83 ---- } ! static inline jclass debugGetObjectClass( const char *file, const char *func, int line, JNIEnv *env, jobject object, char *args ) { jclass class = (*env)->GetObjectClass( env, object ); *************** *** 86,90 **** } ! static inline jmethodID debugGetMethodID( char *file, char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jmethodID method = (*env)->GetMethodID( env, class, name, id ); --- 86,90 ---- } ! static inline jmethodID debugGetMethodID( const char *file, const char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jmethodID method = (*env)->GetMethodID( env, class, name, id ); *************** *** 93,97 **** } ! static inline jfieldID debugGetFieldID( char *file, char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jfieldID field = (*env)->GetFieldID( env, class, name, id ); --- 93,97 ---- } ! static inline jfieldID debugGetFieldID( const char *file, const char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jfieldID field = (*env)->GetFieldID( env, class, name, id ); *************** *** 100,104 **** } ! static inline jstring debugNewStringUTF( char *file, char *func, int line, JNIEnv *env, char *str, char *args ) { jstring string = (*env)->NewStringUTF( env, str ); --- 100,104 ---- } ! static inline jstring debugNewStringUTF( const char *file, const char *func, int line, JNIEnv *env, char *str, char *args ) { jstring string = (*env)->NewStringUTF( env, str ); *************** *** 107,111 **** } ! static inline jobject debugNewGlobalRef( char *file, char *func, int line, JNIEnv *env, jobject object, char *args ) { jobject newObject = (*env)->NewGlobalRef( env , object ); --- 107,111 ---- } ! static inline jobject debugNewGlobalRef( const char *file, const char *func, int line, JNIEnv *env, jobject object, char *args ) { jobject newObject = (*env)->NewGlobalRef( env , object ); *************** *** 114,118 **** } ! static inline void debugDeleteLocalRef( char *file, char *func, int line, JNIEnv *env, jobject object, char *args ) { (*env)->DeleteLocalRef( env, object ); --- 114,118 ---- } ! static inline void debugDeleteLocalRef( const char *file, const char *func, int line, JNIEnv *env, jobject object, char *args ) { (*env)->DeleteLocalRef( env, object ); *************** *** 120,124 **** } ! static inline void debugDeleteGlobalRef( char *file, char *func, int line, JNIEnv *env, jobject object, char *args ) { (*env)->DeleteGlobalRef( env, object ); --- 120,124 ---- } ! static inline void debugDeleteGlobalRef( const char *file, const char *func, int line, JNIEnv *env, jobject object, char *args ) { (*env)->DeleteGlobalRef( env, object ); *************** *** 126,130 **** } ! static inline void debugGetByteArrayRegion( char *file, char *func, int line, JNIEnv *env, jbyteArray array, jsize offset, jsize length, jbyte *buffer, char *args ) { (*env)->GetByteArrayRegion( env, array, offset, length, buffer ); --- 126,130 ---- } ! static inline void debugGetByteArrayRegion( const char *file, const char *func, int line, JNIEnv *env, jbyteArray array, jsize offset, jsize length, jbyte *buffer, char *args ) { (*env)->GetByteArrayRegion( env, array, offset, length, buffer ); *************** *** 132,136 **** } ! static inline void debugSetByteArrayRegion( char *file, char *func, int line, JNIEnv *env, jbyteArray array, jsize offset, jsize length, jbyte *buffer, char *args ) { (*env)->SetByteArrayRegion( env, array, offset, length, buffer ); --- 132,136 ---- } ! static inline void debugSetByteArrayRegion( const char *file, const char *func, int line, JNIEnv *env, jbyteArray array, jsize offset, jsize length, jbyte *buffer, char *args ) { (*env)->SetByteArrayRegion( env, array, offset, length, buffer ); *************** *** 138,142 **** } ! static inline jsize debugGetArrayLength( char *file, char *func, int line, JNIEnv *env, jarray array, char *args ) { jsize size = (*env)->GetArrayLength( env, array ); --- 138,142 ---- } ! static inline jsize debugGetArrayLength( const char *file, const char *func, int line, JNIEnv *env, jarray array, char *args ) { jsize size = (*env)->GetArrayLength( env, array ); *************** *** 145,149 **** } ! static inline jmethodID debugGetStaticMethodID( char *file, char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jmethodID method = (*env)->GetStaticMethodID( env, class, name, id ); --- 145,149 ---- } ! static inline jmethodID debugGetStaticMethodID( const char *file, const char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jmethodID method = (*env)->GetStaticMethodID( env, class, name, id ); *************** *** 152,156 **** } ! static inline jfieldID debugGetStaticFieldID( char *file, char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jfieldID field = (*env)->GetStaticFieldID( env, class, name, id ); --- 152,156 ---- } ! static inline jfieldID debugGetStaticFieldID( const char *file, const char *func, int line, JNIEnv *env, jclass class, char *name, char *id, char *args ) { jfieldID field = (*env)->GetStaticFieldID( env, class, name, id ); Index: JavaxUsbLog.h =================================================================== RCS file: /cvsroot/javax-usb/javax-usb-ri-linux/jni/JavaxUsbLog.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JavaxUsbLog.h 12 May 2005 19:14:52 -0000 1.9 --- JavaxUsbLog.h 5 Dec 2007 16:23:46 -0000 1.10 *************** *** 95,99 **** } \ } \ ! do_log(logname,(LOG_LEVEL_MASK&level),__FILE__,__FUNCTION__,__LINE__,buffer); \ if (buf2) free(buf2); \ } while (0) --- 95,99 ---- } \ } \ ! do_log(logname,(LOG_LEVEL_MASK&level),__FILE__,__func__,__LINE__,buffer); \ if (buf2) free(buf2); \ } while (0) |