summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5fImp.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /java/src/jni/h5fImp.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'java/src/jni/h5fImp.c')
-rw-r--r--java/src/jni/h5fImp.c165
1 files changed, 70 insertions, 95 deletions
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index 3b7b96c..76c5ad7 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -39,11 +39,10 @@ extern "C" {
* Signature: (Ljava/lang/String;IJ)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5__1H5Fopen
- (JNIEnv *env, jclass clss, jstring name, jint flags, jlong access_id)
+Java_hdf_hdf5lib_H5__1H5Fopen(JNIEnv *env, jclass clss, jstring name, jint flags, jlong access_id)
{
const char *fileName = NULL;
- hid_t status = H5I_INVALID_HID;
+ hid_t status = H5I_INVALID_HID;
UNUSED(clss);
@@ -68,11 +67,11 @@ done:
* Signature: (Ljava/lang/String;IJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5__1H5Fcreate
- (JNIEnv *env, jclass clss, jstring name, jint flags, jlong create_id, jlong access_id)
+Java_hdf_hdf5lib_H5__1H5Fcreate(JNIEnv *env, jclass clss, jstring name, jint flags, jlong create_id,
+ jlong access_id)
{
const char *fileName = NULL;
- hid_t status = H5I_INVALID_HID;
+ hid_t status = H5I_INVALID_HID;
UNUSED(clss);
@@ -97,8 +96,7 @@ done:
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Fflush
- (JNIEnv *env, jclass clss, jlong object_id, jint scope)
+Java_hdf_hdf5lib_H5_H5Fflush(JNIEnv *env, jclass clss, jlong object_id, jint scope)
{
herr_t retVal = FAIL;
@@ -117,12 +115,11 @@ done:
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1name
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1name(JNIEnv *env, jclass clss, jlong file_id)
{
- jstring str = NULL;
- ssize_t buf_size;
- char *namePtr = NULL;
+ jstring str = NULL;
+ ssize_t buf_size;
+ char * namePtr = NULL;
UNUSED(clss);
@@ -130,7 +127,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1name
if ((buf_size = H5Fget_name((hid_t)file_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
+ if (NULL == (namePtr = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Fget_name: malloc failed");
if ((H5Fget_name((hid_t)file_id, namePtr, (size_t)buf_size + 1)) < 0)
@@ -153,13 +150,12 @@ done:
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL
-Java_hdf_hdf5lib_H5_H5Fis_1hdf5
- (JNIEnv *env, jclass clss, jstring name)
+Java_hdf_hdf5lib_H5_H5Fis_1hdf5(JNIEnv *env, jclass clss, jstring name)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
const char *fileName = NULL;
#endif
- htri_t bval = JNI_FALSE;
+ htri_t bval = JNI_FALSE;
UNUSED(clss);
@@ -193,11 +189,10 @@ done:
* Signature: (Ljava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_hdf_hdf5lib_H5_H5Fis_1accessible
- (JNIEnv *env, jclass clss, jstring name, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fis_1accessible(JNIEnv *env, jclass clss, jstring name, jlong file_id)
{
const char *fileName = NULL;
- htri_t bval = JNI_FALSE;
+ htri_t bval = JNI_FALSE;
UNUSED(clss);
@@ -224,8 +219,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
@@ -244,8 +238,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5__1H5Fget_1access_1plist
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5__1H5Fget_1access_1plist(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
@@ -264,8 +257,7 @@ done:
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1intent
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1intent(JNIEnv *env, jclass clss, jlong file_id)
{
unsigned intent = 0;
@@ -284,8 +276,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1fileno
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1fileno(JNIEnv *env, jclass clss, jlong file_id)
{
unsigned long fileno = 0;
@@ -304,8 +295,7 @@ done:
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5__1H5Fclose
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5__1H5Fclose(JNIEnv *env, jclass clss, jlong file_id)
{
herr_t status = FAIL;
@@ -324,11 +314,11 @@ done:
* Signature: (JLjava/lang/String;JJ)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Fmount
- (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong child_id, jlong plist_id)
+Java_hdf_hdf5lib_H5_H5Fmount(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong child_id,
+ jlong plist_id)
{
const char *fileName = NULL;
- herr_t status = FAIL;
+ herr_t status = FAIL;
UNUSED(clss);
@@ -353,11 +343,10 @@ done:
* Signature: (JLjava/lang/String;)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Funmount
- (JNIEnv *env, jclass clss, jlong loc_id, jstring name)
+Java_hdf_hdf5lib_H5_H5Funmount(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
const char *fileName = NULL;
- herr_t status = FAIL;
+ herr_t status = FAIL;
UNUSED(clss);
@@ -382,8 +371,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1freespace
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1freespace(JNIEnv *env, jclass clss, jlong file_id)
{
hssize_t ret_val = -1;
@@ -402,8 +390,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5__1H5Freopen
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5__1H5Freopen(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
@@ -422,16 +409,15 @@ done:
* Signature: (JIJ[J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids
- (JNIEnv *env, jclass clss, jlong file_id, jint types, jlong maxObjs,
- jlongArray obj_id_list)
+Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids(JNIEnv *env, jclass clss, jlong file_id, jint types, jlong maxObjs,
+ jlongArray obj_id_list)
{
- jboolean isCopy;
- ssize_t ret_val = -1;
- size_t i;
- jsize rank;
- jlong *obj_id_listP = NULL;
- hid_t *id_list = NULL;
+ jboolean isCopy;
+ ssize_t ret_val = -1;
+ size_t i;
+ jsize rank;
+ jlong * obj_id_listP = NULL;
+ hid_t * id_list = NULL;
UNUSED(clss);
@@ -445,7 +431,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_obj_ids: obj_id_list length < 0");
}
- if (NULL == (id_list = (hid_t *) HDmalloc((size_t)rank * sizeof(hid_t))))
+ if (NULL == (id_list = (hid_t *)HDmalloc((size_t)rank * sizeof(hid_t))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Fget_obj_ids: malloc failed");
if ((ret_val = H5Fget_obj_ids((hid_t)file_id, (unsigned int)types, (size_t)maxObjs, id_list)) < 0)
@@ -470,8 +456,7 @@ done:
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1obj_1count
- (JNIEnv *env, jclass clss, jlong file_id, jint types)
+Java_hdf_hdf5lib_H5_H5Fget_1obj_1count(JNIEnv *env, jclass clss, jlong file_id, jint types)
{
ssize_t ret_val = -1;
@@ -490,8 +475,7 @@ done:
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1filesize
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1filesize(JNIEnv *env, jclass clss, jlong file_id)
{
hsize_t size = 0;
@@ -501,7 +485,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1filesize
H5_LIBRARY_ERROR(ENVONLY);
done:
- return (jlong) size;
+ return (jlong)size;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1filesize */
/*
@@ -510,8 +494,7 @@ done:
* Signature: (J)D
*/
JNIEXPORT jdouble JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate(JNIEnv *env, jclass clss, jlong file_id)
{
double rate = 0.0;
@@ -530,14 +513,13 @@ done:
* Signature: (J[J)I
*/
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size
- (JNIEnv *env, jclass clss, jlong file_id, jlongArray metadata_cache)
+Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size(JNIEnv *env, jclass clss, jlong file_id, jlongArray metadata_cache)
{
- jboolean isCopy;
- size_t max_size = 0, min_clean_size = 0, cur_size = 0;
- jlong *metadata_cache_ptr = NULL;
- jsize size = 0;
- int cur_num_entries = -1;
+ jboolean isCopy;
+ size_t max_size = 0, min_clean_size = 0, cur_size = 0;
+ jlong * metadata_cache_ptr = NULL;
+ jsize size = 0;
+ int cur_num_entries = -1;
UNUSED(clss);
@@ -555,7 +537,8 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size
if (H5Fget_mdc_size((hid_t)file_id, &max_size, &min_clean_size, &cur_size, &cur_num_entries) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- PIN_LONG_ARRAY(ENVONLY, metadata_cache, metadata_cache_ptr, &isCopy, "H5Fget_mdc_size: metadata_cache array not pinned");
+ PIN_LONG_ARRAY(ENVONLY, metadata_cache, metadata_cache_ptr, &isCopy,
+ "H5Fget_mdc_size: metadata_cache array not pinned");
metadata_cache_ptr[0] = (jlong)max_size;
metadata_cache_ptr[1] = (jlong)min_clean_size;
@@ -574,8 +557,7 @@ done:
* Signature: (J)Lhdf/hdf5lib/structs/H5F_info2_t;
*/
JNIEXPORT jobject JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1info
- (JNIEnv *env, jclass clss, jlong obj_id)
+Java_hdf_hdf5lib_H5_H5Fget_1info(JNIEnv *env, jclass clss, jlong obj_id)
{
H5F_info2_t finfo;
jobject ihinfobuf;
@@ -604,7 +586,8 @@ Java_hdf_hdf5lib_H5_H5Fget_1info
args[7].j = (jlong)finfo.sohm.hdr_size;
args[8].l = ihinfobuf;
- CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5F_info2_t", "(IJJIJJIJLhdf/hdf5lib/structs/H5_ih_info_t;)V", args, ret_obj);
+ CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5F_info2_t",
+ "(IJJIJJIJLhdf/hdf5lib/structs/H5_ih_info_t;)V", args, ret_obj);
done:
return ret_obj;
@@ -616,8 +599,7 @@ done:
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
@@ -634,8 +616,7 @@ done:
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
@@ -652,8 +633,7 @@ done:
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
@@ -670,8 +650,7 @@ done:
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
@@ -688,8 +667,7 @@ done:
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
- (JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
@@ -706,14 +684,14 @@ done:
* Signature: (J[Z)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
- (JNIEnv *env, jclass clss, jlong file_id, jbooleanArray mdc_logging_status)
+Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status(JNIEnv *env, jclass clss, jlong file_id,
+ jbooleanArray mdc_logging_status)
{
- jboolean *mdc_logging_status_ptr = NULL;
- jboolean isCopy;
- hbool_t is_enabled;
- hbool_t is_currently_logging;
- jsize size;
+ jboolean *mdc_logging_status_ptr = NULL;
+ jboolean isCopy;
+ hbool_t is_enabled;
+ hbool_t is_currently_logging;
+ jsize size;
UNUSED(clss);
@@ -731,7 +709,8 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
if (H5Fget_mdc_logging_status((hid_t)file_id, &is_enabled, &is_currently_logging) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- PIN_BOOL_ARRAY(ENVONLY, mdc_logging_status, mdc_logging_status_ptr, &isCopy, "H5Fget_mdc_logging_status: mdc_logging_status array not pinned");
+ PIN_BOOL_ARRAY(ENVONLY, mdc_logging_status, mdc_logging_status_ptr, &isCopy,
+ "H5Fget_mdc_logging_status: mdc_logging_status array not pinned");
mdc_logging_status_ptr[0] = (jboolean)is_enabled;
mdc_logging_status_ptr[1] = (jboolean)is_currently_logging;
@@ -749,8 +728,7 @@ done:
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint
-(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize)
+Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize)
{
hbool_t minimize_val;
herr_t retVal = FAIL;
@@ -772,10 +750,9 @@ done:
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint
-(JNIEnv *env, jclass clss, jlong file_id)
+Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlong file_id)
{
- jboolean bval = JNI_FALSE;
+ jboolean bval = JNI_FALSE;
hbool_t minimize = FALSE;
UNUSED(clss);
@@ -784,7 +761,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint
H5_LIBRARY_ERROR(ENVONLY);
if (minimize == TRUE)
- bval = JNI_TRUE;
+ bval = JNI_TRUE;
done:
return bval;
@@ -796,8 +773,7 @@ done:
* Signature: (JII)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds
- (JNIEnv *env, jclass clss, jlong file_id, jint low, jint high)
+Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds(JNIEnv *env, jclass clss, jlong file_id, jint low, jint high)
{
herr_t retVal = FAIL;
@@ -810,7 +786,6 @@ done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds */
-
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */