summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5util.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5util.c')
-rw-r--r--java/src/jni/h5util.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 8454815..fdabd76 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -41,6 +41,9 @@ jobject get_callback;
jobject set_callback;
jobject delete_callback;
+H5E_auto2_t efunc;
+void *edata;
+
/********************/
/* Local Prototypes */
/********************/
@@ -350,7 +353,7 @@ h5str_sprintf
this_str = (char*)HDmalloc(4 * (nll + 1));
if (1 == nll) {
- sprintf(this_str, "0x%02x", ucptr[0]);
+ sprintf(this_str, "%#02x", ucptr[0]);
}
else {
for (i = 0; i < (int)nll; i++)
@@ -481,7 +484,7 @@ h5str_sprintf
this_str = (char*)HDmalloc(4 * (nll + 1));
if (1 == nll) {
- sprintf(this_str, "0x%02x", ucptr[0]);
+ sprintf(this_str, "%#02x", ucptr[0]);
}
else {
for (i = 0; i < (int)nll; i++)
@@ -1051,8 +1054,20 @@ h5str_get_little_endian_type
p_type=H5Tcopy(H5T_IEEE_F64LE);
break;
- case H5T_TIME:
case H5T_BITFIELD:
+ {
+ if ( size == 1)
+ p_type=H5Tcopy(H5T_STD_B8LE);
+ else if ( size == 2)
+ p_type=H5Tcopy(H5T_STD_B16LE);
+ else if ( size == 4)
+ p_type=H5Tcopy(H5T_STD_B32LE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_STD_B64LE);
+ }
+ break;
+
+ case H5T_TIME:
case H5T_OPAQUE:
case H5T_STRING:
case H5T_COMPOUND:
@@ -1122,8 +1137,20 @@ h5str_get_big_endian_type
p_type=H5Tcopy(H5T_IEEE_F64BE);
break;
- case H5T_TIME:
case H5T_BITFIELD:
+ {
+ if ( size == 1)
+ p_type=H5Tcopy(H5T_STD_B8BE);
+ else if ( size == 2)
+ p_type=H5Tcopy(H5T_STD_B16BE);
+ else if ( size == 4)
+ p_type=H5Tcopy(H5T_STD_B32BE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_STD_B64BE);
+ }
+ break;
+
+ case H5T_TIME:
case H5T_OPAQUE:
case H5T_STRING:
case H5T_COMPOUND: