diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 00:42:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 00:42:48 (GMT) |
commit | d278ce1f21903c33c6b28e8acb827e94275d4421 (patch) | |
tree | d52c322015ac8ce3b8fb992958ab8be1f13d4886 /hl/src/H5IM.c | |
parent | 942739e6fbea0ebf736c35f461e1386396b54e11 (diff) | |
download | hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.zip hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.gz hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.bz2 |
Remove HD/hbool_t from high-level lib (#3183)
Diffstat (limited to 'hl/src/H5IM.c')
-rw-r--r-- | hl/src/H5IM.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 25381fd..04dbc67 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -98,13 +98,13 @@ H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t /* Initialize the image dimensions */ - if (HDstrncmp(interlace, "INTERLACE_PIXEL", 15) == 0) { + if (strncmp(interlace, "INTERLACE_PIXEL", 15) == 0) { /* Number of color planes is defined as the third dimension */ dims[0] = height; dims[1] = width; dims[2] = IMAGE24_RANK; } - else if (HDstrncmp(interlace, "INTERLACE_PLANE", 15) == 0) { + else if (strncmp(interlace, "INTERLACE_PLANE", 15) == 0) { /* Number of color planes is defined as the first dimension */ dims[0] = IMAGE24_RANK; dims[1] = height; @@ -170,7 +170,7 @@ find_palette(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const * cause the iterator to immediately return that positive value, * indicating short-circuit success */ - if (HDstrncmp(name, "PALETTE", 7) == 0) + if (strncmp(name, "PALETTE", 7) == 0) ret = H5_ITER_STOP; return ret; @@ -281,13 +281,13 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t if (has_attr > 0) { /* This is a 24 bit image */ - if (HDstrncmp(interlace, "INTERLACE_PIXEL", 15) == 0) { + if (strncmp(interlace, "INTERLACE_PIXEL", 15) == 0) { /* Number of color planes is defined as the third dimension */ *height = dims[0]; *width = dims[1]; *planes = dims[2]; } - else if (HDstrncmp(interlace, "INTERLACE_PLANE", 15) == 0) { + else if (strncmp(interlace, "INTERLACE_PLANE", 15) == 0) { /* Number of color planes is defined as the first dimension */ *planes = dims[0]; *height = dims[1]; @@ -570,7 +570,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name) dim_ref = (hsize_t)n_refs + 1; - refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref); + refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref); if (H5Aread(aid, atid, refbuf) < 0) goto out; @@ -611,7 +611,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name) if (H5Aclose(aid) < 0) goto out; - HDfree(refbuf); + free(refbuf); } /* ok_pal > 0 */ @@ -868,7 +868,7 @@ H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize dim_ref = (hsize_t)n_refs; - refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref); + refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref); if (H5Aread(aid, atid, refbuf) < 0) goto out; @@ -897,7 +897,7 @@ H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize goto out; if (H5Aclose(aid) < 0) goto out; - HDfree(refbuf); + free(refbuf); } /* Close the image dataset. */ @@ -975,7 +975,7 @@ H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number, unsigned c dim_ref = (hsize_t)n_refs; - refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref); + refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref); if (H5Aread(aid, atid, refbuf) < 0) goto out; @@ -997,7 +997,7 @@ H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number, unsigned c goto out; if (H5Aclose(aid) < 0) goto out; - HDfree(refbuf); + free(refbuf); } /* Close the image dataset. */ @@ -1081,19 +1081,19 @@ H5IMis_image(hid_t loc_id, const char *dset_name) if ((storage_size = H5Aget_storage_size(aid)) == 0) goto out; - attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1); + attr_data = (char *)malloc((size_t)storage_size * sizeof(char) + 1); if (attr_data == NULL) goto out; if (H5Aread(aid, atid, attr_data) < 0) goto out; - if (HDstrncmp(attr_data, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS), HDstrlen(attr_data))) == 0) + if (strncmp(attr_data, IMAGE_CLASS, MIN(strlen(IMAGE_CLASS), strlen(attr_data))) == 0) ret = 1; else ret = 0; - HDfree(attr_data); + free(attr_data); if (H5Tclose(atid) < 0) goto out; @@ -1180,19 +1180,19 @@ H5IMis_palette(hid_t loc_id, const char *dset_name) if ((storage_size = H5Aget_storage_size(aid)) == 0) goto out; - attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1); + attr_data = (char *)malloc((size_t)storage_size * sizeof(char) + 1); if (attr_data == NULL) goto out; if (H5Aread(aid, atid, attr_data) < 0) goto out; - if (HDstrncmp(attr_data, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS), HDstrlen(attr_data))) == 0) + if (strncmp(attr_data, PALETTE_CLASS, MIN(strlen(PALETTE_CLASS), strlen(attr_data))) == 0) ret = 1; else ret = 0; - HDfree(attr_data); + free(attr_data); if (H5Tclose(atid) < 0) goto out; |