diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 23:38:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 23:38:50 (GMT) |
commit | e286b6e706b28330a64115c13c11ae832536b857 (patch) | |
tree | a7fdc80d328010b9c6671829f8b19ea433a4380c /hl/test/test_table.c | |
parent | 41a6b581aef055821796fc9d31f58778dc1c4197 (diff) | |
download | hdf5-e286b6e706b28330a64115c13c11ae832536b857.zip hdf5-e286b6e706b28330a64115c13c11ae832536b857.tar.gz hdf5-e286b6e706b28330a64115c13c11ae832536b857.tar.bz2 |
Sync high-level library with develop (#3298)
Diffstat (limited to 'hl/test/test_table.c')
-rw-r--r-- | hl/test/test_table.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 06e07b8..c475e7f 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -150,7 +150,7 @@ h5file_open(const char *fname, unsigned flags) static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf) { - if ((HDstrcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati || + if ((strcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati || rbuf[i].longi != wbuf[j].longi || !H5_FLT_ABS_EQUAL(rbuf[i].pressure, wbuf[j].pressure) || !H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) { fprintf(stderr, "read and write buffers have differences\n"); @@ -477,9 +477,9 @@ test_table(hid_t fid, int do_write) *------------------------------------------------------------------------- */ if (do_write) - HDstrcpy(tname, "table2"); + strcpy(tname, "table2"); else - HDstrcpy(tname, "table1"); + strcpy(tname, "table1"); rstart = 0; rrecords = 8; @@ -617,7 +617,7 @@ test_table(hid_t fid, int do_write) wbufd[i].longi = wbuf[i].longi; wbufd[i].pressure = wbuf[i].pressure; wbufd[i].temperature = wbuf[i].temperature; - HDstrcpy(wbufd[i].name, wbuf[i].name); + strcpy(wbufd[i].name, wbuf[i].name); } if (H5TBmake_table(TITLE, fid, "table3", FIELDS, RECORDS, type_size_mem, field_names, field_offset, @@ -823,7 +823,7 @@ test_table(hid_t fid, int do_write) nrecords = 3; if (H5TBdelete_record(fid, "table", start, nrecords) < 0) goto out; - ; + /* Get table info */ if (H5TBget_table_info(fid, "table", &nfields_out, &nrecords_out) < 0) goto out; @@ -1130,7 +1130,7 @@ test_table(hid_t fid, int do_write) /* Compare the extracted table with the initial values */ for (i = 0; i < NRECORDS; i++) { - if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) || + if ((strcmp(namepre_out[i].name, namepre_in[i].name) != 0) || !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) { goto out; } @@ -1138,7 +1138,7 @@ test_table(hid_t fid, int do_write) /* reset buffer */ for (i = 0; i < NRECORDS; i++) { - HDstrcpy(namepre_out[i].name, "\0"); + strcpy(namepre_out[i].name, "\0"); namepre_out[i].pressure = -1; } @@ -1155,7 +1155,7 @@ test_table(hid_t fid, int do_write) /* Compare the extracted table with the initial values */ for (i = 0; i < 3; i++) { hsize_t iistart = start; - if ((HDstrcmp(namepre_out[i].name, namepre_in[iistart + i].name) != 0) || + if ((strcmp(namepre_out[i].name, namepre_in[iistart + i].name) != 0) || !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[iistart + i].pressure)) { goto out; } @@ -1318,7 +1318,7 @@ test_table(hid_t fid, int do_write) /* compare the extracted table with the initial values */ for (i = 0; i < NRECORDS; i++) { - if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) || + if ((strcmp(namepre_out[i].name, namepre_in[i].name) != 0) || !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) { goto out; } @@ -1326,7 +1326,7 @@ test_table(hid_t fid, int do_write) /* reset buffer */ for (i = 0; i < NRECORDS; i++) { - HDstrcpy(namepre_out[i].name, "\0"); + strcpy(namepre_out[i].name, "\0"); namepre_out[i].pressure = -1; } @@ -1347,7 +1347,7 @@ test_table(hid_t fid, int do_write) /* compare the extracted table with the initial values */ for (i = 0; i < 3; i++) { int iistart = (int)start; - if ((HDstrcmp(namepre_out[i].name, wbuf[iistart + (int)i].name) != 0) || + if ((strcmp(namepre_out[i].name, wbuf[iistart + (int)i].name) != 0) || !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, wbuf[iistart + (int)i].pressure)) { goto out; } @@ -1383,7 +1383,7 @@ test_table(hid_t fid, int do_write) /* compare the extracted table with the original array */ for (i = 0; i < NRECORDS; i++) { - if ((HDstrcmp(rbuf2[i].name, wbuf[i].name) != 0) || rbuf2[i].lati != wbuf[i].lati || + if ((strcmp(rbuf2[i].name, wbuf[i].name) != 0) || rbuf2[i].lati != wbuf[i].lati || rbuf2[i].longi != wbuf[i].longi || !H5_FLT_ABS_EQUAL(rbuf2[i].pressure, wbuf[i].pressure) || !H5_DBL_ABS_EQUAL(rbuf2[i].temperature, wbuf[i].temperature) || rbuf2[i].new_field != buf_new[i]) { @@ -1419,7 +1419,7 @@ test_table(hid_t fid, int do_write) /* compare the extracted table with the original array */ for (i = 0; i < NRECORDS; i++) { - if ((HDstrcmp(rbuf3[i].name, wbuf[i].name) != 0) || rbuf3[i].lati != wbuf[i].lati || + if ((strcmp(rbuf3[i].name, wbuf[i].name) != 0) || rbuf3[i].lati != wbuf[i].lati || rbuf3[i].longi != wbuf[i].longi || !H5_DBL_ABS_EQUAL(rbuf3[i].temperature, wbuf[i].temperature)) { goto out; @@ -1473,7 +1473,7 @@ test_table(hid_t fid, int do_write) goto out; for (i = 0; i < NFIELDS; i++) { - if ((HDstrcmp(field_names[i], names_out[i]) != 0)) { + if ((strcmp(field_names[i], names_out[i]) != 0)) { goto out; } } @@ -1515,7 +1515,7 @@ main(void) /* create a file using default properties */ fid = H5Fcreate("test_table.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDputs("Testing table with file creation mode (read/write in native architecture):"); + puts("Testing table with file creation mode (read/write in native architecture):"); /* test, do write */ if (test_table(fid, 1) < 0) @@ -1528,7 +1528,7 @@ main(void) * test2: open a file written in test1 on a big-endian machine *------------------------------------------------------------------------- */ - HDputs("Testing table with file open mode (read big-endian data):"); + puts("Testing table with file open mode (read big-endian data):"); fid = h5file_open(TEST_FILE_BE, flags); @@ -1543,7 +1543,7 @@ main(void) * test3: open a file written in test1 on a little-endian machine *------------------------------------------------------------------------- */ - HDputs("Testing table with file open mode (read little-endian data):"); + puts("Testing table with file open mode (read little-endian data):"); fid = h5file_open(TEST_FILE_LE, flags); @@ -1558,7 +1558,7 @@ main(void) * test4: open a file written in test1 on the Cray T3 machine *------------------------------------------------------------------------- */ - HDputs("Testing table with file open mode (read Cray data):"); + puts("Testing table with file open mode (read Cray data):"); fid = h5file_open(TEST_FILE_CRAY, flags); |