summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Tf.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-18 18:51:13 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-18 18:51:13 (GMT)
commit27a385d557df87a50fdec678c808e669d63d5b82 (patch)
treecd9cfb7e0d0119335b2215e789ad85a53935bbe9 /fortran/src/H5Tf.c
parent41aeac45047cd5a18b7862e6138b9e886c5634ed (diff)
downloadhdf5-27a385d557df87a50fdec678c808e669d63d5b82.zip
hdf5-27a385d557df87a50fdec678c808e669d63d5b82.tar.gz
hdf5-27a385d557df87a50fdec678c808e669d63d5b82.tar.bz2
[svn-r26214] Fix for HDFFV-8908:
h5tenum_insert_f does not work with default 8 byte integers (xlf compiler)
Diffstat (limited to 'fortran/src/H5Tf.c')
-rw-r--r--fortran/src/H5Tf.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index ca9c30f..b6bcf5f 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -2421,3 +2421,46 @@ h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void
return ret_value;
}
+/****if* H5Tf/h5tenum_insert_ptr_c
+ * NAME
+ * /h5tenum_insert_ptr_c
+ * PURPOSE
+ * Calls H5Tenum_insert
+ * INPUTS
+ * type_id - Datatype identifier for the enumeration datatype.
+ * name - Datatype identifier.
+ * value - Pointer to the value of the new member.
+ *
+ * OUTPUTS
+ *
+ * RETURNS
+ * 0 on success, -1 on failure
+ * AUTHOR
+ * M. Scot Breitenfeld
+ * 2/6/2015
+ *
+ * SOURCE
+*/
+int_f
+h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value)
+/******/
+{
+ int ret_value = -1;
+ hid_t status;
+ char *c_name;
+ size_t c_namelen;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, c_namelen);
+ if (c_name == NULL) return ret_value;
+
+ status = H5Tenum_insert( (hid_t)*type_id, c_name, value);
+ if ( status < 0 ) return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
+
+