diff options
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5diff/h5diffgentest.c | 82 | ||||
-rw-r--r-- | tools/test/h5dump/h5dumpgentest.c | 68 | ||||
-rw-r--r-- | tools/test/h5format_convert/h5fc_chk_idx.c | 4 | ||||
-rw-r--r-- | tools/test/h5format_convert/h5fc_gentest.c | 4 | ||||
-rw-r--r-- | tools/test/h5import/h5importtest.c | 4 | ||||
-rw-r--r-- | tools/test/h5jam/getub.c | 6 | ||||
-rw-r--r-- | tools/test/h5jam/h5jamgentest.c | 8 | ||||
-rw-r--r-- | tools/test/h5jam/tellub.c | 2 | ||||
-rw-r--r-- | tools/test/h5repack/h5repackgentest.c | 4 | ||||
-rw-r--r-- | tools/test/h5repack/h5repacktst.c | 6 | ||||
-rw-r--r-- | tools/test/h5stat/h5stat_gentest.c | 14 | ||||
-rw-r--r-- | tools/test/misc/clear_open_chk.c | 2 | ||||
-rw-r--r-- | tools/test/misc/h5clear_gentest.c | 4 | ||||
-rw-r--r-- | tools/test/misc/h5perf_gentest.c | 54 | ||||
-rw-r--r-- | tools/test/misc/h5repart_gentest.c | 26 | ||||
-rw-r--r-- | tools/test/misc/talign.c | 12 | ||||
-rw-r--r-- | tools/test/perform/iopipe.c | 28 | ||||
-rw-r--r-- | tools/test/perform/perf_meta.c | 14 | ||||
-rw-r--r-- | tools/test/perform/zip_perf.c | 24 |
19 files changed, 183 insertions, 183 deletions
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 06bd2a9..e595dd3 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -333,16 +333,16 @@ onion_filepaths_init(const char *basename) if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths)))) goto error; - if (NULL == (paths->canon = HDstrdup(basename))) + if (NULL == (paths->canon = strdup(basename))) goto error; if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; - HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); + snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; - HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); + snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); return paths; @@ -4262,35 +4262,35 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new comp9_buf.str_vlen = comp9_buf.str_vlen_repeat = vlen_str_buf; /* copy fixlen string data to compound buffers */ - HDstrcpy(comp1_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp1_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp1_buf.str_fixlen, fixlen_str_buf); + strcpy(comp1_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp2_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp2_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp2_buf.str_fixlen, fixlen_str_buf); + strcpy(comp2_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp3_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp3_buf.str_fixlen, fixlen_str_buf); + strcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp3_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp3_buf.str_fixlen, fixlen_str_buf); + strcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp4_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp4_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp4_buf.str_fixlen, fixlen_str_buf); + strcpy(comp4_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp5_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp5_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp5_buf.str_fixlen, fixlen_str_buf); + strcpy(comp5_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp6_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp6_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp6_buf.str_fixlen, fixlen_str_buf); + strcpy(comp6_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp7_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp7_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp7_buf.str_fixlen, fixlen_str_buf); + strcpy(comp7_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp8_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp8_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp8_buf.str_fixlen, fixlen_str_buf); + strcpy(comp8_buf.str_fixlen_repeat, fixlen_str_buf); - HDstrcpy(comp9_buf.str_fixlen, fixlen_str_buf); - HDstrcpy(comp9_buf.str_fixlen_repeat, fixlen_str_buf); + strcpy(comp9_buf.str_fixlen, fixlen_str_buf); + strcpy(comp9_buf.str_fixlen_repeat, fixlen_str_buf); /* copy vlen string array data to compound buffers */ for (i = 0; i < VLEN_STR_ARRY_DIM; i++) { @@ -4307,32 +4307,32 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new /* copy fixlen string attay data to compound buffers */ for (i = 0; i < FIXLEN_STR_ARRY_DIM; i++) { - HDstrcpy(comp1_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp1_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp1_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp1_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp2_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp2_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp2_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp2_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp3_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp3_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp3_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp3_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp4_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp4_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp4_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp4_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp5_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp5_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp5_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp5_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp6_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp6_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp6_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp6_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp7_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp7_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp7_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp7_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp8_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp8_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp8_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp8_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); - HDstrcpy(comp9_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); - HDstrcpy(comp9_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); + strcpy(comp9_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); + strcpy(comp9_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); } /* int data */ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 1b4b85c..ddbd3af 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -588,7 +588,7 @@ gent_attribute(void) dims[0] = 24; space = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(root, "/attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(buf, sizeof(buf), "attribute of root group"); + snprintf(buf, sizeof(buf), "attribute of root group"); H5Awrite(attr, H5T_NATIVE_SCHAR, buf); H5Sclose(space); H5Aclose(attr); @@ -963,7 +963,7 @@ gent_udlink(void) /* This ud link will dangle, but that's okay */ fid = H5Fcreate(FILE54, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); H5Lcreate_ud(fid, "udlink1", (H5L_type_t)MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); - HDstrcpy(buf, "foo"); + strcpy(buf, "foo"); H5Lcreate_ud(fid, "udlink2", (H5L_type_t)MY_LINKCLASS, buf, 4, H5P_DEFAULT, H5P_DEFAULT); H5Fclose(fid); @@ -1386,7 +1386,7 @@ gent_all(void) dims[0] = 10; space = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(buf, sizeof(buf), "abcdefghi"); + snprintf(buf, sizeof(buf), "abcdefghi"); H5Awrite(attr, H5T_NATIVE_SCHAR, buf); H5Sclose(space); H5Aclose(attr); @@ -1422,7 +1422,7 @@ gent_all(void) dims[0] = 27; space = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1"); + snprintf(buf, sizeof(buf), "1st attribute of dset1.1.1"); H5Awrite(attr, H5T_NATIVE_SCHAR, buf); H5Sclose(space); H5Aclose(attr); @@ -1430,7 +1430,7 @@ gent_all(void) dims[0] = 27; space = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1"); + snprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1"); H5Awrite(attr, H5T_NATIVE_SCHAR, buf); H5Sclose(space); H5Aclose(attr); @@ -1629,7 +1629,7 @@ gent_many(void) dims[0] = 10; space2 = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(buf, sizeof(buf), "abcdefghi"); + snprintf(buf, sizeof(buf), "abcdefghi"); H5Awrite(attr, H5T_NATIVE_CHAR, buf); H5Sclose(space2); H5Aclose(attr); @@ -1894,7 +1894,7 @@ gent_str(void) for (l = 0; l < 10; l++) comp1[i][j].a[k][l] = (l + j + k) * (l + j + k); for (k = 0; k < 12; k++) - HDstrcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678"); + strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678"); } dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -1967,9 +1967,9 @@ gent_str2(void) dims[0] = 3; space2 = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT); - HDsnprintf(&(buf2[0 * LENSTR2]), LENSTR2, "0123456789"); - HDsnprintf(&(buf2[1 * LENSTR2]), LENSTR2, "abcdefghij"); - HDsnprintf(&(buf2[2 * LENSTR2]), LENSTR2, "ABCDEFGHIJ"); + snprintf(&(buf2[0 * LENSTR2]), LENSTR2, "0123456789"); + snprintf(&(buf2[1 * LENSTR2]), LENSTR2, "abcdefghij"); + snprintf(&(buf2[2 * LENSTR2]), LENSTR2, "ABCDEFGHIJ"); H5Awrite(attr, fxdlenstr2, buf2); H5Sclose(space2); H5Tclose(fxdlenstr2); @@ -1981,8 +1981,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -1994,8 +1994,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of string array", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of string array", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -2013,8 +2013,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -2026,8 +2026,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of string array", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of string array", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -2045,8 +2045,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -2058,8 +2058,8 @@ gent_str2(void) for (i = 0; (hsize_t)i < sdim; i++) { start[0] = (hsize_t)i; - HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of string array", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); + snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of string array", i); + H5Tset_size(memtype, strlen(buf) + 1); H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); } @@ -3790,7 +3790,7 @@ gent_split_file(void) root = H5Gopen2(fid, "/", H5P_DEFAULT); atype = H5Tcopy(H5T_C_S1); - H5Tset_size(atype, HDstrlen(meta) + 1); + H5Tset_size(atype, strlen(meta) + 1); H5Tset_strpad(atype, H5T_STR_NULLTERM); dims[0] = 1; @@ -3879,12 +3879,12 @@ gent_multi(void) memset(memb_name, 0, sizeof memb_name); memset(memb_addr, 0, sizeof memb_addr); - assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(strlen(multi_letters) == H5FD_MEM_NTYPES); for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { memb_fapl[mt] = H5P_DEFAULT; memb_map[mt] = mt; - HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]); + sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]); memb_name[mt] = sv[mt]; /*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/ memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10); @@ -3928,7 +3928,7 @@ gent_large_objname(void) group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); for (i = 0; i < 50; ++i) { - HDsnprintf(grp_name, sizeof(grp_name), "this_is_a_large_group_name%d", i); + snprintf(grp_name, sizeof(grp_name), "this_is_a_large_group_name%d", i); group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Gclose(group2); } @@ -3999,7 +3999,7 @@ gent_char(void) hid_t sid1; /* Dataspace ID */ hsize_t dims1[1]; - dims1[0] = HDstrlen(wdata); + dims1[0] = strlen(wdata); /* Create file */ fid1 = H5Fcreate(FILE39, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -10877,10 +10877,10 @@ gent_compound_complex2(void) /* Set up first nested compound */ buf[i].d.nested_a = (double)i; - HDstrcpy(buf[i].d.nested_string, "This is a test string."); + strcpy(buf[i].d.nested_string, "This is a test string."); for (j = 0; j < 4; j++) - HDstrcpy(buf[i].d.nested_string_array[j], "String test"); + strcpy(buf[i].d.nested_string_array[j], "String test"); /* Set up multiple nested compound */ buf[i].e.a = (float)i; @@ -10892,9 +10892,9 @@ gent_compound_complex2(void) buf[i].e.b.multiple_nested_d[j] = (long)(j - i * 10); } - HDstrcpy(buf[i].e.c.further_nested_string, "1234567890"); + strcpy(buf[i].e.c.further_nested_string, "1234567890"); for (j = 0; j < 4; j++) - HDstrcpy(buf[i].e.c.further_nested_string_array[j], "STRING ARRAY"); + strcpy(buf[i].e.c.further_nested_string_array[j], "STRING ARRAY"); for (j = 0; j < 10; j++) { buf[i].e.c.deep_nest.deep_nested_short[j] = (short)(j + i * 10); @@ -11346,16 +11346,16 @@ onion_filepaths_init(const char *basename) if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths)))) goto error; - if (NULL == (paths->canon = HDstrdup(basename))) + if (NULL == (paths->canon = strdup(basename))) goto error; if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; - HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); + snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; - HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); + snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); return paths; diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c index 51309f6..7adc33d 100644 --- a/tools/test/h5format_convert/h5fc_chk_idx.c +++ b/tools/test/h5format_convert/h5fc_chk_idx.c @@ -55,8 +55,8 @@ main(int argc, char *argv[]) } /* end if */ /* Duplicate the file name & dataset name */ - fname = HDstrdup(argv[1]); - dname = HDstrdup(argv[2]); + fname = strdup(argv[1]); + dname = strdup(argv[2]); /* Try opening the file */ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) { diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c index ff0f02e..06d6088 100644 --- a/tools/test/h5format_convert/h5fc_gentest.c +++ b/tools/test/h5format_convert/h5fc_gentest.c @@ -799,8 +799,8 @@ main(void) memset(filename, 0, sizeof(filename)); if (!new_format) - HDstrcat(filename, "old_"); - HDstrcat(filename, FILENAME[i]); + strcat(filename, "old_"); + strcat(filename, FILENAME[i]); gen_ext(filename, new_format, i); } /* end for */ diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index 003c343..b11fe10 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -68,9 +68,9 @@ main(void) volatile uint32_t ibyte = 0x01234567; /* 0 for big endian, 1 for little endian. */ if ((*((volatile uint8_t *)(&ibyte))) == 0x67) - HDstrcpy(machine_order, "LE"); + strcpy(machine_order, "LE"); else - HDstrcpy(machine_order, "BE"); + strcpy(machine_order, "BE"); /* * initialize the row, column, and plane vectors diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index b90ddeb..8878a69 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -59,7 +59,7 @@ parse_command_line(int argc, const char *const *argv) while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'c': - nbytes = HDstrdup(H5_optarg); + nbytes = strdup(H5_optarg); break; case '?': default: @@ -105,10 +105,10 @@ main(int argc, char *argv[]) goto error; } /* end if */ - filename = HDstrdup(argv[H5_optind]); + filename = strdup(argv[H5_optind]); size = 0; - if (EOF == (res = HDsscanf(nbytes, "%u", &size))) { + if (EOF == (res = sscanf(nbytes, "%u", &size))) { /* fail */ error_msg("missing file name\n"); usage(h5tools_getprogname()); diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index d3b7388..0ab29c3 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -151,7 +151,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) goto error; if ((attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if (HDsnprintf(buf, sizeof(buf), "abcdefghi") < 0) + if (snprintf(buf, sizeof(buf), "abcdefghi") < 0) goto error; if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0) goto error; @@ -205,7 +205,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) goto error; if ((attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if (HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1") < 0) + if (snprintf(buf, sizeof(buf), "1st attribute of dset1.1.1") < 0) goto error; if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0) goto error; @@ -219,7 +219,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) goto error; if ((attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if (HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1") < 0) + if (snprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1") < 0) goto error; if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0) goto error; @@ -412,7 +412,7 @@ main(void) if (gent_ub(FILE7, 0, 0) < 0) goto error; - if (gent_ub(FILE8, 512, HDstrlen(pattern)) < 0) + if (gent_ub(FILE8, 512, strlen(pattern)) < 0) goto error; if (gent_ub(FILE9, 1024, 513) < 0) goto error; diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index 501ecc5..61ea896 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -124,7 +124,7 @@ main(int argc, char *argv[]) goto done; } - ifname = HDstrdup(argv[H5_optind]); + ifname = strdup(argv[H5_optind]); testval = H5Fis_accessible(ifname, H5P_DEFAULT); diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c index 203581d..688ee69 100644 --- a/tools/test/h5repack/h5repackgentest.c +++ b/tools/test/h5repack/h5repackgentest.c @@ -115,7 +115,7 @@ set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_fil return -1; for (i = 0; i < n_external_files; i++) { - if (HDsnprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE) + if (snprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE) return -1; if (H5Pset_external(dcpl, name, 0, n_elts_per_file * elt_size) < 0) @@ -140,7 +140,7 @@ make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize_t hid_t space_id = H5I_INVALID_HID; int ret_value = 0; - if (HDsnprintf(filename, MAX_NAME_SIZE, "%s%s.h5", basename, (NULL != ext) ? "_ex" : "") >= MAX_NAME_SIZE) + if (snprintf(filename, MAX_NAME_SIZE, "%s%s.h5", basename, (NULL != ext) ? "_ex" : "") >= MAX_NAME_SIZE) H5REPACKGENTEST_OOPS; if (NULL != ext) { diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index 6fa2d8d..98d5362 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -3186,7 +3186,7 @@ make_early(void) goto out; if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; - HDsnprintf(name, sizeof(name), "%d", i); + snprintf(name, sizeof(name), "%d", i); if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3210,7 +3210,7 @@ make_early(void) for (i = 0; i < iter; i++) { if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; - HDsnprintf(name, sizeof(name), "%d", i); + snprintf(name, sizeof(name), "%d", i); if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3269,7 +3269,7 @@ make_layout(hid_t loc_id) *------------------------------------------------------------------------- */ for (i = 0; i < 4; i++) { - HDsnprintf(name, sizeof(name), "dset%d", i + 1); + snprintf(name, sizeof(name), "dset%d", i + 1); if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf) < 0) goto error; } diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c index 44428fe..787c2e1 100644 --- a/tools/test/h5stat/h5stat_gentest.c +++ b/tools/test/h5stat/h5stat_gentest.c @@ -87,7 +87,7 @@ gen_newgrat_file(const char *fname) /* Create NUM_GRPS groups in the root group */ for (i = 1; i <= NUM_GRPS; i++) { - HDsnprintf(name, sizeof(name), "%s%d", GROUP_NAME, i); + snprintf(name, sizeof(name), "%s%d", GROUP_NAME, i); if ((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; if (H5Gclose(gid) < 0) @@ -108,7 +108,7 @@ gen_newgrat_file(const char *fname) /* Create NUM_ATTRS for the dataset */ for (i = 1; i <= NUM_ATTRS; i++) { - HDsnprintf(attrname, sizeof(attrname), "%s%d", ATTR_NAME, i); + snprintf(attrname, sizeof(attrname), "%s%d", ATTR_NAME, i); if ((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; if (H5Aclose(attr_id) < 0) @@ -210,7 +210,7 @@ gen_threshold_file(const char *fname) /* Create 11 attributes for the dataset */ for (i = 1; i <= (THRES_NUM + 1); i++) { - HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i); + snprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i); if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; if (H5Aclose(attr_id) < 0) @@ -239,7 +239,7 @@ gen_threshold_file(const char *fname) /* Create 10 attributes for the 2-D dataset */ for (i = 1; i <= THRES_NUM; i++) { - HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i); + snprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i); if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; if (H5Aclose(attr_id) < 0) @@ -263,7 +263,7 @@ gen_threshold_file(const char *fname) /* Create 10 1-D datasets with non-zero dimension size for the group */ for (i = 1; i <= THRES_NUM; i++) { /* set up dataset name */ - HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i); + snprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i); /* Create the dataset */ if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -285,7 +285,7 @@ gen_threshold_file(const char *fname) /* Create 25 attributes for the group */ for (i = 1; i <= THRES_NUM_25; i++) { /* Set up attribute name */ - HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_GRP_NAME, i); + snprintf(name, sizeof(name), "%s%d", THRES_ATTR_GRP_NAME, i); /* Create the attribute */ if ((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -307,7 +307,7 @@ gen_threshold_file(const char *fname) /* Create 9 1-D datasets with non-zero dimension size for the group */ for (i = 1; i < THRES_NUM; i++) { /* set up dataset name */ - HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i); + snprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i); /* Create the dataset */ if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c index bcf9a42..8abd4e5 100644 --- a/tools/test/misc/clear_open_chk.c +++ b/tools/test/misc/clear_open_chk.c @@ -47,7 +47,7 @@ main(int argc, char *argv[]) } /* Get the file name */ - fname = HDstrdup(argv[1]); + fname = strdup(argv[1]); /* Try opening the file */ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) { diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 1698f4a..dd4c88d 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -421,7 +421,7 @@ main(void) if ((my_fapl = H5Pcopy(fapl2)) < 0) goto error; /* Create the file */ - HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[0]); + snprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[0]); if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) goto error; @@ -446,7 +446,7 @@ main(void) goto error; /* Create the file */ - HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[1]); + snprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[1]); if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) goto error; diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c index 24d0581..7756914 100644 --- a/tools/test/misc/h5perf_gentest.c +++ b/tools/test/misc/h5perf_gentest.c @@ -103,7 +103,7 @@ main(int argc, char *argv[]) } if (strlen(fname) <= 0) - HDsnprintf(fname, sizeof(fname), FNAME); + snprintf(fname, sizeof(fname), FNAME); create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows, (hsize_t)dim0, (hsize_t)chunk, vlen, z, l); @@ -322,7 +322,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); add_attrs(fid, 0); - HDsnprintf(name, sizeof(name), "a cmp ds of %d rows", nrows); + snprintf(name, sizeof(name), "a cmp ds of %d rows", nrows); did = H5Dcreate(fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large); add_attrs(did, 0); @@ -342,7 +342,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz add_attrs(gid1, 0); for (i = 0; i < ngrps; i++) { /* create sub groups */ - HDsnprintf(name, sizeof(name), "g%02d", i); + snprintf(name, sizeof(name), "g%02d", i); gid2 = H5Gcreate(gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (i < 10) add_attrs(gid2, 0); @@ -355,14 +355,14 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz add_attrs(gid1, 0); for (j = 0; j < ndsets; j += 12) { /* 1 add a null dataset */ - HDsnprintf(name, sizeof(name), "%05d null dataset", j); + snprintf(name, sizeof(name), "%05d null dataset", j); did = H5Dcreate(gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (!j) add_attrs(did, j); H5Dclose(did); /* 2 add scalar int point */ - HDsnprintf(name, sizeof(name), "%05d scalar int point", j); + snprintf(name, sizeof(name), "%05d scalar int point", j); did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j); if (!j) @@ -370,7 +370,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 3 scalar vlen string */ - HDsnprintf(name, sizeof(name), "%05d scalar vlen string", j); + snprintf(name, sizeof(name), "%05d scalar vlen string", j); did = H5Dcreate(gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]); if (!j) @@ -378,7 +378,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 4 add fixed-length float array */ - HDsnprintf(name, sizeof(name), "%05d fixed-length float array", j); + snprintf(name, sizeof(name), "%05d fixed-length float array", j); did = H5Dcreate(gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a); if (!j) @@ -386,7 +386,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 5 add fixed-length strings */ - HDsnprintf(name, sizeof(name), "%05d fixed-length strings", j); + snprintf(name, sizeof(name), "%05d fixed-length strings", j); did = H5Dcreate(gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str); if (!j) @@ -394,7 +394,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 6 add compound data */ - HDsnprintf(name, sizeof(name), "%05d compound data", j); + snprintf(name, sizeof(name), "%05d compound data", j); did = H5Dcreate(gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp); if (!j) @@ -402,7 +402,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 7 add 2D double */ - HDsnprintf(name, sizeof(name), "%05d 2D double", j); + snprintf(name, sizeof(name), "%05d 2D double", j); strcpy(tmp_name1, name); did = H5Dcreate(gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]); @@ -411,7 +411,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 8 add 1D int array */ - HDsnprintf(name, sizeof(name), "%05d 1D int array", j); + snprintf(name, sizeof(name), "%05d 1D int array", j); did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int); if (!j) @@ -419,7 +419,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 9 add vlen int array */ - HDsnprintf(name, sizeof(name), "%05d vlen int array", j); + snprintf(name, sizeof(name), "%05d vlen int array", j); strcpy(tmp_name2, name); did = H5Dcreate(gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i); @@ -428,7 +428,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Dclose(did); /* 10 add vlen strings */ - HDsnprintf(name, sizeof(name), "%05d vlen strings", j); + snprintf(name, sizeof(name), "%05d vlen strings", j); strcpy(tmp_name3, name); did = H5Dcreate(gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT); H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s); @@ -439,7 +439,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz /* 11 add object refs */ H5Rcreate(&buf_ref[0], gid1, ".", H5R_OBJECT, (hid_t)-1); H5Rcreate(&buf_ref[1], gid1, tmp_name3, H5R_OBJECT, (hid_t)-1); - HDsnprintf(name, sizeof(name), "%05d obj refs", j); + snprintf(name, sizeof(name), "%05d obj refs", j); did = H5Dcreate(gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref); if (!j) @@ -454,7 +454,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz H5Sselect_hyperslab(sid_1d, H5S_SELECT_SET, &start, &stride, &count, NULL); H5Rcreate(&buf_reg_ref[1], gid1, tmp_name2, H5R_DATASET_REGION, sid_1d); H5Sselect_none(sid_1d); - HDsnprintf(name, sizeof(name), "%05d region refs", j); + snprintf(name, sizeof(name), "%05d region refs", j); did = H5Dcreate(gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref); if (!j) @@ -570,11 +570,11 @@ add_attrs(hid_t oid, int idx) /* 1 scalar point */ sid = H5Screate(H5S_SCALAR); - HDsnprintf(name, sizeof(name), "%05d scalar int", idx); + snprintf(name, sizeof(name), "%05d scalar int", idx); nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i); - HDsnprintf(name, sizeof(name), "%05d scalar ulong", idx); + snprintf(name, sizeof(name), "%05d scalar ulong", idx); nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l); - HDsnprintf(name, sizeof(name), "%05d scalar str", idx); + snprintf(name, sizeof(name), "%05d scalar str", idx); tid = H5Tcopy(H5T_C_S1); H5Tset_size(tid, H5T_VARIABLE); nattrs += add_attr(oid, name, tid, sid, &s[2]); @@ -584,24 +584,24 @@ add_attrs(hid_t oid, int idx) /* 4 single point */ sid = H5Screate_simple(1, dims1, NULL); H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1); - HDsnprintf(name, sizeof(name), "%05d single float", idx); + snprintf(name, sizeof(name), "%05d single float", idx); nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f); - HDsnprintf(name, sizeof(name), "%05d single double", idx); + snprintf(name, sizeof(name), "%05d single double", idx); nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d); - HDsnprintf(name, sizeof(name), "%05d single obj_ref", idx); + snprintf(name, sizeof(name), "%05d single obj_ref", idx); nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref); H5Sclose(sid); /* 7 fixed length 1D array */ sid = H5Screate_simple(1, dims1, NULL); tid = H5Tarray_create(H5T_NATIVE_FLOAT, 1, dims2); - HDsnprintf(name, sizeof(name), "%05d array float", idx); + snprintf(name, sizeof(name), "%05d array float", idx); nattrs += add_attr(oid, name, tid, sid, &f_array[0]); H5Tclose(tid); tid = H5Tcopy(H5T_C_S1); H5Tset_size(tid, strlen(s[0]) + 1); tid1 = H5Tarray_create(tid, 1, dims2); - HDsnprintf(name, sizeof(name), "%05d array str", idx); + snprintf(name, sizeof(name), "%05d array str", idx); nattrs += add_attr(oid, name, tid1, sid, s); H5Tclose(tid1); H5Tclose(tid); @@ -610,7 +610,7 @@ add_attrs(hid_t oid, int idx) /* 9 fixed length 2D int arrays */ sid = H5Screate_simple(1, dims2, NULL); tid = H5Tarray_create(H5T_NATIVE_INT, 2, dims3); - HDsnprintf(name, sizeof(name), "%05d array int 2D", idx); + snprintf(name, sizeof(name), "%05d array int 2D", idx); nattrs += add_attr(oid, name, tid, sid, int3d[0][0]); H5Tclose(tid); H5Sclose(sid); @@ -619,12 +619,12 @@ add_attrs(hid_t oid, int idx) sid = H5Screate_simple(1, dims2, NULL); tid = H5Tcopy(H5T_C_S1); H5Tset_size(tid, H5T_VARIABLE); - HDsnprintf(name, sizeof(name), "%05d vlen strings", idx); + snprintf(name, sizeof(name), "%05d vlen strings", idx); nattrs += add_attr(oid, name, tid, sid, s_vlen); H5Tclose(tid); tid = H5Tvlen_create(H5T_NATIVE_INT); ; - HDsnprintf(name, sizeof(name), "%05d vlen int array", idx); + snprintf(name, sizeof(name), "%05d vlen int array", idx); nattrs += add_attr(oid, name, tid, sid, i_vlen); H5Tclose(tid); H5Sclose(sid); @@ -638,7 +638,7 @@ add_attrs(hid_t oid, int idx) offset += sizeof(H5T_NATIVE_INT); H5Tinsert(tid, "City", offset, tid1); offset += sizeof(char *); - HDsnprintf(name, sizeof(name), "%05d compound data", idx); + snprintf(name, sizeof(name), "%05d compound data", idx); nattrs += add_attr(oid, name, tid, sid, cmp_data); H5Tclose(tid1); H5Tclose(tid); diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c index 9f0eee1..a4a4ab1 100644 --- a/tools/test/misc/h5repart_gentest.c +++ b/tools/test/misc/h5repart_gentest.c @@ -34,11 +34,11 @@ main(void) /* Set up data array */ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) { - HDperror("calloc"); + perror("calloc"); exit(EXIT_FAILURE); } if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) { - HDperror("calloc"); + perror("calloc"); exit(EXIT_FAILURE); } for (i = 0; i < FAMILY_NUMBER; i++) @@ -46,28 +46,28 @@ main(void) /* Set property list and file name for FAMILY driver */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - HDperror("H5Pcreate"); + perror("H5Pcreate"); exit(EXIT_FAILURE); } if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) { - HDperror("H5Pset_fapl_family"); + perror("H5Pset_fapl_family"); exit(EXIT_FAILURE); } if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { - HDperror("H5Fcreate"); + perror("H5Fcreate"); exit(EXIT_FAILURE); } /* Create and write dataset */ if ((space = H5Screate_simple(2, dims, NULL)) < 0) { - HDperror("H5Screate_simple"); + perror("H5Screate_simple"); exit(EXIT_FAILURE); } if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDperror("H5Dcreate2"); + perror("H5Dcreate2"); exit(EXIT_FAILURE); } @@ -76,34 +76,34 @@ main(void) buf[i][j] = i * 10000 + j; if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) { - HDperror("H5Dwrite"); + perror("H5Dwrite"); exit(EXIT_FAILURE); } if (H5Sclose(space) < 0) { - HDperror("H5Sclose"); + perror("H5Sclose"); exit(EXIT_FAILURE); } if (H5Dclose(dset) < 0) { - HDperror("H5Dclose"); + perror("H5Dclose"); exit(EXIT_FAILURE); } if (H5Pclose(fapl) < 0) { - HDperror("H5Pclose"); + perror("H5Pclose"); exit(EXIT_FAILURE); } if (H5Fclose(file) < 0) { - HDperror("H5Fclose"); + perror("H5Fclose"); exit(EXIT_FAILURE); } free(buf); free(buf_data); - HDputs(" PASSED"); + puts(" PASSED"); fflush(stdout); return EXIT_SUCCESS; diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index 805b30b..2387be4 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -53,12 +53,12 @@ main(void) printf("%-70s", "Testing alignment in compound datatypes"); - HDstrcpy(string5, "Hi!"); + strcpy(string5, "Hi!"); HDunlink(fname); fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fil < 0) { - HDputs("*FAILED*"); + puts("*FAILED*"); return 1; } @@ -125,7 +125,7 @@ main(void) data = (char *)malloc(H5Tget_size(fix)); if (!data) { - HDperror("malloc() failed"); + perror("malloc() failed"); HDabort(); } @@ -138,7 +138,7 @@ main(void) out: if (error < 0) { result = 1; - HDputs("*FAILED - HDF5 library error*"); + puts("*FAILED - HDF5 library error*"); } else if (!(H5_FLT_ABS_EQUAL(fok[0], fptr[0])) || !(H5_FLT_ABS_EQUAL(fok[1], fptr[1])) || !(H5_FLT_ABS_EQUAL(fnok[0], fptr[2])) || !(H5_FLT_ABS_EQUAL(fnok[1], fptr[3]))) { @@ -179,10 +179,10 @@ out: " %6f = %f\n", (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1], (double)fnok[0], (double)fptr[2], (double)fnok[1], (double)fptr[3]); - HDputs("*FAILED - compound type alignmnent problem*"); + puts("*FAILED - compound type alignmnent problem*"); } else { - HDputs(" PASSED"); + puts(" PASSED"); } if (data) diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index bc15fdf..a0dd294 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -158,7 +158,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "fill raw"); for (u = 0; u < nwrite; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); memset(the_data, 0xAA, (size_t)(size[0] * size[1])); } @@ -166,7 +166,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("fill raw", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -181,7 +181,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "fill hdf5"); for (u = 0; u < nread; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); assert(status >= 0); @@ -190,7 +190,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("fill hdf5", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -205,7 +205,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "out raw"); for (u = 0; u < nwrite; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); assert(0 == offset); @@ -216,7 +216,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("out raw", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -231,7 +231,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "out hdf5"); for (u = 0; u < nwrite; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data); assert(status >= 0); @@ -240,7 +240,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("out hdf5", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -255,7 +255,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "in raw"); for (u = 0; u < nread; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); assert(0 == offset); @@ -266,7 +266,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("in raw", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -281,7 +281,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "in hdf5"); for (u = 0; u < nread; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); assert(status >= 0); @@ -290,7 +290,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("in hdf5", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, @@ -310,7 +310,7 @@ main(void) t_start = H5_get_time(); fprintf(stderr, HEADING, "in hdf5 partial"); for (u = 0; u < nread; u++) { - HDputc(PROGRESS, stderr); + putc(PROGRESS, stderr); fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); assert(status >= 0); @@ -319,7 +319,7 @@ main(void) getrusage(RUSAGE_SELF, &r_stop); #endif t_stop = H5_get_time(); - HDputc('\n', stderr); + putc('\n', stderr); print_stats("in hdf5 partial", #ifdef H5_HAVE_GETRUSAGE &r_start, &r_stop, diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index 6762f7c..4f1863d 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -280,7 +280,7 @@ create_dsets(hid_t file) * Create a dataset using the default dataset creation properties. */ for (i = 0; i < NUM_DSETS; i++) { - HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i); + snprintf(dset_name, sizeof(dset_name), "dataset %d", i); if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; @@ -337,14 +337,14 @@ create_attrs_1(void) * Create all(user specifies the number) attributes for each dataset */ for (i = 0; i < NUM_DSETS; i++) { - HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i); + snprintf(dset_name, sizeof(dset_name), "dataset %d", i); open_t.start = retrieve_time(); if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0) goto error; perf(&open_t, open_t.start, retrieve_time()); for (j = 0; j < NUM_ATTRS; j++) { - HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j); + snprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j); attr_t.start = retrieve_time(); if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -433,7 +433,7 @@ create_attrs_2(void) * Create all(user specifies the number) attributes for each new dataset */ for (i = 0; i < NUM_DSETS; i++) { - HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i); + snprintf(dset_name, sizeof(dset_name), "dataset %d", i); create_t.start = retrieve_time(); if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -441,7 +441,7 @@ create_attrs_2(void) perf(&create_t, create_t.start, retrieve_time()); for (j = 0; j < NUM_ATTRS; j++) { - HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j); + snprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j); attr_t.start = retrieve_time(); if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -539,14 +539,14 @@ create_attrs_3(void) for (i = 0; i < loop_num; i++) { for (j = 0; j < NUM_DSETS; j++) { - HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", j); + snprintf(dset_name, sizeof(dset_name), "dataset %d", j); open_t.start = retrieve_time(); if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0) goto error; perf(&open_t, open_t.start, retrieve_time()); for (k = 0; k < BATCH_ATTRS; k++) { - HDsnprintf(attr_name, sizeof(attr_name), "some attrs for each dset %d %d", i, k); + snprintf(attr_name, sizeof(attr_name), "some attrs for each dset %d %d", i, k); attr_t.start = retrieve_time(); if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0) diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 61bb6c0..85c41a1 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -85,7 +85,7 @@ error(const char *fmt, ...) va_start(ap, fmt); fprintf(stderr, "%s: error: ", prog); H5_GCC_CLANG_DIAG_OFF("format-nonliteral") - HDvfprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); H5_GCC_CLANG_DIAG_ON("format-nonliteral") fprintf(stderr, "\n"); va_end(ap); @@ -140,7 +140,7 @@ write_file(Bytef *source, uLongf sourceLen) int rc = (int)HDwrite(output, d_ptr, (size_t)d_len); if (rc == -1) - error(HDstrerror(errno)); + error(strerror(errno)); if (rc == (int)d_len) break; @@ -207,19 +207,19 @@ get_unique_name(void) if (prefix) /* 2 = 1 for '/' + 1 for null terminator */ - filename = (char *)malloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2); + filename = (char *)malloc(strlen(prefix) + strlen(ZIP_PERF_FILE) + 2); else - filename = (char *)malloc(HDstrlen(ZIP_PERF_FILE) + 1); + filename = (char *)malloc(strlen(ZIP_PERF_FILE) + 1); if (!filename) error("out of memory"); filename[0] = 0; if (prefix) { - HDstrcpy(filename, prefix); - HDstrcat(filename, "/"); + strcpy(filename, prefix); + strcat(filename, "/"); } - HDstrcat(filename, ZIP_PERF_FILE); + strcat(filename, ZIP_PERF_FILE); } /* @@ -316,13 +316,13 @@ fill_with_random_data(Bytef *src, uLongf src_len) fprintf(stdout, "Using /dev/urandom for random data\n"); if (fd < 0) - error(HDstrerror(errno)); + error(strerror(errno)); for (;;) { ssize_t rc = HDread(fd, buf, src_len); if (rc == -1) - error(HDstrerror(errno)); + error(strerror(errno)); if (rc == (ssize_t)len) break; @@ -391,7 +391,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(HDstrerror(errno)); + error(strerror(errno)); for (i = 0; i <= iters; ++i) { Bytef *s_ptr = src; @@ -402,7 +402,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long ssize_t rc = HDwrite(output, s_ptr, s_len); if (rc == -1) - error(HDstrerror(errno)); + error(strerror(errno)); if (rc == (ssize_t)s_len) break; @@ -427,7 +427,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(HDstrerror(errno)); + error(strerror(errno)); report_once_flag = 1; HDgettimeofday(&timer_start, NULL); |