summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5util.h
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
commitcabc39c3e197e2591449d2604bfee26465fb60e1 (patch)
treed5f39f5f5965584bf9bf49646a2af617adfd3e4e /java/src/jni/h5util.h
parent7355f4c505092a7a85474b47f18d5206028e2c95 (diff)
parentab69f5df770ee3cc6cd6c81d905a5317b894a002 (diff)
downloadhdf5-feature/coding_standards.zip
hdf5-feature/coding_standards.tar.gz
hdf5-feature/coding_standards.tar.bz2
Merge branch 'develop' into feature/coding_standardsfeature/coding_standards
Diffstat (limited to 'java/src/jni/h5util.h')
-rw-r--r--java/src/jni/h5util.h87
1 files changed, 45 insertions, 42 deletions
diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h
index e5f0d0b..6c568e1 100644
--- a/java/src/jni/h5util.h
+++ b/java/src/jni/h5util.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,50 +23,50 @@
#include "h5jni.h"
#ifndef SUCCEED
-#define SUCCEED 0
+#define SUCCEED 0
#endif
#ifndef FAIL
-#define FAIL (-1)
+#define FAIL (-1)
#endif
typedef struct h5str_t {
- char *s;
- size_t max; /* the allocated size of the string */
+ char * s;
+ size_t max; /* the allocated size of the string */
} h5str_t;
-extern void h5str_new(h5str_t *str, size_t len);
-extern void h5str_free(h5str_t *str);
-extern void h5str_resize(h5str_t *str, size_t new_len);
-extern char* h5str_append(h5str_t *str, const char* cstr);
-extern size_t h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_buf, size_t out_buf_offset);
-extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, size_t in_buf_len, int expand_data);
-extern void h5str_array_free(char **strs, size_t len);
-extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order);
-extern int h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj);
-extern int h5str_dump_region_points_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj);
-
-extern htri_t H5Tdetect_variable_str(hid_t tid);
+extern void h5str_new(h5str_t *str, size_t len);
+extern void h5str_free(h5str_t *str);
+extern void h5str_resize(h5str_t *str, size_t new_len);
+extern char * h5str_append(h5str_t *str, const char *cstr);
+extern size_t h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_buf,
+ size_t out_buf_offset);
+extern int h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p);
+extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf,
+ int expand_data);
+extern void h5str_array_free(char **strs, size_t len);
+extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order);
+extern int h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr, int binary_order);
+
+extern htri_t H5Tdetect_variable_str(hid_t tid);
/*
* Symbols used to format the output of h5str_sprintf and
* to interpret the input to h5str_convert.
*/
#define H5_COMPOUND_BEGIN_INDICATOR "{"
-#define H5_COMPOUND_END_INDICATOR "}"
-#define H5_ARRAY_BEGIN_INDICATOR "["
-#define H5_ARRAY_END_INDICATOR "]"
-#define H5_VLEN_BEGIN_INDICATOR "("
-#define H5_VLEN_END_INDICATOR ")"
+#define H5_COMPOUND_END_INDICATOR "}"
+#define H5_ARRAY_BEGIN_INDICATOR "["
+#define H5_ARRAY_END_INDICATOR "]"
+#define H5_VLEN_BEGIN_INDICATOR "("
+#define H5_VLEN_END_INDICATOR ")"
/*
* Class: hdf_hdf5lib_H5
* Method: H5AreadComplex
* Signature: (JJ[Ljava/lang/String;)I
*/
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5AreadComplex
- (JNIEnv *, jclass, jlong, jlong, jobjectArray);
+JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5AreadComplex(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Copies the content of one dataset to another dataset
@@ -74,9 +74,7 @@ Java_hdf_hdf5lib_H5_H5AreadComplex
* Method: H5Acopy
* Signature: (JJ)I
*/
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Acopy
- (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Acopy(JNIEnv *, jclass, jlong, jlong);
/*
* Copies the content of one dataset to another dataset
@@ -84,35 +82,40 @@ Java_hdf_hdf5lib_H5_H5Acopy
* Method: H5Dcopy
* Signature: (JJ)I
*/
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Dcopy
- (JNIEnv*, jclass, jlong, jlong);
+JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dcopy(JNIEnv *, jclass, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_obj_info_full
* Signature: (JLjava/lang/String;[Ljava/lang/String;[I[I[J[JIII)I
*/
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1full
- (JNIEnv*, jclass, jlong, jstring, jobjectArray, jintArray, jintArray, jlongArray, jlongArray, jint, jint, jint);
+JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1full(JNIEnv *, jclass, jlong, jstring,
+ jobjectArray, jintArray, jintArray,
+ jlongArray, jobjectArray, jint, jint,
+ jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_obj_info_max
* Signature: (J[Ljava/lang/String;[I[I[JJI)I
*/
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1max
- (JNIEnv*, jclass, jlong, jobjectArray, jintArray, jintArray, jlongArray, jlong, jint);
+JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1max(JNIEnv *, jclass, jlong, jobjectArray,
+ jintArray, jintArray, jlongArray, jlong,
+ jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5export_dataset
- * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
+ * Signature: (Ljava/lang/String;JLjava/lang/String;I)V
+ */
+JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *, jclass, jstring, jlong, jstring, jint);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5export_attribute
+ * Signature: (Ljava/lang/String;JLjava/lang/String;I)V
*/
-JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5export_1dataset
- (JNIEnv*, jclass, jstring, jstring, jstring, jint);
+JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1attribute(JNIEnv *, jclass, jstring, jlong, jstring,
+ jint);
-#endif /* H5UTIL_H__ */
+#endif /* H5UTIL_H__ */