summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5T.c25
-rw-r--r--src/H5Ztrans.c14
2 files changed, 26 insertions, 13 deletions
diff --git a/src/H5T.c b/src/H5T.c
index de2a100..587ba0f 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3408,8 +3408,8 @@ done:
* Note: Common code for both H5T_copy and H5T_copy_reopen, as part of
* the const-correct datatype copying routines.
*
- * Programmer: David Young
- * January 18, 2020
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
@@ -3462,8 +3462,8 @@ done:
* Return: Success: Pointer to a new copy of the OLD_DT argument.
* Failure: NULL
*
- * Programmer: David Young
- * January 18, 2020
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
@@ -3490,8 +3490,8 @@ done:
* Return: Success: Pointer to a new copy of the OLD_DT argument.
* Failure: NULL
*
- * Programmer: David Young
- * January 18, 2020
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
@@ -3521,8 +3521,8 @@ done:
*
* Note: Common code for both H5T_copy and H5T_copy_reopen.
*
- * Programmer: David Young
- * January 18, 2020
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
@@ -3794,8 +3794,8 @@ done:
* Return: Success: Pointer to a new copy of the OLD_DT argument.
* Failure: NULL
*
- * Programmer: David Young
- * January 18, 2020
+ * Programmer: David Young
+ * January 18, 2020
*
*-------------------------------------------------------------------------
*/
@@ -5270,7 +5270,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
} /* end else-if */
/* Set the flag to indicate both source and destination types are compound types
- * for the optimization of data reading (in H5Dio.c). */
+ * for the optimization of data reading (in H5Dio.c).
+ * Make sure that path->are_compounds is only TRUE for compound types.
+ */
+ path->are_compounds = FALSE;
if (H5T_COMPOUND == H5T_get_class(src, TRUE) && H5T_COMPOUND == H5T_get_class(dst, TRUE))
path->are_compounds = TRUE;
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 0224c77..7d55efd 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -1538,10 +1538,20 @@ H5Z_xform_create(const char *expr)
"unable to allocate memory for data transform expression")
/* Find the number of times "x" is used in this equation, and allocate room for storing that many points
+ * A more sophisticated check is needed to support scientific notation.
*/
- for (i = 0; i < HDstrlen(expr); i++)
- if (HDisalpha(expr[i]))
+ for (i = 0; i < HDstrlen(expr); i++) {
+ if (HDisalpha(expr[i])) {
+ if ((i > 0) && (i < (HDstrlen(expr) - 1))) {
+ if (((expr[i] == 'E') || (expr[i] == 'e')) &&
+ (HDisdigit(expr[i - 1]) || (expr[i - 1] == '.')) &&
+ (HDisdigit(expr[i + 1]) || (expr[i + 1] == '-') || (expr[i + 1] == '+')))
+ continue;
+ }
+
count++;
+ }
+ }
/* When there are no "x"'s in the equation (ie, simple transform case),
* we don't need to allocate any space since no array will have to be