diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:04:36 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:04:36 (GMT) |
commit | f1ba03cea5b82699a984c80bd2deac14fdc8df18 (patch) | |
tree | ebe777c3e0b83f4c4cec9212731da9ebe0a0cfd3 /java/src/jni/h5pFAPLImp.c | |
parent | 10343c197906415388f2a4c8d292e21d25cf7381 (diff) | |
download | hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.zip hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.gz hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.bz2 |
Source formatted
Diffstat (limited to 'java/src/jni/h5pFAPLImp.c')
-rw-r--r-- | java/src/jni/h5pFAPLImp.c | 489 |
1 files changed, 237 insertions, 252 deletions
diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index 9ae8775..bbeddaf 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -42,14 +42,13 @@ extern "C" { * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1driver - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1driver(JNIEnv *env, jclass clss, jlong plist) { hid_t retVal = H5I_INVALID_HID; UNUSED(clss); - if ((retVal = H5Pget_driver((hid_t) plist)) < 0) + if ((retVal = H5Pget_driver((hid_t)plist)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -66,8 +65,7 @@ done: * Signature: (JI)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fclose_1degree - (JNIEnv *env, jclass clss, jlong plist, jint fc_degree) +Java_hdf_hdf5lib_H5_H5Pset_1fclose_1degree(JNIEnv *env, jclass clss, jlong plist, jint fc_degree) { herr_t retVal = FAIL; @@ -86,8 +84,7 @@ done: * Signature: (J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fclose_1degree - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1fclose_1degree(JNIEnv *env, jclass clss, jlong plist) { H5F_close_degree_t degree = H5F_CLOSE_DEFAULT; @@ -106,8 +103,8 @@ done: * Signature: (JJZ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1core - (JNIEnv *env, jclass clss, jlong fapl_id, jlong increment, jboolean backing_store) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1core(JNIEnv *env, jclass clss, jlong fapl_id, jlong increment, + jboolean backing_store) { herr_t retVal = FAIL; @@ -126,13 +123,13 @@ done: * Signature: (J[J[Z)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1core - (JNIEnv *env, jclass clss, jlong fapl_id, jlongArray increment, jbooleanArray backing_store) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1core(JNIEnv *env, jclass clss, jlong fapl_id, jlongArray increment, + jbooleanArray backing_store) { jboolean isCopy; jboolean *backArray = NULL; - jlong *incArray = NULL; - herr_t status = FAIL; + jlong * incArray = NULL; + herr_t status = FAIL; UNUSED(clss); @@ -147,7 +144,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1core { /* Direct cast (size_t *)variable fails on 32-bit environment */ long long inc_temp = *incArray; - size_t inc_t = (size_t) inc_temp; + size_t inc_t = (size_t)inc_temp; if ((status = H5Pget_fapl_core((hid_t)fapl_id, &inc_t, (hbool_t *)backArray)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -178,16 +175,16 @@ done: * Signature: (JJJJ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1direct - (JNIEnv *env, jclass clss, jlong fapl_id, jlong alignment, - jlong block_size, jlong cbuf_size) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1direct(JNIEnv *env, jclass clss, jlong fapl_id, jlong alignment, + jlong block_size, jlong cbuf_size) { herr_t retVal = FAIL; UNUSED(clss); #ifdef H5_HAVE_DIRECT - if ((retVal = H5Pset_fapl_direct((hid_t)fapl_id, (size_t)alignment, (size_t)block_size, (size_t)cbuf_size)) < 0) + if ((retVal = H5Pset_fapl_direct((hid_t)fapl_id, (size_t)alignment, (size_t)block_size, + (size_t)cbuf_size)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -208,18 +205,17 @@ done: * Signature: (J[J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1direct - (JNIEnv *env, jclass clss, jlong fapl_id, jlongArray info) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1direct(JNIEnv *env, jclass clss, jlong fapl_id, jlongArray info) { #ifdef H5_HAVE_DIRECT - jboolean isCopy; - jlong *theArray = NULL; - size_t alignment = 0; - size_t block_size = 0; - size_t cbuf_size = 0; - jsize arrLen; + jboolean isCopy; + jlong * theArray = NULL; + size_t alignment = 0; + size_t block_size = 0; + size_t cbuf_size = 0; + jsize arrLen; #endif - herr_t retVal = FAIL; + herr_t retVal = FAIL; UNUSED(clss); @@ -261,10 +257,10 @@ done: * Signature: (JJJ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1family - (JNIEnv *env, jclass clss, jlong plist, jlong memb_size, jlong memb_plist) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1family(JNIEnv *env, jclass clss, jlong plist, jlong memb_size, + jlong memb_plist) { - long ms = (long)memb_size; + long ms = (long)memb_size; herr_t retVal = FAIL; UNUSED(clss); @@ -282,16 +278,16 @@ done: * Signature: (J[J[J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1family - (JNIEnv *env, jclass clss, jlong tid, jlongArray memb_size, jlongArray memb_plist) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1family(JNIEnv *env, jclass clss, jlong tid, jlongArray memb_size, + jlongArray memb_plist) { - jboolean isCopy; - hsize_t *sa = NULL; - size_t i; - jlong *sizeArray = NULL; - jlong *plistArray = NULL; - jsize rank; - herr_t status = FAIL; + jboolean isCopy; + hsize_t *sa = NULL; + size_t i; + jlong * sizeArray = NULL; + jlong * plistArray = NULL; + jsize rank; + herr_t status = FAIL; UNUSED(clss); @@ -307,7 +303,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1family H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pget_family: memb_size array length < 0"); } - if (NULL == (sa = (hsize_t *) HDmalloc((size_t) rank * sizeof(hsize_t)))) + if (NULL == (sa = (hsize_t *)HDmalloc((size_t)rank * sizeof(hsize_t)))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_family: memory allocation failed"); PIN_LONG_ARRAY(ENVONLY, memb_plist, plistArray, &isCopy, "H5Pget_family: plistArray not pinned"); @@ -315,7 +311,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1family if ((status = H5Pget_fapl_family((hid_t)tid, sa, (hid_t *)plistArray)) < 0) H5_LIBRARY_ERROR(ENVONLY); - for (i = 0; i < (size_t) rank; i++) + for (i = 0; i < (size_t)rank; i++) sizeArray[i] = (jlong)sa[i]; done: @@ -335,8 +331,7 @@ done: * Signature: (JJ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1family_1offset - (JNIEnv *env, jclass clss, jlong fapl_id, jlong offset) +Java_hdf_hdf5lib_H5_H5Pset_1family_1offset(JNIEnv *env, jclass clss, jlong fapl_id, jlong offset) { herr_t retVal = FAIL; @@ -355,8 +350,7 @@ done: * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1family_1offset - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pget_1family_1offset(JNIEnv *env, jclass clss, jlong fapl_id) { hsize_t offset = 0; herr_t retVal = FAIL; @@ -375,8 +369,7 @@ done: * Signature: (J)Lhdf/hdf5lib/structs/H5FD_hdfs_fapl_t; */ JNIEXPORT jobject JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs(JNIEnv *env, jclass clss, jlong fapl_id) { #ifdef H5_HAVE_LIBHDFS H5FD_hdfs_fapl_t fa; @@ -387,7 +380,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs jstring j_kerb_cache_path = NULL; jint j_stream_buffer_size = 0; #endif /* H5_HAVE_LIBHDFS */ - jobject ret_obj = NULL; + jobject ret_obj = NULL; UNUSED(clss); @@ -397,7 +390,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string"); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, + "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string"); } args[0].l = j_namenode_name; @@ -411,13 +405,15 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string"); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, + "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string"); } args[3].l = j_kerb_cache_path; args[4].i = (jint)fa.stream_buffer_size; - CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_hdfs_fapl_t", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;I)V", args, ret_obj); + CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_hdfs_fapl_t", + "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;I)V", args, ret_obj); #else UNUSED(fapl_id); @@ -434,15 +430,14 @@ done: * Signature: (JLhdf/hdf5lib/structs/H5FD_hdfs_fapl_t;)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1hdfs - (JNIEnv *env, jclass clss, jlong fapl_id, jobject fapl_config) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1hdfs(JNIEnv *env, jclass clss, jlong fapl_id, jobject fapl_config) { #ifdef H5_HAVE_LIBHDFS - H5FD_hdfs_fapl_t instance; - const char *str = NULL; - jfieldID fid; - jstring j_str; - jclass cls; + H5FD_hdfs_fapl_t instance; + const char * str = NULL; + jfieldID fid; + jstring j_str; + jclass cls; #endif /* H5_HAVE_LIBHDFS */ UNUSED(clss); @@ -508,7 +503,8 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1hdfs CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (j_str) { - PIN_JAVA_STRING(ENVONLY, j_str, str, NULL, "H5FDset_fapl_hdfs: fapl_config kerberos_ticket_cache not pinned"); + PIN_JAVA_STRING(ENVONLY, j_str, str, NULL, + "H5FDset_fapl_hdfs: fapl_config kerberos_ticket_cache not pinned"); HDstrncpy(instance.kerberos_ticket_cache, str, H5FD__HDFS_KERB_CACHE_PATH_SPACE + 1); instance.kerberos_ticket_cache[H5FD__HDFS_KERB_CACHE_PATH_SPACE] = '\0'; @@ -526,7 +522,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1hdfs CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (H5Pset_fapl_hdfs((hid_t)fapl_id, &instance) < 0) - H5_LIBRARY_ERROR(ENVONLY); + H5_LIBRARY_ERROR(ENVONLY); #else UNUSED(fapl_id); UNUSED(fapl_config); @@ -548,11 +544,11 @@ done: * Signature: (JLjava/lang/String;JJ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1log - (JNIEnv *env, jclass clss, jlong fapl_id, jstring logfile, jlong flags, jlong buf_size) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1log(JNIEnv *env, jclass clss, jlong fapl_id, jstring logfile, jlong flags, + jlong buf_size) { const char *pLogfile = NULL; - herr_t retVal = FAIL; + herr_t retVal = FAIL; UNUSED(clss); @@ -591,24 +587,24 @@ done: * Signature: (J[I[J[Ljava/lang/String;[JZ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi - (JNIEnv *env, jclass clss, jlong tid, jintArray memb_map, - jlongArray memb_fapl, jobjectArray memb_name, jlongArray memb_addr, jboolean relax) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi(JNIEnv *env, jclass clss, jlong tid, jintArray memb_map, + jlongArray memb_fapl, jobjectArray memb_name, jlongArray memb_addr, + jboolean relax) { - const char * const *mName = NULL; - const char *utf8 = NULL; - jboolean isCopy; - jboolean bb; - jobject o; - jstring rstring; - jstring obj; - jclass Sjc; - size_t i; - jlong *thefaplArray = NULL; - jlong *theaddrArray = NULL; - jint *themapArray = NULL; - char *member_name[H5FD_MEM_NTYPES]; - herr_t status = FAIL; + const char *const *mName = NULL; + const char * utf8 = NULL; + jboolean isCopy; + jboolean bb; + jobject o; + jstring rstring; + jstring obj; + jclass Sjc; + size_t i; + jlong * thefaplArray = NULL; + jlong * theaddrArray = NULL; + jint * themapArray = NULL; + char * member_name[H5FD_MEM_NTYPES]; + herr_t status = FAIL; UNUSED(clss); @@ -625,7 +621,8 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi for (i = 0; i < H5FD_MEM_NTYPES; i++) { size_t str_len; - if (NULL == (obj = (jstring) ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray) memb_name, (jsize) i))) { + if (NULL == + (obj = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)memb_name, (jsize)i))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); /* @@ -644,7 +641,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi str_len = HDstrlen(utf8); - if (NULL == (member_name[i] = (char *) HDmalloc(str_len + 1))) + if (NULL == (member_name[i] = (char *)HDmalloc(str_len + 1))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pset_fapl_multi: memory allocation failed"); HDstrncpy(member_name[i], utf8, str_len + 1); @@ -656,11 +653,11 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi ENVPTR->DeleteLocalRef(ENVONLY, obj); } - mName = (const char * const *)member_name; + mName = (const char *const *)member_name; } if ((status = H5Pset_fapl_multi((hid_t)tid, (const H5FD_mem_t *)themapArray, (const hid_t *)thefaplArray, - mName, (const haddr_t *)theaddrArray, (hbool_t)relax)) < 0) + mName, (const haddr_t *)theaddrArray, (hbool_t)relax)) < 0) H5_LIBRARY_ERROR(ENVONLY); if (memb_name && mName) { @@ -668,14 +665,17 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); for (i = 0; i < H5FD_MEM_NTYPES; i++) { - if (!member_name[i]) continue; + if (!member_name[i]) + continue; if (NULL == (rstring = ENVPTR->NewStringUTF(ENVONLY, member_name[i]))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pset_fapl_multi: out of memory - unable to construct string from UTF characters"); + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, + "H5Pset_fapl_multi: out of memory - unable to construct string from UTF characters"); } - if (NULL == (o = ENVPTR->GetObjectArrayElement(ENVONLY, memb_name, (jsize) i))) { + if (NULL == (o = ENVPTR->GetObjectArrayElement(ENVONLY, memb_name, (jsize)i))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); /* @@ -686,7 +686,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi } if (JNI_TRUE == (bb = ENVPTR->IsInstanceOf(ENVONLY, o, Sjc))) { - ENVPTR->SetObjectArrayElement(ENVONLY, memb_name, (jsize) i, (jobject)rstring); + ENVPTR->SetObjectArrayElement(ENVONLY, memb_name, (jsize)i, (jobject)rstring); CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); } @@ -719,20 +719,19 @@ done: * Signature: (J[I[J[Ljava/lang/String;[J)Z */ JNIEXPORT jboolean JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1multi - (JNIEnv *env, jclass clss, jlong tid, jintArray memb_map, - jlongArray memb_fapl, jobjectArray memb_name, jlongArray memb_addr) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1multi(JNIEnv *env, jclass clss, jlong tid, jintArray memb_map, + jlongArray memb_fapl, jobjectArray memb_name, jlongArray memb_addr) { - jboolean isCopy; - jstring str; - herr_t status = FAIL; - size_t i; - jlong *thefaplArray = NULL; - jlong *theaddrArray = NULL; - jint *themapArray = NULL; - char **mName = NULL; - int relax = 0; - int retVal = 0; + jboolean isCopy; + jstring str; + herr_t status = FAIL; + size_t i; + jlong * thefaplArray = NULL; + jlong * theaddrArray = NULL; + jint * themapArray = NULL; + char ** mName = NULL; + int relax = 0; + int retVal = 0; UNUSED(clss); @@ -743,11 +742,11 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1multi if (memb_addr) PIN_LONG_ARRAY(ENVONLY, memb_addr, theaddrArray, &isCopy, "H5Pget_fapl_multi: memb_addr not pinned"); if (memb_name) - if (NULL == (mName = (char **) HDcalloc(H5FD_MEM_NTYPES, sizeof(*mName)))) + if (NULL == (mName = (char **)HDcalloc(H5FD_MEM_NTYPES, sizeof(*mName)))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_multi: memory allocation failed"); - if ((status = H5Pget_fapl_multi((hid_t)tid, (H5FD_mem_t *)themapArray, (hid_t *)thefaplArray, - mName, (haddr_t *)theaddrArray, (hbool_t *)&relax)) < 0) + if ((status = H5Pget_fapl_multi((hid_t)tid, (H5FD_mem_t *)themapArray, (hid_t *)thefaplArray, mName, + (haddr_t *)theaddrArray, (hbool_t *)&relax)) < 0) H5_LIBRARY_ERROR(ENVONLY); if (memb_name && mName) { @@ -755,10 +754,12 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1multi if (mName[i]) { if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, mName[i]))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_multi: out of memory - unable to construct string from UTF characters"); + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, + "H5Pget_fapl_multi: out of memory - unable to construct string from UTF characters"); } - ENVPTR->SetObjectArrayElement(ENVONLY, memb_name, (jsize) i, (jobject)str); + ENVPTR->SetObjectArrayElement(ENVONLY, memb_name, (jsize)i, (jobject)str); CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); ENVPTR->DeleteLocalRef(ENVONLY, str); @@ -794,17 +795,16 @@ done: * Signature: (J)Lhdf/hdf5lib/structs/H5FD_ros3_fapl_t; */ JNIEXPORT jobject JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3(JNIEnv *env, jclass clss, jlong fapl_id) { #ifdef H5_HAVE_ROS3_VFD H5FD_ros3_fapl_t fa; jvalue args[3]; - jstring j_aws = NULL; - jstring j_id = NULL; - jstring j_key = NULL; + jstring j_aws = NULL; + jstring j_id = NULL; + jstring j_key = NULL; #endif /* H5_HAVE_ROS3_VFD */ - jobject ret_obj = NULL; + jobject ret_obj = NULL; UNUSED(clss); @@ -832,7 +832,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 } args[2].l = j_key; - CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_ros3_fapl_t", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args, ret_obj); + CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_ros3_fapl_t", + "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args, ret_obj); #else UNUSED(fapl_id); @@ -849,15 +850,14 @@ done: * Signature: (JLhdf/hdf5lib/structs/H5FD_ros3_fapl_t;)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1ros3 - (JNIEnv *env, jclass clss, jlong fapl_id, jobject fapl_config) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1ros3(JNIEnv *env, jclass clss, jlong fapl_id, jobject fapl_config) { #ifdef H5_HAVE_ROS3_VFD - H5FD_ros3_fapl_t instance; - const char *str = NULL; - jfieldID fid; - jstring j_str; - jclass cls; + H5FD_ros3_fapl_t instance; + const char * str = NULL; + jfieldID fid; + jstring j_str; + jclass cls; #endif /* H5_HAVE_ROS3_VFD */ UNUSED(clss); @@ -928,7 +928,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1ros3 else HDmemset(instance.secret_key, 0, H5FD_ROS3_MAX_SECRET_KEY_LEN + 1); - if (instance.aws_region[0] != '\0' && instance.secret_id[0] !='\0' && instance.secret_key[0] !='\0') + if (instance.aws_region[0] != '\0' && instance.secret_id[0] != '\0' && instance.secret_key[0] != '\0') instance.authenticate = TRUE; if (H5Pset_fapl_ros3((hid_t)fapl_id, &instance) < 0) @@ -954,11 +954,11 @@ done: * Signature: (JLjava/lang/String;JLjava/lang/String;J)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1split - (JNIEnv *env, jclass clss, jlong fapl_id, jstring metaext, jlong meta_pl_id, jstring rawext, jlong raw_pl_id) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1split(JNIEnv *env, jclass clss, jlong fapl_id, jstring metaext, + jlong meta_pl_id, jstring rawext, jlong raw_pl_id) { - const char *mstr = NULL; - const char *rstr = NULL; + const char *mstr = NULL; + const char *rstr = NULL; herr_t retVal = FAIL; UNUSED(clss); @@ -987,14 +987,13 @@ done: * Signature: (J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1sec2 - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1sec2(JNIEnv *env, jclass clss, jlong fapl_id) { herr_t retVal = FAIL; UNUSED(clss); - if ((retVal = H5Pset_fapl_sec2((hid_t) fapl_id)) < 0) + if ((retVal = H5Pset_fapl_sec2((hid_t)fapl_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1007,14 +1006,13 @@ done: * Signature: (J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1stdio - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1stdio(JNIEnv *env, jclass clss, jlong fapl_id) { herr_t retVal = FAIL; UNUSED(clss); - if ((retVal = H5Pset_fapl_stdio((hid_t) fapl_id)) < 0) + if ((retVal = H5Pset_fapl_stdio((hid_t)fapl_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1027,15 +1025,14 @@ done: * Signature: (J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1fapl_1windows - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pset_1fapl_1windows(JNIEnv *env, jclass clss, jlong fapl_id) { herr_t retVal = FAIL; UNUSED(clss); #ifdef H5_HAVE_WINDOWS - if ((retVal = H5Pset_fapl_windows((hid_t) fapl_id)) < 0) + if ((retVal = H5Pset_fapl_windows((hid_t)fapl_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1068,8 +1065,7 @@ done: * Signature: (JJ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1meta_1block_1size - (JNIEnv *env, jclass clss, jlong plist, jlong size) +Java_hdf_hdf5lib_H5_H5Pset_1meta_1block_1size(JNIEnv *env, jclass clss, jlong plist, jlong size) { long sz = (long)size; @@ -1088,8 +1084,7 @@ done: * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1meta_1block_1size - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1meta_1block_1size(JNIEnv *env, jclass clss, jlong plist) { hsize_t s = 0; @@ -1116,8 +1111,7 @@ done: * Signature: (JJ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1sieve_1buf_1size - (JNIEnv *env, jclass clss, jlong plist, jlong size) +Java_hdf_hdf5lib_H5_H5Pset_1sieve_1buf_1size(JNIEnv *env, jclass clss, jlong plist, jlong size) { size_t sz = (size_t)size; @@ -1136,8 +1130,7 @@ done: * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1sieve_1buf_1size - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1sieve_1buf_1size(JNIEnv *env, jclass clss, jlong plist) { size_t s = 0; @@ -1156,11 +1149,10 @@ done: * Signature: (JJJ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1alignment - (JNIEnv *env, jclass clss, jlong plist, jlong threshold, jlong alignment) +Java_hdf_hdf5lib_H5_H5Pset_1alignment(JNIEnv *env, jclass clss, jlong plist, jlong threshold, jlong alignment) { - long thr = (long)threshold; - long align = (long)alignment; + long thr = (long)threshold; + long align = (long)alignment; herr_t retVal = FAIL; UNUSED(clss); @@ -1178,15 +1170,14 @@ done: * Signature: (J[J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1alignment - (JNIEnv *env, jclass clss, jlong plist, jlongArray alignment) +Java_hdf_hdf5lib_H5_H5Pget_1alignment(JNIEnv *env, jclass clss, jlong plist, jlongArray alignment) { - jboolean isCopy; - hsize_t t = 0; - hsize_t a = 0; - jsize arrLen; - jlong *theArray = NULL; - herr_t status = FAIL; + jboolean isCopy; + hsize_t t = 0; + hsize_t a = 0; + jsize arrLen; + jlong * theArray = NULL; + herr_t status = FAIL; UNUSED(clss); @@ -1221,16 +1212,15 @@ done: * Signature: (JIJJD)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1cache - (JNIEnv *env, jclass clss, jlong plist, jint mdc_nelmts, jlong rdcc_nelmts, - jlong rdcc_nbytes, jdouble rdcc_w0) +Java_hdf_hdf5lib_H5_H5Pset_1cache(JNIEnv *env, jclass clss, jlong plist, jint mdc_nelmts, jlong rdcc_nelmts, + jlong rdcc_nbytes, jdouble rdcc_w0) { herr_t retVal = FAIL; UNUSED(clss); - if ((retVal = H5Pset_cache((hid_t)plist, (int)mdc_nelmts, (size_t)rdcc_nelmts, - (size_t)rdcc_nbytes, (double) rdcc_w0)) < 0) + if ((retVal = H5Pset_cache((hid_t)plist, (int)mdc_nelmts, (size_t)rdcc_nelmts, (size_t)rdcc_nbytes, + (double)rdcc_w0)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1243,15 +1233,14 @@ done: * Signature: (J[I[J[J[D)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1cache - (JNIEnv *env, jclass clss, jlong plist, jintArray mdc_nelmts, - jlongArray rdcc_nelmts, jlongArray rdcc_nbytes, jdoubleArray rdcc_w0) +Java_hdf_hdf5lib_H5_H5Pget_1cache(JNIEnv *env, jclass clss, jlong plist, jintArray mdc_nelmts, + jlongArray rdcc_nelmts, jlongArray rdcc_nbytes, jdoubleArray rdcc_w0) { - jboolean isCopy; - jdouble *w0Array = NULL; - jlong *rdcc_nelmtsArray = NULL; - jlong *nbytesArray = NULL; - herr_t status = FAIL; + jboolean isCopy; + jdouble *w0Array = NULL; + jlong * rdcc_nelmtsArray = NULL; + jlong * nbytesArray = NULL; + herr_t status = FAIL; UNUSED(clss); UNUSED(mdc_nelmts); @@ -1259,23 +1248,25 @@ Java_hdf_hdf5lib_H5_H5Pget_1cache if (NULL != rdcc_w0) PIN_DOUBLE_ARRAY(ENVONLY, rdcc_w0, w0Array, &isCopy, "H5Pget_cache: rdcc_w0 array not pinned"); if (NULL != rdcc_nelmts) - PIN_LONG_ARRAY(ENVONLY, rdcc_nelmts, rdcc_nelmtsArray, &isCopy, "H5Pget_cache: rdcc_nelmts array not pinned"); + PIN_LONG_ARRAY(ENVONLY, rdcc_nelmts, rdcc_nelmtsArray, &isCopy, + "H5Pget_cache: rdcc_nelmts array not pinned"); if (NULL != rdcc_nbytes) - PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy, "H5Pget_cache: nbytesArray array not pinned"); + PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy, + "H5Pget_cache: nbytesArray array not pinned"); { /* direct cast (size_t *)variable fails on 32-bit environment */ long long rdcc_nelmts_temp = *rdcc_nelmtsArray; - long long nbytes_temp = *nbytesArray; - size_t rdcc_nelmts_t = (size_t) rdcc_nelmts_temp; - size_t nbytes_t = (size_t) nbytes_temp; + long long nbytes_temp = *nbytesArray; + size_t rdcc_nelmts_t = (size_t)rdcc_nelmts_temp; + size_t nbytes_t = (size_t)nbytes_temp; - if ((status = H5Pget_cache((hid_t)plist, (int *)NULL, &rdcc_nelmts_t, - &nbytes_t, (double *)w0Array)) < 0) + if ((status = H5Pget_cache((hid_t)plist, (int *)NULL, &rdcc_nelmts_t, &nbytes_t, (double *)w0Array)) < + 0) H5_LIBRARY_ERROR(ENVONLY); *rdcc_nelmtsArray = (jlong)rdcc_nelmts_t; - *nbytesArray = (jlong)nbytes_t; + *nbytesArray = (jlong)nbytes_t; } /* end direct cast special */ done: @@ -1295,8 +1286,7 @@ done: * Signature: (JI)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1elink_1file_1cache_1size - (JNIEnv *env, jclass clss, jlong plist, jint size) +Java_hdf_hdf5lib_H5_H5Pset_1elink_1file_1cache_1size(JNIEnv *env, jclass clss, jlong plist, jint size) { unsigned sz = (unsigned)size; @@ -1315,8 +1305,7 @@ done: * Signature: (J)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1elink_1file_1cache_1size - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1elink_1file_1cache_1size(JNIEnv *env, jclass clss, jlong plist) { unsigned s = 0; @@ -1335,11 +1324,10 @@ done: * Signature: (JZ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1evict_1on_1close - (JNIEnv *env, jclass clss, jlong fapl_id, jboolean evict_on_close) +Java_hdf_hdf5lib_H5_H5Pset_1evict_1on_1close(JNIEnv *env, jclass clss, jlong fapl_id, jboolean evict_on_close) { hbool_t evict_on_close_val = FALSE; - herr_t retVal = FAIL; + herr_t retVal = FAIL; UNUSED(clss); @@ -1358,11 +1346,10 @@ done: * Signature: (J)Z */ JNIEXPORT jboolean JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1evict_1on_1close - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pget_1evict_1on_1close(JNIEnv *env, jclass clss, jlong fapl_id) { hbool_t evict_on_close_val = FALSE; - jboolean bval = JNI_FALSE; + jboolean bval = JNI_FALSE; UNUSED(clss); @@ -1381,8 +1368,7 @@ done: * Signature: (JJ)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts - (JNIEnv *env, jclass clss, jlong plist_id, jlong attempts) +Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts(JNIEnv *env, jclass clss, jlong plist_id, jlong attempts) { UNUSED(clss); @@ -1402,8 +1388,7 @@ done: * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts - (JNIEnv *env, jclass clss, jlong plist_id) +Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts(JNIEnv *env, jclass clss, jlong plist_id) { unsigned attempts = 0; @@ -1413,7 +1398,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts H5_LIBRARY_ERROR(ENVONLY); done: - return (jlong) attempts; + return (jlong)attempts; } /* end Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts */ /* @@ -1422,18 +1407,17 @@ done: * Signature: (JLhdf/hdf5lib/structs/H5AC_cache_config_t;)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config - (JNIEnv *env, jclass clss, jlong plist, jobject cache_config) +Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config(JNIEnv *env, jclass clss, jlong plist, jobject cache_config) { - H5AC_cache_config_t cacheinfo; - const char *str = NULL; - jfieldID fid; - jstring j_str; - jclass cls; - jint flash_incr_mode; - jint incr_mode; - jint decr_mode; - herr_t status = FAIL; + H5AC_cache_config_t cacheinfo; + const char * str = NULL; + jfieldID fid; + jstring j_str; + jclass cls; + jint flash_incr_mode; + jint incr_mode; + jint decr_mode; + herr_t status = FAIL; UNUSED(clss); @@ -1531,7 +1515,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config incr_mode = ENVPTR->GetIntField(ENVONLY, cache_config, fid); /*(enum H5C_cache_incr_mode) */ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - cacheinfo.incr_mode = (enum H5C_cache_incr_mode) incr_mode; + cacheinfo.incr_mode = (enum H5C_cache_incr_mode)incr_mode; if (NULL == (fid = ENVPTR->GetFieldID(ENVONLY, cls, "lower_hr_threshold", "D"))) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); @@ -1562,7 +1546,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config flash_incr_mode = ENVPTR->GetIntField(ENVONLY, cache_config, fid); /*(enum H5C_cache_flash_incr_mode) */ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - cacheinfo.flash_incr_mode = (enum H5C_cache_flash_incr_mode) flash_incr_mode; + cacheinfo.flash_incr_mode = (enum H5C_cache_flash_incr_mode)flash_incr_mode; if (NULL == (fid = ENVPTR->GetFieldID(ENVONLY, cls, "flash_multiple", "D"))) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); @@ -1581,7 +1565,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config decr_mode = ENVPTR->GetIntField(ENVONLY, cache_config, fid); /*(enum H5C_cache_decr_mode) */ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - cacheinfo.decr_mode = (enum H5C_cache_decr_mode) decr_mode; + cacheinfo.decr_mode = (enum H5C_cache_decr_mode)decr_mode; if (NULL == (fid = ENVPTR->GetFieldID(ENVONLY, cls, "upper_hr_threshold", "D"))) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); @@ -1651,13 +1635,12 @@ done: * Signature: (J)Lhdf/hdf5lib/structs/H5AC_cache_config_t; */ JNIEXPORT jobject JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config(JNIEnv *env, jclass clss, jlong plist) { H5AC_cache_config_t cacheinfo; jstring j_str = NULL; jvalue args[30]; - herr_t status = FAIL; + herr_t status = FAIL; jobject ret_obj = NULL; UNUSED(clss); @@ -1675,15 +1658,16 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters"); + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters"); } - args[4].l = j_str; - args[5].z = cacheinfo.evictions_enabled; - args[6].z = cacheinfo.set_initial_size; - args[7].j = (jlong)cacheinfo.initial_size; - args[8].d = cacheinfo.min_clean_fraction; - args[9].j = (jlong)cacheinfo.max_size; + args[4].l = j_str; + args[5].z = cacheinfo.evictions_enabled; + args[6].z = cacheinfo.set_initial_size; + args[7].j = (jlong)cacheinfo.initial_size; + args[8].d = cacheinfo.min_clean_fraction; + args[9].j = (jlong)cacheinfo.max_size; args[10].j = (jlong)cacheinfo.min_size; args[11].j = cacheinfo.epoch_length; args[12].i = cacheinfo.incr_mode; @@ -1705,7 +1689,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config args[28].j = (jlong)cacheinfo.dirty_bytes_threshold; args[29].i = cacheinfo.metadata_write_strategy; - CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5AC_cache_config_t", "(IZZZLjava/lang/String;ZZJDJJJIDDZJIDDIDDZJIZDJI)V", args, ret_obj); + CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5AC_cache_config_t", + "(IZZZLjava/lang/String;ZZJDJJJIDDZJIDDIDDZJIZDJI)V", args, ret_obj); done: return ret_obj; @@ -1725,8 +1710,8 @@ done: * Signature: (JZLjava/lang/String;Z)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options - (JNIEnv *env, jclass clss, jlong fapl_id, jboolean is_enabled, jstring location, jboolean start_on_access) +Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options(JNIEnv *env, jclass clss, jlong fapl_id, jboolean is_enabled, + jstring location, jboolean start_on_access) { const char *locStr = NULL; herr_t retVal = FAIL; @@ -1738,7 +1723,8 @@ Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options PIN_JAVA_STRING(ENVONLY, location, locStr, NULL, "H5Pset_mdc_log_options: location string not pinned"); - if ((retVal = H5Pset_mdc_log_options((hid_t)fapl_id, (hbool_t)is_enabled, locStr, (hbool_t)start_on_access)) < 0) + if ((retVal = H5Pset_mdc_log_options((hid_t)fapl_id, (hbool_t)is_enabled, locStr, + (hbool_t)start_on_access)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1752,18 +1738,18 @@ done: * Signature: (J[Z)Ljava/lang/String; */ JNIEXPORT jstring JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options - (JNIEnv *env, jclass clss, jlong fapl_id, jbooleanArray mdc_log_options) +Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options(JNIEnv *env, jclass clss, jlong fapl_id, + jbooleanArray mdc_log_options) { - jboolean isCopy; - jboolean *mdc_log_options_ptr = NULL; - hbool_t is_enabled; - hbool_t start_on_access; - ssize_t status = -1; - size_t location_size; - jsize arrLen; - char *lname = NULL; - jstring str = NULL; + jboolean isCopy; + jboolean *mdc_log_options_ptr = NULL; + hbool_t is_enabled; + hbool_t start_on_access; + ssize_t status = -1; + size_t location_size; + jsize arrLen; + char * lname = NULL; + jstring str = NULL; UNUSED(clss); @@ -1777,7 +1763,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options if (arrLen < 2) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pget_mdc_log_options: length of mdc_log_options < 2"); - PIN_BOOL_ARRAY(ENVONLY, mdc_log_options, mdc_log_options_ptr, &isCopy, "H5Pget_mdc_log_options: mdc_log_options array not pinned"); + PIN_BOOL_ARRAY(ENVONLY, mdc_log_options, mdc_log_options_ptr, &isCopy, + "H5Pget_mdc_log_options: mdc_log_options array not pinned"); /* get the length of the filename */ if (H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, NULL, &location_size, &start_on_access) < 0) @@ -1787,16 +1774,19 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pget_mdc_log_options: location_size is 0"); location_size++; /* add extra space for the null terminator */ - if (NULL == (lname = (char *) HDmalloc(sizeof(char) * location_size))) + if (NULL == (lname = (char *)HDmalloc(sizeof(char) * location_size))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_log_options: memory allocation failed"); - if ((status = H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, lname, &location_size, &start_on_access)) < 0) + if ((status = H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, lname, &location_size, + &start_on_access)) < 0) H5_LIBRARY_ERROR(ENVONLY); lname[location_size - 1] = '\0'; if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, lname))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_log_options: out of memory - unable to construct string from UTF characters"); + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, + "H5Pget_mdc_log_options: out of memory - unable to construct string from UTF characters"); } mdc_log_options_ptr[0] = (jboolean)is_enabled; @@ -1833,11 +1823,10 @@ done: * Signature: (JZ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1gc_1references - (JNIEnv *env, jclass clss, jlong fapl_id, jboolean gc_ref) +Java_hdf_hdf5lib_H5_H5Pset_1gc_1references(JNIEnv *env, jclass clss, jlong fapl_id, jboolean gc_ref) { unsigned gc_ref_val = 0; - herr_t retVal = FAIL; + herr_t retVal = FAIL; UNUSED(clss); @@ -1856,11 +1845,10 @@ done: * Signature: (J)Z */ JNIEXPORT jboolean JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1gc_1references - (JNIEnv *env, jclass clss, jlong fapl_id) +Java_hdf_hdf5lib_H5_H5Pget_1gc_1references(JNIEnv *env, jclass clss, jlong fapl_id) { unsigned gc_ref_val = 0; - jboolean bval = JNI_FALSE; + jboolean bval = JNI_FALSE; UNUSED(clss); @@ -1879,10 +1867,9 @@ done: * Signature: (JJ)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1small_1data_1block_1size - (JNIEnv *env, jclass clss, jlong plist, jlong size) +Java_hdf_hdf5lib_H5_H5Pset_1small_1data_1block_1size(JNIEnv *env, jclass clss, jlong plist, jlong size) { - long sz = (long)size; + long sz = (long)size; herr_t retVal = FAIL; UNUSED(clss); @@ -1900,8 +1887,7 @@ done: * Signature: (J)J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1small_1data_1block_1size - (JNIEnv *env, jclass clss, jlong plist) +Java_hdf_hdf5lib_H5_H5Pget_1small_1data_1block_1size(JNIEnv *env, jclass clss, jlong plist) { hsize_t s = 0; @@ -1920,8 +1906,7 @@ done: * Signature: (JII)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pset_1libver_1bounds - (JNIEnv *env, jclass clss, jlong fapl_id, jint low, jint high) +Java_hdf_hdf5lib_H5_H5Pset_1libver_1bounds(JNIEnv *env, jclass clss, jlong fapl_id, jint low, jint high) { herr_t retVal = FAIL; @@ -1940,12 +1925,11 @@ done: * Signature: (J[I)I */ JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_H5_H5Pget_1libver_1bounds - (JNIEnv *env, jclass clss, jlong fapl_id, jintArray libver) +Java_hdf_hdf5lib_H5_H5Pget_1libver_1bounds(JNIEnv *env, jclass clss, jlong fapl_id, jintArray libver) { - jboolean isCopy; - jint *theArray = NULL; - herr_t retVal = FAIL; + jboolean isCopy; + jint * theArray = NULL; + herr_t retVal = FAIL; UNUSED(clss); @@ -1954,7 +1938,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1libver_1bounds PIN_INT_ARRAY(ENVONLY, libver, theArray, &isCopy, "H5Pget_libver_bounds: input not pinned"); - if ((retVal = H5Pget_libver_bounds((hid_t)fapl_id, (H5F_libver_t *)&(theArray[0]), (H5F_libver_t *)&(theArray[1]))) < 0) + if ((retVal = H5Pget_libver_bounds((hid_t)fapl_id, (H5F_libver_t *)&(theArray[0]), + (H5F_libver_t *)&(theArray[1]))) < 0) H5_LIBRARY_ERROR(ENVONLY); done: |